Presentation is loading. Please wait.

Presentation is loading. Please wait.

03/05/13 More Induction Discrete Structures (CS 173) Derek Hoiem, University of Illinois 1 Artist: Frank.

Similar presentations


Presentation on theme: "03/05/13 More Induction Discrete Structures (CS 173) Derek Hoiem, University of Illinois 1 Artist: Frank."— Presentation transcript:

1 03/05/13 More Induction Discrete Structures (CS 173) Derek Hoiem, University of Illinois 1 Artist: Frank

2 HW problem 2a 2

3 Midterm feedback (from TAs) 3

4 Does domino n fall? 4

5 5

6 6

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

8 Basic structure of induction proof 8 Inductive hypothesis Inductive conclusion Weak Induction Strong Induction

9 Today’s lecture More examples of induction proofs – Graph coloring – Multiple base cases – Another strong induction – Prime factorization – Towns connected by one-way streets 9

10 Graph coloring 10

11 Graph coloring 11

12 Greedy graph coloring 12

13 Postage example (with strong induction) 13 Claim: Every amount of postage that is at least 12 cents can be made from 4- and 5-cent stamps.

14 Postage example (with strong induction) 14

15 Towns with one-way roads 15 Claim: Suppose that a set of towns are connected by one way roads, such that each town has at least one road leading into it. There must be one town that has a (directed) path to every other town.

16 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.

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

18 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 18

19 Next class Recursive definitions 19


Download ppt "03/05/13 More Induction Discrete Structures (CS 173) Derek Hoiem, University of Illinois 1 Artist: Frank."

Similar presentations


Ads by Google