8 votes 8 votes Let $T(n)$ be defined by $T(1) =10$ and $T(n+1)=2n+T(n)$ for all integers $n \geq 1$. Which of the following represents the order of growth of $T(n)$ as a function of $n$? $O(n)$ $O(n \log n)$ $O(n^2)$ $O(n^3)$ Algorithms isro2011 algorithms time-complexity recurrence-relation + – shivanisrivarshini asked May 31, 2016 shivanisrivarshini 11.6k views answer comment Share Follow See 1 comment See all 1 1 comment reply Nagasaikanmatha commented Sep 9, 2021 reply Follow Share alternative way T(1)=10 GROWTH – T(2)=10+4 2-->4 T(3)=10+10 3-->10 T(4)=10+18 4-->18 T(5)=10+28 5-->28 T(6)=10+40 6-->40 GROWTH IS ALMOST O(n^2) ‘’’’’’ 0 votes 0 votes Please log in or register to add a comment.
Best answer 12 votes 12 votes Answer -: $C$ $T(n+1)=2n+T(n)$ $= 2n+2(n-1)+T(n-1)$ $ = 2n +2(n-1) + 2(n-2)+T(n-2) ......$ $ =2n+2(n-1) +2(n-2) ... 2(1)+T(1)$ $ =2(n+n-1+n-2 ..... 1)+T(1)$ $ = 2 \times \frac{n(n+1)}{2 }+10$ $ = O(n^{2})$ shivanisrivarshini answered May 31, 2016 • selected Apr 4, 2018 by sourav. shivanisrivarshini comment Share Follow See all 15 Comments See all 15 15 Comments reply Show 12 previous comments ManojK commented May 31, 2016 i edited by ManojK May 31, 2016 reply Follow Share Ok see alternative for this type qus T(1)=10 T(2)=2*1+10 =12 T(3)=2*3+12 =18 T(4)=2*4+18 =26 T(5)=2*5+26 =36 T(6)=2*6+36 =48 T(7)=2*7+48 =62 Which is nothing but T(n)=O(n^2). Do you know ans. 2 votes 2 votes shivanisrivarshini commented May 31, 2016 reply Follow Share No i dnt know the answer 0 votes 0 votes ManojK commented May 31, 2016 reply Follow Share ya it will be O(n^2 ) 1 votes 1 votes Please log in or register to add a comment.