\documentclass[11pt]{article}
\usepackage{macros-course-lectures}

%\makeslides

\begin{document}

\section{Overview}

\onlylecture{Get feedback on pace/difficulty of first week's material and HW.}

Last time I introduced the basic structure of a proof by induction,
and did one basic example. \\
Slide 9 \\
\\
This week will be spent mostly on inductive proofs. \\
Start with more examples of regular induction. \\
\\
Then go on to two fancier forms of induction, called strong induction
and structural induction. \\
Second pset entirely on inductive proofs.\\
\\
The material I'm starting with today appears in the lecture notes we
handed out for last time. \\
We've handed it out again. \\
In the future, to save trees, we'd like to assume that you've brought
the previous lecture's notes with you, so we can hand out only new
notes.

\section{Other Simple Examples}

\subsection{Divisibility}

\begin{tabbing}
XXX\=XXX\=XXX\=XXX\=XXXXXXXXXXXXXXXXXXXXX\=    \kill
Prove: $\forall n \in N, n \geq 0 (6 | n^3 - n)$ 
\end{tabbing}

\noindent
$|$ means divides into, no remainder. \\
Try proving it by induction on $n$, with base case $0$. \\
Thus, $P(n)$ is the predicate $6 | n^3 - n$. \\
Base $P(0)$ looks obvious, because $6 | 0$ by definition. \\
Inductive step? 

\begin{tabbing}
XXX\=XXX\=XXX\=XXX\=XXXXXXXXXXXXXXXXXXXXX\=    \kill
Prove: $\forall n \in N, n \geq 0 (6 | n^3 - n)$ \\
1. (Base) $6 | 0^3 - 0$ \\
2. (Inductive step) $\forall n \geq 0 (6 | n^3 - n \Rightarrow 6 | 
(n+1)^3 - (n+1))$ \\
\> 1. Fix $n \geq 0$.\\
\> 2. Assume $6 | n^3 - n$ \\
\> 3. $6 | (n+1)^3 - (n+1)$
   \> \> \> \> ??? \\
\> 4. QED     
   \> \> \> \> Implication, UG (condensing two steps here) \\
3. QED 
\> \> \> \> \> Induction \\
\end{tabbing}

\noindent
Now, how to get from here to there? \\
Since both the expressions have high-order $n^3$ terms, can try
subtracting. \\
Difference is $((n+1)^3 - (n+1)) - (n^3 - n)$, which works out to
$3n^2 + 3n$. \\
If we know that $6$ divides this difference, and we are assuming that
$6$ divides $n^3 - n$, it follows that $6 | (n+1)^3 - (n+1)$, which is
the sum. \\ 
That's what we needed. \\
\\
So the problem reduces to showing $6 | 3n^2 + 3n$. \\
This factors into $3(n^2 + n)$. \\
But we know that $n^2 + n$ is even, that is, $2 | n^2 + n$. \\
If we multiply the expression by $3$, then $6$ certainly divides the
result. \\
\\
This discussion contained all the ideas needed for the proof. \\
Now put it all together in a complete proof. \\

\begin{tabbing}
XXX\=XXX\=XXX\=XXX\=XXXXXXXXXXXXXXXXXXXXX\=    \kill
Prove: $\forall n \in N, n \geq 0 (6 | n^3 - n)$ \\
1. (Base) $6 | 0^3 - 0$ \\
2. (Inductive step) $\forall n \geq 0 (6 | n^3 - n \Rightarrow 6 |
(n+1)^3 - (n+1))$ \\
\> 1. Fix $n \geq 0$. \\
\> 2. Assume $6 | n^3 - n$ \\
\> 3. $6 | (n+1)^3 - (n+1)$ \\
\> \> 1. $(n+1)^3 - (n+1) = n^3 - n  + 3(n^2 + n)$
      \> \> \> Algebra \\
\> \> 2. $n^2 + n$ is even   
      \> \> \> Proved this last lecture \\
\> \> 3. $2 | n^2 + n$  
      \> \> \> Definition of $|$ \\
\> \> 4. $6 | 3(n^2 + n)$ 
      \> \> \> Multiplying both sides by $3$ (basic properties of $N$)\\
\> \> 5. $6 | (n^3 - n)  + 3(n^2 + n)$
      \> \> \> Divides both terms (2.2, 2.3.4), so divides sum. \\
\> \> 6. QED 
      \> \> \> 2.3.1 equality, 2.3.5 \\
\> 4. QED \\
3. QED \\
\end{tabbing}

\noindent
The ideas in this proof are given directly, in the order in which they
are {\em used\/}. \\
Makes it concise, clear. \\
But this is a different order from the way the ideas arose when we
came up with the proof in the first place. \\
By switching the order around, we've lost information about {\em how
we came up with\/} the proof ideas. \\
\\
In reading proofs, you will see a tension between trying to
provide the reader with the cleanest possible final product and
providing intuition about how the proof was developed. \\
Neither extreme is perfect---both kinds of information are
useful. \\
When you write proofs, you might want to give both the final product
and some discussion of how you arrived at it.

\subsection{Fibonacci numbers}

\noindent
Interesting numbers that arise, e.g., in biology, where they model
some types of growth processes (plants, cells, rabbit populations,...)\\
\\
Fibonacci numbers written as $F_i$, $i = 0, 1, 2, \ldots$.  \\
Defined recursively by: \\
$F_0 = 0$ \\
$F_1 = 1$ \\
$F_i = F_{i-1} + F_{i-2}$ for $i \geq 2$.\\
\\
$0, 1, 1, 2, 3, 5, 8, 13, 21,\ldots$. \\
\\
Satisfy many cute identities. \\
Fun for mathematicians. \\
For example: 

\begin{theorem}
$\forall n \geq 0 (\Sigma_{i=0}^n F_i^2 = F_n F_{n+1})$
\end{theorem}

Example: $n = 4$: \\
$0^2 + 1^2 + 1^2 + 2^2 + 3^2 = 15 = 3 \cdot 5$. \\
\\
Try a proof by induction. \\
Theorem statement suggests trying it with $P(n)$ defined as: \\
$\sum_{i=0}^n F_i^2 = F_n F_{n+1}$.  \\

\begin{tabbing}
XXX\=XXX\=XXX\=XXX\=XXXXXXXXXXXXXXXXXXXXX\=    \kill
Prove: $\forall n \geq 0 (\Sigma_{i=0}^n F_i^2 = F_n F_{n+1})$ \\
1. (Base) $\Sigma_{i=0}^0 F_i^2 = F_0 F_1$ \\
2. (Inductive step) $\forall n \geq 0
   (\Sigma_{i=0}^n F_i^2 = F_n F_{n+1} \Rightarrow
    \Sigma_{i=0}^{n+1} F_i^2 = F_{n+1} F_{n+2})$ \\
\> \> \> \> \> ??? \\
3. QED               
\> \> \> \> \> Induction
\end{tabbing}

\noindent
Now we stare at the gap between $P(n)$ and $P(n+1)$. \\
$P(n+1)$ is given by a summation that's obtained from that for $P(n)$
by adding one term; this suggests that, once again, we subtract.
The difference is just the term $F_{n+1}^2$. \\
Now, we are assuming that the original $P(n)$ summation totals $F_n
F_{n+1}$ and want to show that the new $P(n+1)$ summation totals
$F_{n+1} F_{n+2}$. \\
So we would {\em like\/} the difference to be
\[
F_{n+1} F_{n+2} - F_n F_{n+1}
\]

\noindent
So, the actual difference is $F_{n+1}^2$ and the difference we want is
$F_{n+1} F_{n+2} - F_n F_{n+1}$. \\
Are these the same? \\
We want to check that: 
\[
F_{n+1}^2 = F_{n+1} F_{n+2} - F_n F_{n+1}
\]
But this is true, because it is really the Fibonacci recurrence in
disguise: to see this, divide by $F_{n+1}$. \\
Here's the complete proof: 

\begin{tabbing}
XXX\=XXX\=XXX\=XXX\=XXXXXXXXXXXXXXXXXXXXX\=    \kill
Prove: $\forall n \geq 0 (\Sigma_{i=0}^n F_i^2 = F_n F_{n+1})$ \\
1. (Base) $\Sigma_{i=0}^0 F_i^2 = F_0 F_1$ \\
\> \> \> \> \> Both sides are $0$. \\
2. (Inductive step) $\forall n \geq 0 
   (\Sigma_{i=0}^n F_i^2 = F_n F_{n+1} \Rightarrow
    \Sigma_{i=0}^{n+1} F_i^2 = F_{n+1} F_{n+2})$ \\
\> 1. Fix $n \geq 0$. \\
\> 2. Assume $\Sigma_{i=0}^n F_i^2 = F_n F_{n+1}$ \\
\> 3. $\Sigma_{i=0}^{n+1} F_i^2 = F_{n+1} F_{n+2}$ \\
\> \> 1. $\Sigma_{i=0}^{n+1} F_i^2 = \Sigma_{i=0}^n F_i^2 + F_{n+1}^2$
      \> \> \> Summation has one extra term \\
\> \> 2. $\Sigma_{i=0}^n F_i^2 + F_{n+1}^2 = F_n F_{n+1} + F_{n+1}^2$
      \> \> \> Inductive hypothesis (2.2) \\
\> \> 3. $F_n F_{n+1} + F_{n+1}^2 = F_{n+1}(F_n + F_{n+1})$
      \> \> \> Algebra \\
\> \> 4. $F_{n+1}(F_n + F_{n+1}) = F_{n+1} F_{n+2}$ 
      \> \> \> Fibonacci definition \\
\> \> 5. QED                         
      \> \> \> Combining the equations \\
\> 4. QED 
   \> \> \> \> Implication, UG \\
3. QED                           
\> \> \> \> \> Induction
\end{tabbing}

%\noindent
%The Spring 99 notes turn this around, starting from the
%Fib. definition and multiplying, etc.

\section{Tiling}

\noindent
Illustrates: \\
Need to strengthen inductive hypothesis in order to prove it. \\
Use of induction in finding a construction, not just doing a proof. \\
\\
Spring 99 notes describe the early saga of MIT's attempts to construct
a new computer and information sciences center. \\
Here is some updated information. \\
The new CS building will cost about \$140 million. \\
Money has come from many donors, including Bill Gates. \\
Donors get something in return, e.g., something named after them. \\
What Bill G. wants is one of the buildings named after him, plus a
statue of himself in the middle of the courtyard. \\
\\
The planned courtyard consists of $2^n \times 2^n$ squares, for some
$n \geq 1$. \\
(Don't yet know how big $n$ is.) \\
The architect, Frank Gehry, wants to cover most of this with L-shaped
tiles, each covering three squares. \\ 
But one of the four center squares will be left empty, for the
statue. \\
Can this be done?  If so, how (we want a general solution,
for all values of $n$). \\
Example: $n = 2$ 

\begin{figure}
\begin{picture}(100,100)

\put(0,0){\line(1,0){100}}
\put(25,25){\line(1,0){50}}
\put(25,75){\line(1,0){50}}
\put(0,100){\line(1,0){100}}

\put(0,50){\line(1,0){25}}
\put(75,50){\line(1,0){25}}

\put(0,0){\line(0,1){100}}
\put(25,25){\line(0,1){50}}
\put(75,25){\line(0,1){50}}
\put(100,0){\line(0,1){100}}

\put(50,50){\line(0,1){25}}
\put(50,50){\line(1,0){25}}

\put(50,0,){\line(0,1){25}}
\put(50,75){\line(0,1){25}}

\put(50,50){\framebox(25,25){B}}

\end{picture}
\caption{A legal tiling of a 4x4 courtyard.  The B marks Bill.}
\end{figure}

\noindent
Prove by induction? \\
For $P(n)$, try: \\
For any $2^n \times 2^n$ courtyard, and any particular central square,
$\exists$ a tiling of the courtyard with exactly that square left untiled.

\begin{proof}
{\em (doomed attempt)} 
Base: $n = 1$: Use one tile. \\
Inductive step: \\
Try to produce a tiling of a $2^{n+1} \times 2^{n+1}$ courtyard with
one center square blank. \\
Can assume tilings of any $2^n \times 2^n$ courtyard with any center
square blank. \\
\\
Might think of subdividing into four $2^n \times 2^n$ sub-courtyards. \\
But it doesn't seem to help to be able to tile those with centers left
open...
\end{proof}

Here we've hit the first case where just trying to prove the statement
directly by induction doesn't work. \\
Solution (maybe surprising): \\
Try to prove a {\em stronger\/} theorem that implies the one we want. \\
But isn't that harder? \\
\\
Actually, strengthening a statement to be proved by induction often
makes the proof {\em easier\/}. \\
The reason is that, although we have to prove a stronger $P(n+1)$, we
also can rely on a stronger $P(n)$. \\
\\
Here, redefine $P(n)$ to be the predicate that says, for {\em every\/}
square in a $2^n \times 2^n$ courtyard, we can tile the rest. \\
Stronger. \\
But now $P(n) \Rightarrow P(n+1)$ is easier. \\
And the theorem we wanted originally is just a special case.

\begin{proof}
Induction.\\
Base, $P(1)$ as before. \\
Inductive: $n \geq 1$, start with an arbitrary
$2^{n+1} \times 2^{n+1}$ courtyard with an arbitrary square to leave
blank. \\
Try to tile this; can assume tilings of any $2^n \times 2^n$ courtyard with 
{\em any\/} square blank. \\
\\
Again, divide the $2^{n+1} \times 2^{n+1}$ courtyard into four
$2^n \times 2^n$ quadrants. \\
One will contain the square that must be left blank; can be tiled by
inductive hypothesis.\\
\\
Next, put one tile in the center, covering one square in each of the
other 3 quadrants. \\
Now use the inductive hypothesis three more times to tile the rest of
thes 3 quads.
\end{proof}

\noindent
You should make sure you understand the logical structure of this
proof. \\
\\
Proof provides a method, not just existence proof. \\
Demonstrate for $n = 2$.\\
And gives a stronger result than we needed. 

\section{Geometry}

\noindent
Convex polygon = polygon such that any straight line betwen any two
vertices doesn't leave the polygon. \\
\\
Draw one.

\begin{tabbing}
XXX\=XXX\=XXX\=XXX\=XXXXXXXXXXXXXXXXXXXXX\=    \kill
$P(n)$: The sum of the interior angles in any $n$-sided
convex polygon is exactly $(n-2) 180$ degrees. \\
\\
Prove: $\forall n \geq 3$ (The sum of the interior angles in any $n$-sided
convex polygon is exactly $(n-2) 180$ degrees.) \\
1. (Base) Sum of angles in any triangle is $180$.
\> \> \> \> \> Basic fact from geometry \\
2. (Inductive step) $\forall n \geq 3 (P(n) \Rightarrow P(n+1))$ \\
\> 1. Fix $n \geq 3$. \\
\> 2. Assume sum of angles of any $n$-sided convex poly is $(n-2) 180$. \\
\> 3. Sum of angles of any $n+1$-sided convex poly is $(n-1) 180$. \\
\> \> 1. Fix any $n+1$-vertex convex poly $X$, say with vertices
$x_1,x_2,\ldots,x_{n+1}$ \\
\> \> 2. Let $Y$ be the poly with vertices $x_1,x_2,\ldots,x_n$
(cutting out one vertex). \\
\> \> 3. $Y$ is a convex poly with at least 3 vertices. \\
\> \> 4. Sum of interior angles of $Y$ is $(n-2)180$. \\
\> \> \> \> \> Inductive hypothesis (2.2) \\
\> \> 5. Sum of interior angles of triangle $T = x_n, x_{n+1}, x_1$ is
$180$. \\
\> \> \> \> \> Basic fact from geometry \\
\> \> 6. Sum of angles in $X$ = sum in $Y$ + sum in $T$, $= (n-2)180 +
180 = (n-1)180$. \\
\> \> \> \> \> Basic geometry, arithmetic. \\
\> \> 7. QED
      \> \> \> UG \\
\> 4. QED  
   \> \> \> \> Implication, UG \\
3. QED 
\> \> \> \> \> Induction
\end{tabbing}

\noindent
(UG is used to conclude something about all polynomials from what we showed
for any particular one.) 

\section{And a double induction}

\noindent
Finally, a trickier use of induction, used twice, in a nested way, in
the same proof. \\
\\
Define a function of two $N$ variables recursively as follows: \\
$f(0,k) = 1$ for all $k \geq 0$. \\
$f(n,0) = 1$ for all $n \geq 0$.\\
\\
For $n, k \geq 0:$ \\
$f(n+1,k+1) = f(n,k+1) + f(n+1,k)$. \\
\\
Why does this define a function? \\
\\
See in a table. \\
First two rules fill in the first row and column, respectively. \\
For each other, obtain value by adding bottom and left neighbors. \\
LTTR to see that this defines a unique function, 
that is, fills in all the spaces, in exactly one way. \\
\\
\\
\begin{tabbing}
XXX\=XXX\=XXX\=XXX\=XXX\=   \kill
4  \> 1   \> 5  \> 15  \> 35  \> 70 \\
3  \> 1   \> 4  \> 10  \> 20  \> 35 \\
2  \> 1   \> 3  \>  6  \> 10  \> 15 \\
1  \> 1   \> 2  \>  3  \>  4  \>  5 \\
0  \> 1   \> 1  \>  1  \>  1  \>  1 \\
   \> 0   \> 1  \>  2  \>  3  \>  4 \\
\end{tabbing}

We will see these numbers later in the term. \\
For now, notice a formula (pull out of thin air): \\
$f(n,k) = \frac{(n+k)!}{n! k!}$. \\
\\
Define factorial ! \\
$n! = n (n-1)\ldots 1$. \\
Special cases: \\
$1! = 1$, $0! = 1$. \\
\\
Example: \\
$f(3,4) = \frac{7!}{3!4!} = \frac{7.6.5.4.3.2.1}{3.2.1.4.3.2.1} = 35$. 

\begin{tabbing}
XXX\=XXX\=XXX\=XXX\=XXXXXXXXXXXXXXXXXXXXX\=    \kill
Prove: $\forall n, k \in N (f(n,k) = \frac{(n+k)!}{n! k!})$. 
\end{tabbing}

\noindent
Can prove by induction. \\
On what?\\
Two variables, $n$ and $k$.\\
So, will do in 2 levels. \\
Main strategy is by induction on $n$.\\
And for each particular $n$, work by induction on $k$.\\
Induction inside an induction.\\
Break up the statement to make the two levels clearer:\\

\begin{tabbing}
XXX\=XXX\=XXX\=XXX\=XXXXXXXXXXXXXXXXXXXXX\=    \kill
Prove: $\forall n (\forall k (f(n,k) = \frac{(n+k)!}{n! k!}))$
\end{tabbing}

\noindent
Define $Q(n,k)$ to be the predicate $f(n,k) = \frac{(n+k)!}{n! k!}$. \\
$Q(n,k)$ says that the value in position $(n,k)$ is correct (satisfies
the formula). \\
Define $P(n)$ to be $\forall k (Q(n,k))$, that is, 
$\forall k (f(n,k) = \frac{(n+k)!}{n! k!})$. \\
$P(n)$ means that all the values in row $n$ are correct. \\
\\
Pattern: 
\begin{tabbing}
XXX\=XXX\=XXX\=XXX\=XXXXXXXXXXXXXXXXXXXXX\=    \kill
Prove: $\forall n \geq 0 (P(n))$ \\
1. (Base) $P(0)$ \\
2. (Inductive step) $\forall n \geq 0 (P(n) \Rightarrow P(n+1))$ \\
3. QED 
\> \> \> \> \> Induction
\end{tabbing}

\noindent
Expanding:
\begin{tabbing}
XXX\=XXX\=XXX\=XXX\=XXXXXXXXXXXXXXXXXXXXX\=    \kill
Prove: $\forall n \geq 0 (P(n))$ \\
1. (Base) $P(0)$ \\
\> 1. $\forall k (f(0,k) = \frac{(0+k)!}{0!k!})$
   \> \> \> \> Both sides are 1 \\
\> 2. QED 
   \> \> \> \> Definition of $P(0)$ \\
2. (Inductive step) $\forall n \geq 0 (P(n) \Rightarrow P(n+1))$ \\
\> 1. Fix $n \geq 0$. \\
\> 2. Assume $P(n)$, that is, row $n$ is correct. \\
\> 3. $P(n+1)$, that is, row $n+1$ is correct.      
   \> \> \> \> ??? \\
\> 4. QED    
   \> \> \> \> Implication, UG \\
3. QED                           
\> \> \> \> \> Induction 
\end{tabbing}

\noindent
Now, how to prove 3? \\
It involves saying something about the whole row $n+1$. \\
We use induction to handle all the elements in this row one at a
time. \\
Our goal 3 can be rewritten, using the definition of $P$ in terms of
$Q$: \\
Note that this is all talking just about row $n+1$. 

\begin{tabbing}
XXX\=XXX\=XXX\=XXX\=XXXXXXXXXXXXXXXXXXXXX\=    \kill
\> 3. $P(n+1)$ \\
\> \> 1. $\forall k (Q(n+1,k))$ \\
\> \> \> 1. (Base) $Q(n+1,0)$ \\
\> \> \> 2. (Inductive step) $\forall k \geq 0 (Q(n+1,k) \Rightarrow Q(n+1,k+1))$. \\
\> \> \> 3. QED  
         \> \> Induction \\
\> \> 2. QED
      \> \> \> Definition of $P(n+1)$
\end{tabbing}

\noindent
The base case for the inner induction follows by expanding the
definition of $Q(n+1,0)$:
\begin{tabbing}
XXX\=XXX\=XXX\=XXX\=XXXXXXXXXXXXXXXXXXXXX\=    \kill
\> \> \> 1. (Base) $Q(n+1,0)$ \\
\> \> \> \> 1. $f(n+1,0) = \frac{(n+1+0)!}{n+1! 0!}$ 
            \> Both sides are 1 \\
\> \> \> \> 2. QED
            \> Definition of $Q(n+1)$
\end{tabbing}

\noindent
The inductive step involves some algebra:
\begin{tabbing}
XXX\=XXX\=XXX\=XXX\=XXX\=XXXXXXXXXXXXXXXXXXXXX\=    \kill
\> \> \> 2. (Inductive step) $\forall k \geq 0 (Q(n+1,k) \Rightarrow Q(n+1,k+1))$. \\
\> \> \> \> 1. Fix $k \geq 0$. \\
\> \> \> \> 2. Assume $Q(n+1,k)$. \\
\> \> \> \> 3. $Q(n+1,k+1)$ \\
\> \> \> \> \> 1. $f(n+1,k+1)= f(n,k+1) + f(n+1,k)$ \\
\> \> \> \> \> \> Definition of $f(n+1,k+1)$ \\
\> \> \> \> \> 2. $f(n+1,k) = \frac{(n+1+k)!}{(n+1)!k!}$ 
               \> Inductive hypothesis 2.3.1.2.2, def. of $Q(n+1,k)$. \\
\> \> \> \> \> 3. $f(n,k+1) = \frac{(n+k+1)!}{n!(k+1)!}$ 
               \> Inductive hypothesis 2.2, def. of $P(n,k+1)$. \\
\> \> \> \> \> 4. $f(n+1,k+1)=\frac{(n+k+1)!}{n!(k+1)!}+\frac{(n+1+k)!}{(n+1)!k!}
                  =\frac{(n+1+k+1)!}{(n+1)!k+1!}$ \\
\> \> \> \> \> \> Combining equations, algebra \\
\> \> \> \> \> 5. QED                   
               \> Definition of $Q(n+1,k+1)$ \\
\> \> \> \> 4. QED
            \> \> Induction
\end{tabbing}

\noindent
The inner inductive hypothesis is invoked to get info about the
previous element in the same row, $n+1$. \\
The outer inductive hypothesis is then invoked to get info about
element $k+1$ of the previous row. \\
(Uses UI.)

\end{document}
