The Magic of Computer Science III
The third collection of magic tricks, from Paul Curzon and Peter McOwan, is entitled ‘magic meets mistakes, machines and medicine. The five card tricks contained make use of maths and computer science theory, and are used by real magicians.
Each trick includes magician’s instructions. The theory behind each trick is then fully explained, with links to key computational thinking ideas. The theory is then linked to practice, with real world examples.
• Invisible palming works because a carefully crafted algorithm is followed – it is known as a self-working trick.
• The Ninja Countdown shows that confusion can arise when counting up and also counting down. Measures taken to minimise this confusion are explained – these are critical in some environments, such as hospitals.
• The magical friendship test uses slight-of-hand and an algorithm to surprise and amuse. The article includes a pseudocode walk-through of the trick. A full explanation is given which includes some examples of human error-catching measures in hospitals and how they are tested.
• The acrobatic eights trick includes a little misdirection and some classic magician moves. The psychology of misdirection is explained, together with the mistakes that can happen when attention is directed at the wrong moments.
• Between the two red queens uses another ‘self-working trick’ algorithm, and a little more misdirection, to make ‘detectives’ out of the playing cards.
Finally, some advice for both aspiring magicians and software developers is offered.