Showing posts with label puzzles. Show all posts
Showing posts with label puzzles. Show all posts
Saturday, March 3, 2018
Flipping 100 Coins
You have 100 fair coins and you flip them all at the same time. Any that come up tails you set aside. The ones that come up heads you flip again. How many rounds do you expect to play before only one coin remains? What if you start with 1000 coins? Click below for the answer.
Labels:
math,
probability,
puzzles
Saturday, February 17, 2018
A Knight, a Knave, and a Spy
You find yourself on the Island of Knights, Knaves, and Spies, a logical kingdom whose inhabitants always lie (Knaves), always tell the truth (Knights), or who can do either (Spies). You encounter three of said inhabitants, call them Alice, Bob, and Carol. You are told by your guide (a trustworthy Knight) that in this group there are one of each type of inhabitant, a Knight, a Knave, and a Spy. You ask the following questions.
To Alice you ask, "Are you a Knight?"
"No," she answers.
To Bob you ask, "Are you a Spy?"
"No," replies Bob.
Finally, you ask Carol, "Are you a Knave?"
"No," she says.
Can you tell from these answers who is a Knight, who is a Knave, and who is a Spy? Click below for the answer.
Alice must be a Spy. A Knight could never answer "No" to her question, because they'd be lying. A Knave couldn't either, because they'd be telling the truth.
Bob must be a Knight. A Knave could not answer "No" to that question, since they'd be telling the truth. A Spy could, but we've already established that Alice is the Spy in this group.
Carol's answer is consistent with what a Knight or a Knave would say (or a Spy might say), but by process of elimination, she must be a Knave.
Bob must be a Knight. A Knave could not answer "No" to that question, since they'd be telling the truth. A Spy could, but we've already established that Alice is the Spy in this group.
Carol's answer is consistent with what a Knight or a Knave would say (or a Spy might say), but by process of elimination, she must be a Knave.
Saturday, February 3, 2018
Water Glasses
You have five glasses arranged in a row. The first two are empty and the last three are filled with water. By moving only one glass, can you arrange them so full and empty glasses alternate? Click below for the answer.

Pick up the fourth glass, pour the water into the first glass, then replace the fourth (now empty) glass to its original position.
Saturday, January 20, 2018
True or False?
You're taking your college entrance exam, and things are not going well. You spent too much time answering the essay questions and word problems, and now you're running out of time. You turn to the final section and are relieved to find that it consists of 100 True/False questions. The bad news is that you only have 2 minutes left to complete the entire exam!
You figure it doesn't matter if you answer all True, all False, or just guess randomly. Odds are you'll probably get half of them right either way. You begin scribbling in your answers.
How many different ways (unique sequences) are there to answer 100 True/False questions? Click below for the answer.
If you're a computer programmer, you may have recognized right away that this is just a binary counting problem in disguise. Substitute 1 for True and 0 for False, and this is the same as asking how many unique values can be represented by 100 binary bits. Since that's every value from all 0s to all 1s, the answer is $2^{100}$, or 1,267,650,600,228,229,401,496,703,205,376.
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.
At first glance, this problem looks a lot harder than it is. If you work backwards starting at 9/10 of 1000, it's easier to see that the final answer is 100.
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.
This is not a good gamble. Below are all the possible outcomes for four successive coin flips.

Notice that exactly two heads and two tails only appear six out of sixteen times, so you can only expect to win this game about 37.5% of the time. At the offered stakes ($11 for a win, $10 for a loss) you'd be losing an average of around $2.12 every time you play.
This problem appeared as an exercise in Introductory Graph Theory by Gary Chartrand.
See my Probability GitHub repository for a script that shows how to model this problem in Python.

Notice that exactly two heads and two tails only appear six out of sixteen times, so you can only expect to win this game about 37.5% of the time. At the offered stakes ($11 for a win, $10 for a loss) you'd be losing an average of around $2.12 every time you play.
This problem appeared as an exercise in Introductory Graph Theory by Gary Chartrand.
See my Probability GitHub repository for a script that shows how to model this problem in Python.
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.

The instinctive answer might seem to be 15 days, but that would only be correct if the lily pad was growing linearly. Remember, the lily pad doubles in size every day, which is exponential. To solve this puzzle, just work backwards. If the lily pad completely covers the pond on day 60, then half the pond was covered on day 59, and one-quarter of the pond was covered on day 58.
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.
It's not a good idea to play this game at the offered entry fee. Here are the eight possible outcomes when flipping a coin three times, along with how much you would win after each flip.

When you subtract out the $10 entry fee, you only win "big" ($11) one out of eight times. Three times you win only $2, three times you lose $5, and one out of the eight times you lose your entire $10 entry fee. If you average these, you can expect to lose $1 every time you play. So, if you lower the entry fee to $9 this would be a fair game.
This problem appeared as an exercise in Introductory Graph Theory by Gary Chartrand.
See my Probability GitHub repository for a script that shows how to model this problem in Python.

When you subtract out the $10 entry fee, you only win "big" ($11) one out of eight times. Three times you win only $2, three times you lose $5, and one out of the eight times you lose your entire $10 entry fee. If you average these, you can expect to lose $1 every time you play. So, if you lower the entry fee to $9 this would be a fair game.
This problem appeared as an exercise in Introductory Graph Theory by Gary Chartrand.
See my Probability GitHub repository for a script that shows how to model this problem in Python.
Labels:
math,
probability,
puzzles
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$
$10x = 9.999...$
$10x = 9 + 0.999...$
$10x = 9 + x$
$9x = 9$
$x = 1$
There's nothing wrong with it. 1 really is equal to 0.999...
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$
$aa = ab$
$aa - bb = ab - bb$
$(a + b)(a - b) = b(a - b)$
$a + b = b$
$a + a = a$
$2a = a$
$2 = 1$
The problem is in the fourth step, where both sides of the equation are divided by $(a - b)$. Since $a = b$ is given at the start, $a - b$ is 0, and you can't divide by 0.
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.
If you said 'J' or 'Z' you weren't far off. Each of those letters appear only once in the names of the 50 states (thanks to New Jersey and Arizona). The correct answer, though, is the letter Q, which does not appear in any state name.
To find the solution, I used a Python script to load a list of state names and count the occurrence of each letter of the alphabet. This method takes a lot less time than consulting a map.
To find the solution, I used a Python script to load a list of state names and count the occurrence of each letter of the alphabet. This method takes a lot less time than consulting a map.
Labels:
puzzles
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.
This puzzle is from Patrick Honner. It's easy to calculate the expected value with replacement. It's just two times the expected value of a random draw from 1...10, so 2 * 5.5, or 11. The interesting part is that when you draw two numbers without replacement the expected sum doesn't change. Why is that?
To find out, take a look at what happens to the expected value of the second draw for each value of the first draw. (Expected value is just the average of the remaining numbers.)
As the value of the first draw increases, the expected value of the second draw decreases. If you take the sum of each column you get 55. Divide by 10 to get the average and you get 5.5, so when you add them together you arrive back at the solution of 11.
See my Probability GitHub repository for a script that shows how to model this problem in Python.
To find out, take a look at what happens to the expected value of the second draw for each value of the first draw. (Expected value is just the average of the remaining numbers.)
| 1st draw | E(2nd draw) |
|---|---|
| $1$ | $6$ |
| $2$ | $5\frac{8}{9}$ |
| $3$ | $5\frac{7}{9}$ |
| $4$ | $5\frac{2}{3}$ |
| $5$ | $5\frac{5}{9}$ |
| $6$ | $5\frac{4}{9}$ |
| $7$ | $5\frac{1}{3}$ |
| $8$ | $5\frac{2}{9}$ |
| $9$ | $5\frac{1}{9}$ |
| $10$ | $5$ |
As the value of the first draw increases, the expected value of the second draw decreases. If you take the sum of each column you get 55. Divide by 10 to get the average and you get 5.5, so when you add them together you arrive back at the solution of 11.
See my Probability GitHub repository for a script that shows how to model this problem in Python.
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.

There might be cleverer solutions to this problem, but we can do this fairly easily by listing combinations. Once we hit a streak of six numbers in a row that we can obtain, we know that the last number we couldn't obtain before the streak is the largest such number. Beyond that streak of six we can just add one or more boxes of 6 nuggets to one of those numbers to obtain any higher number. (There may be other combinations to obtain some of these numbers, but we only need one combination for each.)
That's six in a row, so we can get any higher number of nuggets just by adding boxes of 6 to those combinations. That means that 43 is the largest number of Chicken McNuggets that you cannot buy by combining boxes of 6, 9, and 20.
| Number | Boxes |
|---|---|
| 1 | Not Possible |
| 2 | Not Possible |
| 3 | Not Possible |
| 4 | Not Possible |
| 5 | Not Possible |
| 6 | 6 |
| 7 | Not Possible |
| 8 | Not Possible |
| 9 | 9 |
| 10 | Not Possible |
| 11 | Not Possible |
| 12 | 6 + 6 |
| 13 | Not Possible |
| 14 | Not Possible |
| 15 | 6 + 9 |
| 16 | Not Possible |
| 17 | Not Possible |
| 18 | 9 + 9 |
| 19 | Not Possible |
| 20 | 20 |
| 21 | 6 + 6 + 9 |
| 22 | Not Possible |
| 23 | Not Possible |
| 24 | 6 + 9 + 9 |
| 25 | Not Possible |
| 26 | 20 + 6 |
| 27 | 9 + 9 + 9 |
| 28 | Not Possible |
| 29 | 20 + 9 |
| 30 | 6 + 6 + 9 + 9 |
| 31 | Not Possible |
| 32 | 6 + 6 + 20 |
| 33 | 6 + 9 + 9 + 9 |
| 34 | Not Possible |
| 35 | 6 + 9 + 20 |
| 36 | 9 + 9 + 9 + 9 |
| 37 | Not Possible |
| 38 | 9 + 9 + 20 |
| 39 | 6 + 6 + 9 + 9 + 9 |
| 40 | 20 + 20 |
| 41 | 6 + 6 + 9 + 20 |
| 42 | 6 + 9 + 9 + 9 + 9 |
| 43 | Not Possible |
| 44 | 6 + 9 + 9 + 20 |
| 45 | 9 + 9 + 9 + 9 + 9 |
| 46 | 6 + 20 + 20 |
| 47 | 9 + 9 + 9 + 20 |
| 48 | 6 + 6 + 9 + 9 + 9 + 9 |
| 49 | 9 + 20 + 20 |
That's six in a row, so we can get any higher number of nuggets just by adding boxes of 6 to those combinations. That means that 43 is the largest number of Chicken McNuggets that you cannot buy by combining boxes of 6, 9, and 20.
Saturday, October 7, 2017
Pennies
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.

One penny weighs 2.500 grams (according to the U.S. Mint).
There are about 28.35 grams in an ounce
There are 16 ounces in a pound.
There are 2,000 pounds in a (U.S.) ton.
One penny is 0.750 inches in diameter.
There are 12 inches in a foot.
There are 5,280 feet in a mile.
One penny is 1.52 millimeters thick.
There are 25.4 millimeters in an inch.
There are about 28.35 grams in an ounce
There are 16 ounces in a pound.
There are 2,000 pounds in a (U.S.) ton.
One penny is 0.750 inches in diameter.
There are 12 inches in a foot.
There are 5,280 feet in a mile.
One penny is 1.52 millimeters thick.
There are 25.4 millimeters in an inch.
Four miles of pennies lined up end-to-end would be $3,379.20, while one ton is $3,628.80, so between the first two options you would be better off to take the ton. However, a stack of pennies half a mile tall would be $5,293.89, so the stack is by far the best option.
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.
| Churchill | Hitler | Mussolini | Roosevelt | Stalin | |
|---|---|---|---|---|---|
| Year of birth | 1874 | 1889 | 1883 | 1882 | 1878 |
| Age in 1944 | 70 | 55 | 61 | 62 | 66 |
| Took power | 1940 | 1933 | 1922 | 1933 | 1922 |
| Years in office | 4 | 11 | 22 | 11 | 22 |
| Sum | 3,888 | 3,888 | 3,888 | 3,888 | 3,888 |
Can you explain this coincidence? Click below for the answer.
There's really no coincidence at all. If you take any person's year of birth and add their age in 1944, the sum will be... 1944. This also goes for the year a leader took office and the number of years they had held office in 1944, so the sum of all four values will always be 1944 + 1944 = 3888. You can make your own puzzle using any year as a reference point.
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.

Spin the inner square around so the corners touch the top, bottom, and sides of the outer square.

Now imagine taking each corner of the outer square and folding them in so they touch in the center of the image. It's easy to see that the area outside the inner square will perfectly cover the area inside, so the inner square has exactly half the area of the outer square, or 50 square inches.

Now imagine taking each corner of the outer square and folding them in so they touch in the center of the image. It's easy to see that the area outside the inner square will perfectly cover the area inside, so the inner square has exactly half the area of the outer square, or 50 square inches.
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.
You could write all the numbers down or write a program to count the digit frequencies, but this problem is much easier if you look for a pattern. The digits 0 through 9 all appear the same number of times in the ones place, but 1 through 9 appear a lot more often in the tens and hundreds place (because of numbers like 22, 222, etc., and the fact that we don't write leading 0s). This means that 0 is the least frequent digit. It only appears 192 times in the specified range. What about the most frequent? The digits 1 through 9 appear with exactly the same frequency in the range 1 to 999 (300 times each), so that extra occurrence (in the number 1000) makes 1 the most frequent digit from 1 to 1000.
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.
For many people, the intuitive answer is one egg, but it pays double-check your math on this kind of problem. The daily rate of eggs per chicken per day is given by the formula
daily rate = eggs / (chickens x days)
Plugging in the numbers from the first part of the problem, we get
daily rate = 1.5 / (1.5 x 1.5)
daily rate = 1.5 / 2.25
daily rate = 2/3
So, one chicken lays two-thirds of an egg in one day.
daily rate = eggs / (chickens x days)
Plugging in the numbers from the first part of the problem, we get
daily rate = 1.5 / (1.5 x 1.5)
daily rate = 1.5 / 2.25
daily rate = 2/3
So, one chicken lays two-thirds of an egg in one day.
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?
- Are there more inches in a mile, or Sundays in 1000 years?
- Are there more seconds in a week, or feet in 100 miles?
- Are there more millimeters in a mile, or seconds in a month?
- Which is larger, multiplying all the numbers from 1 to 10, or multiplying just the even numbers from 1 to 16?
- Which is longer, 666 days or 95 weeks?
- Which is longer, 666 inches or 55 feet?
- Which is longer, 666 hours or 28 days?
- Are there more ounces in a ton or inches in a kilometer?
- Which is hotter, $0^{\circ}C$ or $0^{\circ}F$?
- Which is larger, $e^\pi$ or $\pi^e$?
Click below for the answers.
- Inches in a mile. (63,360. There can be up to 52,178 Sundays in 1000 years.)
- Seconds in a week. (604,800, compared to 528,000 feet in 100 miles.)
- Seconds in a month. (Even if the month only has 28 days, that's 2,419,200 seconds, compared to only 1,609,340 millimeters in a mile.)
- Just the even numbers from 1 to 16. (Multiplying all the numbers from 1 to 10 gives you 3,628,800. Multiplying the even numbers from 1 to 16 give you 10,321,920.)
- 666 days. (95 weeks is only 665 days.)
- 666 inches. (55 feet is 660 inches.)
- 28 days (which is 672 hours).
- Inches in a kilometer. (39,370.1, compared to 35,840 ounces in a long ton, which is the heaviest ton.)
- $0^{\circ}C$ is "hotter" since it is equal to $32^{\circ}F$
- $e^\pi$ (23.14) is larger than $\pi^e$ (22.46).
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.
If you knew that a number that is the sum of its own proper divisors is called a Perfect number, this puzzle was pretty easy. You could just search for that name and find the solutions are 496 and 8,128. Perfect numbers have been known at least as far back as Euclid (323–283 BCE), who included a formulation for then in his book of Elements.
The formulations states that $q(q + 1) / 2$ is a perfect number whenever $q$ is a prime of the form $2^p - 1$ for prime $p$ (now known as a Mersenne prime). So, if we know the first few Mersenne primes, we can calculate the first few perfect numbers.
$3(3 + 1) / 2 = 6$
$7(7 + 1) / 2 = 28$
$31(31 + 1) / 2 = 496$
$127(127 + 1) / 2 = 8,128$
$8,191(8,191 + 1) / 2 = 33,550,336$
The ancient Greek mathematicians would not have known that 8,191 was a prime, so Euclid would only have known the first four Perfect numbers. Now you can say you know something that Euclid didn't!
The formulations states that $q(q + 1) / 2$ is a perfect number whenever $q$ is a prime of the form $2^p - 1$ for prime $p$ (now known as a Mersenne prime). So, if we know the first few Mersenne primes, we can calculate the first few perfect numbers.
$3(3 + 1) / 2 = 6$
$7(7 + 1) / 2 = 28$
$31(31 + 1) / 2 = 496$
$127(127 + 1) / 2 = 8,128$
$8,191(8,191 + 1) / 2 = 33,550,336$
The ancient Greek mathematicians would not have known that 8,191 was a prime, so Euclid would only have known the first four Perfect numbers. Now you can say you know something that Euclid didn't!
Subscribe to:
Posts (Atom)
