Puzzles and Directed Graphs
Previously (Section 2.6) we explained how puzzle problems can be formulated in terms of graphs. The vertices of the graph correspond to the positions in a puzzle; the edges of the graph correspond to the possible moves from one position to another. The solution of the puzzle consists in finding a path from a given initial position to one (or possibly more) terminal or winning positions.
In dealing with these puzzles, we used undirected graphs. This was based upon the tacit assumption that the moves can be made both ways from one position to another. Such a procedure is permissible for the puzzles of the ferryman, the three jealous husbands, and the moves of the knight on the chessboard.
But for many puzzles the moves can only be made in one direction, and in this case we are compelled to use directed graphs in the representation. If some moves can be made in both directions, we can include an edge for each direction, or we can use a mixed graph in which these edges are undirected. To solve the puzzle, we must find a directed path from the initial position in the graph to the desired terminal position.
We shall illustrate these remarks by considering an ancient and familiar puzzle.
To save this book to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Find out more about the Kindle Personal Document Service.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.