Question text is in black, solutions in blue.
Q1: 20 points Q2: 20 points Q3: 10 points Q4: 15 points Q5: 15 points Q6: 20+10 points Total: 100+10 points
Correction in orange made 23 February 2016.
Here are definitions of sets, predicates, and statements used in Questions 1-5 on this exam.
Remember that the score of any quantifier is always to the end of the statement it is in.
Last week my young neighbor Marisol invited a set D of six dogs to a Pet Competition. The dogs were Arlie (a), Cardie (c), my Duncan (d), another Duncan (d'), Honey (h), and Whistle (w).
Let Σ be the alphabet {a, b, c,..., z} and recall that Σ* is the set of all strings with letters in Σ.
The relation N ⊆ D × Σ* is {(x, y): the name of dog x is string y}. The names of the six dogs are thus "arlie", "cardie", "duncan", "duncan", "honey", and "whistle".
The relation R ⊆ D × D is {(x, y): either dogs x and y have the same name or x's name comes before y in alphabetical order}.
The relation S ⊆ D × D is {(x, y): x and y are dogs and R(x, y) and R(y, x) are both true}.
The relation GT ⊆ D is {x: x is a dog and x got a treat}.
Let B be the set of breeds {p, r, s, t} or {Poodle, Retriever, Setter, Terrier}. Let the relation IB ⊆ D × B be {(x, y): dog x is of breed y}. Assume that this relation is a function from D to B. (Hence every dog is of exactly one breed.)
The relation SB ⊆ D × D is {(x, y): ∃b: IB(x, b) ∧ IB(y, b)}.
The Pet Competition had three events: Best Dressed (BD), Cleverest Trick (CT), and Fastest Dog (FD). Let E be the set {BD, CT, FD}.
The relation WB ⊆ E × D is {(y, z): event y was won by dog z}. Assume that this relation is a function from E to D, so that every event was won by exactly one dog.
It is not the case that if my Duncan is a terrier, then the other
Duncan is not a setter.
The most common error here was to miss the parentheses and
apply the ¬ operator only to the first IB(d, t).
IB(a, s) ∧ WB(CT, a)
If Cardie is a poodle, then my Duncan is not a terrier and the other Duncan is a setter.
∀x: ∀y: (IB(x, r) ∨ IB(x, t)) → ¬WB(y, x)
For every breed, there is a dog of that breed.
Some people got this backward, or said only "For every breed
there is a dog" which I took off a point.
(¬IB(c, r) ∨ ¬IB(w, r)) → IB(a, t)
Given any dog, if there is dog of a different breed from it
that won an event,
then the first dog got a treat.
Many bad translations put the "if" of the → in the wrong
place.
∃x: ¬IB(x, s) ∧ ∃y: ∃z: (y ≠ z) ∧
WB(y, x) ∧ WB(z, x)
Many people left off the condition that the two events won
by the dog in question were not the same event -- I took off one
point for this. Some correct answers used facts from other statements
and said that this dog won events BD and FD, since CT was won by a
setter, or gave an OR of all the possible combinations of two or more
events that this dog could have won.
FALSE. IB maps both Arlie and the other Duncan to "setter". With six dogs and four breeds, no possible function from D to B could be one-to-one.
TRUE. The result would be {(x, z): The dog that won event x was of breed z}.
TRUE. It is reflexive and transitive but not antisymmetric, since R(d, d') and R(d', d) are both true but d ≠ d'.
TRUE. It could also be expressed as {(x, y): dogs x and y have the same name}, since the alphabetical order on strings is itself antisymmetric. And this is clearly reflexive, symmetric, and transitive.
FALSE. SB(a, d') and SB(d', a) are both true, but a ≠ d'. Even without that specific example, with six dogs and four breeds we know there must be two distinct dogs with the same breed.
FALSE. It is onto because every breed in B is the breed of at least one dog in D: Statement V says so.
TRUE. That property says that no dog has more than one name, and this is assumed above when the six names are given for the six dogs.
TRUE. There are two distinct dogs mapped to the same string.
TRUE. A binary relation would take two arguments from D. This is a unary relation because it takes only one.
TRUE. If it were, every dog would be the winner of some event. But with three events won by one dog each, it's not possible for all six dogs to be winners.
(Note: The point values of Questions 3 and 5 were reversed on the test paper, though they were correct on page 2.)
Determine exactly which truth values of the propositions IB(c, p), IB(d, t), and IB(d', s) are consistent with statements I and III from Question 1. (There may be none, one, or more than one setting of those three truth values that is consistent with both.) Justify your answer with a truth table or a deductive argument.
Statement I converts to IB(d, t) ∧ IB(d', s) by the Definition of
Implication and DeMorgan rules, thus resolving the truth
value of two of the three propositions. IB(c, p) must be false,
since
if it were true we could derive ¬IB(d, t) which contradicts
the transformed Statement I. And if IB(c, p) is false, Statement III
is true vacuously. So this setting ¬IB(c, p) ∧ IB(d, t)
∧ IB(d', s) is consistent with I and III, and is the only
setting
that is consistent with I and III.
I won't put the truth table here but it would be another
perfectly
good way to show that the setting above is the only consistent one.
Statement I is true for two of the eight settings and Statement III
for V. The biggest source of error here was misreadings of
Statement I.
Determine, using any or all of Statements I through VIII, the breed of each of the six dogs in D. Explain your reasoning.
We know that my Duncan is a terrier and that the other Duncan is
a setter from Question III.
Clearly Arlie is a setter by Separation on Statement II.
Since Arlie is not a terrier, the consequent of Statement VI is
false and thus its premise is false by Modus Tollens, so we know that
Cardie and Whistle are both retrievers.
We now have shown that five of the six dogs are not poodles, but
there are two good reasons why there must be a poodle in the set.
Specifying Statement V to x = p tells us ∃y:IB(y, p). And
Statement VIII tells us that some non-setter won an event, and this
dog could not have been a retriever or terrier by Statement IV. So
Honey must be the poodle required to exist by these arguments.
Prove, using any or all of Statements I through VIII, that every dog in the set D got a treat. Make your use of the quantifier proof rules clear.
Let q be an arbitrary dog, and specify Statement VII to q to get
[∃y: ∃z: ¬SB(q, y) ∧ WB(z, y)] → GT(q).
We use Proof by Cases.
Assume q is not a setter. Then because ¬SB(q, a) and WB(CT, a)
are both true, we can use Existence twice to get the premise of the
implication from VII and prove GT(q).
Assume q is a setter. By instantiation from VIII let m be a dog
who is not a setter and won more than one event. Let u be an event
that dog m won. Then we have ¬SB(q, m) and WB(m, u) and again
we can use Existence twice to get the premise of the implication from
VII and again prove GT(q).
Since we have proven GT(q) in both cases is is true for the
arbitrary
q and we may conclude ∀x: GT(x) by Generalization.
Many people assumed that their arbitrary dog was not a poodle, and
thus failed to prove that Honey got her treat.
13 is prime, 14 = 2 × 7, 15 = 3 × 5, 16 = 2 × 2 × 2 × 2, and 42 = 2 × 3 × 7.
Each of 14, 15, 16, and 42 have a 2, 3, or 7 in their factorization
and are thus not relatively prime to 42 and have no inverses mod 42.
But 13 is prime and thus cannot have a common factor with 42 unless
it
divides it, which is doesn't. So it is relatively prime to 42 and
does
have an inverse, which we will find in part (c).
If we use the EA then 42 and 13 go to 3 and 1 (relatively prime),
42 and 14 go to 0 (not), 42 and 15 go to 12 and 3 (not),
42 and 16 go to 10, then 6, then 4, then 2 (not), and 42 and
42 go to 0 (not). I took off a point if you justified your claim
by the EA and then didn't run the EA on 42 and itself.
In the EA we find that 42 = 3(13) + 3, 13 = 4(3) + 1, and 3 = 3(1) + 0. So 42 = 1(42) + 0(13), 13 = 0(42) + 1(13), 3 = 1(42) - 3(13), 1 = -4(42) + 13(13), and we find that 13 is its own inverse mod 42. If we cared, we have also found that -4 is the inverse of 42, mod 13.
For the function fx to be its own inverse, multiplying by x twice must have the same effect as multiplying by 1, that is, no effect at all. So we are looking for x such that x2 is congruent to 1, modulo 42. We should be able to notice that 1 and -1 (also known as 41) have this property. In (c) we found that 13 does as well, and the fourth number with this property is -13, also known as 29. If we got (c) wrong and started a brute force search, we could restrict it to the 12 numbers found in (e) to be relatively prime to 42, since if x and 42 have a common factor that factor will divide x2 which then can't equal 1.
As in the Sieve of Eratosthenes, all our candidates must be congruent
to
either 1 or 5, modulo 6, since otherwise they would have a factor of 2
or 3 in common with 42. There are 14 such numbers in the range:
1, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, and 41. Of these 7
and
35 are not relatively prime to 42 because they share 7 as a common
factor with 42. That leaves 12 relatively prime numbers, of which 10
are prime -- the other two are 1 and 25.
Many didn't realize that 1 is relatively prime to any positive
integer x, because clearly 1 is a common factor and no larger positive
integer divides 1.
Last modified 23 February 2016