Persi Diaconis and Ron Graham are professors of mathematics and, respectively, a magician and a juggler. They're not professional writers; at times it shows. Their book **Magical Mathematics** (subtitled "The Mathematical Ideas That Animate Great Magic Tricks") occasionally drops the ball (or maybe beanbag, or scarves, or linking rings). But setting aside literary polish, Diaconis and Graham present some amazingly beautiful combinatorics. The core concept: sometimes an apparently-complex situation is far simpler than it seems — specifically, often a mix-it-up operation doesn't actually do a full randomization. Within such subtle order, important information can be conserved, conveyed, and exploited to confuse.

Some of the card tricks and puzzles in **MM** are startling, but the associated theorems are even more amazing — well, to a mathematically-minded person who studies them for a few hours, that is! Two stand out:

**Hummer Shuffles**: Take a deck with an even number of cards, all face-down. Turn over the top two cards (together, as a bundle) so they become face up. Cut and repeat. Call that flip-two-and-cut a "Hummer shuffle". At any time, stop and deal the deck into two piles.More generally, Hummer shuffles can make the order of cards arbitrary, but combined with face-up/face-down data the pattern is severely constrained. Instead of 2**There will be the same number of face-up cards in each pile.**^{2N}*(2N)! possibilities for a deck of 2N cards, there are in fact only 2*(2N)! arrangements. Begin with a deck of face-down cards numbered 1 through 2N in order. After any number of Hummer shuffles, for card j now at position i:- the sum i+j is even if that card is face-down and odd if it is face-up

- the sum i+j is even if that card is face-down and odd if it is face-up
**Gilbreath Permutations**: Start with a deck arranged so red-black colors alternate. Deal any number of cards off the top into a second pile. Riffle-shuffle the two piles together, as sloppy or neatly as you please.In general, after a single shuffle of an N-card deck, instead of N! arrangements of cards only 2**Every pair of cards starting at the top will include one red and one black card.**^{N-1}can occur. Call the result of that deal-off-and-shuffle a "Gilbreath Permutation".**MM**'s Ultimate Gilbreath Principle generalizes the red-black special case. Start with an initially-ordered deck of cards of values 1 through N. For each j:- the top j cards have values that are distinct modulo j (as do the next block of j cards, and the next, etc.)
- the values of the top j cards form a consecutive block in 1, 2, 3, ..., N

Other chapters of **MM** deal with de Bruijn sequences, properties of various perfect shuffles, statistical estimates of how many different magic tricks were known at a given time, probability issues in the * I Ching*, and math related to juggling.

*(a typo: all the page headers of Chapter 7, "The Oldest Mathematical Entertainment?", read instead "The Olders Mathematical Entertainment?"; and cf. CastingShadows (2000-01-06), SubbookKeeping (2000-06-21), RubikCubism1 (2001-03-16), ...)* - * ^z* - 2013-02-07