CMPSCI 250: Introduction to Computation

Third Midterm Exam

David Mix Barrington

20 November 2007

The scale was A = 90, C = 54.

  Q1: 10 points
  Q2: 15 points
  Q3: 20 points
  Q4: 15 points
  Q5: 15 points
  Q6: 25 points 
 Total: 100 points 

Questions 3 and 4 deal with a particular kind of rooted directed trees called foo-trees. They are defined recursively:

Here is an example of a foo-tree with eight nodes:

         (a)
        / | \
       /  |  \
      /   |   \
     /    |    \
    /     |     \
   /      |      \
(b)      (c)      (d)
                 / | \
                /  |  \
               /   |   \
              /    |    \
             /     |     \
            /      |      \
         (e)      (f)      (g)
                            |
                            |
                            |
                            |
                            |
                            |
                           (h)

Questions 5 and 6 deal with the following labeled undirected graph G. The node set is {a,b,c,d} and there are four edges: (a,c) with weight 4, (a,d) with weight 1, (b,c) with weight 1, and (b,d) with weight 1.

Last modified 26 November 2007