Princess and Witch Puzzle

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

The princess is swimming in the center of the blue lake when the evil witch appears on the shore of the lake. The witch cannot swim, but she can run four times faster than the princess can swim. But on land the princess can outrun the witch, so all she has to do is to set her foot on land before the witch gets there. Can you help the princess get out of the water before the witch reaches her? Click on the direction you want the princess to go.

Contributed by: Karl Scherer (October 2015)
Open content licensed under CC BY-NC-SA




The red dot represents the princess and the black dot represents the witch. The small disks around the princess and the witch show how far they can move in one step. When the princess steps on shore, she (the red dot) must be outside the witch's area of influence (gray disk) in order to win; otherwise, she loses.

Click the board to determine the direction of the princess. This direction is shown by an arrow starting from the princess (if the display of the arrow is activated). The length of the arrow has no significance. With every mouse click, the princess swims an equal distance.

The witch automatically runs four times that distance, but stays on the shore of the lake. The witch always heads for the point on the shore that is closest to the princess. This point is indicated by a dashed line from the princess to the shore (if the display of the line is activated).

Expert Level

Once you have managed to win the game, try to do so with the smallest number of moves (27 or fewer).


"clicks": counts the number of clicks you need to solve the puzzle.

"show arrow": when activated, an arrow from the princess's position to the clicked position (which indicates the direction of the last increment the princess swam) is shown.

"show closest": when activated, a dashed line from the princess's position to the closest position on the boundary of the lake is shown.

"reset": resets the board to its starting position.

History This puzzle has been published in various forms in various places (e.g., with a rower in the center of the lake and a dragon waiting on the shore).


[1] M. Gardner, "Lady on the Lake," Mathematical Carnival, Washington, DC: MAA Press, 1965 p. 107.

[2] T. H. O'Beirne, "Christmas Puzzles and Paradoxes," New Scientist, 266, Dec 21, 1961 p. 751–753. #v=onepage&q&f=false.

[3] W. Schuurman and J. Lodder, "The Beauty, the Beast, and the Pond," Mathematics Magazine, 47(2), 1974 pp. 93–95.

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.