notes from Kenneth H. Rosen's Discrete Mathematics and Its Applications, 7th ed. miscellaneous topics in discrete mathematics.

induction and recursion

induction

First used by Maurolico in 16th century to prove the sum of first n odd positive integers equals n2(TeX formula: n^2) . De Morgan was the first to formalize it in proofs in 1838, and coined the term "mathematical induction".

despite its name, mathematical induction is not an induction. it's a completely deductive argument, although it might seem inductive (because an infinite number of cases are proven automatically).

  1. Basis step: prove that conjecture holds true for first case
  2. Inductive step: prove that if assumed true for an arbitrary case, then the next case must also be true.

In combination, both facts imply that all cases are true. The truth at the basis step "trickles down" to every case by virtue of also proving step 2.

P(1)(TeX formula:  P(1) \; ∧ )

k(P(k)P(k+1))kP(k)(TeX formula:  \frac{∀k \; (P(k) \implies P(k+1))}{∀k \; P(k)} )

  • assumes well-ordering of set
  • doesn't give new formulas or conjectures, only proves them
  • no insight as to why theorem is true

1+2+3+...

triangular numbers: n;n(1+2++n=n(n+1)2)(TeX formula: n ∈ \mathbb{N} ; ∀n \left( 1+2+ \ldots + n =
\frac{n(n+1)}{2} \right))

basis step: 1=1(1+1)2=1(TeX formula: 1=\frac{1(1+1)}{2}=1)

inductive step:

1++k=k(k+1)21++k+(k+1)=(k+1)((k+1)+1)2=(k+1)(k+2)2k(k+1)21++k+(k+1)=(k+1)(k+2)2k(k+1)+2(k+1)2=k2+k+2k+22=k2+3k+22=(k+1)(k+2)2 \begin{aligned} \ 1+\ldots+k = \frac{k(k+1)}{2} \implies 1+\ldots+k+(k+1) = \frac{(k+1)((k+1)+1)}{2} = \frac{(k+1)(k+2)}{2} \ \underbrace{\frac{k(k+1)}{2}}_{1+\ldots+k}+(k+1) = \frac{(k+1)(k+2)}{2} \ \frac{k(k+1)+2(k+1)}{2} = \frac{k^{2}+k+2 k+2}{2} = \frac{k^{2}+3 k+2}{2} = \frac{(k+1)(k+2)}{2} \end{aligned} (TeX formula:  \begin{aligned} \
1+\ldots+k = \frac{k(k+1)}{2} \implies 1+\ldots+k+(k+1) = \frac{(k+1)((k+1)+1)}{2} = \frac{(k+1)(k+2)}{2} \\
\underbrace{\frac{k(k+1)}{2}}_{1+\ldots+k}+(k+1) = \frac{(k+1)(k+2)}{2} \\
\frac{k(k+1)+2(k+1)}{2} = \frac{k^{2}+k+2 k+2}{2} = \frac{k^{2}+3 k+2}{2} = \frac{(k+1)(k+2)}{2}
\end{aligned} )

alternative algebraic proof by child Gauss:

1+2++(n1)+n=(n+1)++(n+1)n/2 times =n2(n+1) 1+2+\ldots+(n-1)+n=\underbrace{(n+1)+\ldots+(n+1)}_{n/2 \text { times }}=\frac{n}{2}(n+1) (TeX formula:  1+2+\ldots+(n-1)+n=\underbrace{(n+1)+\ldots+(n+1)}_{n/2
\text { times }}=\frac{n}{2}(n+1) )

1+3+5+...

conjecture: i=0n2i+1=[1,4,9,16,25,]=[12,22,32,42,52,]=n2(TeX formula: ∑_{i=0}^n 2 i+1 = [1,4,9,16,25, \ldots] =
[1^{2}, 2^{2}, 3^{2}, 4^{2}, 5^{2}, \ldots] = n^{2})

basis step: 1=12(TeX formula: 1=1^{2})

inductive step:

1+3+5++(2k1)=k21+3++(2k1)+(2k+1)=(k+1)21+3+5++(2k1)k2+(2k+1)=(k+1)2k2+(2k+1)=(k+1)2=k2+2k+1 \begin{aligned} \ 1+3+5+\ldots+(2k-1) = k^2 \implies 1+3+\ldots+(2k-1)+(2k+1)=(k+1)^2 \ \underbrace{1+3+5+\ldots+(2k-1)}_{k^2} + (2k+1) = (k+1)^2 \ k^2 + (2k+1) = (k+1)^2 = k^2 + 2k + 1 \end{aligned} (TeX formula:  \begin{aligned} \
1+3+5+\ldots+(2k-1) = k^2 \implies 1+3+\ldots+(2k-1)+(2k+1)=(k+1)^2 \\
\underbrace{1+3+5+\ldots+(2k-1)}_{k^2} + (2k+1) = (k+1)^2 \\
k^2 + (2k+1) = (k+1)^2 = k^2 + 2k + 1
\end{aligned} )

1+2+4+8+...

¿ 1+2+22+23++2n=2n+11(TeX formula: 1+2+2^2+2^3+\ldots+2^n = 2^{n+1} - 1) ?, n(n)(TeX formula: ∀n (n ∈ \mathbb{N}))

basis step: P(0)=02=20+11=1(TeX formula: P(0) = 0^2 = 2^{0+1}-1 = 1)

inductive step:

20+21++2k=2k+1120+21++2k+2(k+1)=2k+2120+21++2k2k+11+2(k+1)=2k+21(2k+11)+2(k+1)=2k+212(2k+1)1=2k+212k+21=2k+21 \begin{aligned} \ 2^0 + 2^1 + \ldots + 2^k = 2^{k+1}-1 \implies 2^0 + 2^1 + \ldots + 2^k + 2^(k+1) = 2^{k+2}-1 \ \underbrace{2^0 + 2^1 + \ldots + 2^k}_{2^{k+1}-1} + 2^(k+1) = 2^{k+2}-1 \ (2^{k+1}-1) + 2^(k+1) = 2^{k+2}-1 \ 2(2^{k+1}) - 1 = 2^{k+2} - 1 \ 2^{k+2} - 1 = 2^{k+2} - 1 \end{aligned} (TeX formula:  \begin{aligned} \
2^0 + 2^1 + \ldots + 2^k = 2^{k+1}-1 \implies 2^0 + 2^1 + \ldots + 2^k + 2^(k+1) = 2^{k+2}-1 \\
\underbrace{2^0 + 2^1 + \ldots + 2^k}_{2^{k+1}-1} + 2^(k+1) = 2^{k+2}-1 \\
(2^{k+1}-1) + 2^(k+1) = 2^{k+2}-1 \\
2(2^{k+1}) - 1 = 2^{k+2} - 1 \\
2^{k+2} - 1 = 2^{k+2} - 1
\end{aligned} )

general geometric series

j=0narj=a+ar+ar2++arn=arn+1ar1;r1 ∑_{j=0}^{n} a r^{j} = a + ar +ar^{2} + \ldots + ar^{n} = \frac{ar^{n+1}-a}{r-1}; \; r ≠ 1 (TeX formula:  ∑_{j=0}^{n} a r^{j} = a + ar +ar^{2} + \ldots + ar^{n} =
\frac{ar^{n+1}-a}{r-1}; \; r ≠ 1 )

basis step:

P(0):j=00arj=ar0=ar0+1ar1a=ar1ar1=a(r1)(r1)=a \begin{aligned} \ P(0): ∑_{j=0}^{0} a r^{j}=a r^{0}=\frac{a r^{0+1}-a}{r-1} \ a = \frac{a r^{1}-a}{r-1} = \frac{a(r-1)}{(r-1)} = a \ \end{aligned} (TeX formula:  \begin{aligned} \
P(0): ∑_{j=0}^{0} a r^{j}=a r^{0}=\frac{a r^{0+1}-a}{r-1} \\
a = \frac{a r^{1}-a}{r-1} = \frac{a(r-1)}{(r-1)} = a \\
\end{aligned} )

inductive step:

P(1):ar0+ar2++ark=ark+1ar1ar0+ar1++arkark+1ar1+ark+1=ark+2ar1ark+1ar1+ark+1=ark+2ar1ark+1a+(r1)(ark+1)=ark+2aark+1a+ark+2ark+1=ark+2aark+2a=ark+2a \begin{aligned} \ P(1): ar^{0} + ar^{2}+ \ldots + ar^{k} = \frac{a r^{k+1}-a}{r-1} \ \implies \underbrace{ar^{0} + ar^{1} + \ldots + ar^{k}}_{\frac{ar^{k+1}-a}{r-1}} + ar^{k+1} = \frac{ar^{k+2}-a}{r-1} \ \frac{ar^{k+1}-a}{r-1} + ar^{k+1} = \frac{ar^{k+2}-a}{r-1} \ ar^{k+1}-a + (r-1)(ar^{k+1}) = ar^{k+2} - a \ ar^{k+1} - a + ar^{k+2} - ar^{k+1} = ar^{k+2} - a \ ar^{k+2}-a = ar^{k+2}-a \end{aligned} (TeX formula:  \begin{aligned} \
P(1): ar^{0} + ar^{2}+ \ldots + ar^{k} = \frac{a r^{k+1}-a}{r-1} \\
\implies \underbrace{ar^{0} + ar^{1} + \ldots + ar^{k}}_{\frac{ar^{k+1}-a}{r-1}} + ar^{k+1} = \frac{ar^{k+2}-a}{r-1} \\
\frac{ar^{k+1}-a}{r-1} + ar^{k+1} = \frac{ar^{k+2}-a}{r-1} \\
ar^{k+1}-a + (r-1)(ar^{k+1}) = ar^{k+2} - a \\
ar^{k+1} - a + ar^{k+2} - ar^{k+1} = ar^{k+2} - a \\
ar^{k+2}-a = ar^{k+2}-a
\end{aligned} )