CMPSCI 250: Introduction to Computation

First Midterm Exam Spring 2017

David Mix Barrington

28 February 2017

Directions:

  Q1: 20 points
  Q2: 10 points
  Q3: 20 points
  Q4: 30 points
  Q5: 30 points
Total: 110 points

Here are definitions of sets, predicates, and statements used on this exam.

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

Let S be a finite set of dogs consisting of exactly the four distinct dogs Cardie (c), Duncan (d), Mia (m), and Whistle (w).

Let Z be a finite set of languages consisting of exactly the five distinct languages Chinese (C), English (E), French (F), Latin (L), and Spanish (S).

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

If a, b, and m are naturals, with m > 0, the notation "a ≡ b (mod m)" means "a is congruent to b, modulo m".

Let T be the unary relation on S defined so that T(x) means "dog x is a terrier".

Let R be the binary relation from S to Z defined so that R(x, y) means "dog x responds to commands in language y".

Let P be the binary relation on N defined so that P(x, y) means "|x - y| ≤ 3", where |z| denotes the absolute value of z.

Let Q be the binary relation on N defined so that Q(x, y) means "(x = y) ∨ (y > x + 3)".

Let G be the binary relation on N defined so that G(x, y) means "x = (x/2) + (x%2)", using Java notation.

Last modified 19 March 2017