By John Taylor
Now figure out what these places are. The house is, well, your house. All the others, except W, are stores you need to go to: The sock shop (S), the book store (B), the library (L), the electronics store (E), the farmer’s market (F) and the drug store (D). The W is Will’s house. The next step is to write a matrix recording these relations. For each road from one place to another record a 1. If there is no connection put a zero. For a one-way street only write a 1 for the direction the arrow faces. If there are two options, say between home and the sock shop, enter a 2. This matrix will look like this.
Let’s go back to the trip to Will’s. You want to go to six places before you head over. Just raise the whole matrix to 6 and in the cell H,W you will see how many routes there are that reach Will’s in six moves. The resulting matrix will look like this: