jack: (Default)
[personal profile] jack
OK, so before the bizarre misunderstandings in my previous post, I had been going to repost question which I thought was an interesting logic puzzle in its own right.

You have five bags of holding. One contains a fabulous treasure. Two contain liches who can't escape until you open the bag. Two contain nothing.

You have a spell which tells you something about the result of a course of action you propose. (This description is slightly altered from the functionality of the original spell to make the puzzle work, feel free to ask for clarification as needed.)

"Weal" for good result (eg. treasure, no liches)
"Woe" for bad result (eg. 1+ lich, no treasure)
"Weal and Woe" for a good and bad result (eg. treasure and also lich)
"Nothing" for a result of no particular good or bad (eg. open no bags or only open empty bags)

Puzzle

What's the minimum number of castings of the spell needed? (I think 3 is easy and 1 is impossible, so basically, can you do 2?)

Clarifications

The course of action has to be 30 minutes or less.

We don't have specifics on how you define the course of action, ask if it needs to be more explicit.

Assume you can include other results in the plan if they help, eg. "if this bad contains nothing, I stab myself in the leg", without necessarily needing to follow through. (This is slightly more generous than the original spell.)

Assume you don't include the castings of further divination spells within the scope of the course of action considered by casting the first spell.

Follow-ups (may be unnecessary depending on the best solution to the original)

If you only have one casting, what's the greatest chance you can give yourself of finding the treasure whilst finding no liches.

The original restrictions of the spell say that if you cast it four times in a day (ignored for the basic puzzle), the second, third and fourth times have a 25%, 50% and 75% chance of giving a random answer. What's the highest chance you can give yourself of finding the treasure and no liches in up to four castings with those failure chances.

Previously we assumed you couldn't create a paradox. If you *can*, and causing a paradox causes the spell to fail to give an answer in a way distinct from "nothing", can you reduce the number of castings?

If you *can* ask about a course of action including further divination spells, does that help?

Does the answer generalise to a larger number of bags (assuming 1 treasure, N liches and N nothing)

ETA: Fix formatting.

Date: 2017-06-14 03:37 pm (UTC)
From: [identity profile] khoth.livejournal.com
If I open a bag and it contains a lich, can I continue to open another bag or do I need to stop to get murdered first?

Date: 2017-06-14 06:27 pm (UTC)
simont: A picture of me in 2016 (Default)
From: [personal profile] simont
But I'd be interested to know if you can avoid that being a problem

I think so, yes.

I solved this in my head while walking home. My initial solution, which does have the 'yes but what if liches are instantly fatal?' problem, went like this:

Lbhe svefg dhrel cebprqher vf "V bcra ontf bar naq gjb". Vs lbh urne "jrny", jvgu be jvgubhg "jbr", gura bar bs gubfr gjb ontf vf gur gernfher, fb dhrel #2 vf "V bcra ont bar" naq abj lbh xabj rknpgyl jurer gur gernfher vf. Vs lbh urne whfg "jbr" gura lbh xabj gur erznvavat guerr ontf vapyhqr gur gernfher naq _ng zbfg bar_ yvpu, juvpu zrnaf lbh pna hfr dhrel #2 gb nfx nobhg bcravat gubfr guerr ontf va fbzr cnegvphyne beqre, naq vs gur nafjre gb gung vf abg "jrny" gura bcravat gurz va gur bccbfvgr beqre zhfg or fnsr (orpnhfr gurer pna'g or n yvpu ba _obgu_ fvqrf bs gur gernfher). Gur erznvavat cbffvovyvgl vf gung lbh svaq bhg gung gur svefg gjb ontf ner rzcgl, v.r. gur erznvavat guerr ontf pbagnva gur gernfher naq _obgu_ yvpurf; va gung pnfr, dhrel #2 vf "V bcra bar bs gur erznvavat ontf, naq vs vg'f abg gur gernfher, V bcra n frpbaq bar"; gura nafjre "jrny" zrnaf gur gernfher vf va gur svefg ont lbh vzntvarq bcravat, "jrny naq jbr" zrnaf gur frpbaq, naq cynva "jbr" zrnaf vg'f va gur ont lbh unira'g zragvbarq ng nyy. Ohg gur zvqqyr pnfr bs gung ynfg cbffvovyvgl qbrf nffhzr gung bcravat bar ont naq svaqvat n yvpu fgvyy nyybjf lbh gb bcra n frpbaq ont.

A revised procedure which works even if liches are instantly fatal goes like this:

Lbhe svefg dhrel vf abj "V bcra ontf bar naq gjb, naq vs gurl ner obgu rzcgl, V bcra ont guerr". Abj vs V urne "jrny", gura V fvzcyl _qb gung_ naq jvyy trg gur gernfher. Vs V urne "jrny naq jbr" gura gur gernfher zhfg unir orra va bar bs gur svefg gjb ontf (orpnhfr V xabj ng yrnfg gjb bs gur guerr jrer aba-rzcgl, fb V jbhyqa'g unir bcrarq ont guerr naljnl), juvpu vf bar bs gur rnfl pnfrf sebz gur cerivbhf irefvba. Naq vs V urne "jbr", gura _rvgure_ gur yvpurf ner va ontf bar naq gjb – va juvpu pnfr vg qbrfa'g znggre jung beqre V bcra gur erznvavat guerr va – be ryfr bar bs gur yvpurf vf va ont guerr, va juvpu pnfr V chg ont guerr va gur _zvqqyr_ bs gur beqre gung V nfx nobhg va dhrel #2, naq gung thnenagrrf gung V pna'g cbffvoyl eha vagb gur bar qnatrebhf beqre (yvpu,gernfher,yvpu) jubfr erirefny vf _nyfb_ qnatrebhf.

However, a final quibble: this still assumes something about the nature and behaviour of liches, namely, that they are either instantly fatal or have no short-term effect at all. I think there may still be trouble if the effect of freeing a lich is that it instantly mind-controls you and forces you to open all the remaining bags (including its mate and the treasure) and then swans off leaving you alive – because in that situation there is no way you can get the answer "woe" at all, and your information is much reduced!

Date: 2017-06-15 10:43 am (UTC)
ptc24: (Default)
From: [personal profile] ptc24
So, assuming you're a lich that's just about to be stuffed into a bag of holding in order to be included in one of these puzzles, and you can credibly precommit to taking various courses of action (which you will then definitely follow through on) - what might you want to pre-commit to?

Date: 2017-06-15 10:49 am (UTC)
simont: A picture of me in 2016 (Default)
From: [personal profile] simont
So, assuming you're a lich-hunter who stuffs liches into bags of holding and sells them to logic-puzzle setters and hypothetical-situation manufacturers, this is why you have to sneak up on your target and render it unconscious instantly without giving it enough advance warning to precommit to anything :-)

Date: 2017-06-15 12:02 pm (UTC)
ptc24: (Default)
From: [personal profile] ptc24
Presumably lich = genie + devil - fairy.

So with genies and fairies, any deals you do, you have to have your wits about you lest you end up with a comedically bad deal, but the deals aren't tragically doomed in the way that deals with the devil are.

Date: 2017-06-15 11:03 pm (UTC)
ilanin: (Default)
From: [personal profile] ilanin
"I will help them locate the treasure and then leave them unmolested for a period of 30 minutes. In the 31st minute, I shall kill them and steal the treasure."