## GA. Stacking the Chips

Jeff Yoak discusses the mathematical – and non-mathematical – nature of poker. Sitting at the table led him to wonder: Which numbers, precisely, are the sum of consecutive integers, and in how many ways?

## FZ. Find the Coin!

The Math Factor podcast catches up with Jeff Yoak, an author on the Math Factor website, to discuss his fantastic Find-the-Gold-Coin puzzle.

## Yoak: Cut The Cube

Here’s a classic from Martin Gardner:

Suppose that you have a 3″ on a side wooden cube and a buzz saw.  You wish to cut the cube into 27 smaller cubes, each 1 cubic inch. It is easy to see that you can do this with six cuts.  You simply hold the cube in its original position while making two cuts that trisect each face.

Can it be done if fewer cuts?  If so, tell us how.  If not, prove that it can’t be done.

## Yoak: Face Up

This is a classic puzzle from Martin Gardner that also appears in Peter Winkler’s Mathematical Puzzles: A Connoisseur’s Collection.  (At least I think so.  My copy is buried in a box somewhere.)

First, a warm-up puzzle:

You’re blindfolded and I will place two cards on the table in front of you, each either face up or face down at my option.  We’ll then play a game taking turns.  On your turn, you may turn over either one or both cards.  On my turn, I may either swap the positions of the cards without changing which might be face up or not at my option.  You are unable to detect whether or not I’ve made a swap.  You win as soon as both cards are face up.  Your task is to identify a set (deterministic) strategy that you can use such that regardless of how I place and switch cards you are sure to win.

[spoiler]

The strategy that you can employ to be sure to win this version is to flip both cards on your first turn, and then flip one card on your next turn.  Then finally you flip both cards on your final turn.

There are three states the cards can start in: both up, both down and one of each.  If they are both up, you win without taking a turn.  If they are both down, your first turn causes you to win.  If one is up and one is down, you maintain this state (though you reverse the cards) in your first turn.  On your second turn, you either turn up the down card (and win) or turn down the up card.  In this latter case, your third step of flipping both cards makes you a winner.

[/spoiler]

Now, consider a tougher version of the problem.  You now have four cards, each on the corner of a square table.  The setup is the same as before.  You’re blindfolded and I place the cards faces up or down in a way that I think will stump you.  You flip 1,2,3 or all cards on your turn, and then I either leave the table alone or rotate it 90, 180 or 270 degrees.  You can’t tell if the table has turned.  You then do some more flipping, etc.

(Note that I can’t arbitrarily re-order cards — only rotate the table.  Their relative position remains constant.  I didn’t labor this point in the first puzzle as with two cards it isn’t a distinction.  You can imagine that the rules are identical and the table can only be rotated 180 degrees.)

Can you identify a pattern of steps you can take that will ensure victory regardless of my placements and turning?

## Yoak: Labelous

I have in front of me three boxes.  One contains all red balls.  One contains all blue balls.  The third contains a mixture of red and blue balls.  The three boxes are labeled as to their contents, and the three labels correspond to possible contents of a box, but you know that the labels are all misplaced.

You may draw one ball (at random) out of a box of your chosing.  After that, you must rearrange the labels so that they correctly reflect the contents of the boxes.  How do you do this?

## Yoak: Pick a ball! Any Ball!

This is a quickie that came out of my computer programming work adapted as a puzzle.

I propose to stand in front of you with a bag of balls.  I will hand you the balls one at a time.  You have no idea how many balls my bag contains.  I will also provide you with a magic device such that when its button is pushed, it provides you with a random number between 0 and 1.  You may use this as often as you like.

You must hold on to exactly one ball at a time.  When I hand you a ball, you must either throw it away immediately or else retain it and throw away the ball that you were previously holding.  After you have either retained or thrown away the last ball, your goal is for there to be an exactly equal chance that you are currently holding each of the balls that I have handed you.

It may help to provide a similar problem to demonstrate how you might use the magical device to accomplish something similar.  Suppose that I told you in advance that there were ten balls.  You could then use the device to generate your random number and multiply that number by 10.  This would give you a random number between 0 and 10 uniformly distributed over that range.  You could then designate all numbers up to 1 as pointing to the first ball, numbers greater than 1 up to 2 as the second ball, etc.  Your strategy would then be to throw away balls until handed the ball corresponding to your number and retaining that one from then on.  With this strategy, you would retain each of the balls with an exactly 10% chance.

This method can’t be directly adapted to the puzzle because you wouldn’t know what multiple to use before the first draw because you don’t know how many balls will be present, so you’ll need another strategy.

## Yoak: Followup to A Rather Odd Car Trip

This is a followup to my earlier post, A Rather Odd Car Trip.  It provides a solution so if you haven’t read that yet, you should do so first as this won’t make much sense without it.

[spoiler]

Though czarrandy and others provided the distance between the cities, I’d like to show a way that you can work the problem.

We want to work out an equation that explains the amount of time traveled each  downhill, level and uphill in terms of the distances involved.

How long does it take to travel a particular distance at a particular rate?  Take the uphill portion as an example.  At 56 mph, you travel 1 hour / 56 miles or n hours / x miles for any given distance x.  So:

1/56 = n / x

Solve for n (hours) and you get:

x/56 hours traveled for distance x.

Do something similar for the level distance (call that y) and the downhill distance (call that z) and you get this equation for the time traveled in terms of the three distances traveling from A to B in 4 hours:

x/56 + y/63 + z/72 = 4

For the trip back, where uphill becomes downhill and vice versa, we get:

z/56 + y/63 + x/72 = 4 2/3 or 14/3

If we could solve for x, y and z, we would get our answer, but generally there will not be a unique solution for two equations with three unknowns.  But in this case, what we need is the value of x+y+z , which we can attempt to extract that from the equations.

First, add the two equations together and get:

x/56 + x/72 + y/63 + y/63 + z/56 + z/72 = 26/3

To collect the terms, multiply both sides by the least common multiple of the denominators, which is 504, and we get:

9x + 7x + 8y + 8y + 9z + 7z = 4368
16x + 16y + 16z = 4368
16(x+y+z) = 4368
x+y+z = 273

for 273 miles each way.  Notice that what we did was to add the equations up to get a value for the round trip, which might have been a first intuitive step if you happened to think of it.

Now… it was very lucky that we were able to nicely factor out that 16 in order to solve for x+y+z.  This won’t always be the case!  The three speeds were chosen carefully so that this would work out.  Consider if we used some other randomly chosen values:

Uphill: 50 mph
Level: 60 mph
Downhill: 70 mph

Leave the times the same, so:

x/50 + y/60 + z/70 = 4
x/70 + y/60 + z/50 = 14/3

or x/50 + x/70 + y/60 + y/60 + z/70 + z/50 = 26/3

Multiply by the least common multiple of the denominators, 2100, and get:

42x + 30x + 35y + 35y + 30z + 42z = 18200
72x + 70y + 72z = 18200

As you can see, there isn’t going to be any way to factor out x+y+z to get a unique total distance.  You could experiment to demonstrate that you can pick values for x, y and z that satisfy the equation and for which x+y+z will differ.

The final question that interested me is how to identify the cases where there does turn out to be a solution.  From the process we just followed, you can see that you want the final coefficient of the x and z terms, or the uphill and downhill time traveled, which will always be equal to each other, to also be equal to the coefficient of the y term or the time traveled level.

Since we’ve added the two equations from the round trip, the meaning of these terms is the time taken to travel round-trip over a slanted piece of road.  So in English, in order to have a unique solution to the problem, the speeds must be specially selected such that the time it takes to travel round-trip over a slanted piece of road must be the same as the time it takes to travel over a level piece of road.

I got this problem originally from Nick’s Mathematical Puzzles. There are a lot of neat puzzles on the site to enjoy.

[/spoiler]

## Yoak: A Rather Odd Car Trip

Here’s a puzzle that sounds a little like those, “A train leaves…” questions we were all prepared for but rarely saw on the SAT, but with a twist.

You are going to take a drive from City A to City B and back, but in a rather unusual car.  When travelling uphill, the car always moves at exactly 56 miles per hour.  On level ground, it travels at 63 miles per hour and finally when travelling downhill it travels at 72 miles per hour.  Assume that it transitions from one speed to another instantaneously and all of those other “mathematically perfect” qualities that make questions like this answerable.

You find that travelling from City A to City B takes exactly 4 hours of travel time.  On the return trip, driving time sums to 4 hours and 40 minutes.

How far apart are Cities A and B?

## Yoak: A Fun Math Trick – Guess the Polynomial

Here’s an old puzzle, I think from Martin Gardner though I can’t immediately find a reference, adapted as a fun trick for spring break — if you have just the right sort of friends.

Invite a friend to invent a polynomial of any order, but require that it have only positive integer coefficients. Next, you explain that you have to get something of a feel for the polynomial so you provide an integer and ask them to apply the polynomial to it, telling you the value. You may have to do this more than once. You then close your eyes and dramatically tell them what their polynomial is.

What strategy would you use and how many values would you have to provide?

## Yoak: Will A Real Gold Coin Please Stand Up?

You have a sack of coins of three types: brass, silver and gold. You know that the majority of the coins are gold, though they’ve been painted and partially hollowed so that you can’t actually determine the type of a particular coin. Fortunately, you have a machine into which you can insert two coins and the machine will tell you whether the two coins are of the same type or different types.