Plow-Pair

Futoshiki is fun. It’s a number-puzzle where you use logic to re-create a 5×5 square in which every row and column contains the numbers 1 to 5. At first, most or all of the numbers are missing. You work out what those missing numbers are by using the inequality signs scattered over the futoshiki. Here’s an example:


There are no numbers at all in the futoshiki, so where do you start? Well, first let’s establish some vocabulary for discussing futoshiki. If we label squares by row and column, you can say that square (4,5), just above the lower righthand corner, dominates square (4,4), because (4,5) is on the dominant side of the inequality sign between the two squares (futōshiki, 不等式, means “inequality” in Japanese). Whatever individual number is in (4,5) must be greater than whatever individual number is in (4,4).

Conversely, you can say that (4,4) is dominated by (4,5). But that’s not the end of it: (4,4) is dominated by (4,5) but dominates (3,4), which in its turn dominates (2,4). In other words, there’s a chain of dominations. In this case, it’s a 4-chain, that is, it’s four squares long: (4,5) > (4,4) > (3,4) > (2,4), where (4,5) is the start-square and (2,4) is the end-square. Now, because 5 is the highest number in a 5×5 futoshiki, it can’t be in any square dominated by another square. And because 1 is always the lowest number in a futoshiki, it can’t be in any square that dominates another square. By extending that logic, you’ll see that 4 can’t be in the end-square of a 3-chain, (a,b) > (c,d) > (e,f), and 2 can’t be in the start-square of a 3-chain. Nor can 3 be in the start-square or end-square of a 4-chain.

Using all that logic, you can start excluding numbers from certain squares and working out sets of possible numbers in each square, like this:

[whoops: square contains errors that need to be corrected!]


Now look at column 1 and at row 4:


In column 1, the number 5 appears only once among the possibles, in (1,1); in row 4, the number 1 appears only once among the possibles, in (4,1). And if a number appears in only one square of a row or column, you know that it must be the number filling that particular square. So 5 must be the number filling (1,1) and 1 must be the number filling (4,1). And once a square is filled by a particular number, you can remove it from the sets of possibles filling the other squares of the row and column. I call this sweeping the row and column. Voilà:


Now that the 5 in (1,1) and the 1 in (4,1) have swept all other occurrences of 5 and 1 from the sets of possibles in column 1 and row 4, you can apply the only-once rule again. 2 appears only once in row 4 and 5 appears only once in column 4:


So you’ve got two more filled squares:


Now you can apply a more complex piece of logic. Look at the sets of possibles in row 3 and you’ll see that the set {2,3} occurs twice, in square (3,1) and square (3,4):


What does this double-occurrence of {2,3} mean? It means that if 2 is in fact the number filling (3,1), then 3 must be the number filling (3,4). And vice versa. Therefore 2 and 3 can occur only in those two squares and the two numbers can be excluded or swept from the sets of possibles filling the other squares in that row. You could call {2,3} a plow-pair or plow-pare, because it’s a pair that pares 2 and 3 from the other squares. So we have a pair-rule: if the same pair of possibles, {a,b}, appears in two squares in a row or column, then both a and b can be swept from the three other squares in that row or column. Using {2,3}, let’s apply the pair-rule to the futoshiki and run the plow-pare over row 3:


Now the pair-rule applies again, because {4,5} occurs twice in column 5:


And once the plow-pare has swept 4 and 5 from the other three squares in column 5, you’ll see that 3 is the only number left in square (1,5). Therefore 3 must fill (1,5):


Now 3 can be swept from the rest of row 1 and column 5:


And the pair-rule applies again, because {1,2} occurs twice in row 2:


Once 2 is swept from {2,3,4} in square (2,1) to leave {3,4}, 3 must be excluded from square (2,2), because (2,2) dominates (2,1) and 3 can’t be greater than itself. And once 3 is excluded from (2,2), it occurs only once in column 2:


Therefore 3 must fill (5,2), which dominates (5,1) and its set of possibles {2,3,4}. Because 3 can’t be greater than 4 or itself, 2 is the only possible filler for (5,1) and only 3 is left when 2 is swept from (3,1):


And here are the remaining steps in completing the futoshiki:

The complete futoshiki


Animation of the steps required to complete the futoshiki


Afterword

The pair-rule can be extended to a triplet-rule and quadruplet-rule:

• If three numbers {a,b,c} can occur in only three squares of a row or column, then a, b and c can be swept from the two remaining squares of the row or column.
• If four numbers {a,b,c,d} can occur in only four squares of a row or column, then a, b, c and d can be swept from the one remaining square of the row or column (therefore the number e must fill that remaining square).

But you won’t be able to apply the triplet-rule and quadruplet-rule as often as the pair-rule. Note also that the triplet-rule doesn’t work when {a,b,c} can occur in only two squares of a row or column. An n-rule applies only when the same n numbers of a set occur in n squares of a row or column. And n must be less than 5.


Post-Performative Post-Scriptum

Domination. Exclusion. Inequality. — an earlier look at futoshiki

Domination. Exclusion. Inequality.

Sudoku has conquered the world, but I think futoshiki is more fun — more concentrated, more compact and quicker. When complete, a 5×5 futoshiki will be a Roman square in which every row and column contains the numbers 1 to 5, but no number is repeated in any row or column. You have to work out the missing numbers using logic and the “inequality” signs that show whether one square contains a number more than or less than a number in a neighboring square — futōshiki, 不等式, means “inequality” in Japanese (fu- is the negative prefix). Here’s an example of a futoshiki puzzle:

Futoshiki puzzle, with 4 in square (3,2) and 3 in square (1,1)


If you identify the squares by row and column, 4 is in (3,2) and 3 is in (1,1). And you can say, for example, that the empty square (3,4) dominates the empty square (3,3) or that (3,3) is dominated by (3,4). I’ll describe one route (not the best or most efficient) to completing the puzzle. Let’s start by considering the general rules that 1 cannot appear in any square that dominates another square and that 5 cannot appear in any square dominated by another square.

If you extend that logic, you’ll see that 4 cannot appear in any square that is at the end of what you might call a chain of dominations, where one square dominates a second square that in turn dominates a third square. Therefore, in the puzzle above, 4 cannot appear in squares (2,1) and (4,1) of column 1. And it can’t appear in square (3,1), because that would mean two 4s in the same row. This leaves one place for 4 to appear: square (5,1). And if 4 is there, 5 has to be in square (3,1):


Now look at row 3. Two of the remaining three empty squares are dominators: (3,4) dominates (3,2) and (3,5) dominates (2,5). 1 cannot appear in a dominating square, so 1 has to be in the dominated square (3,3):


The next step I’ll take is a bit more complicated. In row 2, the number 4 cannot be in (2,1) and (2,4). It can’t be in (2,1) because that would mean 4 was greater than itself. And it can’t be in (2,4), because (2,4) is dominated by (3,4) and (3,4) can’t contain 5, the only number that dominates 4. Therefore 4 must be in either (2,3) or (2,4). But so must 5. Therefore (2,3) contains either 4 or 5 and (2,4) contains either 4 or 5. That means that the numbers [1,2,3] must be in the other three squares of row 2. Now, 3 can’t be in square (2,1), because the chain of dominations is too long. And 3 can’t be in (2,5), because (2,5) is dominated by (3,5), which contains either 2 or 3. Therefore 3 must be in (2,2):


Now consider column 2. Square (4,2) cannot contain 1 or 5, because it’s both dominated and dominating. And if it can’t contain 1 or 5, there’s only one number it can contain: 2. And it immediately follows that (4,1) must contain 1, the only number less than 2. And if four squares of column 1 now contain the numbers [1,3,4,5], the remaining empty square (2,1) must contain 2:


Now consider row 2. Squares (2,3) and (2,4) contain either 4 or 5, therefore (2,5) must contain 1:


Now consider row 5. The number 1 is logically excluded from three squares: from (5,3), because there’s a 1 in (3,3); from (5,4), because (5,4) dominates (5,5); and from (5,5), because there’s a 1 in (2,5). Therefore 1 must be in (5,2). And if 1 is in (5,2), the number 5 must be in (1,2):


Now 1 pops up in row 1 because it can only be in (1,4):


And 5 pops up in row 4 because it can only be in (4,5):


Once 5 is in (4,5), the number 4 must be in (4,4) and the number 3 in (4,3):


The 4 of (4,4) immediately collapses the ambiguity of (2,4), which must contain 5. Therefore (2,3) contains 4:


Next, 5 pops up in (5,3):


And 3 must be in (5,4), dominating 2 in (5,5):


With 3 in (5,4) and 2 in (5,5), the ambiguity of (3,4) and (3,5) collapses:


And the square is completed like this:


Here’s an animated version of the steps to completion:

Futoshiki puzzle animated

There are 719 errors in this sentence

Here’s a famous paradox (or a variant of it at least):

• There are two errers in this sentence.

The only visible error is the misspelt “errers”. But if the sentence claims to have two errors while having only one, that is another error and there are two errors after all.

Now for another variant. I’m not sure if I’ve thought this up for myself, but try this sentence:

• There are three errors in this sentence.

There are no visible errors in the sentence. Therefore it has one error: the claim that it has three errors when there is in fact no error. But if it has one error, it’s in error to claim that it has three errors. Therefore the sentence has two errors. And if it has two errors, again it’s in error, because it claims to have three errors while having only two. Therefore it has three errors after all.

The same reasoning can be applied to any integral number of errors:

• There are five errors in this sentence.
• There are 719 errors in this sentence.
• There are 1,000,000 errors in this sentence.
• There are 1,000,000,000 errors in this sentence.

No matter how large the number of errors, the sentence becomes true instantly, because each time the sentence makes a false claim, it makes another error. But those “times of error” don’t take place in time, any more than this equation does:

• 2 = 1 + 1/2 + 1/4 + 1/8 + 1/16…

So I think these sentences are instantly true:

• There are infinitely many errors in this sentence.
• There are ∞ errors in this sentence.

But there are infinitely many infinities. Ordinary infinity, the infinity of 1,2,3…, is called ℵ0 or aleph-zero. It’s a countable infinity. Above that comes ℵ1, an uncountable infinity. So does this sentence instantly become true?

• There are ℵ1 errors in this sentence.

I’m not sure. But I think I can argue for the validity of sentences claiming fractional or irrational number of errors:

• There is 1.5 errors in this sentence.
• There are π errors in this sentence.

Let’s have a look at “There is 1.5 errors in this sentence”. There are no visible errors, so there’s one error: the claim that sentence contains 1.5 errors. So now there seems to be another error: the sentence has one error but claims to have 1.5 errors. But does it therefore have two errors? No, because if it has two errors, it’s still in error and has three errors. And that generates another error and another and another, and so on for ever. The sentence becomes unstoppably and infinitely false.

So let’s go back to the point at which the sentence contains one error. Now, the difference between 1 error and 1.5 errors is small — less than a full error. So how big is the error of claiming to have 1.5 errors when having 1 error? Well, it’s obviously 0.5 of an error. So the sentence contains 1.5 errors after all.

Now for “There are π errors in this sentence”. There are no visible errors, so there’s one error: the claim that the sentence contains π errors. Therefore it contains one error. But it claims to have π errors, so it has another error. And if it has 2 errors and claims to have π errors, it has another and third error. But if it has three errors and claims to have π error, it’s still in error. But only slightly — it’s now committing a small amount of an error. How much? It can only be 0.14159265… of an error. Therefore it’s committing 3.14159265… = π errors and is a true sentence.

Now try:

• There is -1 error in this sentence.

What is a negative error? A truth. So I think that sentence is valid too. But I can’t think of how to use i, or the square root of -1, in a sentence like that.

H₂Oenometry

You have two glasses each filled with exactly the same amount of liquid. One contains water, the other contains wine. First, take a teaspoon of water from the water glass and pour it into the wine glass. Next stir the wine and water until well mixed. Then take a teaspoon of the water-and-wine mixture and pour it into the glass of water.

The question now is: Is there more wine in the water glass than water in the wine glass, or is there less? (from World’s Most Baffling Puzzles, Charles Barry Townsend, Sterling, New York, 1991)

(Scroll down for answer)


Post-Performative Post-Scriptum

Oenometry means “wine-measurement”, from ancient Greek οἶνος, oinos, “wine”, + μετρία, metria, “measurement”. Its standard pronunciation would be “ee-NOM-ett-ry”, but you could conceivably say “oh-een-NOM-ett-ry” or “oi-NOM-ett-ry”.


Discussion of the answer

The original question is fair but worded to send you astray. By using the words “glass” and “teaspoon”, it creates distinct images in your mind: those of an unvarying teaspoon and of two glasses with identical-but-varying amounts of wine and water in them. So you’re guided away from considering that the contents of the glasses can be measured in teaspoons too. If you think not in teaspoons but in unspecified units (of liquid measure), it’s easier to see the truth.

If the two glasses each contain n units of liquid, by transferring water to the wine you’re adding 1 unit of water to n units of wine.

Therefore the wine glass contains n+1 units of mixed wine-and-water, of which n units are wine and 1 unit is water. Let’s say n+1 = n1.

Consider that 1 unit of that mixture contains n/n1 parts of wine and 1/n1 parts of water: n/n1 + 1/n1 = (n+1)/n1 = n1/n1 = 1 unit.

Now, if one unit of the mixture is transferred to the water glass, you take n/n1 units of wine from n units of wine in the wine glass: n – n/n1 = n-1 + 1/n1. You also take 1/n1 units of water from 1 unit of water in the wine glass: 1 – 1/n1 = (n1-1)/n1 = n/n1. So the wine glass now contains n-1 + 1/n1 units of wine and n/n1 of a unit of water.

When you add that unit to the (n-1) units of water in the water glass, it will contain (n-1) + 1/n1 units of water and n/n1 of unit of wine:

Wine glass: n-1 + 1/n1 units of wine and n/n1 of a unit of water
Water glass: n-1 + 1/n1 units of water and n/n1 of a unit of wine

Therefore, however much water and wine you start with, in the end there will be as much water in the wine glass as there is wine in the water glass. For some concrete examples:

Example #1

1. Start

Water glass: 2 teaspoons of water
Wine glass: 2 teaspoons of wine

2. Transfer water to wine glass and mix:

Water glass: 2 tsp of water – 1 tsp = 1 tsp of water
Wine glass: 2 tsp of wine + 1 tsp of water = 3 tsp of which 2/3 is wine, 1/3 is water

3. Transfer wine-and-water mixture to water glass:

One tsp of wine-and-water mixture = 2/3 tsp of wine + 1/3 tsp of water

Therefore:

Wine glass: 2 tsp of wine – 2/3 tsp of wine = 1 and 1/3 tsp of wine; 1 tsp of water – 1/3 tsp of water = 2/3 tsp of water
Water glass: 1 tsp of water + 1/3 tsp of water = 1 and 1/3 tsp of water; 0 tsp of wine + 2/3 tsp of wine = 2/3 tsp of wine

4. Finish

Wine glass contains: 1 and 1/3 tsp of wine, 2/3 tsp of water
Water glass contains: 1 and 1/3 tsp of water, 2/3 tsp of wine


Example #2

1. Start

Water glass: 10 teaspoons of water
Wine glass: 10 teaspoons of wine

Transfer water to wine glass and mix:

Water glass: 10 tsp of water – 1 tsp = 9 tsp of water
Wine glass: 10 tsp of wine + 1 tsp of water = 11 tsp of liquid of which 10/11 is wine, 1/11 is water

Transfer wine-and-water mixture to water glass:

One tsp of wine-and-water mixture = 10/11 tsp of wine + 1/11 tsp of water

Therefore:

Wine glass: 10 tsp of wine – 10/11 tsp of wine = 9 and 1/11 tsp of wine; 1 tsp of water – 1/11 tsp of water = 10/11 tsp of water
Water glass: 9 tsp of water + 1/11 tsp of water = 9 and 1/11 tsp of water; 0 tsp of wine + 10/11 tsp of wine = 10/11 tsp of wine

4. Finish

Wine glass contains: 9 and 1/11 tsp of wine, 10/11 tsp of water
Water glass contains: 9 and 1/11 tsp of water, 10/11 tsp of wine

Bent Pent

This is a beautiful and interesting shape, reminiscent of a piece of jewellery:

Pentagons in a ring


I came across it in this tricky little word-puzzle:

Word puzzle using pentagon-ring


Here’s a printable version of the puzzle:

Printable puzzle


Let’s try placing some other regular polygons with s sides around regular polygons with s*2 sides:

Hexagonal ring of triangles


Octagonal ring of squares


Decagonal ring of pentagons


Dodecagonal ring of hexagons


Only regular pentagons fit perfectly, edge-to-edge, around a regular decagon. But all these polygonal-rings can be used to create interesting and beautiful fractals, as I hope to show in a future post.

Sampled (Underfoot)

Some interesting statistics from the American sociologist Elizabeth Wrigley-Field:

Here are three puzzles.

• American fertility fluctuated dramatically in the decades surrounding the Second World War. Parents created the smallest families during the Great Depression, and the largest families during the postwar Baby Boom. Yet children born during the Great Depression came from larger families than those born during the Baby Boom. How can this be?

• About half of the prisoners released in any given year in the United States will end up back in prison within five years. Yet the proportion of prisoners ever released who will ever end up back in prison, over their whole lifetime, is just one third. How can this be?

• People whose cancers are caught early by random screening often live longer than those whose cancers are detected later, after they are symptomatic. Yet those same random screenings might not save any lives. How can this be?

And here is a twist: these are all the same puzzle.

• Answers here: Length-Biased Sampling by Elizabeth Wrigley-Field


Proxi-Performative Post-Scriptum

The title of this post is, of course, a radical reference to core Led Zeppelin track “Trampled Underfoot” (1975).

Paradoxical Puzzle Pair

Two interesting puzzles, one of which looks hard and is in fact easy, while the other looks easy and is in fact hard.

1. Three Cards

The values attached to a deck of bridge cards start with the Two of Clubs as lowest, with Diamonds, Hearts and Ace of Spades as highest.

If you draw three cards at random from the deck, what is the probability that they will be drawn in order of increasing value? (Answer 1)


2. The Hungry Hunter

A hunter, having run out of food, met two shepherds. One of the shepherd had three loaves of bread and the other had five loaves. When the hunter asked for food, the shepherds agreed to divide the eight identical loaves equally between the three of them. The hunter thanked them and gave them $8. How should the shepherds divide the money? (Answer 2)

• Puzzles and answers from Erwin Brecher’s How Do You Survive a Duel? And Other Mathematical Diversions, Puzzles and Brainteasers (Carlton Books 2018)

*

*

*

*

*

*

*

*

*


Answer #1: The puzzle sounds far more complicated than it is. The deck of cards is a red herring. The question reduces to this: Take three cards, say 2, 3 and 4 of clubs, facedown. What is the probability of turning them over in the order 2, 3, 4? There are six possible ways of arranging three cards. Therefore the probability is one-sixth.

*

*

*

*

*

*

*

*

*

Answer #2: It would be wrong to split the money into $3 and $5. Each of the three ended up with 2⅔ loaves. In other words, the first shepherd parted with ⅓ of a loaf and the other shepherd with 2⅓ or 7/3 loaves. The first shepherd should therefore get $1 and the second shepherd $7.

Squooh You

Here’s an interesting little puzzle:

Winnie-the-Pooh and Piglet set out to visit one another. They leave their houses at the same time and walk along the same road. But Piglet is absorbed in counting the birds overhead, and Winnie-the-Pooh is composing a new “hum,” so they pass one another without noticing. One minute after the meeting, Winnie-the-Pooh is at Piglet’s house, and 4 minutes after the meeting Piglet is at Winnie-the-Pooh’s. How long has each of them walked? — “A puzzle by S. Sefibekov” viâ Futility Closet

If you’re good at maths, you should see the answer in an intuitive instant. I’m not good at maths, so it took me much longer, because I didn’t understand what was going on. But I can explain the answer like this. Pooh is obviously walking faster than Piglet. Therefore, Pooh and Piglet can’t have met after one minute, because that would mean Pooh takes one minute to walk the distance walked by Piglet in one minute.

So let’s suppose Pooh and Piglet met after two minutes. If Pooh takes one minute to walk the distance walked by Piglet in two minutes, then Pooh is walking twice as fast as Piglet. Does that work? Yes, because Piglet walks Pooh’s distance in four minutes, which is twice as long as Pooh took. Therefore Piglet is walking twice as slowly as Pooh. It’s symmetrical and we can conclude that they did indeed meet after two minutes. Pooh then walks another minute, for three minutes in total, and Piglet walks another four minutes, for six minutes in total.

But guessing is not a good way to find the answer to the puzzle. Let’s try to reason it through properly. Suppose that Pooh and Piglet meet after one unit of time, during which Piglet has walked one unit of distance and Pooh has walked x units of distance, where x > 1. In other words, Pooh is walking x times faster than Piglet. The distances they walk before meeting are therefore in the ratio:

1 : x

Next, note that Pooh will cover the distance Piglet has already walked in 1 unit / x = 1 minute, while Piglet covers the distance Pooh has already walked in x / 1 = 4 minutes. The times they take are therefore in the ratio:

1 / x : x → 1 : x^2 → 1 : 4

And if 1 : x^2 is 1 : 4 (the ratio of the minutes they walk after meeting), then 1 : x (the ratio of the distances they walk before meeting) = 1 : √(x^2) = 1 : √4 = 1 : 2. Pooh is therefore walking 2x faster than Piglet and Piglet is walking 2x slower than Pooh. If Pooh covers Piglet’s distance in 1 minute, Piglet must have taken 2 minutes to walk that distance. And if Piglet covers Pooh’s distance in 4 minutes, Pooh must have taken 2 minutes to walk that distance.

Therefore, when they meet, each of them has been walking for 2 minutes. Pooh therefore walks 2 + 1 = 3 minutes in total and Piglet walks 2 + 4 = 6 minutes in total.

The result can be generalized for all relative speeds. Suppose that Pooh and Piglet meet after m1 minutes and that Pooh then takes m2 minutes to walk the distance Piglet walked in m1 minutes, while Piglet takes m3 minutes to walk the distance Pooh walked in m1 minutes. The time they walk before they meet, m1 minutes, is therefore supplied by this simple equation:

m1 = √(m3 / m2)

And you can call √(m3 / m2), the square root of m3 / m2, the squooh function:

m1 = √(m3 / m2) = squooh(m2,m3)

Now suppose the distance between Pooh’s and Piglet’s houses houses is 12 units of distance and that Piglet always walks at 1 unit a minute. If Pooh walks at the same speed as Piglet, i.e. 1 unit a minute, then:

After they meet, Pooh walks 6 more min = m2, Piglet walks 6 more min = m3.

How long do they walk before they meet?

m1 = m3 / m2 = 1, √1 * 6 = 6

They meet after 6 min.

Now suppose that after they meet, Pooh walks 2 more min, Piglet walks 8 more min.

Therefore, m3 / m2 = 4, √4 * 2 = 2 * 2 = 4 = m1

Therefore they walk for 4 min before they meet and Pooh walks 2x faster than Piglet.

After they meet, Pooh walks 1 more min, Piglet walks 9 more min (m3 / m2 = 9, √9 * 1 = 3)

Therefore they walk for 3 min before they meet and Pooh walks 3x faster than Piglet.

After they meet, Pooh walks 0·6 more min, Piglet walks 9·6 more min (m3 / m2 = 16, √16 * 0·6 = 4 * 0·6 = 2·4)

Therefore they walk for 2·4 min before they meet and Pooh walks 4x faster than Piglet:

After they meet, Pooh walks 0·4 more min, Piglet walks 10 more min (m3 / m2 = 25, √25 * 0·4 = 5 * 0·4 = 2)

Therefore they walk for 2 min before they meet and Pooh walks 5x faster than Piglet.

And so on.

Pigmental Paradox

From Raymond Smullyan’s Logical Labyrinths (2009):

We now visit another knight/knave island on which, like on the first one, all knights tell the truth and all knaves lie. But now there is another complication! For some reason, the natives refuse to speak to strangers, but they are willing to answer yes/no questions using a secret sign language that works like this:

Each native carries two cards on his person; one is red and the other is black. One of them means yes and the other means no, but you are not told which color means what. If you ask a yes/no question, the native will flash one of the two cards, but unfortunately, you will not know whether the card means yes or no!

Problem 3.1. Abercrombie, who knew the rules of this island, decided to pay it a visit. He met a native and asked him: “Does a red card signify yes?” The native then showed him a red card.

From this, is it possible to deduce what a red card signifies? Is it possible to deduce whether the native was a knight or a knave?

Problem 3.2. Suppose one wishes to find out whether it is a red card or a black card that signifies yes. What simple yes/no question should one ask?

Shareway to Seven

An adaptation of an interesting distribution puzzle from Joseph Degrazia’s Math is Fun (1954):

After a successful year of plunder on the high seas, a pirate ship returns to its island base. The pirate chief, who enjoys practical jokes and has a mathematical bent, hands out heavy bags of gold coins to his seven lieutenants. But when the seven lieutenants open the bags, they discover that each of them has received a different number of coins.

They ask the captain why they don’t have equal shares. The pirate chief laughs and tells them to re-distribute the coins according to the following rule: “At each stage, the lieutenant with most coins must give each of his comrades as many coins as that comrade already possesses.”

The lieutenants follow the rule and each one in turn becomes the lieutenant with most coins. When the seventh distribution is over, all seven of them have 128 coins, the coins are fairly distributed, and the rule no longer applies.

The puzzle is this: How did the pirate captain originally allocate the coins to his lieutenants?


If you start at the beginning and work forward, you’ll have to solve a fiendishly complicated set of simultaneous equations. If you start at the end and work backwards, the puzzle will resolve itself almost like magic.

The puzzle is actually about powers of 2, because 128 = 2^7 and when each of six lieutenants receives as many coins as he already has, he doubles his number of coins. Accordingly, before the seventh and final distribution, six of the lieutenants must have had 64 coins and the seventh must have had 128 + 6 * 64 coins = 512 coins.

At the stage before that, five of the lieutenants must have had 32 coins (so that they will have 64 coins after the sixth distribution), one must have had 256 coins (so that he will have 512 coins after the sixth distribution), and one must have had 64 + 5 * 32 + 256 coins = 480 coins. And so on. This is what the solution looks like:

128, 128, 128, 128, 128, 128, 128
512, 64, 64, 64, 64, 64, 64
256, 480, 32, 32, 32, 32, 32
128, 240, 464, 16, 16, 16, 16
64, 120, 232, 456, 8, 8, 8
32, 60, 116, 228, 452, 4, 4
16, 30, 58, 114, 226, 450, 2
8, 15, 29, 57, 113, 225, 449

So the pirate captain must have originally allocated the coins like this: 8, 15, 29, 57, 113, 225, 449 (note how 8 * 2 – 1 = 15, 15 * 2 – 1 = 29, 29 * 2 – 1 = 57…).

The puzzle can be adapted to other powers. Suppose the rule runs like this: “At each stage, the lieutenant with most coins must give each of his comrades twice as many coins as that comrade already possesses.” If the pirate captain has six lieutenants, after each distribution each of five will have n + 2n = three times the number of coins that he previously possessed. The six lieutenants each end up with 729 coins = 3^6 coins and the solution looks like this:

13, 37, 109, 325, 973, 2917
39, 111, 327, 975, 2919, 3
117, 333, 981, 2925, 9, 9
351, 999, 2943, 27, 27, 27
1053, 2997, 81, 81, 81, 81
3159, 243, 243, 243, 243, 243
729, 729, 729, 729, 729, 729

For powers of 4, the rule runs like this: “At each stage, the lieutenant with most coins must give each of his comrades three times as many coins as that comrade already possesses.” With five lieutenants, each of them ends up with 1024 coins = 4^5 coins and the solution looks like this:

16, 61, 241, 961, 3841
64, 244, 964, 3844, 4
256, 976, 3856, 16, 16
1024, 3904, 64, 64, 64
4096, 256, 256, 256, 256
1024, 1024, 1024, 1024, 1024

For powers of 5, the rule runs like this: “At each stage, the lieutenant with most coins must give each of his comrades four times as many coins as that comrade already possesses.” With four lieutenants, each of them ends up with 625 coins = 5^4 coins and the solution looks like this:

17, 81, 401, 2001
85, 405, 2005, 5
425, 2025, 25, 25
2125, 125, 125, 125
625, 625, 625, 625