CS 5000: Theory of Computation                         Lecture 03                       Vladimir Kulyukin                D...
Outline    ●        Two Proof Techniques Useful in CS           –   Contradiction           –   Inductionwww.youtube.com/v...
Review: Proof Techniques   ●       Proof techniques are independent of their subject matter:       valid proofs in calculu...
Two Proof Techniques for CS   ●       There are two proof techniques that are prominent in CS:       contradiction and ind...
Two Proof Techniques for CS   ●       You use induction method to prove that some statement       S is true for every natu...
Inductionwww.youtube.com/vkedco           www.vkedco.blogspot.com
Induction●    There are two inductive techniques: standard and    generalized (aka course-of-values induction)●    The sta...
Standard Induction: Example 1                          n                               n( n + 1)                         ∑...
Standard Induction: Example 2    A complete binary tree of height h has        h+ 1    2          nodeswww.youtube.com/vke...
Standard Induction: Example 3     long fibo(long n) {       if (n == 0 || n == 1) {           return n;       }       else...
Course-Of-Values Induction   ●       The course-of-values induction proceeds by proving the       following two statement:...
Course-Of-Values Induction: Example        Any natural number n ≥ 2 can be expressed        as a product of primeswww.yout...
Feedback      Errors to vladimir dot kulyukin at gmail comwww.youtube.com/vkedco            www.vkedco.blogspot.com
Theory of Computation: Lecture 03
Theory of Computation: Lecture 03
Theory of Computation: Lecture 03
Theory of Computation: Lecture 03
Theory of Computation: Lecture 03
Theory of Computation: Lecture 03
Upcoming SlideShare
Loading in...5
×

Theory of Computation: Lecture 03

953

Published on

1. Proof by Contradiction
2. Proof by Induction
3. Class home page is at http://vkedco.blogspot.com/2011/08/theory-of-computation-home.html

Published in: Education, Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
953
On Slideshare
0
From Embeds
0
Number of Embeds
16
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Theory of Computation: Lecture 03"

  1. 1. CS 5000: Theory of Computation Lecture 03 Vladimir Kulyukin Department of Computer Science Utah State Universitywww.youtube.com/vkedco www.vkedco.blogspot.com
  2. 2. Outline ● Two Proof Techniques Useful in CS – Contradiction – Inductionwww.youtube.com/vkedco www.vkedco.blogspot.com
  3. 3. Review: Proof Techniques ● Proof techniques are independent of their subject matter: valid proofs in calculus use the same proof techniques as valid proofs in algorithms or theory of computation ● Common proof techniques can be identified ● Learning to identify common proof techniques will enable you to study many areas of CS independently ● The ability to identify proof techniques is based on your ability to understand how the technique works and when it is likely to be applicablewww.youtube.com/vkedco www.vkedco.blogspot.com
  4. 4. Two Proof Techniques for CS ● There are two proof techniques that are prominent in CS: contradiction and induction ● The contradiction method is used any time you want to show that something is impossible ● The gist of the contradiction method is this: you assume that it is possible and then derive a statement that contradicts another statement that you and everyone else familiar with the subject matter know to be truewww.youtube.com/vkedco
  5. 5. Two Proof Techniques for CS ● You use induction method to prove that some statement S is true for every natural number greater than or equal to some initial value k ● In other words, S(k) is true, S(k+1) is true, S(k+2) is true, S(k+3) is true, and so on to infinity ● In the end, a valid inductive proof allows you to conclude that S(n) is true for all numbers greater than or equal to kwww.youtube.com/vkedco www.vkedco.blogspot.com
  6. 6. Contradictionwww.youtube.com/vkedco www.vkedco.blogspot.com
  7. 7. Contradiction: Examples 1. Show that 2 is not a rational number 2. Show that 3 is not a rational number 3. Show that if x ∈ { a, b} and xa = ax, then * x = a ,n∈ N nwww.youtube.com/vkedco www.vkedco.blogspot.com
  8. 8. Inductionwww.youtube.com/vkedco www.vkedco.blogspot.com
  9. 9. Induction ● The induction method should be seriously considered every time you have a statement of the form: ∀ n ∈ N , n ≥ k , k ∈ N , k ≥ 0 S ( n ) is truewww.youtube.com/vkedco www.vkedco.blogspot.com
  10. 10. Induction● There are two inductive techniques: standard and generalized (aka course-of-values induction)● The standard induction proceeds by proving the following two statements: 1. Show that S ( k ) is true 2. Show that if S ( k ) is true, then S ( k + 1) is true www.vkedco.blogspot.com
  11. 11. Standard Induction ● Standard Induction can be thought of as the following infinite inference chain: S ( k ) is true If S ( k ) , then S ( k + 1) If S ( k + 1) , then S ( k + 2 ) If S ( k + 2 ) , then S ( k + 3) ...www.youtube.com/vkedco www.vkedco.blogspot.com
  12. 12. Standard Induction: Example 1 n n( n + 1) ∑1 i = 2 i=www.youtube.com/vkedco www.vkedco.blogspot.com
  13. 13. Standard Induction: Example 2 A complete binary tree of height h has h+ 1 2 nodeswww.youtube.com/vkedco www.vkedco.blogspot.com
  14. 14. Standard Induction: Example 3 long fibo(long n) { if (n == 0 || n == 1) { return n; } else { return fibo(n-2) + fibo(n-1); } Show that fibo(n) terminates for all n >= 0.www.youtube.com/vkedco www.vkedco.blogspot.com
  15. 15. Course-Of-Values Induction ● The course-of-values induction proceeds by proving the following two statement: ( ∀ n )[ If ( ∀ m ) m< n S ( m ) is true, then S ( n ) ]www.youtube.com/vkedco www.vkedco.blogspot.com
  16. 16. Course-Of-Values Induction ● The course-of-values induction proceeds by the following infinite inference chain: S ( 0) If S ( 0 ) , then S (1) If S ( 0 ) & S (1) , then S ( 2 ) If S ( 0 ) & S (1) & S ( 2 ) , then S ( 3) ...www.youtube.com/vkedco www.vkedco.blogspot.com
  17. 17. Course-Of-Values Induction: Example Any natural number n ≥ 2 can be expressed as a product of primeswww.youtube.com/vkedco www.vkedco.blogspot.com
  18. 18. Reading ● Ch. 1, Davis, Sigal, Weyuker. Computability, Complexity, and Languages, 2nd Ed.www.youtube.com/vkedco www.vkedco.blogspot.com
  19. 19. Feedback Errors to vladimir dot kulyukin at gmail comwww.youtube.com/vkedco www.vkedco.blogspot.com

×