# CMPSCI 250 Practice Midterm #1

#### Actual midterm will be 30 September 2004

There are six questions for 100 total points.

Questions 1-4 deal with three sets of naturals (non-negative integers) named A, B, and C. You will need the following predicates defined in the lecture of Mon 27 September: The predicate D(x,y) on naturals x and y means "x divides y", or formally, ∃z:xz=y. The predicate P(x) on naturals means "x is a prime number", or formally,

(x>1)∧∀y: D(y,x)→(y=1)∨(y=x).

Question 1 (15): Translate the following English statements about A into symbolic form:

• (a) If 3 is an element of A, then so are both 5 and 7.
• (b) Every element of A is a prime number.
• (c) Every number that divides an element of A is in B.

Question 2 (15): Translate the following symbolic statements about A into English:

• (d) (2∈A)⊕(5∈A)
• (e) ∃x:∃y:[(x∈A)∧(y∈A)∧(x+y=9)]
• (f) C = {x: ∃y:[D(y,x)∧(y∈A)]}

Question 3 (20): Assuming that all six of the statements (a)-(f) are true, exactly which naturals are both less than 10 and in A? Prove your answer by either a truth table or a propositional argument. (Hint: Because of (b) you need only worry about the membership questions for the four prime numbers that are less than 10, and statements (a), (d), and (e) give you compound propositions involving these. Ignore (c) and (f), which don't give information about A.)

Question 4 (20): Prove the following statements about A, B, and C, being specific about your use of the four proof rules for quantifiers:

• ∀x:∃y:[(y∈B)∧(y≤x+1)]
• ∀i:∃j:[(j∈C)∧(i≤j)]
Questions 5 and 6 deal with two binary relations R (from A to B) and S (from B to A), where A and B are not necessarily the sets from above. Assume that both R and S define functions, that is, both are total and both are well-defined. These questions also deal with the following three statements:

• (I) ∀a:∀b:[R(a,b)↔S(b,a)]
• (II) ∀a:∀c:[∃b:R(a,b)∧S(b,c)]↔(a=c)
• (III) ∀b:∀d:[∃a:S(b,a)∧R(a,d)]↔(b=d)

Question 5 (15): Assuming statement (I), and the fact that both R and S are functions, prove statement (II). (It would be easy to adapt a correct proof of (II) to prove (III).) (Originally you were to show that (I) and (II) imply (III), which is of course true since (I) implies (III).)

Question 6:(15) Assuming statements (II) and (III), and that R and S are functions, prove statement (I). Originally you were asked to prove (I) from (III) alone, which is not possible.