Enter the maze

Cards on your mind

by Peter W. McOwan and Paul Curzon, Queen Mary University of London

Womann with swirls doing mentalism. Adapted from PIXABAY.com

You ask a group of four of your friends to help in an experiment in thought transmission. You first hand them a list of 15 numbers and ask them to jointly agree a target number at random from the list. Your friends are then given cards which contain a jumble of numbers and letters. They stand in a line facing you, cards hidden from your sight. Concentrating on the chosen target number they transmit their thoughts and you are able to correctly state the chosen number.

Breaking the magicians code

This trick contains a rather cunning code. First things first. The list of 1 to 15 is perfectly normal. It can even be written by a spectator. All you want it for is to make sure that the group of four friends are all thinking of the same target number somewhere between 1 and 15. The clever bit is in the content of the cards and your instruction to the group. Each card contains a specific set of numbers. We will come back to the letters later. It is knowing which of these cards has the chosen target number on it that lets you performs this effect. Let's look at the cards first.

The cards have IT

Each card contains part of a binary code, the code that underpins digital computers at their most basic level. The four cards are as follows - for now just focus on the red numbers though.

The numbers on the cards

Suppose our volunteers pick a target number between 1 and 15 at random, say 12. 12 appears only on cards 3 and card 4 and nowhere else. Now if we add the first numbers that appear on card 3 and card 4 (in the top left corner), these card's "code numbers", we get 4 + 8 = 12. Adding the code numbers gives the original target number. Try another number, like 6. It appears on cards 2 and 3, which have code numbers 4 and 2 which we add to get 2 + 4 = 6. By knowing what cards a secret number appears on, you can work out from the code numbers what that original secret number was.

It always works. Why? Because the code numbers correspond to the digits that appear in the binary representation of all the numbers on that card. In our normal decimal counting system you have a 1s column, a 10s column, a 100s column, and so on. Binary is similar except you have a 1s column, a 2s column, a 4s column and an 8s column. Those column headings are just the code numbers of each card. The decimal number 12 means 1 lot of 10 and 2 lots of 1s (which add up to twelve). The binary number 1100 means 1 lot of 8s and 1 lot of 4s (adding up to twelve again) For each digit in the binary representation of a number you just add in that many of the column heading number. Here are the binary values for the numbers 1 to 15.

Binary numbers from 1 to 15

Notice you get the numbers on card with code number 8 by just looking down the 8s column. Whenever there is a 1, write that decimal number on the card. You do the same for each card but using it's column in the binary.

Now, if the participants are standing in a line with the cards handed out in order 4 3 2 1 as above as you look at them, and kept in this order, then if you know the cards with the target number in them you know the target number. Now you just need a way to find out which of those cards have the secret number on.

It's best to keep the numbers in numerical order so it's easier for your participants to check all their card numbers without making a mistake. Also don't use o, i or j as they are to easy to confuse with zero and one. It's important they don't miss or confuse the target number if it's on their card as we shall see.

The ABC of the Letters

The cards also have a selection of random letters scattered though them, for example card 1 has

1 B 3 P 5 K 7 G 9 11 F 13 15

The extra letters add camouflage and help both to hide the mathematical coding principle being used but also give a natural way to let you get at the information you need...

Covert coding with your eyes shut

The question then is how does the performer know if the card each of the four spectators is holding contains the chosen number? Some version of the trick simply have the spectator hand you the cards with their chosen number on it, but that risks the method being revealed. It is a useful way to practice your binary conversions though. You can do better. That's where stage direction comes in. You ask those whose card has the chosen number on it to concentrate on that secret number. To improve their thought transmission you tell them to shut their eyes so they aren't distracted. Those whose card doesn't have the chosen number should choose one of the letters on their card instead, and stare at it so as not to cause interference with the number transmission. So there it is right in front of you. All those with closed eyes are a binary 1 in that position and those with eyes open are a binary 0. You have set up a 'covert channel' A covert channel is just a secret way for information to be leaked from inside a private area (the cards which you are not allowed to see) to the outside (you) Here, information is being leaked from the cards but without those doing the leaking realising what they are doing. Those setting up high security systems have to make sure there are no ways to create a covert channel so information can leak out like this.

For the trick you just need to do the binary to decimal conversion, do a bit of mind reading acting and then announce their chosen number with a flourish.

There are versions of this effect that use numbers from 1 to 31 and 1 to 63 which use the same binary coding just more cards, more bits in the binary, and so and more mental calculation to decode the target number, but 1-15 makes a good compromise, easy to do and impressive to watch.

There you have it, a magic effect you can perform to a large audience that plays big on the stage or classroom. You are using two separate bits of computer science, binary coding and covert channels to create your mentalism act. Just remember to keep the spectators and their cards in the correct order and be clear about who has to close their eyes and you have a magical gem. And as they say 'the eyes have it'.