CMPSCI 250: Introduction to Computation

Solutions to First Midterm Exam Spring 2016

David Mix Barrington

Exam given 23 February 2016

Solutions posted 6 March 2016

Directions:

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

Question text is in black, solutions in blue.

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 D be a finite set of dogs consisting of exactly the four distinct dogs Cardie (c), Duncan (d), Mia (m), and Scout (s).

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

There are three owners O1, O2, and O3.

Let BT(u, n) be the relation from D to N defined so that BT(n, u) means "dog u belongs to owner On".

Let E be the binary relation on D defined so that E(u, v) means "dog u goes out earlier than dog v".

Let Y be the binary relation on D defined so that Y(u, v) means "dog u is younger than dog v". You may assume that no two dogs in D are exactly the same age.

Some of the true/false questions also refer to an arbitrary set D of dogs with predicates T(x) meaning "dog x is a terrier" and S(x, y) meaning "dog x is sillier than dog y".

Last modified 6 March 2016