GATE CSE
First time here? Checkout the FAQ!
x
+2 votes
85 views
  • T(n) = T(log n) + c
  • T(n) = T(log n) + log n
asked in Algorithms by Active (1.2k points)   | 85 views

For 

  • T(n) = T(log n) + c 
       T(n)=log*n
Can  u plz  show how ?

yes......
see how our problem of size n is reducing...like
  n -> logn ->loglogn -> loglogn ..................-> 1
it must b need 2 give there that T(1) is constant 
now see defn of log*n "In computer science, the iterated logarithm of n, written log* n (usually read "log star"), is the number of times the logarithm function must be iteratively applied before the result is less than or equal to 1. "
  so there r log*n such iterations nd cost of each is c hence it is clog*n

Please log in or register to answer this question.



Top Users Mar 2017
  1. rude

    5246 Points

  2. sh!va

    3054 Points

  3. Rahul Jain25

    2920 Points

  4. Kapil

    2732 Points

  5. Debashish Deka

    2602 Points

  6. 2018

    1574 Points

  7. Vignesh Sekar

    1440 Points

  8. Bikram

    1432 Points

  9. Akriti sood

    1420 Points

  10. Sanjay Sharma

    1128 Points

Monthly Topper: Rs. 500 gift card

21,553 questions
26,901 answers
61,258 comments
23,269 users