CEMC Banner

Problem of the Week
Problem A and Solution
Amazing Navigation

Problem

Juanita and AJ create mazes on grid paper. Each maze is a rectangular grid containing white squares and grey squares. One white square is marked \(A\) and another is marked \(Z\).

To complete a maze, they start at \(A\) and need to reach \(Z\) by moving one square at a time in one of the following directions: north (\(N\)), east (\(E\)), south (\(S\)), or west (\(W)\), where the top of the page is considered north. They cannot go through any of the grey squares and must go through each of the white squares exactly once. That is, they must go through all of the white squares but cannot go through any of them more than once.

  1. Determine the directions they need to follow to successfully complete the given maze.

    A description of the maze follows.

  2. AJ creates another maze by changing where the grey squares are in the maze from part (a). (The locations of \(A\) and \(Z\) remain unchanged.) Juanita successfully completes this new maze by following these directions:

    \(E\), \(S\), \(E\), \(E\), \(E\), \(N\), \(E\), \(N\), \(W\), \(W\), \(W\), \(W\), \(N\), \(E\), \(E\), \(E\), \(E\), \(E\), \(E\)

    What does AJ’s maze look like?

Solution

  1. The first direction must be either \(N\) or \(S\), because there is a grey square to the right of \(A\). Suppose they start with \(N\). Then at some point, they must go through the square that is directly below \(A\). However, once they reach that square they will be stuck because they can’t go through any white square more than once. So the first direction must be \(S\).

    Using similar reasoning, we can complete the maze as shown.

    A description of the diagram follows.

    The directions followed are then

    \(S\), \(E\), \(E\), \(N\), \(N\), \(W\), \(W\), \(N\), \(E\), \(E\), \(E\), \(E\), \(E\), \(S\), \(S\), \(E\), \(N\), \(N\), \(E\)

  2. We first mark the given directions on the maze, as shown.

    A description of the diagram follows.

    Since Juanita cannot go through any of the grey squares, and must go through each of the white squares exactly once, the squares that are blank after marking the path must be the grey squares. Thus, AJ’s maze is as shown.

    In the first row, only the first square is grey. In the
second row, the first, seventh, and eighth squares are grey. In the
third row, the third, fourth, seventh, and eighth squares are grey. In
the fourth row, the first, sixth, seventh, and eighth squares are
grey.