Thanks to a Singapore math exam, the internet is being driven crazy by the biggest problem in birthdays since the birthday paradox!

Here's the problem: Albert and Bernard want to know Cheryl's birthday, but Cheryl isn't willing to tell them directly. Instead, she gives them a list of 10 possible dates: May 15, May 16, May 19, June 17, June 18, July 14, July 16, August 14, August 15, and August 17. She then whispers only the month to Albert and the date to Bernard. The following discussion then takes place between Albert and Bernard:

Albert: "I don't know when Cheryl's birthday is, but I know that Bernard does not know, too."

Bernard: "At first, I didn't know when Cheryl's birthday was, but I know now."

Albert: "Then I also know when Cheryl's birthday is."

When is Cheryl's birthday? We'll look at how to find the answer in this post!

The simplest and most direct explanation of this puzzle I've found is in Presh Talwalkar's post, *When Is Cheryl’s Birthday? Answer To Viral Math Puzzle*. The included video makes the answer seem so straightforward:

Another helpful approach is Mark Josef's interactive Cheryl's Birthday page, on which you can click each of the dates to see why that the logic determines that date to be right or wrong. Both Cahoots Malone and The Washington Post have also featured simple and straightforward video explanations of this puzzle.

For a more detailed look at the solution, check out Numberphile's thorough explanation, as well the extra footage:

Ever the intrepid explorer, however, James Grime takes an even closer look at Cheryl's Birthday, and finds that the intended answer may not necessarily be the right answer:

Has this puzzle driven you crazy? Did you manage to solve it? If so, how? I'd love to hear your answers in the comments below!

## Cheryl's Birthday Round-Up

Published on Monday, April 20, 2015 in controversy, fun, math, puzzles, self improvement, videos

## Estimating Roots

Published on Sunday, March 29, 2015 in fun, math, mental math, self improvement

3 years ago, I posted a tutorial about estimating square roots of non-perfect squares, including tips and tricks.

Since then, I've wondered if there was a general formula for estimating other roots, such as cube roots, fourth roots, and so on. Reddit user InveighsiveAd informed me that there's a simple general formula very similar to the method I've taught for square roots! Once you pick up the basic idea of this method, you'll be able to astound friends, family, and teachers.

The approach for estimating roots originates from an approach developed by Leonhard Euler, and involves taking derivatives, so I won't delve into the math behind why this works here. I'll focus more on the resulting formulas, which can be used to

The method I taught for estimating square roots basically boiled down to this formula, where a was a perfect square equal to or less than x, and b was equal to x - a:

With Euler's method, we'll be estimating roots using the same basic approach of breaking up a number into a number which is a perfect power (square, cube, 4th power, etc.) and the difference between that power and the targeted number. The following formula may look scary at first, but it's simpler than it looks:

y is simply the root we wish to know. For square roots, y would equal 2, for cube roots, y would equal 3, and for 4th roots, y would equal 4. As a matter of fact, I'm not going to concern this article with anything past 4th roots, as this quickly becomes complex. Here are the formulas for square, cube and 4th roots individually:

These look worse than they really are. Remember that a is always chosen to be a perfect power, so you're working with an easily determined number. If you were going through this process for cube root, and using 729 for a, the cube root of 729 would be 9. So, any where you see the cube root of a, you can mentally replace it with 9, in this example.

Obviously, knowing perfect squares up through 31 will be of help, as in the original method. Knowing the perfect cubes from 1 to 10, as many Grey Matters readers already do, will allow you to estimate cubes of number up to 1,000. Memorizing or being able to quickly calculate perfect 4th powers will allow you to estimate 4th powers up to 10,000!

For those confused by the ± symbol in the equations, it simply means that we're going to choose a to be the closest perfect power, and adjust b accordingly. For example, if we want the cube root of 340, then we'd use 343 (7^{3}), and work it out as the cube root of 340 as the cube root of (343 - 3).

Let's estimate the cube root of 340 as a full example. As explained above, we've already broken this up into the cube root of (343 - 3). Your mental process might go something like this:

How close is 6^{48}⁄_{49} to the cube root of 340? The two numbers are *very* close, as this Wolfram|Alpha comparison shows!

Colin Beveridge, of Flying Colours Maths has helpfully pointed out that the error in the method will increase as you get approach the geometric mean of two closest consecutive perfect powers. For example, when using this method to find the cube root of 612, which is close to 611 (the approximate geometric mean of 512 and 729), you'll be farther off.

Let's find out exactly how far off we would be. The cube root of 612 could be worked out as (729 - 117), but (512 + 100) is closer, so we'll use the latter. Working this out, we'd get:

Wolfram|Alpha shows that 8^{25}⁄_{48} ≈ 8.52, while the actual cube root of 612 ≈ 8.49. It's off by about 3 hundredths, but that's still a good estimate!

As an added bonus, if you wind up with a fraction whose denominator ends in 1, 3, 5, or 7, you can use the techniques taught in *Leapfrog Division* or Leapfrog Division II to present your estimate with decimal accuracy! Yes, it's just the same number presented differently, but working out decimal places in your head always comes across as impressive. Personally, I reserve the decimal precision for when I know the root is close to a perfect power.

Try this approach out for yourself. If you have any questions, feel free to ask them in the comments!

## Grey Matters' 10th Blogiversary!

Published on Saturday, March 14, 2015 in books, fun, magic squares, Martin Gardner, math, memory, memory feats, mental math, nim, Pi, puzzles, reviews, self improvement, site features

Ever since I started this blog, I've been waiting for this day. I started Grey Matters on 3/14/05, specifically with the goal of having its 10th blogiversary on the ultimate Pi Day: 3/14/15!

Yes, it's also Einstein's birthday, but since it's a special blogiversary for me, this post will be all about my favorite posts from over the past 10 years. Quick side note: This also happens to be my 1,000th published post on the Grey Matters blog!

Keep in mind that the web is always changing, so if you go back and find a link that no longer works, you might be able to find it by either searching for a new place, or at least copying the link and finding whether it's archived over at The Wayback Machine.

## 2005

My most read posts in 2005 were*25 Years of Rubik's Cube*(at #2), and

*Free Software for Memory Training*(at #1). It was here I started to get an idea of what people would want from a blog about memory feats.

## 2006

In the first full January to December year of Grey Matters, reviews seemed to be the big thing. My reviews of*Mathematical Wizardry*,

*Secrets of Mental Math*, and

*Mind Performance Hacks*all grabbed the top spots.

## 2007

This year, I began connecting my posts with the interest of the reader, and it worked well. My series of “Visualizing” posts,*Visualizing Pi*,

*Visualizing Math*, and

*Visualizing Scale*were the biggest collectively-read posts of the year.

Fun and free mental improvement posts also proved popular in 2007.

*Unusual Lists to Memorize*, my introduction to

*The Prisoner's Dilemma*, and my look at

*Calculators: Past, Present, and Future*(consider Wolfram|Alpha was still 2 years away) were well received!

*10 Online Memory Tools...For Free!*back-to-back with my

*Memorizing Poetry*post also caught plenty of attention.

## 2008

I gave an extra nod to Pi this year, on the day when Grey Matters turned Pi years old on May 5th. The most popular feature of the year was my regularly update list of*How Many Xs Can You Name in Y Minutes?*quizzes, which I had to stop updating.

Lists did seem to be the big thing that year, with free flashcard programs, memorizing the elements, and tools for memorizing playing card decks grabbed much of the attention in 2008.

## 2009

Techniques took precedence over lists this year, although my series on memorizing the amendments of the US Constitution (Part I, Part II, Part III) was still popular. My web app for memorizing poetry, Verbatim, first appeared (it's since been updated). Among other techniques that caught many eyes were memorizing basic blackjack strategy, the*Gilbreath Principle*, and

*Mental Division with Decimal Precision*.

## 2010

This year opened with the sad news of the passing of Kim Peek, the original inspiration for the movie*Rain Main*. On a more positive note, my posts about the game Nim, which developed into a longer running series than even I expected, started its run.

As a matter of fact, magic tricks, such as

*Bob Hummer's 3-Object Divination*, and puzzles, such as the 15 Puzzle and Instant Insanity, were the hot posts this year.

Besides Kim Peek, 2010 also saw the passing of Martin Gardner and BenoÃ®t Mandelbrot, both giants in mathematics.

## 2011

The current design you see didn't make its first appearance until 2011. Not only was the blog itself redesigned, the current structure, with Mental Gym, the Presentation section, the Videos section, and the Grey Matters Store, was added. This seemed to be a smart move, as Grey Matters begin to attract more people than ever before.The new additions to each section that year drew plenty of attention, but the blog has its own moments, as well. My list of

*7 Online Puzzle Sites*, my update to the Verbatim web app, and the

*Wolfram|Alpha Trick*and

*Wolfram|Alpha Factorial Trick*proved most popular in 2011.

My own personal favorite series of posts in 2011, however, was the

*Iteration, Feedback, and Change*series of posts:

*Artificial Life*,

*Real Life*,

*Prisoner's Dilemma*,

*Fractals*, and

*Chaos Theory*. These posts really gave me the chance to think about an analyze some of the disparate concepts I'd learned over the years when dealing with various math concepts.

## 2012

In 2012, I developed somewhat of a fascination with Wolfram|Alpha, as its features and strength really began to develop. I kicked the year off with a devilish 15-style calendar puzzle, which requires knowing both how to solve the 15 puzzle and how to work out the day of the week for any date in your head! Yeah, I'm mean like that. I did, however, release*Day One*, my own original approach to simplifying the day of the week for any date feat.

*Estimating Square Roots*, along with the associated tips and tricks was the big feat that year. The bizarre combination of controversy over a claim in a Scam School episode about a 2-card bet and my approach to hiding short messages in an equation and Robert Neale's genius were also widely read.

## 2013

After we lost Neil Armstrong in 2012, I was inspired to add the new*Moon Phase For Any Date*tutorial to the Mental Gym. A completely different type of nostalgia, though, drove me to post about how to program mazes. Admittedly, this was a weird way to kick off 2013.

Posts about the Last Digit Trick,

*John Conway's Rational Tangles*, and Mel Stover were the first half of 2013's biggest hits on Grey Matters.

I also took the unusual approach of teaching Grey Matters readers certain math shortcuts without initially revealing

*WHY*I was teaching these shortcuts. First, I taught a weird way of multiplying by 63, then a weird way of multiplying by 72, finally revealing the mystery skill in the 3rd part of the series.

## 2014

Memory posts were still around, but mental math posts began taking over in 2014. A card trick classically known as Mutus Nomen Dedit Cocis proved to have several fans. The math posts on exponents, the nature of the Mandelbrot set, and the Soma cube were the stars of 2014. Together, the posts*Calculate Powers of e In Your Head!*and

*Calculate Powers of π In Your Head!*also grabbed plenty of attention.

## Wrap-up

With 999 posts before this one, this barely even scratches the surface of what's available at this blog, so if you'd made it this far, I encourage you to explore on your own. If you find some of your own favorites, I'd love to hear what you enjoyed at this blog over the years in the comments below!## Estimating Compound Interest Without a Calculator

Published on Sunday, March 08, 2015 in math, mental math, money, self improvement

Something about the challenging nature of calculating compound interest keeps drawing me back, as in my *Mental Financial Wizard* post and my recent *Estimating Compound Interest* post. Or, maybe I'm just greedy.

In either case, here's yet another way to get a good estimate of interest compounded over time. It's a little tricky to do in your head alone, so you'll probably prefer to work this one out on a sheet of paper.

It turns out that compound interest is based on the binomial theorem. This means we can use relatively simple math concepts from Pascal's Triangle (also based on the binomial theorem). The method I'm about to teach you has its roots in the approach used to work out coefficients in *The Easy Peasy Binomial Expansion Trick* (jump down to the paragraph which reads, *"So now comes the part where the coefficients for each term are written. This is very easy to do with the way we set up our example."*).

What we're going to be estimating is the total percentage of interest alone. Once this is done, you can calculate the original investment into the problem. As a first example, let's work out 5% interest per year for 10 years. To keep things simple, we'll work with 5% as if it represented 5, instead of 0.05.

To get a starting point multiply the interest rate by the time, as if you were working out simple interest. In our 5% for 10 years example, we would simply multiply 5 × 10 = 50. You need to make a table with that number expressed two ways: As a standard number, as as a fraction over 1. For this example, the first row of the table would look like this:

Number | Fraction |
---|---|

50 | ^{50}⁄_{1} |

From here, there are 2 repeating steps, which repeat only as many times as you wish to carry them.

**STEP 1:**You're going to create a new fraction in the next row, based on the existing fraction. Take the existing fraction,

*increase*the denominator (the bottom number of the fraction) by 1, and

*decrease*the numerator by the amount of the annual interest.

In our example, starting from

^{50}⁄

_{1}, we'd increase the denominator by 1, turning it into

^{50}⁄

_{2}, and then decrease the denominator by 5, because we're dealing with 5% interest, to give us

^{45}⁄

_{2}. The table, in this example, would now look like this:

Number | Fraction |
---|---|

50 | ^{50}⁄_{1} |

^{45}⁄_{2} |

**STEP 2:**Take the number from the previous row, and multiply this by the new fraction, in order to get a new number for the current row. Divide the result by 100, and write this number down in the new row. This can seem challenging without a calculator, but if you think of a fraction as simply telling you to divide by the denominator and multiply by the numerator, it becomes simpler.

Continuing with our example, we'll multiply the number from the previous row (50) times our new fraction (

^{45}⁄

_{2}). That's 50 × 45 ÷ 2 = 25 × 45 = 1,125. 1,125 ÷ 100 = 11.25, so we add that number to the new row like this:

Number | Fraction |
---|---|

50 | ^{50}⁄_{1} |

11.25 | ^{45}⁄_{2} |

From here, we can repeat steps 1 and 2 as many times as we like, depending on what kind of accuracy is needed. Repeating step 1 one more time, we get this result (do you understand how we got to

^{40}⁄

_{3}?):

Number | Fraction |
---|---|

50 | ^{50}⁄_{1} |

11.25 | ^{45}⁄_{2} |

^{40}⁄_{3} |

After repeating step 2, we work out 11.25 × 40 ÷ 3 = 11.25 × 4 × 10 ÷ 3 = 45 × 10 ÷ 3 = 450 ÷ 3 = 150. Don't forget, as always, to divide by 100, which gives us 1.5 for the new row:

Number | Fraction |
---|---|

50 | ^{50}⁄_{1} |

11.25 | ^{45}⁄_{2} |

1.5 | ^{40}⁄_{3} |

Most of the time, I stop the calculations when the number in the bottommost row is somewhere between 0 and 10. I find this is enough accuracy for a decent estimate.

Once you've stopped generating numbers, all you need to do to estimate the interest percentage is add up everything in the the

*Number*column! In our above example, we'd add 50 + 11.25 + 1.5 to get 62.75. In other words, 5% for 10 years would yield roughly 62.75% interest. If we run the actual numbers through Wolfram|Alpha, we see that the actual result is about 62.89% interest. That's not bad for a paper estimate!

Back in 2012, a question was posted at math stackexchange which could've benefitted from this technique. In under 3 minutes, answer the following multiple choice question without using a calculator or log tables:

Someone invested $2,000 in a fund with an interest rate of 1% a month for 24 months. Consider it to be compounded interest. What will be the accumulated value of the investment after 24 months?Let's use this technique to work this out:

A) $2,437.53

B) $2,465.86

C) $2,539.47

D) $2,546.68

E) $2,697.40

Number | Fraction |
---|---|

24 | ^{24}⁄_{1} |

2.76 | ^{23}⁄_{2} |

0.2024 | ^{22}⁄_{3} |

Hmmm...24 + 2.76 + 0.2024 = 26.9624, so that would give us about a 26.96% return, or a little less than 27%. Multiplying this by 2,000 is easy, since we can multiply by 2, then 1,000. This lets us know there must be just under $540 in interest on that $2,000. A and B are way too low, E is way too high, and D is just over $540 in interest. That eliminates every answer except C. Sure enough, Wolfram|Alpha confirms that $2,539.47 is the correct answer!

## Review: The Best Mental Math Tricks

Published on Sunday, February 22, 2015 in books, math, mental math, products, reviews, self improvement

Two years ago, about this time, I reviewed Presh Talwalkar's previous *Infinite Tower* book.

Since then, not only has Presh not only been hard at work on his *Mind Your Decisions* blog, but also another book guaranteed to interest Grey Matters readers! This newest book is titled *The Best Mental Math Tricks*. Presh was kind enough to send me an advance copy, so I'll share my review in this post.

Probably the first thing to stand out about this book, when reading the table of contents, is that it's organized almost exactly backwards to most arithmetic, and even most mental math books. It starts out with a variety of mental math shortcuts for specific situations, then moves on to squaring shortcuts, followed by multiplication shortcuts, then division shortcuts, and it closes with another variety of shortcuts.

There's nothing bad about this approach. As a matter of fact, since the subject is mental math, this actually allows the shortcuts to be described in a rough order of simpler to more complex. It's also a nice change from the standard order of adding/subtracting to multiplication/division to roots/powers.

When you learn this book is put out by the author of a blog, you might be concerned that this is just a collection of previous mental math blog posts that you could access online for free. While there is some overlap, there's plenty of material in the book that has never been posted on the author's blog. Conversely, there are also several mental math shortcuts on his blog which don't appear in the book, so Presh's book and site wind up complementing each other quite nicely.

Even when there is crossover, the entry isn't simply copied straight from the blog to the book. For example, Presh wrote a post titled *Understanding the rule of 72: a popular rule that has little practical value* that was highly critical of this standard shortcut. In the book, however, the rule of 72 is taught with a less critical review, while still giving the reader an understanding of when the rule is and isn't appropriate to use.

The structure of each shortcut is also well thought-out. Each one starts with a description of the shortcut itself, followed immediately by practice problems which help you internalize it. Just before providing the answers to the practice problems, however, Presh explains the proof behind each shortcut, so you can get a better understanding of *why* it works. This is probably one of the most useful and important aspects of the book. It's one thing to learn a rule, but another thing to understand the reasoning behind it.

If you're already familiar with mental math shortcuts, you're still likely to find enough new shortcuts to make this book worthwhile. If you're new to mental math, this book is a definite treat for the mind!

~~At this writing, ~~ *The Best Mental Math Tricks* isn't available yet, but Presh Talwalkar assures me that it will be released in the near future. When it is released,*The Best Mental Math Tricks* is now available at Amazon.com. I recommend to anyone interested in improving their mental math skills!

## Still More Quick Snippets

Published on Sunday, February 15, 2015 in magic, math, mental math, snippets, videos

February's snippets are here. Thanks to some old favorites, and some new favorites, we have a good selection to share with you this month.

• Just 2 days ago was Friday the 13th, so MindYourDecision.com's Presh Talwalkar decided it was a good time to teach how to divide by 13 in your head:

This is a handy technique, and you really only need to learn how to do this up to 12, which isn't too difficult.

If you'd like to learn similar tricks for dividing by 2 through 15, check out the *Instant Decimalization of Common Fractions* video.

• Like me, Presh seems to have plenty of fun with mental math techniques. Here's a mathematical magic trick of sorts, in which you apparently divine a crossed out digit:

Are you curious as to why this works? Presh has a detailed proof on his blog.

For those who are worried that just multiplying by 9 may seem too obvious, scroll down to the end of my *Age Guessing: Looking at the Roots* post. The section entitled “Sneakier ways of getting to a multiple of 9” has several useful and clever ways to disguise the method.

• IFLScience just posted *21 GIFs That Explain Mathematical Concepts*. More than a few of these will be familiar to regular Grey Matters readers. Many are from LucasVB's tumblr gallery, and others are from videos I've shared over the years. Nevertheless, it's nice having all these in one place.

• Steve Sobek, who has a wide variety of videos on his YouTube channel, has recently made several mental math-related videos that are worth checking out. For example, here's his video teaching a trick for mentally subtracting large numbers:

You can find more of his mental math tricks at AmysFlashcards.com.

## Estimating Compound Interest

Published on Sunday, February 08, 2015 in mental math, money, self improvement, videos

A recent question on the Mathematics StackExchange about mentally the compound interest formula caught my attention.

It got me thinking about good ways to work out a good mental estimate of compound interest.

Part of what makes it so tricky, is that compound interest doesn't work in a straight line, like much of the math with which we're familiar. Compound interest builds on itself exponentially (not surprising since the formula is a exponential expression). This is a good point to re-familiarize ourselves with the basics of the time value of money:

For a more detailed guide to interest rate mathematics, I suggest reading BetterExplained.com's *A Visual Guide to Simple, Compound and Continuous Interest Rates*.

**BINOMIAL METHOD:** The Mental Math wikibook suggests the following formula: To estimate (1 + *x*)^{n}, calculate 1 + *nx* + ^{n(n-1)}⁄_{2} *x*^{2}.

It is an interesting formula, especially considering that the first part, 1 + *nx*, is basically the simple interest formula. However, after using Wolfram|Alpha to compare the actual compound interest rate formula to this binomial estimation of compound interest method, you see that it really only gives close answers when *x* is 5% or less, and *n* is 5 time periods or less.

If your particular problem qualifies, that's not bad, but what about longer times?

**RULE OF 72 AND OTHERS:** Last July, I wrote another post about estimating compound interest discussing the rule of 72 for determining doubling time, as well as the rules for 114 (tripling time) and 144 (quadrupling time). Note especially that you can work out the effects of interest of long time periods with a little simple addition.

Yes, the rule of 72 has been explained many places, such BetterExplained.com's *Rule of 72* post, and critically analyzed, such as MindYourDecision.com's *Understanding the rule of 72* post and the related video, but as long as you understand its proper use and caveats, it's an excellent tool.

Understanding where the rule of 72 comes from, you can actually work out other rules for other multiples of your original amount, which is how the rules of 114 for tripling and 144 for quadrupling came about. If you want to estimate how long your money takes to grow to 5 times the original amount (quintupling), there's the rule of 168. Similar to the other rules, you can work out quintupling as ^{168}⁄_{time} ≈ interest rate (as a percentage) and ^{168}⁄_{interest} ≈ time.

To help increase the accuracy of needed estimates, you can also remember the 50% increases between each of the above rules. For a 50% increase, for example, there's the rule of 42. For 2.5 times, there's the rule of 96, for 3.5 times, there's the rule of 132, and for 4.5 times, there's the rule of 156.

This may seem like too many rules to remember, but there are a few things that help. First, keep the rules of 72, 114, 144, and 168 in mind as primary markers for 2×, 3×, 4×, and 5× respectively. Note that these are all multiples of 6, and that the “half-step” rules are also multiples of 6, and fall between the other numbers. So, if you forget how to work out 2.5×, you can realize that the rule is somewhere between 72 and 114, and then recall that 96 is the rule you need! Here is a handy Wolfram|Alpha chart for which rules go with which amounts.

*“RULE” EXAMPLES:* In the video above, Timmy needs to find out how long it will take to get 10 times his money at a 10% interest rate. Since we only have rule up to 5, how do we work this out? Well, 10 times the money is basically the same as quintupling the money, then doubling that amount of money. So, we can work out the quintupling times and doubling times at 10%, then add them together!

For quintupling, we use the rule of 168 to find that ^{168}⁄_{10} ≈ 16.8 years. Since these are estimates, you can usually round up to the nearest integer to help with the accuracy. So, his money will quintuple in about 17 years. How long will it take to double from there? We use the rule of 72 for doubling, so ^{72}⁄_{10} ≈ 7.2 years, and rounding up gives us 8 years. Since it will take about 17 years to quintuple, and about 8 years to double, then getting 10 times the amount should take roughly 17 + 8 = 25 years. In the video, they note that it will take 26 years, so we've got a good estimate!

In his *Impress by doing compound interest in your head* post, Martin Lewis describes the following interest problem: “What is the APR, ie annual interest rate, if you borrowed £80,000 and had to repay £200,000 six years later?”

Since £200,000 ÷ £80,000 = 2.5, we can use a simpler approach than Martin Lewis did in his article, as we know that the rule of 96 with the 6 year time span to work out the annual interest rate. ^{96}⁄_{6} ≈ 16% interest, the same answer Martin worked out!

**USING e:** Once you start getting too far beyond 25 time periods (25 years for annual interest rates), you should start using

*e*(roughly 2.71828...) to estimate compound interest over the long term. Last March, I wrote

*Calculate Powers of e In Your Head!*to help with this exact task. At this point, you're probably more concerned with the scale of the answer, rather than the exact answer, so working out just the equivalent power of 10 is all you really need.

**SHORT VERSION:**So, instead of providing one way to estimating compound interest, here are 3 methods for different scale problems. If the rate is 5% or less, and the interest is applied 5 or fewer time, the binomial method is the way to go. If your problem is larger than that, and covers less than 25 time periods, then use the rules approach (rule of 42, 72, 96, etc.). If the interest is applied more than 25 times, use

*e*to get an idea of the scale.

It may not be the simplest estimation approach for compound interest, but if you're stuck without a calculator, this will help you get by until you can more accurately crunch the numbers.

## Cards and Dice

Published on Sunday, February 01, 2015 in fun, magic, math, playing cards, videos

Presh Talwalkar, from the *Mind Your Decisions* blog, recently shared a fun magic trick.

It involves playing cards and dice. Because it's mathematically based, however, you might just fool yourself while performing it. You'll really only fool yourself if you don't analyze the math behind the trick, which is exactly what we're going to do in this post.

First, let's take a look at Presh's video, from this January 2015 post:

There's quite a bit going on here, so let's break this down piece by piece.

**CARDS:** Let's ignore the dice for the time being, and focus only on the playing cards. During the dealing process, cards fall into 1 of 2 categories: Either they're dealt individually, or they're in the remainder that is placed on top of the stack. Let's look at each of these categories separately.

*DEALT CARDS:* We'll start with the first example from the video, where 10 cards were used, 7 of which were dealt. What happens to those 7 cards. The card in position 1 is dealt first, and will obviously become card 10. The card at position 2 will wind up as the 9th card, and so on. Take a look at where these 7 cards end up in the final stack:

```
Starting position Ending position
----------------- ---------------
1 10
2 9
3 8
4 7
5 6
6 5
7 4
```

See the pattern? The starting position plus the ending position always add up to 11, in this example! Why 11? What would happen if we used, say, 18 cards instead? Well, 1 would become 18, 2 would become 17, and so on. In that example, everything totals 19. The resulting total will always be 1 more than the number of cards involved.We can use this to work out a formula for the dealt cards. The total number of cards plus 1, minus the starting position of a dealt card, will give you the ending position. So, in our example with 10 cards, of which 7 are dealt, we can work out the total number of cards (10) plus 1 (equals 11) minus the original position (say, 3, so 11 minus 3 equals 8) gives us the ending location of that card (so, we can easily say that, in this example, the card that started at the 3rd position will wind up at the 8th position).

A simpler way to say this is to use S for starting position, E for ending position, and N for the total number of cards. So, our formula for dealt cards could be written as E = (N + 1) - S

That's OK for the dealt cards, but what about the undealt cards?

*UNDEALT CARDS:*If you have 10 cards with 7 cards dealt, cards 8, 9, and 10 will not be dealt. They are simply placed on top of the dealt cards as a group.

In this case, the original 8th card becomes the first card, the 9th card becomes the 2nd card, and the 10th card becomes the 3rd card. Let's chart these positions and find a pattern:

Starting position Ending position ----------------- --------------- 8 1 9 2 10 3This pattern is even simpler! The starting position, minus the number of dealt cards, gives the new ending position. Using D for the number of dealt cards, and the same variables from the first formula above, we have E = S - D for the undealt cards.

OK, we've got 2 formulas to handle our 2 cases, so let's bring the dice back in.

**DICE:**Since the dice are used to choose random numbers, we'll refer to them with the letter R, and since high, low, and medium numbers are important, we'll use R1 for the dice with the lowest number, R2 for the dice with the middle number, and R3 for the dice with the highest number.

*FOLLOW THE TOP CARD:*As explained, knowing the top card is the key to this trick, so we're only going to follow that particular card.

How many cards are used? In the first performance, the dice rolled with R1=2, R2=3, and R3=5, which means that 10 cards are used. More generally, the dice total determines the number of cards used, so N (total number of cards) = R1 + R2 + R3. In our example, this was 5 + 3 + 2 = 10 cards.

*Step 1:*Note that, when the cards are dealt initially, the top card ALWAYS becomes the bottommost card. So, the starting position for the predicted card is always at the bottom as well. In other words, S (the starting point) = R1 + R2 + R3, as well. So, the predicted card starts at 10 in the first example. In other words, S = 10.

*Step 2:*For the next deal, R2 is removed (3 in the first example), and R1 + R3 dice (D = 7) are dealt. The card as starting position 10 (S=10) is obviously not going to be dealt, so we'll apply the undealt card formula (E = S - D). E = 10 - 7 = 3. So, the predicted card winds up at position 3 in the example.

Let's look at this more generally. The card starts out at position S, which is also R1 + R2 + R3. You're dealing D cards, and D = R1 + R3. So, E = S - D can be re-written as E = R1 + R2 + R3 - (R1 + R3), which simplifies to E = R1 + R2 + R3 - R1 - R3, which further simplifies to E = R2.

In other words, after the first dealing of D cards, the predicted card will wind up at the position denoted by R2, the removed dice! That's interesting and unexpected.

*Step 3:*So, now we want to see what happens to the card at position R2 on the next deal. Because R2 must always be less than the total of R1 + R3 (removing the middle number ensures this), R2 will always be among the cards dealt in this phase. This means we need to follow the dealt card formula from above (E = (N + 1) - S).

In the 10 cards total/7 cards dealt example, we're now tracking the 3rd position, so E = 10 + 1 - 3, which simplifies to E = 8, so our 3rd card winds up in the 8th position.

The current general starting position is, as we already know, is R2. We can turn the formula, then, into E = (N + 1) - R2. Further, since the total number of cards, N, is R1 + R2 + R3, we can change the formula into E = R1 + R2 + R3 + 1 - R2. This simplifies into E = R1 + R3 +1.

Interpreting that general formula, that means the predicted card has now moved to the position denoted by the remaining dice plus 1. Sure enough, in our running 10/7 example, 7 remains, and the predicted card has moved to the 8th (7 + 1) position!

*Step 4:*This should be pretty clear. The card we're following is at position R1 + R3 + 1, and we're going to deal R1 + R3 cards off of it. In our example, the card we're tracking is at position 8, and we're going to deal 7 cards from above it. Either way, the card will be moved to the first position!

**SHORT VERSION:**If you read the above carefully, you can start to see

*WHY*this card trick works. The predicted card starts at the bottom of the pile. Next, it moves to position R2, followed by a move to position R1 + R3 + 1, and finally to position 1.

**CREDITS AND OTHER THOUGHTS:**As noted in Presh's original post, he developed this after reading the Low Down Triple Dealing routine, as found in the book

*Mathematical Card Magic*by Colm Mulcahy.

There's limitless variations to this type of routine, one of which was created by Jim Steinmeyer for use by David Copperfield's

*Fires of Passion*TV special.

If you'd like to play around with this principle without having to constantly deal cards, I've created a formula in Wolfram|Alpha that will effectively deal the cards for you.

Returning one last time to our 10 card pile (N=10) with 7 cards dealt (D=7) example, you simply set N and D, and the calculation will do the rest. The output you get from this run is {8, 9, 10, 7, 6, 5, 4, 3, 2, 1}. The numbers are the starting positions (S), and each number's placement is their ending position (E). 8 being placed first means that it started in the 8th position and moved to the first position. 9 being in the second position means that the cards which started out 9th has been moved to the 2nd position, and so on.

As a matter of fact, since the total cards (N) and the number of dealt cards (D) stay constant in most routines, you can use this one output to track the card through multiple deals. I'll show you what I mean by following through 3 deals of 7 cards from a pile of 10.

What does {8, 9, 10, 7, 6, 5, 4, 3, 2, 1} tell us about the original 10th card? One quick glance tells us it became the 3rd card (because there's a 10 in the 3rd position. Where does the 3rd card go from there? Another quick glance tells us that, since 3 is in the 8th position, the 3rd card must move to the 8th position next. Finally, what happens to the 8th card? It winds up on top, because we can see the 8th card at position 1!

That's how an entire routine with multiple deals can be explored using only one simple mathematical result!

Thanks for creating and sharing this routine, Presh! I'd love to hear about any variations my readers develop in the comments, as well!