Enter the maze

The mind boggling memory experiment

a magician touches his forehead as he concentrates

After years of training, world memory champions can memorise packs of randomly shuffled cards and recall them in perfect order. In this experiment you will be able to emulate a small-scale feat of memory magic, impressing your friends with your mind’s memory power.

Memory magic

Hand a pack of cards to your friend who gives it a good shuffle to ensure this is no setup. Get them to split the pack and divide it roughly into two. They then choose which part of the pack to give you. Pick up those cards and quickly scan them, face-up, for about 5 seconds, saying that you are memorising the order of the pack. Now place these cards out of sight in your pocket.

Name a card?

Your friend then names any card in the pack (not the joker). Suppose they name the Ten of Diamonds. You think carefully, and state that the Ten of Diamonds isn’t in your pocket. However, you say you can still prove you can picture the whole deck in your mind. First you pull out a card of the same suit as their freely chosen card. You follow that up with cards that add up to the value they gave.

What the trick looks like

After your friend has chosen a card, it's time to show off your amazing memory. First you put your hand in your pocket to try and match your friend's suit. ‘Hummm, 12th card from the top is the Eight of Diamonds I seem to remember’, you say, and you pull out the Eight of Diamonds, just as you said. You’ve matched their suit with a Diamond. ‘Of course’, you continue, ‘there was a one in four chance of getting a Diamond at random, so I will pull out another card to make the value of your chosen card, the Ten of Diamonds’. Without much effort you remember there was a Two of Hearts ‘five cards from the bottom’ and pull it out to complete your card memory challenge: Eight of Diamonds and Two of Hearts, 8+2 =10, proof you have amazing skill to memorise cards in an instant – or is it?


A trick to remember

Of course it’s a trick, and it needs a bit of set up. First you secretly need to take 4 cards from the pack. From the top down these are: the Ace of Clubs, Two of Hearts, Four of Spades and Eight of Diamonds. These are your secret ‘stack’ and you need to memorise these cards, but that’s easy! The order of the suits is simple if you remember the word CHaSeD, the capital letters here representing the order of the suits – Clubs, Hearts, Spades and Diamonds. CHaSeD is an example of a mnemonic, a memory aid, and such word tricks are often used to help in real memory competitions or in studying for exams. You may have come across the phrase ‘Richard Of York Gave Battle In Vain’ as a way or remembering the order of the colours in the spectrum for example.

Stacking the deck

You take the stack of 4 cards and secretly hide them in your pocket before your performance. Your friend won’t notice the pack’s missing four cards when they shuffle and split it. Take the half of the shuffled pack they give you and ‘instantly memorise’ the deck (that bit’s just acting, you really don’t need to remember anything). Put the half pack in your pocket but make sure that the four hidden stack cards go on top of the pack, and that you don’t disturb their CHaSeD order.

Ask your friend to name any card. One of two things can happen. They could mention one of your memorised stack of four cards, in which case you are home and dry with a stunning effect. You just act like you are remembering where in the pack it is and then pull it out from amongst the top 4 cards…and bingo! But what if they don’t mention one of your secret stack of cards? Well that’s where the computer science magic comes in!

Binary addition

The first part is easy. For any card named you can pull out the card in the secret stack with the same suit. Just remember CHaSeD. But what about the value? For the trick you need to be able to create any number value Ace (1) through 10, Jack (11), Queen (12) King (13). The 4 specific stack cards allow you to do that, whatever the number. Look at the cards in the stack: 1,2,4 and 8. These are the decimal values of the first four binary base numbers, 1 =2^0, 2=2^1,4=2^2 and 8=2^3. They are special as they allow you to represent all binary numbers from 0000 to 1111. That is equivalent to all the decimal values between 0 and 16. All you need are values 1 to 13 for any card named so that is fine. This binary representation of 1 and 0 is how values are stored in a computer. In the trick, with just those four cards in your secret stack, you are storing the values of all possible selected cards.

Build it in binary

In this trick the value of the card your friend selects is converted into binary. Say they choose a six – that’s 0110 in binary, so you use 8D=0, 4S=1, 2H=1,AC=0, i.e. you need to pull out the 4 of Spades (4S) and 2 of Hearts (2H). What about the suit? You always go for the suit first, so get that card out. Then depending on the value you either include the suit card in the count if you need it or you keep it separate. Your audience don’t know in advance what you're going to do, so using the suit card or not using it in the total won’t matter to them.

Two Examples

So for example if the card selected is the King of Clubs, bring out the suit first (that’s the Ace of Clubs), then for the sum pull out the 8D and the 4S to add to the Ace (1) on the table, 1+4+8=13, the value of a King.

If they say the Ace of Diamonds, pull out the Eight of Diamonds first (suit), then the Ace of Clubs (value), in this case you don’t add the suit card to the other cards to make the value.

Last thoughts on the magic

Practice so you are confident with working out the set of cards you need for each card selection, and practice the patter (the dialogue). That is what sells the trick. Remember this is a great feat of mental powers, so make sure it looks like it. You could present this as a psychic experiment where you claim you can read the printing on the cards with your fingertips when they are in your pocket. Then you don’t need to pretend to do the card memorisation. Whatever presentation you decide on make sure that you explain clearly to the spectator what you're doing (or at least what you want them to believe you're doing): finding the suit then the value. Make sure they have signed up to the impossibility of it and you have a cool trick that will impress.

Oh, and always remember the Magicians' Code: always keep the workings of tricks secret, and practice, practice, practice.

The Computer Science

So what is the link to Human-computer interaction? Read on.