+ All Categories
Home > Documents > More Induction

More Induction

Date post: 07-Jan-2016
Category:
Upload: boone
View: 16 times
Download: 0 times
Share this document with a friend
Description:
More Induction. A  Pork-Butchers Shop Seen from a Window Van Gogh. Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois. Midterm grades. Freshmen: formal roster People did very well, in general. Thanks to TAs; very lenient grading Estimated grade thus far - PowerPoint PPT Presentation
21
More Induction Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois 1 A Pork-Butchers Shop Seen from a Window Van Gogh
Transcript
Page 2: More Induction

Midterm grades

• Freshmen: formal roster

• People did very well, in general.• Thanks to TAs; very lenient grading• Estimated grade thus far

– A+,A, A-: 90 or above; – B+, B, B-: 80 or above;– C+, C, C-: 70 or above– D ,F : you need to be worried; come talk to us

2

<40 41-50 51-60 61-70 71-80 81-90 91-100

010203040506070

Histogram

# StudentsFr

eque

ncy

Page 3: More Induction

Does domino n fall?

3

Page 4: More Induction

Does domino n fall?• Suppose domino k falls. Then domino k+1 falls.

4

Page 5: More Induction

Does domino n fall?• Suppose domino k falls. Then domino k+1 falls.

• The first domino falls

5

Page 6: More Induction

Induction

6

Inductive hypothesis: Suppose domino k falls.Inductive conclusion: Domino k+1 falls.Base case: The first domino falls.

Page 7: More Induction

Basic structure of induction proof

Claim:

Base: is true.

Inductive step:

or

7

Inductive hypothesis

Inductive conclusion

Weak Induction

Strong Induction

Page 8: More Induction

Today’s lecture• Induction template• More examples of induction proofs

– Graph coloring– Multiple base cases– Another strong induction– Prime factorization– Towns connected by one-way streets

8

Page 9: More Induction

Induction template

9

Page 10: More Induction

Graph coloring

10

Claim: For any positive integer , if all nodes in a graph have degree , then can be colored with colors.

Page 11: More Induction

Graph coloring

11

Claim: For any positive integer , if all nodes in a graph have degree , then can be colored with colors. P(n): Any graph G with n nodes where all nodes have degree D+1 colors

Structure of proof:

Page 12: More Induction

Graph coloring

12

Page 13: More Induction

Greedy graph coloring algorithm

13

Page 14: More Induction

Postage example (with strong induction)

14

Claim: Every amount of postage that is at least 12 cents can be made from 4- and 5-cent stamps.

Page 15: More Induction

Postage example (with strong induction)

15

Claim: Every amount of postage that is at least 12 cents can be made from 4- and 5-cent stamps.

Page 16: More Induction

Nim

16

Nim: Two piles, two piles of matches. Each player takes turns removing any number of matches from either pile. Player that takes last match wins. Claim: If the two piles contain the same number of matches at the start of the game, then the second player can always win.

Page 17: More Induction

Prime factorization

17

Claim: Every positive integer can be written as the product of primes.

Page 18: More Induction

Program verification

18

Page 19: More Induction

Puzzle

19

Page 20: More Induction

Tips for induction• Induction always involves proving a claim for a set of integers

(e.g., number of nodes in a graph)

• Sketch out a few simple cases to help determine the base case and strategy for induction– How many base cases are needed?– How does the next case follow from the base cases?

• Carefully write the full inductive hypothesis and what you need to show

• Make sure that your induction step uses the inductive hypothesis to reach the conclusion

20

Page 21: More Induction

Next class• Recursive definitions

21


Recommended