ba(ab+ba+bb)*
Base case: ba has length 2, which is even.
Induction case: Let u be a string and assume that u has some even length
2k. Then uab, uba, and ubb each have length 2k+2, which is even.
Since the property holds for the base case and is preserved by the inductive
steo it holds for all strings in Z.
Base: ba does not end in aa.
Induction: Assuming u does not end in aa, neither do uab, uba, or ubb.
(Note that no use is made of the IH here.)
As in (a), this suffices to prove it for all strings in Z.
Base: ba does not have three a's in a row.
Induction:
Let u be an arbitrary string in Z. By (c), u does not end in aa,
and by the IH, u does not have three a's in a row. Now look at uab, uba, and
ubb. The latter two certainly could only have three a's in a row if u did, and
it doesn't. The string uab could have three a's in a row only if either u did
or if u ended in aa, neither of which is true.
We have shown that (u∈Z) and P(u) together imply P(uab), P(uba), and
P(ubb), which is enough to complete the induction and thus the proof.
where the type of the variables a, b, and c is natural
.
Recall that x≡y (mod z)
is defined to be true if and only if z divides the integer x-y.
Let a and b be arbitrary. Assume that ab > 0. It follows that a > 0
and b > 0, because if either of a and b were 0 then so would be ab.
Let c = ab+3. Then the difference between c and 3 is ab, which is divisible
by both a and b, so c is congruent to 3 both mod a and mod b. Since we found
a suitable c, we have proved the ∃c statement by the Rule of Existence.
Since a and b were arbitrary, we have proved the whole statement.
Some students let c=3 rather than c=ab+3, which is a perfectly good
answer because both a and b divide 0.
Let P(n) be the statment that F(n+2) > F(n+1) and F(n+1) ≥ F(n).
Base: Since we are proving this for all positive n, our base case
is P(1), which is a good thing since P(0) is false. P(1) is true because
F(3) = 2 > F(2) = 1 ≥ F(1) = 1.
Induction: Assume P(n), so that F(n+2) > F(n+1) and F(n+1) ≥ F(n).
We want to prove that F(n+3) > F(n+2) and that F(n+2) ≥ F(n+1). The
first statement is true because F(n+3) = F(n+2) + F(n+1) > F(n+1) = F(n+1)
≥ F(n+1) + F(n) = F(n+2). The second statement follows immediately from
the assumption $F(n+2) > F(n+1). This proves P(n+1), completing the
induction and the proof.
Base: P(0) says that on input F(1) = 1 and F(0) = 0, the EA stops in zero
steps. This is true because the second argument is already 0.
Induction: Assume that the EA stops in at most n steps on F(n+1) and F(n+2).
Consider starting the EA on inputs F(n+2) and F(n+1). By the observation in
(a), F(n+2) % F(n+1) = F(n) unless n=0 or n=1, so except in these cases,
after its first step the
EA continues on inputs F(n+1) and F(n). By the IH this takes at
most n more steps, making at most n+1 in all. If n=0, then the EA on input
F(2) = 1 and F(1) = 1 takes one step, which is fine since 1 = n+1.
If n=1, the EA on input F(3) = 2
and F(2) = 1 also takes one step, and since 1 ≤ n+1 this is fine.
This completes the induction and thus the proof.
We use strong induction on n with "PD(n)" as our predicate.
Base: The statements PD(0) and PD(1) are trivially true by joining.
Induction: Assume PD(i) for all i with i ≤ n, and we will prove P(n+1).
If n=0, then PD(n+1) = PD(1) is trivially true by joining.
If n+1 is prime, let b = n+1
and c = 1, and we have proved PD(n+1). Otherwise n+1 is composite, so that
it equals de for some naturals d and e, each greater than 1 and less than n+1.
The strong IH tells us that PD(d) is true, so there exist numbers f and g such
that f is prime and fg = d. But then fge = n+1, and by taking b to be f and
c to be ge, we have that b is prime and bc=n+1 and we have proved PD(n+1).
This completes the strong induction and thus the proof.
Let u be arbitrary and use induction on v such that Path(u,v) is true.
Base: u = v, and then u ≡ v (mod 3) is true because 3 divides 0.
Induction: Assume that Path(u,w), that u ≡ w (mod 3), and that
Edge(w,v). Then v must be equal to w-9, w-6, w+6, or w+9. All these numbers
are congruent to w modulo 3, so by the IH they are also congruent to u
modulo 3. This completes the induction on paths and thus the proof.
Following the hint, let u be arbitrary, and
let P(k) be "if v = u+3k or v = u-3k
and v is the number of a vertex, then Path(u,v)". We will prove P(k) for
all naturals by strong induction on
k.
Base: k=0, so v = u and Path(u,v) is true by the base case of the Path
definition.
Induction: Assume P(i) for all i with i ≤ k, and we will prove P(k+1).
Let v be an arbitrary vertex. Assume v = u + 3(k+1) = u + k + 3. If u and
k are both 0, then v = 3 and Path(0,3) is true because there is an edge from
0 to 9 and an edge from 3 to 9. Otherwise v - 6 = u + k - 3 is a vertex
number. Then the IH tells us P(k-1) is true and thus that Path(u,v-6) and thus
P(u,v) are true, unless k = 0. But if k = 0 then v = u+3 and we can connect
u to v by a two-step path either from u to u+9 to u+3 or from u to u-6 to u+3.
(Since the length of the graph is more than 15, at least one of u+9 and u-6 is
the number of a vertex.) This completes the case of v = u + 3(k+1).
Now assume that v = u - 3(k+1). If k=0, connect u to u-3 by a two-step
path either through u-9 or through u+6, as at least one of these vertices
exists. Otherwise connect v to v+6 = u - 3(k-1), and then connect v+6 to u
using the strong IH which includes P(k-1).
Last modified 29 October 2004