In April, in the first of my age-guessing series of posts, I discussed the magic trick known as the Age Cards.
In that post, I focused solely on their use in finding someone's age, but today I'm going to look at the trick from several other perspectives.
As a quick note before we proceed, you should be familiar with the basics of the Age Cards from that original post to follow most of this post.
Binary is important in this trick, because all the numbers are being uniquely identified by whether or not each of the powers of 2 are involved in adding up to that number.
The numbers are distributed on the Age Cards in accordance with their binary equivalent. For example, 53 in binary becomes 110101. The 1s in 110101 appear only in the 1s, 4s, 16s, and 32s places, so 53 will only appear on the cards with 1, 4, 16, and 32 in the upper left corner. This is why you can add the numbers in the upper left corner, 1+4+16+32 in this case, to get the person's number.
What if the range of numbers were smaller? If I limit your choice to the numbers 1 through 7, I would only need 3 cards, since 7 is 111 in binary. However, the trick would seem far less impressive, as it wouldn't take that long to just look through the cards and find a number common to the cards containing the number, and making sure those numbers aren't on the remaining cards.
This seems to suggest that the trick becomes less impressive with smaller sets. However, this is actually only true when you're using cards filled solely with numbers. What if the numbers were represented with something else?
Let's try using months. January will replace 1, February will replace 2, and so on up to December replacing 12. How many cards will we need for the month version? The largest number we'll deal with is 12, which is 1100 in binary, a 4-digit number, so we'll only need 4 cards.
How do we distribute the months? We can test each bit using the AND operation with the first 4 powers of 2 to work out where they go. With Wolfram|Alpha, this is achieved using the BitAnd command.
Testing each of the numbers from 1 to 12 by performing the AND operation against each of the first 4 powers of two, we get the rather odd-looking result of {{1, 0, 0, 0}, {0, 2, 0, 0}, {1, 2, 0, 0}, {0, 0, 4, 0}, {1, 0, 4, 0}, {0, 2, 4, 0}, {1, 2, 4, 0}, {0, 0, 0, 8}, {1, 0, 0, 8}, {0, 2, 0, 8}, {1, 2, 0, 8}, {0, 0, 4, 8}}. What does this mean?
This is the distribution of months we need! Formatted more clearly, the answer would look like this:
January (1) = {1, 0, 0, 0}
February (2) = {0, 2, 0, 0}
March (3) = {1, 2, 0, 0}
April (4) = {0, 0, 4, 0}
May (5) = {1, 0, 4, 0}
June (6) = {0, 2, 4, 0}
July (7) = {1, 2, 4, 0}
August (8) = {0, 0, 0, 8}
September (9) = {1, 0, 0, 8}
October (10) = {0, 2, 0, 8}
November (11) = {1, 2, 0, 8}
December (12) = {0, 0, 4, 8}
In other words, if we consider the various cards as 1, 2, 4, and 8, as we would were we using just numbers, November would appear on cards 1, 2, and 8, while May would only appear on cards 1 and 4. The final lists, then, would look like this (each column represents a singe card):
January February April August
March March May September
May June June October
July July July November
September October December December
November November
As long as you can think of the January card as having a value of 1, February as 2, April as 4, and August as 8 (the first month on each of the respective cards), you can determine someone's secret month (perhaps their birthday month?) as easily as their age. If a month is only on the cards beginning with February (2) and April (4), then their month must be 2 + 4, which equals 6. The 6th month is June, so June must be the month of which they're thinking!Compared to using cards with the numbers 1 through 12, the month version is more deceptive, as the underlying logic and mathematics are better disguised.
As long as you can develop a list you can somehow associate with numbers, you can work out your own version of the Age Cards in this manner. Do you know the position of each letter in the alphabet? Then you can use the alphabet! 26 in binary is 11010, a 5-digit number, so you'd need 5 cards, and have the letters distributed appropriately among those 5 cards.
Similarly, as long as you have specific numbers attached to each item, you could use 52 playing cards, the 50 states (you'd have to have memorized an order such admission to the US), and much, much more! As you can start to see, if you have a big list memorized, you can create a unique and impressive routine.
UPDATE (Oct. 2, 2012): Numberphile just posted a video showing variations of the age cards that don't use binary! Watch and learn how this can be done with Fibonacci numbers and prime numbers, as well!
If you come up with your own variation of the Age Cards, I'd love to hear about it in the comments!