2 Answer this question on the insert provided.
A maze is constructed by building east/west and north/south walls so that there is a route from the entrance to the exit. The maze is shown in Fig. 2.1.
\begin{figure}[h]
\includegraphics[alt={},max width=\textwidth]{03df7d9e-63d4-48fb-9cf3-e92003f44788-3_495_717_470_671}
\captionsetup{labelformat=empty}
\caption{Fig. 2.1}
\end{figure}
On entering the maze Janet says "I'm always going to keep a hand in contact with the wall on the right." John says "I'm always going to keep a hand in contact with the wall on the left."
- On the insert for this question show Janet's route through the maze.
On the insert show John's route.
- Will these strategies always find a way through such mazes? Justify your answer.
In some mazes the objective is to get to a marked point before exiting. An example is shown in Fig. 2.2, where \(\mathbf { X }\) is the marked point.
\begin{figure}[h]
\includegraphics[alt={},max width=\textwidth]{03df7d9e-63d4-48fb-9cf3-e92003f44788-3_497_716_1672_669}
\captionsetup{labelformat=empty}
\caption{Fig. 2.2}
\end{figure}
In the maze shown in Fig. 2.2 Janet's algorithm takes her to \(\mathbf { X }\). John's algorithm does not take him to \(\mathbf { X }\). John modifies his algorithm by saying that he will turn his back on the exit if he arrives there without visiting \(\mathbf { X }\). He will then move onwards, continuing to keep a hand in contact with the wall on the left. - Will this modified algorithm take John to the point \(\mathbf { X }\) in the maze in Fig. 2.2?
- Will this modified algorithm take John to any marked point in the maze in Fig. 2.2? Justify your answer.