CISC 121 Lecture : 6.1.pdf

49 views1 pages
wunch and 39345 others unlocked
CISC 121 Full Course Notes
35
CISC 121 Full Course Notes
Verified Note
35 documents

Document Summary

Suppose we want to prove something is true about all the objects in a set. Statement: every citrus fruit has a certain amount of vitamin c in the juice. You can prove this by evaluating every fruit and showing that it is true for each. If the set is infinite however, you can"t do that. Proof by induction is useful for proving statements about all members of infinite sets. Prove the statement is true for the first member of the set. Prove that if it is true for some member, it is also true for the next member of the set. Statement: e(n) = 1 + 2 + 3 + 4 + n = (n(n+1))/2. Assume e(n) is true for some n in set. 1+2+ . n+n+1 = (n+1)(n+1+1)/2 n(n+1)/2 + (n+1) = (n+1)(n+1+1)/2. We do not use concrete time to measure the time it takes a program to run, due to software differences and other programs running, etc.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers