Kruskal Count

Murali told us about this amazing card trick his professor did in his statistics class. The professor asked a student to shuffle a deck of cards and then lay all the cards face up in a straight line. Every card was given a value between 1 and 10. The value of the numbered cards was equal to their number (Aces are given the value 1) and the value of the remaining face cards (Jack, Queen, King) was 2. To start with, the student chooses a secret number n between 1 and 8. He or she then looks at the nth card and silently figures out its value. If that value is m then the student finds the value of the mth card after the nth. This continues till the student reaches the end of the deck. For example, suppose the secret number is 5 and in the 5th place is the 7 of clubs. Then the student has to look at the 12th (5 + 7) place and if that is the Jack of Hearts then he or she would have to look at the 14th (12 + 2) place. At some point the student runs out of cards and cannot do this process anymore. The card that (s)he had just before this process ended is the “magic” card. For example, if the student happens to get to the 47th card and that is the 9 of spades, then since 9 + 47 is greater than 52, the 9 of spades is the magic card. The professor does not know what secret number the student has chosen but is still able to figure out what the magic card is.

How is this trick done? Well initially we thought that the magic card depends only on the distribution of the cards and not on the secret number. However it is easy to produce a distribution of the cards where two different secret numbers end up giving two different magic cards. This is very fragile, because if the distribution of the cards is changed even slightly it ends up giving the same magic card no matter what secret number is chosen. So it appears to be a probability game where the magician who performs the trick ends up getting the very same magic card almost all the time no matter what secret number is chosen. In the rare occasion that the magician is wrong, the person doing the counting should be ridiculed for being bad at simple arithmetic. It would help to quickly shuffle the deck while doing the ridiculing so that all evidence is erased and the trick can be performed again ;)

The mathematical idea behind this trick is very simple. It is known as the Kruskal Principle after Martin D. Kruskal. The magician goes through the same procedure using 1 as the starting secret value. After a few steps there is a great probability that the two procedures will “hit” the same card and then after that they will be “in step”, thus producing the same magic card. I didn’t realise it at the time but this is principle is very similar to the one used in the Rho Pollard Method of factorizing large integers. The idea being to iterate a function till it falls into a cycle. Here is an arxiv paper which uses coupling in Markov chains to analyse this card trick.

2 Responses to “Kruskal Count”

  1. card tricks Says:

    This really helped me. I am very intrigued by this concept. Besides the obvious, how might a mentalist use this method in an effect? I have thought of perhaps doing the Kruskal Count on a deck of shuffled and randomly mixed cards before an effect so that I know in advance what card the spectator will stop on when they do the Kruskal Count themselves using the ordinary method. This would be a good mind-reading effect (i.e. having them concentrate on the card they stopped on). However, this does not allow the deck to be shuffled prior to them doing their Kruskal Count. I know that the mentalist can just “follow along” with his/her own Kruskal Count as the spectator does theirs, but I think it would be more effective for the mentalist to have done his/her Count beforehand. Also, if the mentalist did their Count beforehand, they could turn their back, leave the room, etc while the spectator does theirs.

  2. Monica Allen Says:

    That was Awesome!!
    here’s a video I found about a simple card trick: http://www.metacafe.com/watch/703549/how_to_change_your_card_to_win/

Leave a Reply