Saturday, December 30, 2017

Number System

In a slightly eccentric numbering system, the numbers on the left are converted to regular decimal numbers by applying a simple rule.

9999 = 4
8888 = 8
1816 = 3
1212 = 0

Can you answer

2419 = ?

Click below for the answer.

Saturday, December 23, 2017

Fraction of 1000

What is 1/2 of 2/3 of 3/4 of 4/5 of 5/6 of 6/7 of 7/8 of 8/9 of 9/10 of 1000? Click below for the answer.

Saturday, December 16, 2017

Three Water Bottles

You have three water bottles with capacities of 8 quarts, 5 quarts, and 3 quarts. The largest bottle is filled with water, and the other two are empty. If there are no graduation marks on any of the bottles, how can you split the water evenly so that two of the bottles contain exactly 4 quarts each? You can only use these three bottles. Click below for the answer.

Saturday, December 9, 2017

The Compulsive Gambler

You are approached by a compulsive gambler with the following proposal. You are to flip a fair coin four times. If heads and tails both appear twice each, he will pay you $11. If any other combination of heads and tails appears, you have to pay him only $10. Do you take the wager? Click below for the answer.

Saturday, December 2, 2017

The Lily Pad

A lily pad starts out very small, but doubles in size every day. After 60 days it has completely covered a pond. After how many days had it covered one-quarter the area of the pond? Click below for the answer.

Saturday, November 25, 2017

Three Coin Flips

The following game has a $10 entry fee. You are to flip a fair coin three times. The first time it comes up heads you are paid $5. The second time it comes up heads you're paid an additional $7. The third time it comes up heads you're paid $9 more, for a possible maximum prize of $21. Would you pay the $10 entry fee to play?

If not, what would be a fair price for this game? Click below for the answer.

Saturday, November 18, 2017

One equals 0.999...

The following is a mathematical proof that 1 is equal to 0.999.... What's wrong with it? Click below for the answer.
$x = 0.999...$
$10x = 9.999...$
$10x = 9 + 0.999...$
$10x = 9 + x$
$9x = 9$
$x = 1$

Saturday, November 11, 2017

Two equals one?

The following is a mathematical proof that two equals one. What's wrong with it? Click below for the answer.
$a = b$
$aa = ab$
$aa - bb = ab - bb$
$(a + b)(a - b) = b(a - b)$
$a + b = b$
$a + a = a$
$2a = a$
$2 = 1$

Saturday, November 4, 2017

State Names

There's only one letter in the English alphabet that is not used in the name of any of the 50 United States. Do you know which letter it is? Click below for the answer.

Saturday, October 28, 2017


In a standard game of Tic-Tac-Toe, players take turns placing X's and O's on a 3x3 grid until one player makes three-in-a-row in any direction (horizontally, vertically, or diagonally). Because of these rules, you can only place a maximum of five of either symbol on the board during a game, often ending in a draw.

Can you place six X's on a Tic-Tac-Toe board without making three-in-a-row in any direction? (Without placing any O's.) Click below for the solution.

Saturday, October 21, 2017

Draw Two

Two numbers are drawn at random from the integers 1 through 10. What is the expected value of their sum? Does it change if the second draw is done with or without replacement? Click below for the answers.

Saturday, October 14, 2017

Chicken McNuggets

You drove for hours last week to get your hands on McDonald's limited edition Szechuan sauce, and now you need some chicken nuggets for you and all of your friends. You can buy McNuggets in boxes of 6, 9, and 20. What is the largest whole number of nuggets that it is not possible to obtain by purchasing some combination of boxes of 6, 9, and 20? Click below for the answer.

Saturday, October 7, 2017


Would you rather have a ton of pennies, four miles of pennies lined up end-to-end, or a stack of pennies half a mile tall? Click below for a hint, or for the answer.

Saturday, September 30, 2017

Western Leaders

Here's a freaky coincidence about World War II. If you add up the year of birth, age in 1944, year of taking power, and the number of years in office in 1944 for each of the five main leaders of the Western world during World War II, the sums are all the same.

Year of birth18741889188318821878
Age in 19447055616266
Took power19401933192219331922
Years in office411221122

Can you explain this coincidence? Click below for the answer.

Saturday, September 23, 2017

Concentric Shapes

See the image below of a square inscribed inside a circle inscribed inside a square. If the outer square has an area of 100 square inches, is there a quick way of figuring out the area of the inner square? Click below for the answer.

Saturday, September 16, 2017

Digit Frequency

If you write down all the numbers from 1 to 1000 (inclusive) which digit occurs most frequently? Which digit appears least frequently in the same range? Click below for the answers.

Saturday, September 9, 2017

Counting Chickens

If one-and-a-half chickens lay one-and-a-half eggs in one-and-a-half days, how many eggs does one chicken lay in one day? Click below for the answer.

Saturday, September 2, 2017

Number Sense

How good is your "number sense"? How many of the following can you answer without using a calculator or looking up a conversion factor?
  1. Are there more inches in a mile, or Sundays in 1000 years?
  2. Are there more seconds in a week, or feet in 100 miles?
  3. Are there more millimeters in a mile, or seconds in a month?
  4. Which is larger, multiplying all the numbers from 1 to 10, or multiplying just the even numbers from 1 to 16?
  5. Which is longer, 666 days or 95 weeks?
  6. Which is longer, 666 inches or 55 feet?
  7. Which is longer, 666 hours or 28 days?
  8. Are there more ounces in a ton or inches in a kilometer?
  9. Which is hotter, $0^{\circ}C$ or $0^{\circ}F$?
  10. Which is larger, $e^\pi$ or $\pi^e$?

Click below for the answers.

Saturday, August 26, 2017

Replacing Marbles

We place 15 black marbles and 15 white marbles in an urn. We have 30 additional black marbles in a bag. Then we follow these rules.

1. Remove two marbles from the urn.
2. If they are different colors, put the white marble back in the urn and the black marble in the bag.
3. If they are the same color, put both marbles in the bag, then put one black marble from the bag into the urn.

Continue following these rules until only one marble is left in the urn. What color is that marble? Click below for the answer.

Saturday, August 19, 2017

Factor Sums

Not counting itself, the number 6 has the factors 1, 2, and 3, which add to 6. The number 28 has the same property (its factors are 1, 2, 4, 7, and 14). Can you come up with a three-digit number that has this property? What about a four-digit number? Click below for the answers.

Saturday, August 12, 2017

Minimum Percentage

75% of men from a certain group are tall, 75% have brown hair, and 75% have brown eyes. What is the minimum percentage that are tall, have brown hair, and have brown eyes? Click below to see the answer.

Saturday, August 5, 2017

A Two-Digit Number

Find a two-digit number that's equal to two times the result of multiplying its digits. Click below to see the answer.

Saturday, July 29, 2017

Identical Twins

Alice and Eve are identical twin sisters. One always lies and the other always tells the truth, but we don't know which is which. We ask one of them "Is Alice the one that always lies?" and she replies "Yes." Did we speak to Alice or Eve? Click below to see the answer.

Saturday, July 22, 2017

Counting Socks

All my socks are red except two. All my socks are white except two. All my socks are blue except two. How many socks do I have? Click below for the answer.

Saturday, July 15, 2017


From 1519 until 1522, Ferdinand Magellan's Victoria was the first ship to successfully circumnavigate the globe. (Magellan himself did not survive the entire voyage.) Can you tell me which part of the ship traveled the greatest distance? Click below for the answer.

Replica of the Victoria, Photograph by Gnsin - Own work, CC BY-SA 3.0

Saturday, July 8, 2017

50 factorial

50! = 30414093201713378043612608166064768844377641568960512071337804000

Without doing the full computation, can you tell whether the above statement is true or false? Click below for the answer.

Saturday, July 1, 2017

The Missing Fish

Two fathers took their sons fishing. Each man and his son caught one fish, but when they all returned to camp they only had three fish. None of the fish were eaten, lost, or thrown back. How could this be? Click below to see the answer.

Saturday, June 24, 2017

Bags of Marbles

You have three identical bags, each containing two marbles. Bag A contains two white marbles, Bag B contains two black marbles, and Bag C contains one white and one black marble. You pick a bag at random and draw out one marble. If the marble is white, what is the probability that the other marble in the same bag is also white? Click below to see the answer.

If you want to see how you would model this problem in Python, you can look at my solution on GitHub.

Saturday, June 17, 2017

The Monk and the Mountain Path

One morning at precisely 9:00 AM a monk begins walking up a mountain path. He takes his time, stopping several times to rest along the way. He arrives at the temple at the mountain's summit at precisely 5:00 PM that evening. The next day, the monk leaves the temple at precisely 9:00 AM and makes his way back down the path. Again, he takes his time and rests at several points along the journey. He arrives back at his original starting point at precisely 5:00 PM that evening. Is there any time when the monk is in exactly the same spot on both days? Click below to see the answer.

Saturday, June 10, 2017

The Pigeonhole Principle

The pigeonhole principle states that if a group of pigeons flies into a set of pigeonholes, and there are more pigeons than pigeonholes, then there must be at least one pigeonhole with two pigeons in it. More generally, if k + 1 or more objects are placed into k boxes, then there is at least one box containing two or more of the objects. Despite its seeming simplicity (perhaps obviousness), it can be used to solve a surprising range of problems in probability, number theory, and computer science, just to name a few. See if you can use it to solve the following three problems.

  1. (Warm up) A drawer contains a dozen blue socks and a dozen black socks, all unmatched. If the room is dark, how many socks do you have to take out to be sure you have a matching pair?
  2. Prove that there are at least two people in Tokyo with exactly the same number of hairs on their heads.
  3. Prove that if five distinct integers are selected from the numbers 1 through 8, there must be at least one pair with a sum equal to 9.

Click below to see the answers.

Saturday, June 3, 2017

Coffee with Cream

Suppose you have two cups in front of you, one with precisely 8 fluid ounces of coffee, and the other with precisely 8 fluid ounces of cream. You take precisely one teaspoon of the cream and add it to your coffee. You stir it in so that it's thoroughly mixed. Then you take precisely one teaspoon of that coffee/cream mixture and put it back into the cup of cream. Does the cup of coffee have more cream in it, or does the cup of cream contain more coffee? Click below for the answer.

Saturday, May 27, 2017

Letter Groupings

The letters of the (English) alphabet can be grouped into four distinct categories.





Based on the categories established by the first 13 letters, can you place each of the remaining 13 letters in the correct group?

Saturday, May 20, 2017

Number Words

In the solution to A Unique Number, I asked a bonus question. "Can you think of a number whose letters when spelled out in English are all in alphabetical order?" Several people replied via Twitter with the correct answer of "forty." You may have found a shortcut to the solution if you noted that none of the single-digit numbers have their letters in alphabetical order, nor does the word "teen." This allows you to skip ahead to 20, 30, etc. Can you use a similar strategy to answer the following questions?
  • What is the lowest number that requires the five vowels A, E, I, O, and U only once each in its spelling?
  • What is the lowest number that requires the six letters A, E, I, O, U, and Y only once each in its spelling?
Click below to see the answers.

Saturday, May 13, 2017

The Nine Dot Puzzle

The following is a classic "thinking outside the box" puzzle. Can you connect all nine dots below by drawing exactly four straight lines, without lifting your pencil or tracing back over any line?

Give it a try before you click below for the answer.

Saturday, May 6, 2017

Apples and Oranges

You work in a factory boxing fruit. In front of you are three boxes labeled "apples," "oranges," and "apples & oranges." One box contains only apples, one contains only oranges, and one contains a mixture of both apples and oranges. Unfortunately, the label machine has gone haywire and has mislabeled all three boxes. Can you look at one piece of fruit from only one of the boxes and correctly label all three? Click below for the solution.

Saturday, April 29, 2017

Common Thread

What do the following words have in common?
  • dust
  • seed
  • left
  • resign
  • weather
  • sanction
Click below to see the answer.

Saturday, April 22, 2017

Marking a Ruler

A 13-inch ruler only needs four markings on it so that it can be used to measure any whole number of inches from 1 to 13. At what positions should the four markings be? (Do not include the two ends, which are understood to be markings 0 and 13.) Click below to see the answer.

Saturday, April 15, 2017

Move One Digit

The following equation is incorrect. Can you make the equation balanced by moving only a single digit?

101 - 102 = 1

Click below to see the answer.

Saturday, April 8, 2017

What is the next number in the sequence?

Without Googling it, can you tell me the next number in the following sequence?


That should be enough to see the pattern, but this sequence goes on infinitely. Click below to see the answer.

Saturday, April 1, 2017

Beer Run

A man runs n laps around a circular track with a radius of t miles. He says he will drink s quarts of beer for every mile he runs. How many quarts will he drink? Click below for the answer.

Saturday, March 25, 2017

10-digit Number

Find a 10-digit number where the first digit is how many 0's there are in the number, the second digit is how many 1's in the number, the third digit is how many 2's, and so on, until the tenth digit which is how many 9's there are in the number.

Click below to see the answer.

Saturday, March 18, 2017

The Extra Dollar

Here is an old math puzzle that you can find many versions of online.

Two friends have a meal at a restaurant, and the bill is $25. The friends pay $15 each, which the waiter gives to the cashier. The cashier gives back $5 to the waiter. The friends tell the waiter to keeps $3 as a tip, so he hands back $1 to each of the two diners.

So, the friends paid $14 each for the meal, for a total of $28. The waiter kept $3, and that makes $31. Where did the extra dollar come from? Give yourself a moment to think about it before clicking below for the solution.

Saturday, March 11, 2017

Arranging Eights

Can you arrange eight 8's so that when added they will equal 1000? Click below to see the answer.

Saturday, March 4, 2017

A Unique Number

What is unique about the number 8,549,176,320? Click below to see the answer (and a bonus question).

Saturday, February 25, 2017

Best Poker Hand

Which of the following poker hands is the best? Assume one standard 52-card deck is used. The game is five-card draw, so there are no community cards, with no wild cards.

For reference, here are the rankings of poker hands.
  • Royal flush - A, K, Q, J, 10, all the same suit.
  • Straight flush - Five cards in a sequence, all the same suit.
  • Four of a kind - Four cards all of the same rank.
  • Full house - Three of a kind with a side pair.
  • Flush - Any five cards, all the same suit
  • Straight - Five cards in a sequence, any suits.
  • Three of a kind - Three cards all of the same rank.
  • Two pair - Two different pairs.
  • One pair - Two cards of the same rank.
  • High card - Highest card in your hand.

Click below to see the answer.

Saturday, February 18, 2017

The Collapsing Bridge

The bridge will collapse in 17 minutes! Four people need to cross the bridge before it collapses. It is a dark night and they have only one flashlight among them.

Only two people can cross at a time.
  • Alice takes one minute to cross.
  • Bob takes two minutes.
  • Carol takes five minutes
  • Dave takes 10 minutes to cross.
How can they all get across before the bridge collapses? Click below to see the answer.

Friday, February 10, 2017

The Island of Knights and Knaves

Raymond Smullyan, one of the grand masters of logic puzzles, sadly passed away at the age of 97 earlier this week. In his honor, I present a classic puzzle adapted from his book What Is the Name of This Book?

There is a wide variety of puzzles about an island in which certain inhabitants called "knights" always tell the truth and others called "knaves" always lie. It is assumed that every inhabitant of the island is either a knight or a knave.

In this problem, there are only two people, A and B, each of whom is either a knight or a knave. A makes the following statement: "At least one of us is a knave." What are A and B?

Click below for the solution.

Raymond Smullyan presented a couple more of his puzzles in a 1982 interview on the Tonight Show with Johnny Carson. When you see the white hair and long beard, it seems like even 35 years ago that Smullyan was an old man, but the twinkle in his eye and the playfulness in his voice reveal that he was always a child at heart. Watch the full interview below.

If these puzzles seem too easy, they're just a small sample of Dr. Smullyan's brilliant work. If you really want a challenge, I encourage you to check out some of his books, or The Hardest Logic Puzzle Ever, also credited to Smullyan.

Finally, I leave you with a quote.

Why should I be worried about dying?
It's not going to happen in my lifetime!

-Raymond Smullyan (1919 - 2017)

Saturday, February 4, 2017

Animal Kingdom

What do the following animals all have in common?
  • firefly
  • jackrabbit
  • koala bear
  • prairie dog
  • silkworm
  • guinea pig

Click below to see the answer.

Saturday, January 28, 2017

Name this Book

When this book first came out, it was only read by a handful of rather wealthy people. Now almost everyone has a copy, and many people read it regularly. You cannot buy it from a bookstore or borrow it from the library. Can you name this book? Click below for the answer.

Saturday, January 21, 2017

The Brodie Helmet

At the outbreak of World War I, none of the combatant nations provided steel helmets to their troops. Soldiers of most nations went into battle wearing cloth or leather hats that offered little protection from modern weapons. As a result, many soldiers suffered head injuries from exploding shrapnel.

In April of 1916, British soldiers began using a metal helmet in battle called the Brodie helmet, but authorities discovered that the proportion of head injuries then increased. Why should the incidence of head injuries increase when soldiers wore metal helmets rather than cloth caps? Click below to see the answer.

Saturday, January 14, 2017

Panama Canal

A ship sailed through the Panama Canal going from west to east. When it exited the canal, it entered the Pacific Ocean. (The ship did not double back.) How can this be so? Click below to see the answer.

Saturday, January 7, 2017

Rope Around the Earth

Suppose you tie a rope tightly around the Earth at the equator. (Assume the Earth is perfectly spherical, and that the surface is smooth so that the rope lies tight against the surface at all points.) Now suppose that you add an additional 6 feet to the length of the rope. How high off the surface would the rope lie? You could look up the Earth's circumference and do the math to come up with an exact answer, but can you quickly come up with an intuitive guess? (High enough to slide a piece of paper under? To wave your hand under? To walk under?) Click below to see a hint or the answer.

Sunday, January 1, 2017


I've been reading The Revenant by Michael Punke and came across the following few passages. The main character, Hugh Glass, is embarking on a canoe trip up the Missouri River with a group of French Canadian fur traders known as voyageurs.
...For the rest of their voyage, Glass manned not a paddle but an enormous sponge, constantly bailing water as it pooled on the bottom of the canoe.
It was a full-time job, since the bâtard leaked steadily. The canoe reminded Glass of a floating quilt. Its patchwork skin of birch bark was sewn together with wattope, the fine root of a pine tree. The seams were sealed with pine tar, reapplied constantly as leaks appeared. As birch had become more difficult to find, the voyageurs were forced to use other materials in their patching and plugging. Rawhide had been employed in several spots, stitched on and then slathered in gum. Glass was amazed at the fragility of the craft. A stiff kick would easily puncture the skin, and one of La Vierge's main tasks as steersman was the avoidance of lethal, floating debris. At least they benefited from the relatively docile flow of the fall season. The spring floods could send entire trees crashing downstream.
If you've ever maintained a large code base, you probably already see where I'm going with this. The constant patching and plugging of leaks, the fragility of the craft, one man constantly bailing out water while several others row the boat guided by a steersman. These elements all remind me of several large software projects I've been on.  The passage continues.
There was an upside to the bâtard's shortcomings. If the vessel was frail, it was also light, an important consideration as they labored against the current. Glass came quickly to understand the odd affection of voyageurs for their craft. It was a marriage of sorts, a partnership between the men who propelled the boat and the boat that propelled the men. Each relied upon the other. The voyageurs spent half their time complaining bitterly about the manifold ails of the craft, and half their time nursing them tenderly.
This reminds me not only of the relationship programmers have with our code, but also of the relationship we have with our tools. How much time do we spend complaining about an IDE or a framework? How much time configuring them? But after we've gotten comfortable using them, most of us will strongly resist switching to a new one. Finally...
They took great pride in the appearance of the bâtard, dressing it in jaunty plumes and bright paint. On the high prow they had painted a stag's head, its antlers tilted challengingly toward the flowing water. (On the stern, La Vierge had painted the animal's ass.)
This final bit surprises me the most, but in a way I suppose it shouldn't. I don't know much about boating, but I do know that you should fix the leaks in your boat before you bother to decorate it. But that isn't how we always approach software development, is it? I've seen people spend plenty of time refactoring and cleaning code that didn't really need to change, or adding test cases just to get a higher percentage in test coverage. At times I've been guilty of this myself. I guess it's worth it to ask yourself, before you make a change to your code, am I fixing a leak, or am I just painting a stag's ass on this canoe?

Quetico Superior Route, Passing a Waterfall by Frances Anne Hopkins