Don't Miss

The four ducks trick

By on 01/02/2016

The described trick is a “ducky” version of the trick known as Yates’ Four-Divination, which is described in Martin Gardner’s book “Mathematics, Magic and Mistery” (Dover Publ., New York, 1956).

Move the ducks!

There are four different rubber ducks on the table:

The participator is to select the one in his favourite colour and name it. Then the mathemagician turns his back to the table and gives the following instruction: “Make five switches of two ducks. In every switch your chosen duck must be involved and it may only be switched with a duck adjacent to it. Tell me when you have done the five switches.”

Say the participator selected the pink duck. He could perform the five switches as follows:

Switch pink and blue duck:

Switch pink and yellow duck:

Switch pink and yellow duck again:

Switch pink and blue duck:

Switch pink and green duck:

After the participator announces that he hase done the five switches, the mathemagician – still with his back turned to the table – asks him to remove a duck at one of the two ends. The mathemagician gives a precise instruction: “Please remove the duck at your left.” (or right, depending on which duck was chosen in the beginning). In our example the mathemagician would instruct the participator to remove the duck that is on the left of the picture. This would leave the participator with the three non-yellow ducks:
.

In the last part of the trick, the mathemagician gives the following instructions (and the participator follows them): “Now, please make one more switch of your duck with an adjacent one.”In our case, this would mean switching the pink and green duck:

“Now please remove the duck on the left (or right) end.” In our example, the removal of the left would be asked and this leaves us without the blue duck:

“And finally, please remove the… right (or left) duck. This should leave you with your chosen duck!”. In our example the mathemagician would ask to remove the right (green) duck and the chosen pink duck is left all alone on the table:

The “4 Ducks” manual

There are two principal questions to think about when trying to explain and learn the trick: How does the mathemagician know how to instruct the participator in the removal of the ducks? And what about using other numbers of switches besides 5?

In fact, consideration of the second question leads to the answer to the first one. If you would like to work it out yourself, try what happens if 1, 2, 3, 4, … switches are required. Think about possible final configurations of the ducks in each of the cases. As a hint we give you the following: number the starting positions of the ducks with 1, 2, 3 and 4. Now, if you do not want the trick disclosed to you before you have tried to find out about it on your own, please do not read further. All other readers will find the explanation in the following paragraphs.

If the starting positions are numbered 1 to 4 (say, 1 for the starting position of the yellow duck in the first of the pictures above), then if the chosen duck started from an even position, after 5 switches it will end up in an odd position and vice versa. In our example the chosen pink duck started from position 3, so after 5 switches it must end up in position 2 or 4. This enables the performer to eliminate one of the two ducks at the ends. If the starting position was odd, like in our example, the performer can be sure that the duck is now not on position 1 and can give the instruction to remove the duck at the corresponding end.

After this, the chosen duck is sure not to be in the middle of the three ducks left on a table, and consequently another switch with an (in fact, the) adjacent duck brings it to the middle position. Now it is easy to instruct the participator to remove the flank ducks and end up with the chosen duck.

Finally, note that the performance would be exactly the same if instead of 5 any other odd number of switches was used. If one uses an even number of switches, then the chosen duck will end in a position of same parity as its starting position (even if starting from an even one, and odd if starting from an odd one) and it is easy to adapt the performance to this case.

There is more maths behind the trick than meets the eye…

Although the trick can be explained on a pure logical basis like above, the explanation can be connected to a relatively advanced mathematical notion of odd and even permutations. A permutation is a rearrangement of a number of things (in our example: every rearrangement of the four ducks is one permutation of the ducks). It relates to the relative positions of the things, and not to the things itself (any rearrangement of the numbers 1, 2, 3 and 4 can be related to a rearrangement of the four ducks, or any other four items, if we number their starting positions; e.g. the permutation 2,4,1,3 would in the “duck”-context meant that the duck that was on position 2 in the beginning is now on position 1, the one who started from position 4 is now on position 2, the one who started from position 1 is now on position 3 and the one who started from position 3 is now on position 4). For those who are interested: A formal definition of a permutation of a permutation of a (usually finite) set is that it is a bijection of the set onto itself.

Permutations can be classified as even and odd. By definition, an even/odd permutation is one that is obtainable by an even/odd number of transpositions. A transposition is a permutation that interchanges two objects and does not move the others, so each of our duck-switches is a transposition on our set of ducks. Consequently, if the participator is asked to switch the ducks 5 times he is asked to perform an odd permutation. There is however a condition on the transpositions performed: one is allowed only to interchange neighbouring ducks. Since two adjacent positions are obviously of different parity, it is almost obvious that an even permutation composed of transpositions of neighboring objects does not change the parity of the position of the chosen object, and an odd one always changes it.

Permutations are studied both in combinatorics and abstract algebra, and parity is one of the properties helping in their study. Parity really provides a classification of permutations: although the same permutation (final distribution of objects) can be achieved by different sequences of transpositions (try to find another sequence of switches that rearranges the ducks from the starting configuration to the last one before removing any ducks), in all possible sequences there will always be involved an odd number or always an even number of transpositions. In other words, if a permutation is obtained by an odd number of transpositions it can never be obtained by any sequence of an even number of transpositions (nor vice versa). In our example this means that no even number of duck switches (not even if we allow switching ducks that are not adjacent) will transform the starting configuration to the last one before removing any ducks. This is known as the parity theorem for permutations. One of the best-known applications of using this classification is the solution to the famous Sam Loyd’s 15 puzzle.