You are on page 1of 155

Rome

Informal proofs

Lecture 4

CS 441 Discrete mathematics for CS M. Hauskrecht

Course administration
Homework 1
• First homework assignment is out today will be posted on
the course web page
• Due next week on Thurday

Recitations:
• today at 4:00pm SENSQ 5313
• tomorrow at 11:00 SENSQ 5313

Course web page:


http://www.cs.pitt.edu/~milos/courses/cs441/

CS 441 Discrete mathematics for CS M. Hauskrecht

1
CS 441 Discrete Mathematics for CS
Lecture 6

Informal proofs

Milos Hauskrecht
milos@cs.pitt.edu
5329 Sennott Square

CS 441 Discrete mathematics for CS M. Hauskrecht

Proofs
• The truth value of some statements about the world are obvious
and easy to assess
• The truth of other statements may not be obvious, …
…. But it may still follow (be derived) from known facts about
the world

Proof: shows that the truth value of such a statement follows from
(or can be inferred) from the truth value of other statements

Important questions:
– When is the argument correct?
– How to construct a correct argument, what method to use?

CS 441 Discrete mathematics for CS M. Hauskrecht

1
Informal proofs
Proving theorems in practice:
• The steps of the proofs are not expressed in any formal language
as e.g. propositional logic
• Steps are argued less formally using English, mathematical
formulas and so on
• One must always watch the consistency of the argument made,
logic and its rules can often help us to decide the soundness of the
argument if it is in question

• We use (informal) proofs to illustrate different methods of


proving theorems

CS 441 Discrete mathematics for CS M. Hauskrecht

Methods of proving theorems


Basic methods to prove the theorems:
• Direct proof
– p  q is proved by showing that if p is true then q follows
• Indirect proof
– Show the contrapositive ¬q  ¬p. If ¬q holds then ¬p follows
• Proof by contradiction
– Show that (p  ¬ q) contradicts the assumptions
• Proof by cases
• Proofs of equivalence
– p  q is replaced with (p  q)  (q  p)

Sometimes one method of proof does not go through as nicely as the


other method. You may need to try more than one approach.
CS 441 Discrete mathematics for CS M. Hauskrecht

4
Informal proofs
Proving theorems in practice:
• The steps of the proofs are not expressed in any formal language
as e.g. propositional logic
• Steps are argued less formally using English, mathematical
formulas and so on
• One must always watch the consistency of the argument made,
logic and its rules can often help us to decide the soundness of the
argument if it is in question

• We use (informal) proofs to illustrate different methods of


proving theorems

CS 441 Discrete mathematics for CS M. Hauskrecht

Methods of proving theorems


Basic methods to prove the theorems:
• Direct proof
– p  q is proved by showing that if p is true then q follows
• Indirect proof
– Show the contrapositive ¬q  ¬p. If ¬q holds then ¬p follows
• Proof by contradiction
– Show that (p  ¬ q) contradicts the assumptions
• Proof by cases
• Proofs of equivalence
– p  q is replaced with (p  q)  (q  p)

Sometimes one method of proof does not go through as nicely as the


other method. You may need to try more than one approach.

4
Direct proof
• p  q is proved by showing that if p is true then q follows

• Example: Prove that “If n is odd, then n2 is odd.”

Proof:
• Assume the hypothesis is true, i.e. suppose n is odd.
• Then n = 2k + 1, where k is an integer.
n2 = (2k + 1)2
= 4k2 + 4k + 1
= 2(2k2 + 2k) + 1
• Therefore, n2 is odd.

CS 441 Discrete mathematics for CS M. Hauskrecht

Indirect proof
• To show p  q prove its contrapositive ¬q  ¬p
• Why? p  q and ¬q  ¬p are equivalent !!!
• Assume ¬q is true, show that ¬p is true.

Example: Prove If 3n + 2 is odd then n is odd.


Proof:
• Assume n is even, that is n = 2k, where k is an integer.
• Then: 3n + 2 = 3(2k) + 2
= 6k + 2
= 2(3k+1)
• Therefore 3n + 2 is even.
• We proved ¬ “n is odd”  ¬ “3n + 2 is odd”. This is
equivalent to “3n + 2 is odd”  “n is odd”.

CS 441 Discrete mathematics for CS M. Hauskrecht

5
Direct proof
• p  q is proved by showing that if p is true then q follows

• Example: Prove that “If n is odd, then n2 is odd.”

Proof:
• Assume the hypothesis is true, i.e. suppose n is odd.
• Then n = 2k + 1, where k is an integer.
n2 = (2k + 1)2
= 4k2 + 4k + 1
= 2(2k2 + 2k) + 1
• Therefore, n2 is odd.

CS 441 Discrete mathematics for CS M. Hauskrecht

Indirect proof
• To show p  q prove its contrapositive ¬q  ¬p
• Why? p  q and ¬q  ¬p are equivalent !!!
• Assume ¬q is true, show that ¬p is true.

Example: Prove If 3n + 2 is odd then n is odd.


Proof:
• Assume n is even, that is n = 2k, where k is an integer.
• Then: 3n + 2 = 3(2k) + 2
= 6k + 2
= 2(3k+1)
• Therefore 3n + 2 is even.
• We proved ¬ “n is odd”  ¬ “3n + 2 is odd”. This is
equivalent to “3n + 2 is odd”  “n is odd”.

CS 441 Discrete mathematics for CS M. Hauskrecht

5
Proof by contradiction
• We want to prove p  q
• The only way to reject (or disprove) p  q is to show that (p 
¬q ) can be true

• However, if we manage to prove that either q or ¬ p is True


then we contradict (p  ¬q )
– and subsequently p  q must be true

• Proof by contradiction. Show that the assumption (p  ¬q )


leads either to q or ¬ p which generates a contradiction.

CS 441 Discrete mathematics for CS M. Hauskrecht

Proof by contradiction
• We want to prove p  q
• To reject p  q show that (p  ¬q ) can be true
• To reject (p  ¬q ) show that either q or ¬ p is True

Example: Prove If 3n + 2 is odd then n is odd.


Proof:
• Assume 3n + 2 is odd and n is even, that is n = 2k, where k an
integer.

CS 441 Discrete mathematics for CS M. Hauskrecht

6
Proof by contradiction
• We want to prove p  q
• The only way to reject (or disprove) p  q is to show that (p 
¬q ) can be true

• However, if we manage to prove that either q or ¬ p is True


then we contradict (p  ¬q )
– and subsequently p  q must be true

• Proof by contradiction. Show that the assumption (p  ¬q )


leads either to q or ¬ p which generates a contradiction.

CS 441 Discrete mathematics for CS M. Hauskrecht

Proof by contradiction
• We want to prove p  q
• To reject p  q show that (p  ¬q ) can be true
• To reject (p  ¬q ) show that either q or ¬ p is True

Example: Prove If 3n + 2 is odd then n is odd.


Proof:
• Assume 3n + 2 is odd and n is even, that is n = 2k, where k an
integer.

CS 441 Discrete mathematics for CS M. Hauskrecht

6
Proof by contradiction
• We want to prove p  q
• To reject p  q show that (p  ¬q ) can be true
• To reject (p  ¬q ) show that either q or ¬ p is True

Example: Prove If 3n + 2 is odd then n is odd.


Proof:
• Assume 3n + 2 is odd and n is even, that is n = 2k, where k an
integer.
• Then: 3n + 2 = 3(2k) + 2
= 6k + 2
= 2(3k + 1)
• Thus 3n + 2 is even. This is a contradiction with the assumption
that 3n + 2 is odd. Therefore n is odd.

CS 441 Discrete mathematics for CS M. Hauskrecht

Vacuous proof
We want to show p  q
• Suppose p (the hypothesis) is always false
• Then p  q is always true.
Reason:
• F  q is always T, whether q is True or False

Example:
• Let P(n) denotes “if n > 1 then n2> n” is TRUE.
• Show that P(0).
Proof:
• For n=0 the premise is False. Thus P(0) is always true.

CS 441 Discrete mathematics for CS M. Hauskrecht

7
Proof by contradiction
• We want to prove p  q
• To reject p  q show that (p  ¬q ) can be true
• To reject (p  ¬q ) show that either q or ¬ p is True

Example: Prove If 3n + 2 is odd then n is odd.


Proof:
• Assume 3n + 2 is odd and n is even, that is n = 2k, where k an
integer.
• Then: 3n + 2 = 3(2k) + 2
= 6k + 2
= 2(3k + 1)
• Thus 3n + 2 is even. This is a contradiction with the assumption
that 3n + 2 is odd. Therefore n is odd.

CS 441 Discrete mathematics for CS M. Hauskrecht

Vacuous proof
We want to show p  q
• Suppose p (the hypothesis) is always false
• Then p  q is always true.
Reason:
• F  q is always T, whether q is True or False

Example:
• Let P(n) denotes “if n > 1 then n2> n” is TRUE.
• Show that P(0).
Proof:
• For n=0 the premise is False. Thus P(0) is always true.

CS 441 Discrete mathematics for CS M. Hauskrecht

7
Trivial proofs
We want to show p  q
• Suppose the conclusion q is always true
• Then the implication p  q is trivially true.
• Reason:
• p T is always T, whether p is True or False

Example:
• Let P(n) is “if a >=b then an >= bn ”
• Show that P(0)
Proof:
a0 >=b0 is 1=1 trivially true.

CS 441 Discrete mathematics for CS M. Hauskrecht

Proof by cases
• We want to show p1  p2  …  pn  q
• Note that this is equivalent to
– (p1  q)  (p2  q)  …  (pn  q)
• Why?
• p1  p2  …  pn  q <=> (useful)
• ¬ (p1  p2  …  pn)  q <=> (De Morgan)
• (¬p1  ¬p2  …  ¬pn)  q <=> (distributive)
• (¬p1  q)  (¬p2  q)  … (¬pn  q) <=> (useful)
• (p1  q)  (p2  q)  …  (pn  q)

CS 441 Discrete mathematics for CS M. Hauskrecht

8
Trivial proofs
We want to show p  q
• Suppose the conclusion q is always true
• Then the implication p  q is trivially true.
• Reason:
• p T is always T, whether p is True or False

Example:
• Let P(n) is “if a >=b then an >= bn ”
• Show that P(0)
Proof:
a0 >=b0 is 1=1 trivially true.

CS 441 Discrete mathematics for CS M. Hauskrecht

Proof by cases
• We want to show p1  p2  …  pn  q
• Note that this is equivalent to
– (p1  q)  (p2  q)  …  (pn  q)
• Why?
• p1  p2  …  pn  q <=> (useful)
• ¬ (p1  p2  …  pn)  q <=> (De Morgan)
• (¬p1  ¬p2  …  ¬pn)  q <=> (distributive)
• (¬p1  q)  (¬p2  q)  … (¬pn  q) <=> (useful)
• (p1  q)  (p2  q)  …  (pn  q)

CS 441 Discrete mathematics for CS M. Hauskrecht

8
Proof by cases
We want to show p1  p2  …  pn  q
• Equivalent to (p1  q)  (p2  q)  …  (pn  q)
Prove individual cases as before. All of them must be true.

Example: Show that |x||y|=|xy|.


Proof:
• 4 cases:
• x >=0, y>=0
• x>= 0, y <0
• x<0, y>=0 |
• x<0, , y <0 |

CS 441 Discrete mathematics for CS M. Hauskrecht

Proof by cases
We want to show p1  p2  …  pn  q
• Equivalent to (p1  q)  (p2  q)  …  (pn  q)
Prove individual cases as before. All of them must be true.

Example: Show that |x||y|=|xy|.


Proof:
• 4 cases:
• x >=0, y>=0 xy >0 and |xy|=xy=|x||y|
• x>= 0, y <0 xy < 0 and |xy|=-xy =x (-y)=|x||y|
• x<0, y>=0 xy < 0 and |xy|=-xy =(-x) y=|x||y|
• x<0, , y <0 xy >0 and |xy|= (-x)(-y) =|x||y|
• All cases proved.
CS 441 Discrete mathematics for CS M. Hauskrecht

9
Proof by cases
We want to show p1  p2  …  pn  q
• Equivalent to (p1  q)  (p2  q)  …  (pn  q)
Prove individual cases as before. All of them must be true.

Example: Show that |x||y|=|xy|.


Proof:
• 4 cases:
• x >=0, y>=0
• x>= 0, y <0
• x<0, y>=0 |
• x<0, , y <0 |

CS 441 Discrete mathematics for CS M. Hauskrecht

Proof by cases
We want to show p1  p2  …  pn  q
• Equivalent to (p1  q)  (p2  q)  …  (pn  q)
Prove individual cases as before. All of them must be true.

Example: Show that |x||y|=|xy|.


Proof:
• 4 cases:
• x >=0, y>=0 xy >0 and |xy|=xy=|x||y|
• x>= 0, y <0 xy < 0 and |xy|=-xy =x (-y)=|x||y|
• x<0, y>=0 xy < 0 and |xy|=-xy =(-x) y=|x||y|
• x<0, , y <0 xy >0 and |xy|= (-x)(-y) =|x||y|
• All cases proved.
CS 441 Discrete mathematics for CS M. Hauskrecht

9
Proof of equivalences
We want to prove p  q
• Statements: p if and only if q.
• Note that p  q is equivalent to [ (p  q )  (q  p) ]
• Both implications must hold.

Example:
• Integer is odd if and only if n^2 is odd.
Proof of (p  q ) :
• (p  q ) If n is odd then n^2 is odd
• we use a direct proof
• Suppose n is odd. Then n = 2k + 1,where k is an integer.
• n^2 = (2k + 1)^2 = 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1
• Therefore, n^2 is odd.
CS 441 Discrete mathematics for CS M. Hauskrecht

Proof of equivalences
We want to prove p  q
• Note that p  q is equivalent to [ (p  q )  (q  p) ]
• Both implications must hold.

• Integer is odd if and only if n^2 is odd.


Proof of (q  p):
• (q  p): if n^2 is odd then n is odd
• we use an indirect proof (¬p  ¬q) is a contrapositive
• n is even that is n = 2k,
• then n^2 = 4k^2= 2(2k^2)
• Therefore n^2 is even. Done proving the contrapositive.
Since both (p  q) and (q  p) are true the equivalence is true
CS 441 Discrete mathematics for CS M. Hauskrecht

10
Proof of equivalences
We want to prove p  q
• Statements: p if and only if q.
• Note that p  q is equivalent to [ (p  q )  (q  p) ]
• Both implications must hold.

Example:
• Integer is odd if and only if n^2 is odd.
Proof of (p  q ) :
• (p  q ) If n is odd then n^2 is odd
• we use a direct proof
• Suppose n is odd. Then n = 2k + 1,where k is an integer.
• n^2 = (2k + 1)^2 = 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1
• Therefore, n^2 is odd.
CS 441 Discrete mathematics for CS M. Hauskrecht

Proof of equivalences
We want to prove p  q
• Note that p  q is equivalent to [ (p  q )  (q  p) ]
• Both implications must hold.

• Integer is odd if and only if n^2 is odd.


Proof of (q  p):
• (q  p): if n^2 is odd then n is odd
• we use an indirect proof (¬p  ¬q) is a contrapositive
• n is even that is n = 2k,
• then n^2 = 4k^2= 2(2k^2)
• Therefore n^2 is even. Done proving the contrapositive.
Since both (p  q) and (q  p) are true the equivalence is true
CS 441 Discrete mathematics for CS M. Hauskrecht

10
Proofs with quantifiers
• Existence proof – sentences expressed with an existential
quantifiers

– Constructive
• Find an example (through search) that shows the
statement holds.
– Nonconstructive
• Show the statement holds for one example but we do not
have the witness example. Typically relies on the proof by
contradiction – negate the existentially quantified
statement and show that it implies a contradiction.

CS 441 Discrete mathematics for CS M. Hauskrecht

Proofs with quantifiers


• Universally quantified statements

– Prove the property holds for all examples


– can be tricky
– proof by cases to divides the proof to the different
subgroups may help

– Counterexamples:
• use to disprove universal statements
• Similar to constructive proofs for existentially

CS 441 Discrete mathematics for CS M. Hauskrecht

11
Proofs with quantifiers
• Existence proof – sentences expressed with an existential
quantifiers

– Constructive
• Find an example (through search) that shows the
statement holds.
– Nonconstructive
• Show the statement holds for one example but we do not
have the witness example. Typically relies on the proof by
contradiction – negate the existentially quantified
statement and show that it implies a contradiction.

CS 441 Discrete mathematics for CS M. Hauskrecht

Proofs with quantifiers


• Universally quantified statements

– Prove the property holds for all examples


– can be tricky
– proof by cases to divides the proof to the different
subgroups may help

– Counterexamples:
• use to disprove universal statements
• Similar to constructive proofs for existentially

CS 441 Discrete mathematics for CS M. Hauskrecht

11
Mathematical Induction
Discrete Mathematics

1
What is induction?
A method of proof

It does not generate answers:


it only can prove them

Three parts:
◼ Base case(s): show it is true
for one element
◼ Inductive hypothesis: assume
it is true for any given element
Must be clearly labeled!!!
◼ Show that if it true for the next
highest element

2
Induction example
Show that the sum of the first n odd
integers is n2
◼ Example: If n = 5, 1+3+5+7+9 = 25 = 52
n
Formally, Show n P(n) whereP(n) =


2i − 1 == n 2
i =1

Base case: Show that P(1) is true


1
P(1) =  2(
i =1
i ) − 1 == 12

= 1 == 1
3
Induction example, continued
Inductive hypothesis: assume true for k
◼ Thus, we assume that P(k) is true, or that
k

 2i
i =1
− 1 == k 2

◼ Note: we don’t yet know if this is true or not!

Inductive step: show true for k+1


◼ We want to show that:
k +1

 2i
i =1
− 1 == ( k + 1) 2

4
Induction example, continued
k
Recall the inductive hypothesis:  2i − 1 == k 2
i =1

Proof of inductive step:


k +1

 2i
i =1
− 1 == ( k + 1) 2

k
2(k + 1) − 1 +  2i − 1 == k 2 + 2k + 1
i =1

2(k + 1) − 1 + k 2 == k 2 + 2k + 1
k 2 + 2k + 1 == k 2 + 2k + 1
5
What did we show
Base case: P(1)
If P(k) was true, then P(k+1) is true
◼ i.e., P(k) → P(k+1)

We know it’s true for P(1)


Because of P(k) → P(k+1), if it’s true for P(1), then it’s true for P(2)
Because of P(k) → P(k+1), if it’s true for P(2), then it’s true for P(3)
Because of P(k) → P(k+1), if it’s true for P(3), then it’s true for P(4)
Because of P(k) → P(k+1), if it’s true for P(4), then it’s true for P(5)
And onwards to infinity

Thus, it is true for all possible values of n

In other words, we showed that:


P(1)  k (P( k ) → P( k + 1)) → n P( n)
6
The idea behind inductive proofs
Show the base case
Show the inductive hypothesis
Manipulate the inductive step so that you
can substitute in part of the inductive
hypothesis
Show the inductive step

7
Second induction example
Rosen, section 3.3, question 2:
◼ Show the sum of the first n positive even
integers is n2 + n
◼ Rephrased: n
n P(n) whereP(n) =  2i == n + n
2

i =1

The three parts:


◼ Base case
◼ Inductive hypothesis
◼ Inductive step

8
Second induction example,
continued
Base case: Show P(1): 1
P(1) =  2(i) == 12 + 1
i =1

= 2 == 2

Inductive hypothesis: Assume


k
P(k ) =  2i == k 2 + k
i =1

Inductive step: Show


k +1
P(k + 1) =  2i == (k + 1) 2 + (k + 1)
i =1

9
Second induction example,
continued
Recall our k inductive
P(k ) =  2i == k + k
2

hypothesis: i =1

k +1

 2i
i =1
== ( k + 1) 2
+ k +1
k
2(k + 1) +  2i == (k + 1) 2 + k + 1
i =1

2(k + 1) + k 2 + k == (k + 1) 2 + k + 1
k 2 + 3k + 2 == k 2 + 3k + 2

10
Notes on proofs by induction
We manipulate the k+1 case to make part
of it look like the k case
We then replace that part with the other
side of the k case k
k +1 P(k ) =  2i == k 2 + k
 2i
i =1
== ( k + 1) 2
+ k +1 i =1

k
2(k + 1) +  2i == (k + 1) 2 + k + 1
i =1

2(k + 1) + k 2 + k == (k + 1) 2 + k + 1
k 2 + 3k + 2 == k 2 + 3k + 2 11
Third induction example
Rosen, question 7: Show n
n(n + 1)(2n + 1)

i =1
i =
2

Base case: n = 1 1
1(1 + 1)(2 + 1)

i =1
i =
2

6
6
1 =
2

6
1=1
Inductive hypothesis: assume
k
k (k + 1)(2k + 1)

i =1
i =
2

6 12
Third induction example
Inductive step: show k +1
(k + 1)((k + 1) + 1)(2(k + 1) + 1)

i =1
i =
2

6
k +1
(k + 1)((k + 1) + 1)(2(k + 1) + 1)

i =1
i =
2

6
k
(k + 1)(k + 2)(2k + 3)
(k + 1) +  i =
2 2

i =1 6
k (k + 1)(2k + 1) (k + 1)(k + 2)(2k + 3)
(k + 1) +
2
=
6 6
6(k + 1) 2 + k (k + 1)( 2k + 1) = (k + 1)( k + 2)( 2k + 3)
k (k + 1)(2k + 1)
k
2k + 9k + 13k + 6 = 2k + 9k + 13k + 6  i =
3 2 3 2 2

i =1 6 13
Third induction again: what if your
inductive hypothesis was wrong?
Show:  i 2 = n(n + 1)(2n + 2)
n

i =1 6 1
1(1 + 1)(2 + 2)
Base case: n = 1:
 =
i 2

i =1 6
7
1 =
2

6
7
1
6
But let’s continue anyway…
Inductive hypothesis: assume
k
k (k + 1)(2k + 2)

i =1
i =
2

6 14
Third induction again: what if your
inductive hypothesis was wrong?
Inductive step: show k +1
(k + 1)((k + 1) + 1)(2(k + 1) + 2)

i =1
i =
2

6
k +1
(k + 1)((k + 1) + 1)(2(k + 1) + 2)

i =1
i =
2

6
k
(k + 1)(k + 2)(2k + 4)
(k + 1) +  i =
2 2

i =1 6
k (k + 1)(2k + 2) (k + 1)(k + 2)(2k + 4)
(k + 1) +
2
=
6 6
6(k + 1) 2 + k (k + 1)( 2k + 2) = (k + 1)( k + 2)( 2k + 4)
k (k + 1)(2k + 2)
k
2k + 10k + 14k + 6  2k + 10k + 16k + 8  i =
3 2 3 2 2

i =1 6 15
Fourth induction example
Rosen, question 14: show that n! < nn for
all n > 1

Base case: n = 2
2! < 22
2<4
Inductive hypothesis: assume k! < kk
Inductive step: show that (k+1)! < (k+1)k+1
k +1
(k + 1)! = (k + 1)k!  (k + 1)k  (k + 1)( k + 1) = (k + 1)
k k
16
Question 40
Take a pile of n stones
◼ Split the pile into two smaller piles of size r
and s
◼ Repeat until you have n piles of 1 stone each
Take the product of all the splits
◼ So all the r’s and s’s from each split
Sum up each of these products
Prove that this product equals n(n − 1)
2
17
Question 40
10

7 21 3

4 12 3 2 2 1

2 4 2 2 2 1 1 1 1

1 1 1 1 1 1 1 1 1
n(n − 1)
2
10 * 9
21 + 12 + 2 + 4 + 2 + 1 + 1 + 1 + 1 = 45 =
2 18
Question 40
We will show it is true for a pile of k
stones, and show it is true for k+1 stones
◼ So P(k) means that it is true for k stones

Base case: n = 1
◼ No splits necessary, so the sum of the
products = 0
◼ 1*(1-1)/2 = 0
◼ Base case proven

19
Question 40
Inductive hypothesis: assume that P(1), P(2), …,
P(k) are all true
◼ This is strong induction!

Inductive step: Show that P(k+1) is true


◼ We assume that we split the k+1 pile into a pile of i
stones and a pile of k+1-i stones
◼ Thus, we want to show that
(i)*(k+1-i) + P(i) + P(k+1-i) = P(k+1)
◼ Since 0 < i < k+1, both i and k+1-i are between 1 and
k, inclusive

20
Question 40
◼ Thus, we want to show that i2 − i
(i)*(k+1-i) + P(i) + P(k+1-i) = P(k+1) P( i ) =
2
(k + 1 − i )( k + 1 − i − 1) k 2 + k − 2ki − i + i 2
P( k + 1 − i ) = =
2 2
(k + 1)( k + 1 − 1) k 2 + k
P( k + 1) = =
2 2
(i) * (k + 1 − i) + P(i) + P(k + 1 − i) = P(k + 1)
i 2
− i k 2
+ k − 2 ki − i − i 2
k 2
+k
ki + i − i 2 + + =
2 2 2
2ki + 2i − 2i 2 + i 2 − i + k 2 + k − 2ki − i + i 2 = k 2 + k
k2 + k = k2 + k 21

You might also like