CSE390D Notes for Monday, 10/21/24
strong induction
To prove P(n) for n in Z+
1) prove P(1) (or, P(min) for an appropriate min)
2) prove that P(1) ^ P(2) ^ ... ^ P(k) -> P(k + 1) for k in Z+
----------------------------------------------------------------------
Show that:
all integers greater than 1 can be written as a product of primes
P(n): n can be written as a product of primes for n in Z and n >= 2
basis step:
P(2): 2 = 2, which is a product of one prime
inductive step:
Prove that P(2) ^ P(3) ^ ... P(k) -> P(k + 1) for all k in Z, k >= 2
Assume P(2) ^ P(3) ^ ... ^ P(k) for some k in Z, k >= 2
We Prove P(k + 1)
Proof by cases:
k + 1 is a prime
k + 1 = k + 1, which is a product of primes
k + 1 is composite
then k+1 has a factor a other than 1 and itself, 1 < a < k+1
then there exists an integer b with k+1 = a*b
b must be in the range 1 < b < k+1 (otherwise a*b would either
be negative or larger than k+1)
QED
----------------------------------------------------------------------
Show that:
any postage amount p with p >= 4 can be formed with a combination
of 2-cent and 5-cent stamps
P(n): n can be written as a multiple of 2 and 5 when n >= 4
basis step:
P(4): 4 = 2 * 2 + 0 * 5
P(5): 5 = 0 * 2 + 1 * 5
inductive step:
Prove that P(4) ^ P(5) ^ ... P(k) -> P(k + 1) for all k in Z, k >= 6
Assume P(4) ^ P(5) ^ ... ^ P(k) for some k in Z, k >= 6
We Prove P(k + 1)
applying the inductive hypothesis for P(k - 1) we know that:
k - 1 = 2 * a + 5 * b for some integers a and b
therefore k + 1 = 2 * (a + 1) + 5 * b
QED
----------------------------------------------------------------------
Consider a game in which two players take turns removing any positive
number of matches they want from one of two piles of matches. The
player who removes the last match wins the game.
Show that:
if the two piles contain the same number of matches initially, the
second player can always guarantee a win
P(n): if the two piles initially each have n matches, the second
player has a guaranted win
basis step:
P(1): The first player has no choice but to remove a single match from
one of the piles, which allows the second player to remove the
single match in the other pile and to win the game.
inductive step:
Prove that P(1) ^ P(2) ^ ... P(k) -> P(k + 1) for all k in Z+
Assume P(1) ^ P(2) ^ ... ^ P(k) for some k in Z+
We Prove P(k + 1)
Both piles start with k+1 matches.
Proof by cases:
first player removes all k+1 matches from one of the piles.
Then the second player can remove all k+1 matches from the
second pile and win the game.
first player removes r matches from one of the piles with
1 <= r < k , leaving k+1-r matches in that pile. Neither pile
is empty after this removal, so the second player can remove r
matches from the larger pile, leaving it with k+1-r matches.
By the inductive hypothesis, we know that P(k+1-r) guarantees
a win for the second player.
QED
----------------------------------------------------------------------
Show that:
The first player in an n x 2 game of chomp has a guaranteed win
(taking the lower-right corner guarantees a win)
P(n): an n x 2 chomp grid with the lower-right corner removed is a
guaranteed loss
basis step:
P(1): for a 1 x 2 grid, only the poison remains, leading to a loss
+---+
| * |
+---+
inductive step:
Prove that P(1) ^ P(2) ^ ... P(k) -> P(k + 1) for all k in Z+
Assume P(1) ^ P(2) ^ ... ^ P(k) for some k in Z+
We Prove P(k + 1)
assume we have a (k+1) x 2 chomp grid with lower right corner removed:
+---+---+---+---+---+---+---+---+---+
| * | | | |...| | | | |
+---+---+---+---+---+---+---+---+---+
| | | | |...| | | |
+---+---+---+---+---+---+---+---+
proof by cases:
case 1:
other player chooses a square in row 1 removing j squares for some
positive integer j and this player removes the lower-right corner
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
| * | | | |...| | | | 2 |...| 2 | 2 | 2 | 2 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
| | | | |...| | | 1 | 2 |...| 2 | 2 | 2 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+
this leads to a (k + 1 - j) x 2 grid with the lower right corner
missing, which by the inductive hypothesis is a guaranteed loss for the
second player because j > 0.
case 2:
other player chooses a square in row 2 removing j squares and this
player chooses a square in row 2 that also removes j squares:
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
| * | | | |...| | | | 1 |...| 1 | 1 | 1 | 1 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
| | | | |...| | | 2 | 2 |...| 2 | 2 | 2 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+
this leads to a (k + 1 - j) x 2 grid with the lower right corner
missing, which by the inductive hypothesis is a guaranteed loss for the
second player because j > 0.
+---+---+---+---+---+---+---+---+---+
| * | | | |...| | 2 | 2 | 2 |
+---+---+---+---+---+---+---+---+---+
| | | | |...| 1 | 1 | 1 | 1 |
+---+---+---+---+---+---+---+---+---+
QED
Stuart Reges
Last modified: Mon Oct 21 14:08:27 PDT 2024