21
04/09/13 Proof by Contradiction Discrete Structures (CS 173) Derek Hoiem, University 1

04/09/13

  • Upload
    rey

  • View
    36

  • Download
    0

Embed Size (px)

DESCRIPTION

Proof by Contradiction. 04/09/13. Discrete Structures (CS 173) Derek Hoiem, University of Illinois. Administrative. Homeworks due Wed Tests released during discussion sections Grades released shortly before (Wed at earliest) Honors HW 2 posted (due Apr 29). About conflict exams for final. - PowerPoint PPT Presentation

Citation preview

Page 1: 04/09/13

04/09/13

Proof by Contradiction

Discrete Structures (CS 173)Derek Hoiem, University of Illinois 1

Page 2: 04/09/13

Administrative

• Homeworks due Wed

• Tests released during discussion sections– Grades released shortly before (Wed at earliest)

• Honors HW 2 posted (due Apr 29)

2

Page 3: 04/09/13

About conflict exams for final• Look for posted conflict exams that might help out. These are largely from courses

with combined exams. CS 173, like most non-combined exams, doesn't have one.

• Two exams at the same time? The course with the combined exam handles it. (Or, if there's more than one, the largest such course.)

• Three exams in a row? The largest course handles it.

• Really large combined exams often have an unposted "conflict conflict" time already set up, that you'll only find out about after you report a conflict to their course staff.

• Conflicts must be reported to instructors by the last day of classes. Earlier is better. If you aren't 100% sure which course is handling it, notify all the instructors involved, so we can help make sure you end up with a solution.

• More details are on the student code exams page

3

Page 4: 04/09/13

• Last class– Analysis of running time of code– P vs. NP: Problems in NP can be verified in

polynomial time. Problems in P can also be solved in polynomial time.

• This class– Proof by contradiction– When to use different types of proofs

4

Page 5: 04/09/13

Proof by Contradiction• Sometimes you want to show that something is impossible

– 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

5

Page 6: 04/09/13

Contradiction

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

Contradiction? and is odd is negative number and is real

6

Page 7: 04/09/13

Proof by contradictionClaim: There are infinitely many prime numbersEquivalent claim: There is not a finite set of primes.

7

Page 8: 04/09/13

Basic form of proof by contradiction

1. I need to show proposition

2. Suppose, instead, that is false.

3. Then, we can see that both and, which is a contradiction.

4. Therefore, must be true.

8

Page 9: 04/09/13

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,

9

Page 10: 04/09/13

Another explanation

We need to prove proposition

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

But means that , so

10

Page 11: 04/09/13

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

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

11

Page 12: 04/09/13

Proof by contradictionClaim: is irrationalEquivalent claim: There does not exist a pair of integers without common factors such that

12

Page 13: 04/09/13

Proof by contradictionClaim: No lossless compression algorithm can reduce the size of every file.

13

Page 14: 04/09/13

Why image compression works: images are mostly smooth

Page 15: 04/09/13

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)

Page 16: 04/09/13

Proof by contradictionClaim: A cycle graph with an odd number of nodes is not 2-colorable.

16

Page 17: 04/09/13

Proof by contradiction or contrapositive

Claim: For all integers , if is odd, then is odd.

17

Page 18: 04/09/13

When to use each type of proof

Situation1. Can see how conclusion directly

follows from hypothesis

2. Need to demonstrate claim for an unbounded set of integers

3. Easier to show that negation of hypothesis follows from negation of conclusion

4. Need to show that something doesn’t exist

5. Need to show that something exists18

Proof type

a) Direct proof

b) Proof by example or counter-example

c) Proof by contrapositive (or logical equivalence)

d) Induction

e) Proof by contradiction

Match the situation to the proof type

Page 19: 04/09/13

When to use each type of proof

Situation1. Can see how conclusion directly

follows from claim (a)

2. Need to demonstrate claim for an unbounded set of integers (d)

3. Easier to show that negation of hypothesis follows from negation of conclusion (c)

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

5. Need to show that something exists (b)19

Proof type

a) Direct proof

b) Proof by example or counter-example

c) Proof by contrapositive (or logical equivalence)

d) Induction

e) Proof by contradiction

Match the situation to the proof type

Page 20: 04/09/13

When to use each type of proof

Claim1. There is no real , such that 2. If is odd, then is odd.3. There is an integer , such that .4. If is odd, then is odd.5. All trees have more nodes than edges.6. A wheel graph can’t be colored with

two colors.7. Not every natural number is a square.8. The sum of two rational numbers is

rational.9. An even number can’t be created from

the product of odd numbers.20

Proof type

a) Direct proof

b) Proof by example or counter-example

c) Proof by contrapositive (or logical equivalence)

d) Induction

e) Proof by contradiction

Match the claim to the suitable proof type

Page 21: 04/09/13

Next class• Collections of sets

– Sets of sets– Powersets– Partitions

21