- Answer the problems on the exam pages.
- There are five problems, some with multiple parts, for 110 total points. Actual scale A = 95, C = 65.
- Some useful definitions precede the questions below.
- No books, notes, calculators, or collaboration.
- In case of a numerical answer, an arithmetic expression like
"2
^{17}- 4" need not be reduced to a single integer.

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 "y = (x/2) + (x%2)", using Java notation.

**Question 1 (20):**Translate each statement as indicated, using the set of dogs D = {c, d, m, w}, the set of languages Z = {C, E, F, L, S}, the predicate T(x) meaning "dog x is a terrier", and the predicate R(x, y) meaning "dog x responds to commands in language y". In general I have used x as a variable of type "dog" (S) and y as a variable of type "language" (Z), but this should also be clear by the usage of variables in predicates.- (a, 2) (to English) (Statement I)
¬(R(c, F) → R(c, S)) ∧ ¬(¬R(c, L) ∨ R(c, S))
- (b, 3) (to symbols) (Statement II) Cardie responds to commands both in French and in Latin.
- (c, 2) (to English) (Statement III) ∀y: (y ≠ C) ↔ (∃x: R(x, y))
- (d, 3) (to symbols) (Statement IV) There is exactly one dog, Whistle, who responds to commands in Spanish.
- (e, 2) (to English) (Statement V) ∀x: ∀y: R(x, y) → R(x, E)
- (f, 3) (to symbols) (Statement VI) Unless Duncan is a terrier, he responds to commands in Chinese.
- (g, 2) (to English) (Statement VII) ∃x: ∀y: ¬T(x) ∧ (R(x, y) ↔ (y = E))
- (h, 3) (to symbols) (Statement VIII) Any dog who does not respond to commands in English must be a terrier.

- (a, 2) (to English) (Statement I)
¬(R(c, F) → R(c, S)) ∧ ¬(¬R(c, L) ∨ R(c, S))
**Question 2 (10):**This question uses the sets, definitions, and predicates above, and the statements from Question 1.Prove that if Statement I is true, Statement II must be true as well. You may use either a truth table or a deductive argument.

**Question 3 (20):**This question also uses the sets, definitions, and predicates from above and the statements from Question 1.Prove, using any or all of Statements I through VII, that Statement VIII is true. Do not assume anything about the English meaning of the predicates, except what you are given in the statements. Make your use of quantifier proof rules clear.

(Hint: If you have an arbitrary dog x, you may divide into the four cases x = c, x = d, x = m, and x = w. It is possible to solve this problem with or without Proof By Contradiction.)

**Question 4 (30):**The following are fifteen true/false questions, with no explanation needed or wanted, no partial credit for wrong answers, and no penalty for guessing. They use the sets and relations defined above.- (a) (This uses the predicates defined above but not Statements I-VIII.) If I have the premise (T(x) ∧ R(x, c)) → (x = d), I may derive the statement T(x) → (x = d) by the rule of Separation.
- (b) The negation of ∀x: T(x) is ¬∀x:¬T(x)
- (c) The relation P defined above is an equivalence relation.
- (d) The relation P defined above is both reflexive and symmetric.
- (e) The relation Q defined above is a partial order.
- (f) The relation Q defined above is a total order.
- (g) The relation G defined above is a function from
**N**to**N**. - (h) The relation G is an injection (a one-to-one function).
- (i) The relation G is not a surjection (an onto function).
- (j) Let u, v, and w be any three strings over the alphabet Σ = {a, b}. If uv = uw, it must be true that v = w. (Here "uv" means the concatenation of u and v.)
- (k) Let u be a string of eight letters over the alphabet Σ = {a, b}. If neither aaa nor bbb is a substring of u, then u has at least two a's and at least two b's.
- (l) Let a, b, c, d, and m be naturals with m > 1, a ≡ c (mod m), and b ≡ d (mod m). If a is divisible by b and c is divisible by d, we can guarantee that (a/b) ≡ (c/d) (mod m).
- (m) The statement of part (l) is true if we add the additional condition that b and m are relatively prime.
- (n) (This uses the sets and predicates of Question 1 but not Statements I-VIII.) If I have the premises ∃x: T(x) → R(x, C) and T(d), I can conclude R(d, C).
- (o) (This uses the sets and predicates of Question 1 but not Statements I-VIII.) If I have the premises ∀x: T(x) → R(x, C) and ¬T(m), I can conclude ¬R(m, C).

**Question 5 (30):**Here are some straightforward number theory questions.- (a, 5) Give prime factorizations of the naturals 25 and 57.
- (b, 5) Based on your prime factorizations, determine
exactly which of the numbers in the set {1, 2, 3, 4, 5, 6, 7, 8,
9, 10}, if any, have
*both*an inverse modulo 25 and an inverse modulo 57. Justify your answer. - (c, 10) Find an inverse of 25, modulo 57, and an inverse of 57, modulo 25. Be sure to make clear which is which.
- (d, 10) Find which naturals x satisfy both the congruences x ≡ 13 (mod 25) and x ≡ 14 (mod 57). You may give an arithmetic expression in your answer without resolving it to an explicit integer.

Last modified 22 February 2018