Homework 11


Due : 11am, 27 July

Questions 7.4 and 7.5 from the course text.

Solution

(stars represent arrows)

7.4. Depth-First

     (2)
     *|           
    / |           
   /  |           
(1)   |            (4)
      |            /*
      |           / |
      |          *  |
      |         (6) |
      *             |
     (3)----------*(5)
or 1, 2, 3, 5, 4, 6

7.5. Breadth-First

     (2)
     *|           
    / |           
   /  |           
(1)---------------*(4)
   \  |             |
     \|             |
      |\            |
      |  *          |
      |   (6)       |
      *             *
     (3)           (5)
or 1, 2, 4, 6, 3, 5
Last updated : 27 July 1999 5:08pm