Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- i ← 0
- while i < n+1
- i ← i+1
- i ← 0 |
- while i < n |
- i ← i+1 | <--- i = f(n) = n once the loop completes, by the induction hypothesis
- i ← i+1 <--- i = f(n)+1 = n+1, which proves the induction step f(n+1) = n+1
Add Comment
Please, Sign In to add comment