Tricks From the Flicks

This month we turn to the imaginary worlds of books and movies for some very real puzzlers

Harry Potter and the Boggling Bottles

The climactic scene of

*Harry Potter and the Sorcerer's Stone* poses a delightful logic problem: Harry and his friend Hermione are trapped in a chamber. Walls of fire block the path in front and the path in back. A row of seven unmarked, single-serving bottles, all of different sizes, sits on a table. To pass safely through either fire, they must drink from the bottle containing the right potion. A poem on a roll of paper spells out these hints.

a. One bottle— let's call it F— contains a potion that will let you walk through the fire in front. Another bottle (B) contains a potion that will let you walk through the fire in back. Two bottles (W) contain wine that does nothing, while the three remaining bottles (P) contain poison.

b. Each wine bottle has a poison bottle to its left.

c. The bottles at either end contain different liquids, and neither is the potion that lets you walk through the fire in front.

d. The biggest and smallest bottles are not poison.

e. The second bottle from either end contains the same liquid.

After pondering the hints and the arrangement of the bottles, clever Hermione concludes that the rightmost bottle contains the potion that will let them walk through the fire in back, and the smallest bottle contains the potion that will let them walk through the fire in front.

1. From this information, what can you conclude about the location of the bottle that will let them walk through the fire in front?

2. What can you conclude about the position of the biggest bottle?

3. If the poem had lacked the clue about the biggest and smallest bottles, which bottle could Hermione have chosen, knowing that it wasn't poison?

4. If the biggest and smallest bottles had been in positions 1 and 4, respectively, what would Hermione have done?

A Pentomino Odyssey

A key scene in the movie

*2001: A Space Odyssey* features the intelligent computer HAL playing chess with astronaut Dave Bowman. The scene was also filmed with HAL playing a version of pentominoes. Although that scene was cut from the movie,

*2001* author Arthur C. Clarke so enjoyed pentominoes that he worked them into a later novel,

*Imperial Earth.* Pentominoes, named by mathematician Solomon Golomb, are the 12 shapes (shown at right) that can be created by joining five squares edge to edge. In Golomb's game of pentominoes, two players alternately place pieces from a complete set of 12 pentominoes on the squares of a chessboard. The first player who cannot place a piece without overlapping another piece loses.

1. Since there are only 12 different pentomino shapes, no pentominoes game can last more than 12 moves. The shortest possible pentominoes game on an 8x8 board ends in just five moves. The figure below shows the position of the pieces after the first four moves. Can you play one more piece so that the other player can't move? Remember, each piece can be played only once.

2. Can you place three pentominoes on a 6x6 board so that no more can be placed? Can you find a second solution that uses completely different pieces?

3. Can you place four pentominoes on a 7x7 board so that no more pentominoes can be placed? Can you find a solution in which not one of the pentominoes touches the edge of the board?

4. Can you place six pentominoes on a 9x9 board so that no more pieces can be placed? What about seven pentominoes on a 10x10 board? These two problems will require a fundamentally different approach from the others.

Mathematics Takes a Bow

At the beginning of the 1997 film

*Good Will Hunting,* a troubled genius (Matt Damon) solves a thorny problem left on a chalkboard by a mathematics professor (Stellan Skarsgård). The professor describes the challenge as an unsolved problem in advanced Fourier series.

The film's director, Gus Van Sant, turned to University of Toronto physicist Patrick O'Donnell, originally hired as an extra (he appears in a bar scene), to ensure that the movie's mathematics was correct. O'Donnell chose a wide range of real mathematics inspired by the script. The film also refers to bits of genuine math lore, including the Fields Medal— the Nobel prize of mathematics— and the story of Ramanujan, a real-life mathematics prodigy.

Shown below is the problem that appears on the chalkboard in the film. (Incidentally, the problem has nothing to do with advanced Fourier series and is hardly unsolved.) The following puzzle is derived from the chalkboard problem below.

| **Find:** 1) The adjacency matrix A
2) The matrix giving the number of 3-step walks
3) The generating function for walks from points i -> j
4) The generating function for walks from points 1 -> 3 |

Notice that there are two different ways to travel from point 1 to point 3 in exactly two steps: Move from point 1 to point 2, then move along either of the two routes from 2 to 3.

1. How many ways are there to travel from point 1 to point 3 in exactly three steps?

2. How many ways are there to travel from point 1 to point 3 in exactly four steps? You may retrace your path and visit a point more than once.

3. How many ways are there to travel from point 1 to point 3 in exactly five steps?

4. How about 25 steps? Hint: Find an efficient, systematic method to solve this problem. Try using a spreadsheet program.

**Solution** Want to see the

solution to this puzzle?

Got new solutions for the puzzle? Want to see other people's solutions? Talk to the puzzle master in his discussion forum at

www.scottkim.com.

For a list of other bits of mathematics from the movies, see the Math in the Movies Page:

world.std.com/~reinhold/mathmovies.html.

© Copyright 2001 The Walt Disney