You are on page 1of 23

Proof 

by Contradiction

Discrete Structures (CS 173)
Madhusudan Parthasarathy, University of Illinois 1
Proof by Contradiction
• Sometimes you want to show that something is 
impossible
– 2 cannot be written as a ratio of integers
– There is no compression algorithm that reduces the size of 
all files
– A cycle with an odd number of nodes can’t be colored with 
two colors

• Difficult to prove non‐existence directly, and can’t 
prove by example

• Solution: show that the negation of the claim leads to a 
contradiction

2
Contradiction

A set of propositions is a contradiction if their 
conjunction is always false

Contradiction?


5 ∧ 21
20 and  is odd
5 ∧ 21
5 ∧ 21
is negative number and  is real

3
Proof by contradiction
Claim: There are infinitely many prime numbers
Equivalent claim: There is not a finite set of primes.

4
Basic form of proof by contradiction

1. I need to show proposition 

2. Suppose, instead, that  is false.

3. Then, show that both  and are true, which is 


a contradiction.

4. Therefore, our assumption that p is false must
be impossible.
So  must be true.

5
Structure of a proof by contradiction

6
Why proof by contradiction works

We need to prove proposition 

Instead, we show  , i.e., that we can 
conclude a contradiction from not 

By contrapositive, 

7
Another explanation

We need to prove proposition 

Instead, we show  , i.e., that we can 

conclude a contradiction from 

But  means that  , so 

8
Danger of proof by contradiction: a mistake in 
the proof might also lead to a contradiction

See this blog post about P=NP problem
http://rjlipton.wordpress.com/2011/01/08/proofs‐by‐contradiction‐and‐other‐dangers/

9
Proof by contradiction
Claim:  2 is irrational
Equivalent claim: There does not exist a pair of integers  ,
without common factors such that  2

10
Another proof…

11
Proof by contradiction
There re are no positive integer solutions to the diophantine
equation  1

12
Proof by contradiction
There are no rational number solutions to the equation 
1 0

13
Proof by contradiction
If a is a rational number and b is an irrational number, 
then a+b is an irrational number.

14
Proof by contradiction
Claim: No lossless compression algorithm can reduce the size of 
every file.

15
Why image compression works: images are 
mostly smooth
Lossless compression (PNG)

1. Predict that a pixel’s value based on 
its upper‐left neighborhood
2. Store difference of predicted and 
actual value
3. Pkzip it (DEFLATE algorithm)
Proof by contradiction
Claim: A cycle graph with an odd number of nodes is not 2‐
colorable.

18
Proof by contradiction vs contrapositive

19
20
When to use each type of proof
Match the situation to the proof type
Situation
1. Can see how conclusion directly follows  Proof type
from hypothesis
a) Direct proof
2. Need to demonstrate claim for an 
unbounded set of integers b) Proof by example or 
counter‐example
3. Easier to show that negation of 
hypothesis follows from negation of  c) Proof by contrapositive 
conclusion (or logical equivalence)

4. Need to show that something doesn’t  d) Induction
exist

e) Proof by contradiction
5. Need to show that something exists
21
When to use each type of proof
Match the situation to the proof type
Situation
1. Can see how conclusion directly follows  Proof type
from claim (a)
a) Direct proof
2. Need to demonstrate claim for an 
unbounded set of integers (d) b) Proof by example or 
counter‐example
3. Easier to show that negation of 
hypothesis follows from negation of  c) Proof by contrapositive 
conclusion (c) (or logical equivalence)

4. Need to show that something doesn’t  d) Induction
exist (e)

e) Proof by contradiction
5. Need to show that something exists (b)
22
Later in this course

• Prove that there is no bijection between 
natural numbers and reals
(not even a 1‐1 function from reals to nat)

• Prove that there is no bijection between S and 
P(S).

• Prove that there are problems that no 
computer can solve.
23

You might also like