Friday, December 11, 2020

Will Geulleu

 Will Geulleu

By Bobby Neal Winters

One day last week I was sitting in the faculty lounge and separating decks of playing cards that someone had shuffled together for some reason.  Doing tasks like this is my karma, both in the literal and the metaphorical sense.  I was working happily away when Will Geulleu, a well-known member of the faculty walked in.  

Will is not well-known because he’s a great teacher; he might very well be.  He’s not well known because he’s a careful researcher; I can’t say one way or the other.  

He is well-known, however, to be a card shark.

Will, looking at the cards in my hands and their state of disarray, smiled.

“I bet I can tell you exactly how many cards you have in your hands,” he said with a twinkle.

“I don’t bet,” I replied because indeed I don’t.  I remember, but I didn’t tell him, that line from “Guys and Dolls” about a card jumping from a deck and spitting cider in your ear.  “I don’t bet,” I repeated, “but I would be interested in you telling me how many cards I have.”

Will thought a spell before replying.

“Okay,” he finally replied, “but it will require effort on your part.  This is magic, but it comes at a cost.”

It was my turn to smile.  I don’t believe in magic anymore than I believe in taking someone else’s bet, but know I was curious to see how his game played out.

Will then outlined a procedure for me to follow, which I will now share with you.

Deal out (almost) all of the cards into four stacks; each of the stacks will contain exactly the same number of cards.

When dealing out the cards into four stacks, they might not come out even, i.e. there might be 1, 2, or 3 left over.  If there are cards left over, put them into their own stack in a particular case.  If the cards come out even, put down a poker chip in the place where you would’ve stacked the cards. 

Once all of the cards have been dealt and either the left over cards (or the chip) have been put in their place, pick up exactly one of the four equal piles and move the remaining three stacks out of the way.

Take the one stack you took from the four equal stacks produced by your dealing, and repeat steps 1-3 from above with it. Again, when you are done, put down either the left over cards or the poker chip to the right of your previous cards or poker chip.

Continue this process until all of the chips are gone.

I asked Will to leave the room while I did this because I wanted to be sure he wasn’t counting the cards as I dealt them out. That wouldn’t  have been fun at all.  Once he was safely out of the room, I began the process.

The first round of dealing came out even, so I put down a poker chip.  The second round I only had one card left over, so I put it down to the right of the poker chip.  After the third round, I had two cards left; to make the easy to count, I put them down in a vee shape to the right of the single card from round two.

At this point, each of the stacks had only one card, so I was momentarily confused.  I became very literal-minded at this point, and dealt it out into four stacks of 0 cards and had only one left over.  When I was done, it looked as in the picture below:

At this point, I invited Will back into the lounge.  He looked at the cards, knitted his brow a bit, and moved his lips silently, giving the appearance of great concentration.  Once he was done with his dramatics, he gave his pronouncement.

There are 100 cards.

I gathered all of the cards together and this time used my own algorithm, counting them into stacks of ten.  When I was done, I had ten stacks of ten.  Will was right, there were 100 cards.

The reader is at this point invited to pause to figure out how it was done.

The Explanation

As a mathematician, I realized immediately how he did it.  Actually, it took a minute or two, but there was no way I was going to let him know that, so I played it cool until I figured it out and then--and butter would not have melted in my mouth--I told him how he did it.

Now I will tell you.

The process Will described was a sneakily disguised algorithm for rendering numbers into base 4.  You can use it to put numbers into any base, actually, by having the number of equal stacks be equal to the desired base.  In this process, we represented the number of cards by



But in standard written notation it would be 1210 (base 4); note the reversed order which makes it even sneakier.  Expanding this number from base 4 gives (1)(64) + (2)(16) + (1)(4) + (0)(1) =100 base 10.

The dealing process and reserving the number of left over cards is a physical representation of what mathematicians call the Division Algorithm.

The process of yielding a number into a particular base can be put into a simple algorithm that we represent in pseudo-code below:

Digit_list = []
While N > 0:
N, r := N // base, N % base
        Digit_list.append(r)
Return Digit_list

Where // denotes integer division and % denotes keeping the remainder from division. 

Doing this on a computer seems like cheating when compared to the elegant simplicity of the Dealing Algorithm. To use a computer, one must know what the number is to begin with and have a representation of it in some base already.  With the Dealing Algorithm, the number of cards is unknown at the beginning.  Performing the algorithm reveals the name of the number, like tricking out the name of Rumplestilskin. 

A Final Walk-Through

To achieve a fuller understanding from the barebones level, let’s trace through the Dealing Algorithm again.

Recall, in the first round everything came out even and a put down a poker chip that represented 0.  Add 0 times 1 to the total.

I had four stacks of cards each having exactly the same (unknown) number of cards.  I only took one of those stacks to the next round, but each card in that one stack is standing for four cards, one from each of the stacks.

In the second round, when I deal out the cards and have one card left over, that one card is standing in for four cards.  I now add 4 cards to my previous total making 4 cards all together now. 

I take one of the four stacks to the third round, but each card in that stack is standing for four from the previous stack and each of those was standing for four from the first round.  That means when I have two cards left over, they are representing 2 time 16 = 32 cards.  Adding this to the total brings it to 36.

My equal “stacks” of cards each now consists of one card.  That one card will be the remainder of the fourth round dealing process.  It stands for four third round cards, and therefore for 64 cards total. So this round contributes 64.  Adding this to the total brinks us to one hundred. 

This is a simple physical process, but it does arithmetic for us.