First Midterm Exam

Directions:

• Answer the problems on the exam pages.
• There are three problems on pages 2-7, for 100 total points plus 10 extra credit. Probable scale is A=93, C=69.
• If you need extra space use the back of a page.
• No books, notes, calculators, or collaboration.

```  Q1: 30 points
Q2: 50 points plus 10 extra credit
Q3: 20 points
Total: 100 points plus 10 extra credit
```

• Question 1 (30): Let a be the proposition "he is asleep", c be the proposition "he has his coat", l be the proposition "he has the leash" and w be the proposition "it is time for a walk".

• (a,10) Translate the following four statements as indicated:
• (to English) (I) (a ∧ c) ⊕ l
• (to symbols) (II) If he has the leash, then he also has his coat.
• (to English) (III) l ∨ (c → ¬a)
• (to symbols) (IV) It is time for a walk if and only if it is not the case that either he is asleep, he does not have the leash, or he does not have his coat.

• (b,20) Prove that given the statements I, II, III, and IV above, it is time for a walk. One good way to do this is to construct a truth table. Another is to use a deductive sequence proof -- a good way to do this is to use Proof by Cases with intermediate proposition l. In a deductive sequence proof, remember that you may use valid rules even if you don't remember their names.

• Question 2 (50+10): This question involves a set of dogs D and the following predicates: L(x) means "dog x is a Labrador", S(x) means "dog x likes to swim", and B(x) means "dog x is black".

• (a,10) Translate the following three statements as indicated:
• (to symbols) (V) Ebony is a black Labrador.
• (to English) (VI) ∃y: S(y) ∧ ¬B(y)
• (to symbols) (VII) Only Labradors like to swim.

• (b,10) The following statement VIII defines the binary predicate E(x,y) on D:

¬E(x,y) ↔ (B(x) ⊕ B(y))

Prove that E is an equivalence relation. (Use this definition only, not the statements from (a).)

• (c,20) Using statements V, VI, VII, and VIII from parts (a) and (b), prove the statement:

∀u:∃v: L(v) ∧ E(u,v)

(For full credit you must use the predicate calculus proof rules -- there will be partial credit for informal arguments.)

• (d,10) Let C be the set {b,n} and define a function f from D to C by the rules (f(x) = b) ↔ B(x) and (f(x) = n) ↔ ¬B(x). Can you determine from statements V, VI, and VII in part (a) whether the function f is onto (a surjection)? Justify your answer, making it clear that you understand the relevant definitions.

• (e,10 XC) Can you determine from statements V, VI, and VII in part (a) whether the function f is one-to-one (an injection)? Justify your answer, making it clear that you understand the relevant definitions.

• Question 3 (20): Let N = {0,1,2,3,...} be the set of all naturals. Let R be the binary relation on N defined by:

R(a,b) ↔ [(a ≤ b) ∧ (∃c: b - a = 2c)]

That is, R(a,b) means that b - a is an even natural.