The Math Lesson: Abbott & Costello


With Joe Kirk as Mr. Bacciagalupe. Here’s are some fun facts: According to ever-reliable Wikipedia, Kirk’s original name was Ignazio “Nat” Curcuruto,  his family was from Sicily, and… he was married to Lou Costello’s sister Marie.

Thanks to YouTuber Kovacs Corner

Math and Magic


(Click to enlarge)

While sorting through things at home, I came upon this illustration of me done by a former student, Jian. Wish I could remember his last name. I taught him math, and he knew I liked magic, so he included math and magic symbols in the background.

Jesus’s Magic Square


(Click to enlarge)

From an exterior wall of the Sagrada Familia Church designed by Antoni Gaudi.

Barcelona, Spain


The sum of the numbers in every row is 33.

The sum of the numbers in every column is 33.

The sum of the numbers in each diagonal is 33.

The sum of the numbers in the four corners is 33.

The sum of the numbers in the center 2×2 square is 33.

The sum of the numbers in each 2×2 square in each of the corners is 33.


Seven Shuffles



Yesterday, card magician Derek DelGaudio appeared on NPR radio’s quiz show, Ask Me Another, where his quiz category was…playing cards.

What an incredible stroke of fortuitous luck engineered by the quiz show Gods! (not)

Anyway, Derek answered questions like, “Which suit used to be represented by batons and sticks?” and “One of the four Kings’ faces is different from the other three: which, and why?” Of course Derek answered these questions correctly—he is after all performing card magic nightly in his new one man Off-Broadway show, In & Of Itself—but it was the final question that was the most amusing. Here’s how the conversation went:

Host:  “According to mathematicians at Harvard and Columbia, how many—”

DelGaudio (and magicians across the country):  “Seven!”

Host: (Stunned silence, then laughter) “Yes, correct.”


Spoiler: As the host later told the audience, the question’s finish was, “how many riffle shuffles does it take to fully shuffle a deck into a randomized state?”  It’s a more interesting question than might appear at first glance, with quite a few sticky points.

First of all, is it referring to any kind of shuffle? No; it applies specifically to the riffle shuffle, also known as the dovetail shuffle—the deck is divided into two packets, one packet held from above in each hand, with each thumb at one short end of the cards, and the other fingers at the opposite short end. Then some cards are riffled off the bottom of one packet by the thumb onto the table, and next, some cards are riffled off the bottom of the other packet by the other thumb onto the table. This is repeated, riffling off cards from the bottom of the two packets onto the table, alternately, until both packets are exhausted (or at least a little bit sleepy). Most bridge players are familiar with this kind of shuffle.

Do the cards have to be perfectly alternated, one card from each hand, in perfect syncopation (magicians call this a “faro shuffle”)? Again, the answer is no. There is no requirement that the cards be perfectly interlaced, nor that the deck be cut into two even packets at the beginning. But even with imperfect shuffling, the cards should be fully randomized after seven riffle shuffles.

With some reflection, one might ask, what does it even mean to say that the cards are now in a random order? Isn’t every order a random order? The whole question of randomness is non-trivial, but a quick and dirty explanation as applied to shuffling depends on two notions. First, suppose we number all the cards in a deck consecutively from the top, 1-52.  Now we shuffle the deck. When we look at our new shuffled order, are there any clues in the new order that might lead us to suspect what the original order might have been? For example, if the new order looked like 1-20, 26-40, 21-25, 41-52, we can see that the “chunks” from the original order have left a calling card of sorts of the previous order; we would not say that the shuffle had randomized the order yet. The other thing to realize is, that given our original stack ordered 1-52, it is not true that every other conceivable stack could be obtained by one riffle shuffle—even if we were allowed to decide exactly how the cards should fall. For example, if we wanted a new stack that began 2-1-7-3 on top, there is no way of splitting the original 1-52 stack and doing one riffle shuffle that would put those four cards on top.

So, now we are in a position to talk about what a randomly shuffled deck would mean. It means that if we were to compare the positions before shuffling and after shuffling, there would be no clues left as to what the original order was; and that the new order was just as likely to have resulted from the actual beginning order as from any other beginning order. It turns out that only if you riffle shuffle at least the magic seven times, can you be sure that the preceding two conditions are true.

This result was proved by Persi Diaconis, presently a professor of mathematics at Stanford University, but also one of the most intriguing and elusive figures in modern sleight-of-hand conjuring.  When he was 14, he ran away from home and joined a much older magician, Dai Vernon, on a cross-country scramble to track down the best underground card sharks in America. The idea was to learn new card sleights that other magicians had not yet discovered. Diaconis was so intrigued by gambling questions that he enrolled in college math courses to learn the math that would give him more insight into such problems. Later on, Diaconis got himself a teaching post at Stanford on the recommendation of the Scientific American columnist Martin Gardner. Gardner it turns out, was a first-class amateur magician; Diaconis had shown him a few card tricks that he had invented, and on the strength of those card tricks, Gardner recommended Diaconis to the department head at Stanford who then hired Diaconis.

Diaconis has since published papers on many topics of potential interest to magicians and gamblers, including a proof that when flipping a fair coin, it is slightly more likely to fall on the side it started on. Equally intriguing is Diaconis’s tight-lipped attitude towards questions about the now-deceased Vernon. Vernon had many acolytes, most of whom have shared in print or video what Vernon had taught them. Vernon himself was not averse to revealing some of his confidences. But Diaconis is one of the few who refuses to speak about any of the Master’s teachings, and believes that some mysteries are meant to be taken to the grave.

But Diaconis’s riffle shuffle paper is well known among magicians. So now you know why Derek DelGaudio didn’t need to hear the rest of the question…


Will The Cards Match: A Formula

cut cards


Today’s post is for the magic nerds among us. An excellent staple of mental card magic is an effect by Larry Becker called “Will The Cards Match?” It’s based upon a clever math principle first used in magic by Howard Adams, and the trick itself can take many forms depending on the performer’s imagination. My favorite presentation is one that uses a set of business cards: each card has a famous name written on the back, and the cards are torn in half into two mates. After turning all the pieces face down and subjecting them to shuffles, cuts, and a spectator-controlled sorting procedure, the pieces, against all odds, end up paired next to their mates.

Since the standard method of doing this trick uses the spelling of the title phrase, many magicians are curious about 1) What other phrases would also work, and 2) What if instead of using the usual five cards, one wishes to use some other number of cards?

So quite a number of years ago, I worked out a method to determine phrases for any number of cards.  This will allow the performer to customize by occasion and venue the phrase that is used.

Here’s a modified version of how I described it on one of the magic forums about a decade ago:

“A) Suppose each pile of cards contains X cards to begin with. Then a workable phrase could have for its first word X-1 letters, the second word X-2 letters, the third word X-3 letters, the Nth word X-N letters and so on. So, for example, for five cards, four words of lengths 4-3-2-1 will work.

B) But those word lengths are not unique. Each of the word lengths can be adjusted in the following way:

At any point, you may add to any of the above lengths any multiple of the number that is one more than the original word length. That is, at word N, you may add any multiple of X -N+1.

Example: I have two five card piles. By the first formula, I can have a phrase consisting of 4 letters, then 3 letters, then 2 letters, then one letter.

So the first word has length 4—WILL

The second word has length 3—THE

The third word should have length 2—but we’re going to adjust its length for a better phrase.

I can add as many multiples of the original number plus one that I like. Since at this point the original word length would have been 2, I  can add any multiple of three (one more than 2) to the original word length of two.. For instance I can add exactly three to two to get five letters for the third word—CARDS

On the fourth word (on which I originally had 1 letter) I can add any multiple of 2 (one more than one) to my original 1. If I add 2×2 to 1, then I get five—MATCH

So, in this example, I have a phrase consisting of 4-3-5-5 which is Will The Cards Match.

Now let’s try this with six cards in each pile to make this more clear.

To start with:
First word . . . five letters
Second word , . . four letters
Third word . . . three letters
Fourth word . . . Two letters
Fifth word. . . One letter

So a workable sequence of word lengths for 6 cards could be a phrase with 5-4-3-2-1 letters

Now I’ll make some adjustments so that I can get a more convenient phrase:

First word, leave as is . . . five letters—MAGIC.
Second word, leave as is, . . . four letters—WILL.
Third word, originally three letters, which means I can add any multiple of four (one more than three). So I’ll add just 4 to the original three to get seven letters—ASTOUND.
Fourth word, originally two letters, so I can add any multiple of three (one more than two). In this case I’ll add 3 to the original two to get five letters—EVERY.
Fifth word, originally one letter, so I can add any multiple of two (one more than one). In this case, I choose to add two times two to the original one, to get five letters—CHILD.

So my sequence could be 5-4-7-5-5.

For example, “Magic Will Astound Every Child.”

Another sequence that will work using the above instructions is 5-4-3-2-5. Only the last word length needs to be adjusted here. So, “Every Body Can Do Magic.”

It may seem a little complicated, but if you’ll follow along with cards in hand, you’ll see that it works easily, and you can create your own phrase for any number of cards. Let me know if you have any questions.

Would You Be Happy With This Teacher Or Would You Transfer Out?


Diane Ravitch, that tireless fighter for students and teachers, brought the above video to my attention on her blog. I re-posted it elsewhere, but got some reactions which I had not expected. I’m very curious to hear what you have to say. The high school teacher in the video, Joshua Katz, asks his students to watch the video as their first assignment. What do you think of Mr. Katz? Would you do well in his classroom?