01 Correctness Proof of Iterative Algorithm
01 Correctness Proof of Iterative Algorithm
CORRECT?
ANSWER No. 1
𝑛(𝑛+1)
1+2+…+n= 2
When using induction to prove that some statement concerning the positive integer is true, the
following terminology is used :
1. The induction base is the proof that the statement is true fot n = 1 (or another initial
value)
2. The induction hypothesis is the assumption that the statement is true for an arbitrary n
> 1 (or another initial value)
3. The induction step is the proof that if the statement is true for n, it must be also true
for n + 1
Then
To that end ,
𝑛(𝑛+1)
= 2
+ (n + 1)
𝑛2 +𝑛
= + (n + 1)
2
𝑛2 +3𝑛+2
= 2
(𝐧+𝟏)(𝒏+𝟐)
= 𝟐
(proved)
ANSWER No. 2