magic with 4 tools in positions switching

There are 4 tools, on a table, in a row:

spoon,tablespoon,fork,knife

in positions:

4,3,2,1 respectively.

The magician look at their initial arrangement and then turns around. Then a volunteer from the crowd comes by and starts switching between pairs of tools over and over again.

First he makes 10 switches and declares the positions of the tools he switched then he makes one "silent" switch (without saying anything). He then makes 10 more "loud" switches.

After this process the magician turns to the table, looks at the row of tools and picks up one of the tools that the volunteer switched in the "silent" switch. The magician performs the magic by only remembering one number in the range of 1 to 10 that can be changed again and again.

How does he perform the magic?

• Just to make sure I understand the point of the question: If the magician can remember a couple of permutations (equivalent to remembering two numbers in the range 1..24), he can just remember what the first 10 "loud" switches did and what the last 10 "loud" switches did, in which case he knows exactly what the configurations immediately before and after the "silent" switch were. So the question is: if his memory is much worse than that, only sufficient to hold a single number in the range 1..10, how can he still keep track of enough information to identify one affected tool? Is that right? – Gareth McCaughan May 19 '16 at 17:10
• Yes because if he can remember teo larger numbers it is much easier – Don Fanucci May 19 '16 at 17:24
• So a "Loud" switch is "I swap positions one and three". – LeppyR64 May 20 '16 at 13:23
• @Lior I don't know if I'm right, but I think there are 12 possible permutations at the end of "magic". Is there really a way he could get more information? – Lasoloz May 20 '16 at 19:10
• @Lior: Your method does not work because you need 12 possibilities to keep track of the individual positions of the two items. If you only keep track of the pair of positions, then you cannot tell whether the swap involved those two or the other two. – user21820 May 21 '16 at 8:17

The final permutation done by the volunteer is σ

α = σ₁₀ σ₉ σ₈ σ₇ σ₆ σ₅ σ₄ σ₃ σ₂ σ₁
β = σ₂₀ σ₁₉ σ₁₈ σ₁₇ σ₁₆ σ₁₅ σ₁₄ σ₁₃ σ₁₂ σ₁₁
σ = β σₛ α


where σᵢ are transpositions and σₛ is the silent transposition.

Then, the magician can

choose two different numbers a and b in {1,2,3,4}.

Each time the volunteer makes a "loud" transposition, the magician

does it too on his numbers.

Finally, he gets

β α (a) and β α (b)

Then, he checks

whether the objects which were initially in positions a and b are now in positions β α (a) and β α (b).

• If both are, that means the silent transposition didn't affect these objects. Since there are only 4 objects, the transposition affected the other two.
• If (at least) one isn't, that means it was affected by the silent transposition.

In order to achieve this, the magician must keep track of two different numbers between 1 and 4. That's 12 possibilities, which is too much for his limited memory.

However, there is a trick (I'm not sure if this is cheating, but otherwise I think it's impossible):

he does not need to use his memory in order to keep track of a number. For example, he can store the numbers in his own eyes and tongue, using a code like 1 = up, 2 = right, 3 = down, 4 = left.

When the volunteer says a loud transposition, the magician does this

1. He retrieves the number stored in his eyes and places it in his memory
2. He transforms that number according to the transposition
3. He stores the new number in his eyes
4. He retrieves the number stored in his tongue and places it in his memory
5. He transforms that number according to the transposition
6. He stores the new number in his tongue
Only one number between 1 and 4 is stored in the memory at a time.

Of course, this assumes the transposition and the conversion code do not waste memory. Otherwise, he could use his fingers to store more data.

This will work because the magician is turned around, otherwise the public would realize there is something wrong with his face: