225_03_induction_lists

225_03_induction_lists -...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Put your name if you want your attendance credit. Please put your e-mail as well. CSC 225 is done at  11:30 so I did  NOT fill in the box  for 11:30 for our  class.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Some students claimed to prove that 2 k   = 2  k+1  – 1. Try to prove by induction that: 2 k   = 2  k+1  – 1. Where does the proof go off-track?
Background image of page 2
3 If you are on my connex roster, you should have received an e-mail I sent out  Monday reminding you to bring your schedule to class today. Please make  sure you can access connex. Start work now on assignment #1. Please ask me questions if any of the  instructions are not clear to you. Next tutorial: the lab instructor can answer any questions you have about  induction, linked lists, class material or the assignment. Students who are  slow in starting the assignment may benefit from hearing questions other  students have. Note: you don’t have to wait until the tutorial if you have questions. Ask me  or send me e-mail.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4        n      Σ   f(i)       i=c Meaning of notation (translation to code): sum= 0; for (i=c; i ≤ n; i++)        sum= sum + f(i); The value of the expression is  sum  at the termination of  this loop.
Background image of page 4
5 = { 0, 1, 2, 3, 4, … } Natural Numbers Inductive Definition: [Basis]  0 is in the set   [Inductive step]:  If k is in           then k+1 is in          
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 The idea behind the simplest form of an induction proof: Suppose we are given a statement S(n) and we want to show that S(n) is true  for all integers n ≥ 0.   If we prove: 1.that S(0) is a true statement, and 2.if S(n) is a true statement then so is S(n+1) then this is sufficient to prove that S(n) is true for all integers n ≥ 0.
Background image of page 6
7                                       k Theorem S(k):    Σ  2 i     =   2  k+1   - 1                                       i=0 Proof: [Basis] When k=0,    Σ i=0 to k  2 i    =   2 0    =  1 and  2 k+1  – 1 = 2 0+1  -1 =1 so this formula is correct for k=0.
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 25

225_03_induction_lists -...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online