1 / 19

03/05/13

More Induction. 03/05/13. Artist: Frank. Discrete Structures (CS 173) Derek Hoiem, University of Illinois. HW problem 2a. Midterm feedback (from TAs). vs. Take care to define subset variables: Say let , even if was defined using )

fionan
Télécharger la présentation

03/05/13

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. HW problem 2a

  3. Midterm feedback (from TAs) • vs. • Take care to define subset variables: Say let , even if was defined using ) • Make sure that you work straight from hypothesis to conclusion (don’t work it from both ends in the final proof) • Take care not to re-use the same variable in different equations

  4. Does domino n fall?

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

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

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

  8. Basic structure of induction proof Claim: Base: is true. Inductive step: or Weak Induction Inductive hypothesis Inductive conclusion 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

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

  11. Graph coloring Claim: For any positive integer , if all nodes in a graph have degree , then can be colored with colors. Base case: A graph that has 1 node has maximum degree less than or equal to 0 and can be colored with 1 color. Induction: Suppose that any graph with at most nodes with maximum degree can be colored with colors. We need to show that any graph of nodes with maximum degree can also be colored with colors. Let be a graph with nodes and degree . Remove one node and its edges from the graph to form a subgraph with nodes and at most degree (since removing edges can’t increase the degree). By the inductive hypothesis can be colored with colors. Node is connected to at most other nodes, so it can be assigned the remaining th color. QED

  12. Greedy graph coloring

  13. Postage example (with strong induction) 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) Claim: Every amount of postage that is at least 12 cents can be made from 4- and 5-cent stamps. I.e., show that for some natural numbers and and any integers . Base cases: : : : : Induction: Suppose that there exist natural integers and such that for each integer , where 6. Then, we have to show that for some natural and . Since 6, , so for some natural . So . QED

  15. Towns with one-way roads 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 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 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

  19. Next class • Recursive definitions

More Related