Saturday, October 28, 2017
Tic-Tac-Toe
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.
Labels:
logic 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.
Subscribe to:
Posts (Atom)