34
$\begingroup$

Inspired by the Skull Game in StoneStory RPG.

You make a deal with the Devil. You are granted your deepest desire, in exchange, eventually, for your eternal soul. Every year, on your birthday, he arrives at midnight to play a game. A fiery glow illuminates the room. If you win, you live another year. If you lose, he takes your soul immediately. The Devil does not cheat, but he does not play fairly either.

On the table between you and the Devil are three shells, no... skulls, and a solitary bead, at least you're telling yourself it's a bead. The three skulls are identical, except one has a gold tooth, gleaming in the light, distinguishing it from the other two skulls.

The skulls are in a line on the table (positions left, centre and right.) You watch him take the bead and place it under one of the skulls. He explains that he will now swap the position of two skulls, either left and centre, or right and centre, many times. The light goes out, you can't see a thing. You can only hear as the skulls slide across the table. Thankfully you can count how many times a swap was made, more than a hundred! The fiery glow returns. You see the three skulls in front of you, including the gold tooth.

You choose a skull. The Devil lifts it, revealing the bead. Disappointed, he vanishes, plunging the room back into darkness. It's difficult to sleep with the smell of sulphur in the air... and with the excitement that now you know that you can live forever!

What is your strategy to win the game every time and live forever?

  • The three skulls are originally in random order. The gold tooth is visible.
  • The bead is originally placed under any of the three skulls, and you know which one.
  • You know exactly how many swaps were made, but not which pair of skulls were swapped.
  • Each swap swaps the positions of either the left and centre skulls, or the right and centre skulls, but never the left and right skulls.
  • The bead remains in the skull it started in.
  • The gold tooth is visible at the end of the game.
  • The Devil does not cheat.
$\endgroup$
6
  • $\begingroup$ I believe there is a card trick that works in a similar way to this. Now if only I could remember how to do it.... $\endgroup$ Commented Feb 19 at 23:43
  • $\begingroup$ I noticed that too in StoneRPG! Was fun while it lasted. Now I'm at the stage where it feels too grindy $\endgroup$
    – justhalf
    Commented Feb 20 at 14:11
  • 2
    $\begingroup$ The devil does not play fair. If you live so long, time will come to an end and the Devil will be thrown into the abyss for the last time and you with him. $\endgroup$
    – Joshua
    Commented Feb 20 at 23:26
  • $\begingroup$ Could you clarify this detail: "swap the position of two skulls, either left and centre, or right and centre, many times"? For this set S = {lc, rc} of swaps, this can mean either: (1) a sequence (s₁, s₂, ..., sₙ): sᵢ ∈ S of any such swaps; or (2) a dichotomy between the sequence of exclusively the one swap (lc, lc, ..., lc) or the other (rc, rc, ..., rc). Put another way: situation (2) implies the Devil always swaps the same two skulls. $\endgroup$
    – Greg
    Commented Feb 22 at 22:34
  • 1
    $\begingroup$ @mountrix Thanks for clarifying! I suspected as much, but it's always best to make certain. $\endgroup$
    – Greg
    Commented Feb 23 at 16:36

6 Answers 6

35
$\begingroup$

Do we need the restriction that left and right can not be swapped directly?

If the bead is in the tooth skull at the start, then it's in the tooth skull at the end. Trivial.

If not, imagine the three skulls are placed equally spaced around a circle. Each swap goes between "tooth, bead, neither arranged clockwise" and "tooth, bead, neither arranged counter-clockwise".
You know whether it starts clockwise or ccw. You know whether there are odd or even swaps. That tells you whether it ends clockwise or ccw.
You know where the tooth is; you know whether it's cw or ccw; that tells you where the bead is.

$\endgroup$
3
  • $\begingroup$ I like your explanation and how it negates that rule! I did wonder if it was necessary but couldn't prove it. $\endgroup$ Commented Feb 20 at 8:24
  • $\begingroup$ Note this generalizes to an n-skull game: suppose you have n-2 skulls labeled 1 through n-2, and two unlabeled skulls. By knowing the parity of the permutation, you can always label the last two skulls and find the bead. $\endgroup$ Commented Feb 25 at 7:03
  • $\begingroup$ A variation of this puzzle fooled Penn & Teller. In that case it was rock, paper, scissors instead of skull with gold tooth, skull with bead, skull with nothing, but the answer was still based on the parity of the number of swaps. $\endgroup$ Commented Mar 2 at 2:35
13
$\begingroup$

Setting aside the trivial case where the bead is under the skull with the gold tooth, we observe that:

The condition that the left and right skulls cannot be swapped enforces the result that a skull can only move to an adjacent spot in an odd number of moves, and can only move two spots away or return to its starting position in an even number of swaps.

So given that we know the starting and ending position of the gold skull, the starting position of the bead, and the total number of swaps:

There are a few cases to examine. If the gold skull is in its original position, then it was involved in an even number of swaps. If the total number of swaps is also even, then the other two skulls were swapped an even number of times, and therefore the bead is back where it began; on the other hand if the total number of swaps is odd, then the other two skulls were swapped an odd number of times and the bead has moved to the other position.

If the gold skull has moved to the space where the bead originally started, then we can consider them to have swapped. If they were originally adjacent, this would account for one swap (or more generally, an odd number of swaps); if they were originally at opposite ends this would account for an even number of swaps. Similarly to before, we now compare to the total number of swaps to see whether the number of swaps between the other two skulls was odd or even. If it was even, then the bead is under the skull that is in the position where the gold skull began; if it was odd it is in the other position.

Finally if the gold skull has moved to the spot where neither it nor the bead originally started, the logic is similar to the prior cases. If it moved one space over, it was involved in an odd number of swaps, otherwise it was in an even number of swaps. As before, we figure out whether the swaps between the other two skulls was odd or even. If even, the bead is back where it started, otherwise it's in the other position.

Edited to add:

As an illustration of each of the different cases:

Start: Gold Bead X
End: Gold X X
Total swaps even: Bead is in position 2.
Total swaps odd: Bead is in position 3.

Start: Gold Bead X
End: X Gold X
Total swaps even: Bead is in position 3.
Total swaps odd: Bead is in position 1.

Start: Gold X Bead
End: X X Gold
Total swaps even: Bead is in position 1.
Total swaps odd: Bead is in position 2.

Start: Gold Bead X
End: X X Gold
Total swaps even: Bead is in position 2.
Total swaps odd: Bead is in position 1.

Start: Gold X Bead
End: X Gold X
Total swaps even: Bead is in position 1.
Total swaps odd: Bead is in position 3.

$\endgroup$
1
  • $\begingroup$ This is correct. I've chosen to give it to @ralphmerridew for their nicely generalised answer. $\endgroup$ Commented Feb 20 at 8:26
7
$\begingroup$

There are 6 possibilities for the skulls and bead to be in. In this answer, G is the gold tooth skull, A is the empty skull, and B is the skull with the bead under it. The six possibilities are:

1. AGB 2. BGA 3. BAG 4. GAB 5. GBA 6. ABG

I wrote those in a specific order. The odd numbers in the list can only be transformed into the even numbers and vice versa. BAG can only become AGB after at least 2 swaps. And notice that in each of the 3 odd options the G skull, which is the easily identifiable skull, is in each of the 3 positions exactly once. So if you know that you are in one of the odd positions, you know where the bead is based solely on where G is. This is also true for the even entries on the list.

Therefore:

You simply have to take note of the starting setup of the bead and gold tooth skull. This tells you if you are starting in an even entry or an odd entry. Then as you hear him make a swap simply change which position you are in. If you start odd, you hear a swap, you change in your mind to even and so on. This ensures that when he stops, you know exactly which 3 situations you are in. Then select the correct GB pair.

$\endgroup$
5
  • $\begingroup$ it's not possible to swap left and right skulls, but that's what you doing to go from 1 to 2 (or 3 to 4, or 5 to 6) $\endgroup$ Commented Feb 20 at 8:03
  • 2
    $\begingroup$ @AloisChristen he never said that it would be possible to go from 1 to 2. Just that it goes from an even to an odd position. In any case, it proves that even when swapping left and right is allowed this still works $\endgroup$
    – Ivo
    Commented Feb 20 at 8:24
  • 1
    $\begingroup$ Yeah, I honestly misread the swaps. I thought all 3 swaps were possible. But regardless, my solution still works. You could restrict it to saying that the gold tooth skull is involved in every swap. It doesn't matter. The point is that so long as you know what list your start position is in, and if you had an even or odd number of swaps, the gold tooth position tells you where the bead is. $\endgroup$
    – Truej
    Commented Feb 20 at 20:02
  • 1
    $\begingroup$ Can you share your thought process while coming up with the order? $\endgroup$
    – SajanGohil
    Commented Feb 26 at 10:52
  • 1
    $\begingroup$ @SajanGohil sure. I started with AGB. Then I looked at all 3 possible swaps. That gives us BGA, GAB, and ABG. Then I did each of the 3 swaps on each of those 3 options. That gave me the remaining two. I drew out a map showing your possible paths through the 6 options. That led me to the understanding that you can seperate the map into 2 sections, where you have to go from one to the other. From there it was simply noticing that the G<->B locations combination was unique for each of the 3 options so long as you knew which map section you were in. $\endgroup$
    – Truej
    Commented Feb 28 at 14:38
6
$\begingroup$

My solution's not as neat as ralphmerridew's because it relies on the fact that the outer two skulls can't be swapped:

As noted elsewhere, the case where the bead is under the gold tooth skull is trivial: pick that one.

Ignoring the gold coin skull's position, the bead skull is either the one on the left or right. Any swap involving the gold coin skull doesn't alter this fact: only swaps that don't involve the gold coin skull will switch their order. Since we know the parity of the number of swaps and we know the parity of the number of gold skull swaps (Equal to the parity of how many spaces it's moved), we can subtract the latter from the former to get the parity of the swaps involving our two candidate skulls. If there's an even number of these, our bead is still on the left/right. If odd, it's the other one.

$\endgroup$
3
  • $\begingroup$ That's easiest to understand and remember. Issue is I doubt I can count precisely the number of swaps :( $\endgroup$ Commented Feb 20 at 14:58
  • 1
    $\begingroup$ You can actually make this work even if the outer two skulls can be swapped - because swapping positions (1,3) is the same as swapping (1,2) then (2,3) then (1,2) again, and your reasoning isn't affected by the difference :) $\endgroup$
    – psmears
    Commented Feb 21 at 10:34
  • $\begingroup$ @psmears, you're right, I hadn't considered that if the gold tooth skull is involved in a swap between (1,3) then it moves two spaces, keeping its displacement the same parity while switching the other two skulls' order. Neat, thanks! $\endgroup$
    – Goldstein
    Commented Feb 21 at 15:20
1
$\begingroup$

A basic algorithm is the following one. There is a wrapping mechanism here: for skulls ordered as A, B, C, the skull at the left of C is B, and the skull at the right of C is A. The solution is equivalent to the post of @ralphmerridew.

- if the bead is under the gold tooth skull, take that one.

- if not, the bead, at the start, was at the right (resp. left) of the gold tooth skull.

- if the number of swaps is even, take the skull at the right (resp. left) of the gold tooth skull

- if the number of swaps is odd, take the skull at the left (resp. right) of the gold tooth skull

$\endgroup$
4
  • 4
    $\begingroup$ This is essentially the same as ralphmerridew's answer, just with right/left instead of clockwise/counter-clockwise. $\endgroup$ Commented Feb 20 at 21:05
  • $\begingroup$ Yes, I have found the algorithm on my own, but I will cite him in my answer $\endgroup$
    – mountrix
    Commented Feb 20 at 21:09
  • 4
    $\begingroup$ However, @mountrix, you are supposed to check existing answers before posting your own, to make sure that your answer won't essentially duplicate existing work. Duplicate answers don't add to the site. $\endgroup$
    – bobble
    Commented Feb 21 at 16:05
  • $\begingroup$ @JaapScherphuis: actually the solution of ralphmerridew is justifying the solution is correct, describe a lot of things you know, but not a straightforward "method" you can follow to directly find the right skull... $\endgroup$
    – mountrix
    Commented Feb 23 at 14:56
1
$\begingroup$

Assume that both left-center and right-center swaps can be used in the same game.

Let A and B be the regular skulls and G be the gold skull. Swapping is cyclical, so given the following starting configurations, it is easy to list all the possible permutations:

ABG, BGA, GAB (even) -> ABG, BGA, GAB
ABG, BGA, GAB (odd) -> AGB, BAG, GBA

AGB, BAG, GBA (even) -> AGB, BAG, GBA
AGB, BAG, GBA (odd) -> ABG, BGA, GAB

(A and B are arbitrary labels, so in fact the first group is identical to the second group with A and B swapped.)

The solution is then to identify which starting configuration is used based on the gold skull, and where the bead starts. Knowing the end position of the gold skull is then sufficient to identify how A and B were rearranged.

For example, if the starting configuration was XXG with the bead under the middle skull, if the ending configuration is GXX and an even number of swaps, the solutions is given from either ABG -> GAB or BAG -> GBA for even swaps. That means the (starting) left skull is now in the center and the (starting) center skull is now on the right, and therefore the bead is now on the right.

Also note, if you prefer you can read the configuration as clockwise or counter clockwise. This provides the missing detail to explain why the accepted answer works.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.