Ed Pegg Jr

## Classic Puzzles in Wolfram Demonstrations NB   CDF   PDF

### B E Y O N D S U D O K U

Sudoku, today’s most well-known grid-solving puzzle, was originally invented by Howard Garns in 1978. Almost 30 years later, its popularity suddenly exploded. This column presents logic puzzles of various sorts and challenges readers to solve the puzzles in two ways: by hand and with Mathematica. Solvers are invited to send their code to edp@wolfram.com.

### Fifteen Classic Puzzles

1. If a package has one of 50 random baseball cards, how many packages do you need to buy to get a complete set?
(demonstrations.wolfram.com/CouponCollectorProblem)
2. A chess king is at one corner of a chessboard. It makes a series of moves that always take it closer to the opposite corner. How many possible paths are there? (demonstrations.wolfram.com/DelannoyPathExhaustionDiagonal)
3. A hallway has 100 lockers, all closed. 100 students are sent down the hall as follows: student 1 opens all the lockers; student 2 closes every other locker, beginning with the second; student 3 changes the state of every third locker, beginning with the third; and so on. After all the students have marched, which lockers remain open?
(demonstrations.wolfram.com/TheLockerProblem)
4. In the Florida Lotto, a player picks 6 numbers out of 1 to 53. Matching 3, 4, 5, or 6 numbers from the drawing wins a prize. What are the odds of winning? (demonstrations.wolfram.com/UrnProblem)
5. On a grid, plant 10 trees to make 5 lines each containing 4 trees. (demonstrations.wolfram.com/OrchardPlantingProblem)
6. A grid has 25 “on” buttons. Pressing a button changes the state of that button and the surrounding buttons. Can all the buttons be turned “off”? (demonstrations.wolfram.com/LightsOutPuzzle)
7. Can books similar in size be stacked on the edge of a desk so that the top book is not over the desk at all? (demonstrations.wolfram.com/StackingDominoesToTheLimit)
8. McDonald’s once sold Chicken McNuggets in packs of 6, 9, or 20. What is the highest number of McNuggets you cannot buy?
(demonstrations.wolfram.com/McNuggetProblemAndFrobeniusNum-bers)
9. Thirty people are in a room. What is the probability that two of them share a birthday? (demonstrations.wolfram.com/TheBirthdayProblem)
10. Wheels of radius 30cm and 40cm are 10cm apart. What is the length of a snug belt that goes around both? (demonstrations.wolfram.com/TwoWheelBelt)
11. You have a 3 gallon jug and a 5 gallon jug at a well. How can exactly 1 gallon be measured? (demonstrations.wolfram.com/JugProblem)
12. A 30-foot statue is on a 10-foot pedestal. Where should you stand so that the statue itself looks as big as possible from your point of view? (demonstrations.wolfram.com/TheStatueOfRegiomontanus)
13. As a contestant on Monty Hall’s game show, you are presented with three doors. Behind one door is a new car and behind each of the other two is a goat. You select a door behind which, you hope, is the new car. Monty Hall then opens another door to reveal a goat and asks if you would like to change your selection. Should you switch?
(demonstrations.wolfram.com/MontyHallProblem)
14. You have 12 coins, labeled with letters M, I, T, F, O, L, K, D, A, N, C, and E. One of the coins is fake, and is heavier or lighter than the others. Can you find the fake coin in 3 weighings?
(demonstrations.wolfram.com/The12CoinWeighingProblem)
15. A 55-gallon barrel, with a diameter of 22.5 inches, is lying on its side. 10 inches of grain is in the barrel. How much grain does the barrel contain? (demonstrations.wolfram.com/SagittaApothemAndChord)

### Discussion—Coupon Collecting

For each of the problems listed above, a link is given to a Wolfram Demonstration that allows for further exploration [1]. For example, the Coupon Collector Demonstration comes with the following explanatory caption:

If a package has one of 50 random baseball cards, how many packages do you need to buy to get a complete set? The expected answer is packages, where is the harmonic number . Switching from baseball cards to coupons gives the coupon collector problem: if there are different kinds of coupons and many of them are distributed randomly, the expected number of purchases necessary for a complete set is .

Code containing a Manipulate is provided for each Demonstration, allowing for exploration of the problem with either Mathematica or Mathematica Player.

All the classic puzzles listed here have been given a similar Demonstration treatment. Is there another classic problem that should be added to The Wolfram Demonstrations Project? If so, please consider adding it at demonstrations.wolfram.com/participate.html. Drop me a line once your new Demonstration has been published.

### References

 [1] The Wolfram Demonstrations Project, demonstrations.wolfram.com. E. Pegg Jr., “Classic Puzzles in Wolfram Demonstrations,” The Mathematica Journal, 2011. dx.doi.org/10.3888/tmj.10.4-2.

Ed Pegg Jr
Scientific Information Editor
Wolfram Research, Inc.
edp@wolfram.com