Induction. Consider the following recurrence definition: T(1) = 1, T(i+1) = T(i) + 3i² +3¡ +1. a. Prove by induction the predicate p(i) = ( T(i) = ¡³ ) h. Give the Big Oh() attribute of the following algorithm as a function of N:

icon
Related questions
Question
Please Help ASAP!!
Induction. Consider the following recurrence definition:
T(1) = 1,
T(i+1) = T(i) + 3i² +3¡ +1.
a. Prove by induction the predicate
p(i) = ( T(i) = ¡³ )
b. Give the Big Oh() attribute of the following algorithm as a function of N:
int T, i; T=1; i=1;
while (T<=N)
{T=T+3*i*i+3*i+1; i=i+1;}
Transcribed Image Text:Induction. Consider the following recurrence definition: T(1) = 1, T(i+1) = T(i) + 3i² +3¡ +1. a. Prove by induction the predicate p(i) = ( T(i) = ¡³ ) b. Give the Big Oh() attribute of the following algorithm as a function of N: int T, i; T=1; i=1; while (T<=N) {T=T+3*i*i+3*i+1; i=i+1;}
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer