CMPSCI 250: Introduction to Computation

Second Midterm Exam

David Mix Barrington

2 April 2015

Directions:

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

Here are definitions of sets, predicates, and statements used in Questions 1-5 on this exam.

Remember that a natural is a non-negative integer, so that the set N of all naturals is {0, 1, 2, 3,...}.

Questions 3 and 5 refer to the labeled undirected graph below. There are eight nodes, each representing a city in the northeast United States. The edge from x to y, if it exists, is labeled with the driving distance from x to y as given by Google Maps. If there is no edge from x to y, we assume that it is only possible to drive from x to y along edges of the graph, through intermediate cities as necessary. Since the edges are undirected, the distance from x to y always equals the distance from y to x.



         Montpelier ----180---- Augusta
            /  | \               / |
           /   |  \             /  |
          /    |  117         163  |
         /     |    \         /    |
       158    153    \       /   166
       /       |      Concord      |
      /        |     /      |      |
     /         |   97      68      |
    /          |   |         \    /
Albany --101-- Amherst --95-- Boston
      \          |          /   |
      113       53    _102_/    51
        \        |   /          |
         \-- Hartford --74-- Providence





Last modified 12 April 2015