## HR. CardColm

Colm Mulcahy, of Spelman College in Atlanta, joins us to share his ice cream trick from his CardColm mathematical card trick column on the MAA website! You’re invited to explain how this works in the comments below.

Colm also shares a quick puzzle, tweeted on his What Would Martin Gardner Tweet feed @WWMGT. And finally we touch on the Gathering For Gardner and the Celebration of Mind, held all over the world around the time of Martin Gardner’s birthday, October 21.

And at last we get around to answering our quiz from a few weeks ago. There are indeed two solutions for correctly filling in the blanks in:

The number of 1’s in this paragraph is ___; the number of 2’s is ___; the number of 3’s is ____; and the number of 4’s is ___.

[spoiler] namely (3,1,3,1) and (2,3,2,1) [/spoiler]

We can vary this puzzle at will, asking

The number of 1’s in this paragraph is ___; the number of 2’s is ___; ….. and the number of N’s is ___.

For N=2 or 3, there are no solutions (Asking that all the numbers we fill in are between 1 and N); for N=4 there are two. For N=5 there is just one, for N=6 there are none and beyond that there is just one. I think we’ll let the commenters explain that.

But here’s the cool thing.

One way to approach the problem is to try filling in any answer at all, and then counting up what we have, filling that in, and repeating. Let’s illustrate, but first stipulate that we’ll stick with answers that are at least plausible– you can see that the total of all the numbers we fill in the blanks has to be 2N (since there are 2N total numbers in the paragraph).

So here’s how this works. Suppose our puzzle is:

There are ___ 1’s;___ 2’s; ___ 3’s; ___ 4’s; ___ 5’s

Let’s pick a (bad) solution that totals 10, say, (2,4,1,2,1). So we fill in:

There are __2_ 1’s; __4_ 2’s; _1__ 3’s; __2_ 4’s; _1__ 5’s

That’s pretty wrong! There are actually three 1’s in that paragraph, three 2’s; at least there is just one 3, and two 4’s and one 5. In any case this gives us another purported solution to try: (3,3,1,2,1). Let’s fill that in:

There are __3_ 1’s; __3_ 2’s; _1__ 3’s; __2_ 4’s; _1__ 5’s

That attempt actually does have three 1’s; but has only two 2’s; it does have three 3’s but only one 4 and one 5. So let’s try (3,2,3,1,1):

There are __3_ 1’s; __2_ 2’s; _3__ 3’s; __1_ 4’s; _1__ 5’s

Lo and behold that works! We do in fact have three 1’s; two 2’s; three 3’s and yes, one 4 and one 5.

So we can think of it this way: filling in a purported solution and reading off what we actually have gives another purported solution.

In this case (2,4,1,2,1) -> (3,3,1,2,1) -> (3,2,3,1,1) -> (3,2,3,1,1) etc,

We can keep following this process around, and if we ever reach a solution that gives back itself, we have a genuine answer, as we did here.

So here’s an interesting thing to think about.

First, find, for N>=7, a correct solution; and a pair of purported solutions A,B that cycle back and forth A->B->A->B etc.

Second, find a proof that this is all that can happen (unless I’m mistaken)– any other purported solution eventually leads into the correct one or that cycle.

## gpeace said,

April 14, 2012 at 11:31 am

I like the problem with the two triangles (sides 5, 5, 6 and sides 5, 5, 8), but I’m surprised that people who know advanced math would get stuck on it.

[spoiler]

My answer is that they have the same area. Bisect the angle contained by the equal sides and you get two right triangles. For the first triangle, the hypotenuse is 5 and one side is 3, so by the Pythagorean theorem the height is 4. The other triangle has hypotenuse 5 and one side is 4, so the height is 3.

The areas of both triangles equal 12.[/spoiler]

## Harry Kaplan said,

April 17, 2012 at 4:00 pm

I tried to replicate Colm’s ice-cream-scoop-and-toppings trick using 15 cards and the flavor vanilla. At the end of three cycles, as in the podcast, the card that had started on the bottom was on the bottom again, not the top. However, when i repeated the process with 13 cards instead of 15, all went well and the bottom card had moved to the top. What am I missing? Colm named vanilla as an acceptable flavor, and he also gave a range of size of the card pile which included 15. Even if I did misunderstand the parameters, I don’t see how this could be a very good in-person card trick, because someone might easily take 15 cards when asked to take roughly a quarter of the deck. Any insight?

## Harry Kaplan said,

April 18, 2012 at 2:49 pm

With respect to the problem of creating correct counts of integers that appear in a paragraph:

For N=7 the solution is:[spoiler]

There are 4 1’s; 3 2’s; 2 3’s; 2 4’s; 1 5’s; 1 6’s; and 1 7’s in this paragraph.

A simple algorithm will transform the solution that for any N>6 to that for N+1. Add “1 N+1’s” at the end of the paragraph after “1 N’s.” Add 1 to the count for 1’s in the solution for N. Finally, move the last count of 2 that appears in the solution for N (call it the count of K’s) to the count for the next highest integer (K+1), replacing the 2 K’s by a count of 1 K’s. Applying this rule to proceed from N=7 to N=8:

There are 5 1’s; 3 2’s; 2 3’s; 1 4’s; 2 5’s; 1 6’s; 1 7’s; and 1 8’s in this paragraph.[/spoiler]

I believe this rule will work indefinitely as N is increased.

On the podcast Chaim said that the relationship between this problem and some of Alan Turing’s work would be explained on the website. I think that fell through the cracks. I’m guessing it has something to do with self-reference as mentioned on the podcast — each individual count, which can be turned into a sentence, refers to the entire paragraph. Can someone please explain where Turning comes in?

## strauss said,

April 18, 2012 at 3:02 pm

Yes, there are really two ways this (at least tangentially) illustrates some of the principles behind Turing’s work. Most of all, this is about the dual nature of language, as data, and as meaning; this is an endless source of puzzles and paradoxes, and is at the very foundations of logic and computation. Among many excellent references are the Pulitzer prize winning Gödel-Escher-Bach and the more recent graphic novel Logicomix. (Right next to my chair is The Universal Computer: The Road from Liebnitz to Turing; fantastic!) And of course that’s what’s driving this puzzle, though it is a lot less confusing in the end than what

canhappen.The second connection may be a bit spurious and narrower; basically what I listed in the post was a way to rewrite a purported solution to get another purported solution. Such rewriting systems are another way to look at computation– in effect all that’s happening inside your computer is a gigantic rewriting of the computers memory at every step. But there are much simpler rewriting systems that already have the full power of universal computation (This isn’t saying much more than there are simple models, period, of universal computation, since in effect, every such model more or less comes down to rewriting something or another) But this puzzle as stated

isn’tthat powerful, provably, since everything eventually gets sucked into the ABAB.. cycle or the actual solution.For more interesting examples, check out my survey “Can’t Decide? Undecide!” at http://ams.org/notices/201003 Probably my favorite there is Mysterious Example #3.

## Harry Kaplan said,

April 20, 2012 at 11:16 am

With all due respect, I think Chaim’s conjecture in his essay above is incorrect. He proposes that the convergence method he describes for the “paragraph” of integer counts will end either in the correct answer or an an infinitely repeating loop of two incorrect answers A->B->A->B->… But here is an example that converges quickly in a loop of three incorrect answers A->B->C->A->B->C->…

1’s| 5 4 5 5 4 5 5

2’s| 2 4 2 2 4 2 2

3’s| 2 1 1 2 1 1 2

4’s| 2-> 1-> 3-> 1-> 1-> 3->1-> etc.

5’s| 1 2 1 2 2 1 2

6’s| 1 1 1 1 1 1 1

7’s| 1 1 1 1 1 1 1

Perhaps a better approach would be to first prove that the procedure will always converge either in a correct solution or in an infinitely repeating loop. Then, as a second step, find the upper bound of “paragraphs” or states on that loop.

This isn’t meant to be a spoiler — I just don’t think anyone would want the Math Factor community to be working feverishly to prove an incorrect conjecture. I still find it amazing that this method (maybe) is always guaranteed to converge, sometimes even with the right answer.

## strauss said,

April 20, 2012 at 12:00 pm

You are right Harry! I forgot to mention that interesting example; You’re right– the business with the AB’s starts for N>=8.

## Harry Kaplan said,

April 21, 2012 at 4:34 pm

With respect to my first posted comment here, re Colm Mulcahy’s card trick:

There is a stipulation which I missed (Colm mentions it in the podcast) that the number of cards you are working with must be less than or equal to twice the number of letters in the ice cream flavor. In my case 15 (cards) is not less than or equal to 2 x 7 (7 being the letters in “vanilla”). So I did not uncover anything unexpected. The only (trivial) comment I’d make is that if you were doing the trick live, there is a modest chance that your subject would name vanilla and then take 15 or more cards from the deck – that’s what I did. (Thanks to Colm for pointing me in the right direction.)

## Pratik Poddar said,

June 16, 2014 at 12:15 pm

As posted in comments on my blog: http://www.cseblog.com/2013/07/self-referential-problem-from-what.html

For general N>6, the following solution works.

The number of 1?s in this paragraph is N-3; the number of 2?s is 3; the number of 3?s is 2; .. the number of N-3?s is 2. All other blanks are 1.

This solution works as long as N-3 > 3, i.e., N > 6.

Thought process

Again, the sum of the blanks has to be 2N. That implies the average in a blank is 2. This must mean most values are small.

Now, most blanks are small imply the majority of the values are 1 or 2. Most blanks cannot have 2 because then we won’t be able to satisfy all the statements ‘The numbers of K’s in the paragraph are 2’.

So, let us assume that most blanks are 1 and try possible values for the first blank. Suppose we fill the first blank with N-p. Then the (N-p)th blank will have value at least 2. A larger value will again lead to all constraints not being satisfied. So, the (N-p)th blank is 2.

Now, the second blank is at least 2. But it cannot be 2 (because then there would be three 2’s). So, the second blank is greater than equal to 3. As it turns out, it cannot be greater. So, this blank is filled with 3.

Now, the third blank can be filled with 2 and all others with 1. And the value of p can be determined by the fact that the sum is 2N. Comes out to be 3.

I agree the proof is not rigorous about why no other solution works.