CMPSCI 250: Introduction to Computation

First Midterm Exam

David Mix Barrington

14 October 2015

Directions:

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

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

Remember that the score of any quantifier is always to the end of the statement it is in.

Let D be a finite set of dogs including the named dogs Cardie (c), Duncan (d), Mia (m), and Toby (t), along possibly with others.

Let DW by the set of the seven days of the week: {Sun, Mon, Tue, Wed, Thu, Fri, Sat}.

Let N be the set of natural numbers {0, 1, 2, 3,...}.

Let L(x, y, r) be the predicate defined by "dog x likes dog y on day of week r".

Let w be the function from D to N defined so that w(x) is the weight of dog x in kilograms, rounded to the nearest integer.

Let SW(x, y) ("same weight") be the binary relation on D defined by "w(x) = w(y)".

Let LEW(x, y) ("less than or equal weight") be the binary relation on D defined by "w(x) ≤ w(y)".

Last modified 23 October 2015