Question text is in black, solutions in blue.
Q1: 10 points Q2: 20 points Q3: 15 points Q4: 15 points Q5: 20 points Q6: 20+10 points Total: 100+10 points
[a0] <---- [a1] <---- [a2] <---- [a3]
| ^ | ^
| | | |
| | | |
V | V |
[b0] ----> [b1] ----> [b2] ----> [b3]
∀x: (x ≠ a) → F(a, x). Many people used ∧ instead of →, losing most of the points. You could debate whether ¬F(a, a) follows from the English statement -- it certainly follows from the antireflexivity of F. I accepted ∀x: (x ≠ a) ⇔ F(a, x) as well.
There exist three dogs, all different, such that the first and second are friends, but neither the first nor second is friends with the third.
The simplest expression is probably ∃x:∀y: F(b, y) ⇔ (y = x). Another possibility is ∃x: F(b, x) ∧ ∀y: (y ≠ x) → ¬F(b, y). Many people wrote just ∃x: F(b, x) which only says "Biscuit is friends with at least one dog. I didn't define the notation "∃!x:" for "there exists exactly one x" in lecture, so I only gave three points out of four for using it.
The graph has nodes a, b, c, and d and edges (a, b), (a, c), (a, d), and (c, d). The last edge exists because statement II cannot be satisfied by having dogs x and y be either Ace or Biscuit, but it is true, so Cardie and Duncan must be the x and y and this implies F(c, d) is true. The three edges involving a follow from Statement I and the two non-edges (b, c) and (b, d) follow from Statement III, since Biscuit's only friend must be Ace. Many of you omitted the edge (c, d) -- in this case I graded parts (b) and (c) of this problem based on your answer to part (a).
The correct graph in (a) is not bipartite. Since a, c, and d form a triangle, we cannot split them into two sets without two nodes in the same set having an edge between them. (They also form an odd cycle, which makes the graph not bipartite by a theorem proved in lecture.)
The correct graph is not a tree. The nodes a, c, and d form a cycle, and trees have no cycles.
∃x: ∃y: ∃z: (x ≠ y) ∧ (x ≠ z) ∧ (y ≠ z) ∧ [(F(x, y) ∧ F(x, z) ∧ F(y, z)) ∨ ((¬F(x, y)) ∧ (¬F(x, z)) ∧ (¬F(y, z)))]
or in English, "There exist three distinct dogs such that either every pair is friendly or every pair is unfriendly". (Hint: Let two of your dogs be Cardie and Duncan and use an argument by cases to determine your third dog.)
Let x be Cardie and let Y be Duncan, as suggested. We argue by cases:
Case I: F(c, d) is true. Let z be Ace. We have that F(a, c) and
F(a, d) are true by UI from Statement I. Then we also have F(c, a)
and F(d, a) by UI on the symmetry property and Modus Ponens. We have that F(c, d) is
true by the assumption for the case. Thus "F(c, d) ∧ F(c, a)
∧ F(d, a)" is true by Conjunction, and "[F(c, d) ∧ F(c, a)
∧ F(d, a)] ∨ [¬F(c, d) ∧ ¬F(c, a) ∧ ¬F(d,
a)]" is true by Addition. The desired statement is thus true by
three
uses of EG quantifying z, y, and x in that order.
Case II: F(c, d) is false. Let z be Biscuit. By Statement III,
∃u:∀v: F(b, v) ⇔ (v = u). By EI, let s be the dog
such that ∀v: F(b, v) ⇔ (v = s). By UI, specifying v to
a, we get F(b, a) ⇔ (a = s) . We know F(a, b) by UI from
Statement I, and since F(b, a) follows from F(a, b)
by UI from Symmetry and Modus Ponens, a must be equal to s and we
know that ∀v: F(b, v) ⇔ (v = a). From this it follows
that F(b, c) and F(b, d) are false, and by Symmetry, UI, and Modus
Ponens again we know that F(c, b) and F(d. b) are false. By
Conjunction we get "¬F(c, d) ∧ ¬F(c, b) ∧ ¬F(d,
b)".
We get the final statement from this just as in Case I, by Addition
and then three uses of EG.
Let P(k) be the statement "If n ≤ 2k - 1, then we can find the number with k guesses". Prove P(k) by induction for all positive integers k.
Since we are using induction on positive integers, our base case is k
= 1. P(1) says that if n ≤ 21 - 1 = 1, then we can find
our number with one guess. This is true since we may guess the only
number that is in the range.
Now assume the IH, which says that a range of up to 2k
- 1
numbers may be searched with k guesses. We need to search a range of
up to 2k+1 - 1 numbers with k + 1 guesses to prove P(k+1)
and complete the induction.
Let x and y be the endpoints of an arbitrary range of n integers,
with n ≤ 2k+1 - 1. Our first guess will be (x + y)/2.
If this is correct we have finished with 1 guess, and 1 ≤ k + 1.
Otherwise we know either that the target is in the low range or that
it is in the high range. Each of these ranges has at most n/2 =
2k - 1 integers in it. By the IH, we can search this range
with at most k more guesses, completing the original search with at
most k + 1 guesses as desired.
I got many bad answers that tried to prove the statement "n ≤
2k + 1" by induction, without any reference to guesses or
ranges. Induction proofs are about something -- many are about
numbers but this one is about guesses and ranges, as you can tell by
the reference to guesses and ranges in the statement P(k).
Prove that the first player has a winning strategy starting from (i, j) if and only if i ≠ j. (Hint: Let P(k) be the statement: "If k is the minimum of i an dj, then the first player has a winning strategy starting from (i, j) if and only if i ≠ j." Then prove P(k) for all natural numbers k by strong induction. But if you can't do the strong induction, make the most convincing argument you can.) problems:
Most of you had what was more or less the correct strategy, but I got
rather few correct strong induction proofs. I'll give two here, the
first using my suggested statement P(k) above, and the other using a
different P(k).
Using my P(k), our base case is to prove P(0), since we are told
to prove P(k) for all natural numbers. P(0) says that if the minimum
of i and j is 0, then Player I wins the game starting at (i, j) if and only if i ≠ j.
This means that he loses the game starting at (0, 0) and that he wins
starting from (i, 0) or from (0, j) if i or j is positive. We are
given that he loses from (0, 0), and in the other case he can move
directly to (0, 0) and win, so P(0) is true.
Now we assume that P(m) is true for all m with m ≤ k, as our
strong inductive hypothesis. We first prove that the first player
loses the game starting at (k + 1, k + 1). Her first move must be to
(i, k + 1) or (k + 1, j) for some i or j less than k + 1. The second
player can then move to (i, i) or (j, j), whereupon she wins (and thus
the first player loses) by the strong inductive hypothesis which
implies P(i) and P(j). Now consider the game starting from (i, k + 1)
or (k + 1, j) with i or j greater than k + 1. The first player can
move to (k + 1, k + 1), and this is a winning move for her because she
then
becomes the second player in the game we just analyzed as a win for
the second player. This proves P(k + 1) and completes the strong
induction.
Suppose instead we used the statement Q(k), which says "If i and j
are each ≤ k, then the first player wins from (i, j) if and only if
i ≠ j". We can prove this statement by ordinary induction. Q(0)
says that the first player loses if starting at (0, 0), and we are
given that this is true. Now assume that Q(k) is true and look at Q(k
+ 1). Let i and j be arbitrary natural numbers, each ≤ k + 1. If
both are ≤ k, we have our conclusion from the IH, which is Q(k).
If i = k + 1 or j = k + 1 but not both, the first player can move to
(j, j) in the first case or to (i, i) in the second case, whereupon
she
becomes the second player in a game that Q(k) tells us is a win for
the second player. If i = j = k + 1, the first player must move to
(i, k + 1) or (k + 1, j) with i or j less than k + 1, and the second
player then wins by the analysis we just did. This proves Q(k + 1)
from the IH and completes the ordinary induction.
Let e(n) be the number of edges in the graph Gn -- we are
asked to prove ∀n: e(n) = 3n + 1. The base case is n = 0,
where e(0) = 1 = 3(0) + 1 because we are told that there are only
the vertices a0 and b0 and only the edge
(a0, bo).
Assume as the IH that e(n) = 3n + 1. We are told that
Gn+1 has exactly three more edges than Gn.
So we can compute that e(n+1) = (3n + 1) + 3 = 3n + 4, and since 3n
+ 4 = 3(n + 1) + 1, we have completed the inductive step and proved
e(n) = 3n + 1 for all naturals.
Again, a proof that does not talk about graphs and edges cannot
get us a result about graphs and edges.
An "if and only if" proof breaks up into two halves. We must prove
that Gn is strongly connected when n is odd, and
that it is not strongly connected when n is even.
When n is odd, there is a directed cycle from a0
first to b0, then through all the bi's to
bn, then to an, then through all the
ai's back to a0. We may get from any node to
any other node by following this cycle, since it contains all the
nodes.
So the graph is strongly connected.
When n is odd, the node bn has two arcs into it (from
bn-1 and from an) and no edges out, so it has no
path to any other node and the graph is not strongly connected. We
could also note that an has two arcs out and none in, and
so has no path from any other node.
There is exactly one path with no edges from any node to itself, so
f(0) = 1. By inspection of the graph we see that f(1), f(2), and f(3)
are all 0 and that f(4) is 1, by the path from a0 to
b0 to b1 to a1 and back to
a0. There are also four-step paths from a0 to
b3 and vice versa, but not from either of those two nodes
to any other node.
Just to give you another induction example, let's prove that if k
equals 4m + 1, 4m + 2, or 4m + 3, then there are no paths of length k
from a0 to either itself or to b3. We work by induction
on m. The base case is m = 0, for which we dealt with the cases of k
= 1, k = 2, and k = 3 by inspection of the graph. Now assume the IH
for m and look at the cases of k = 4(m + 1) + 1, k = 4(m + 1) + 2 , and k =
4(m + 1) + 3. In each case, we assume that there is a path of that
length and get a contradiction. Look at the alleged path and consider
the node four arcs from the end of the path. This node has a path of
length four to either a0 or b3, so it is itself
either a0 or b3. But this contradicts the IH.
Now let's look at f(k) for k divisible by 4. We have observed that
f(0) = 1 and f(4) = 1. We can see that f(8) = 2, since we can go
either from a0 to a0 to a0 or from
a0
to b3 to a0 by a pair of four-step paths. In
fact to choose a path of length 4m from a0 to itself, we
just have to choose where the path is after 4, 8, 12,..., and 4(m-1)
steps.
This is m - 1 binary choices, as at each of these points it is at
either a0 or b3. So f(4m) = 2m-1,
for any positive m.
Some people observed that I could in principle construct the 8 by 8
adjacency matrix for G3, raise it to the k'th power, and
read off f(k) from the (a0, a0) entry. I gave
five points out of ten for this answer, which after all does not
really give you f(k) in a useful form.
Last modified 19 May 2013