CMPSCI 250: Introduction to Computation

First Midterm Exam Fall 2018

David Mix Barrington and Marius Minea

10 October 2018

Directions:

  Q1: 20 points
  Q2: 30 points
  Q3: 30 points
  Q4: 20+10 points
Total: 100+10 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.

Question 2 deals with the following scenario. One day Cardie and Duncan were joined on their morning walk by several other dogs. The set S of dogs on this group walk included Bingley (b), Cardie (c), Duncan (d), Guinness (g), Whistle (w), and perhaps others.

Let the binary predicate JB on S be defined so that JB(x, y) means "dog x joined the walk before dog y". Assume that the relation corresponding to JB is antireflexive, antisymmetric, and transitive.

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".

The operator "%" on naturals, as in Java, refers to integer division, so that "x % y" is the remainder on dividing x by y.

Last modified 18 October 2018