algorithm - Recurence related to master theorem T(n)=T(n^(1/2))+1 -


in masters theorem given "plug-in" formula find big o, given satisfies condition.

however, if have problems following below? can show me how step step formula. , topics me know more these types of questions. assume person asking question knows nothing induction.

t(n)=t(n^(1/2))+1 t(n)=t(n-1) + 1 t(n)=t(n-1) + n^c , c natural number >1 t(n)= t(n-1) c^n, c natural number >1 

you'll need know little math of these. can figure out recursion looks when expand out way base case, e.g. t(n) = t(n-1) + n^c t(n) = 1^c + 2^c + ... + n^c, need know math in order know o(n^(c+1)). (the easiest way see bounding sum above , below in terms of integrals of x^c). t(n) = t(n-1) + c^n t(n) = c^1 + c^2 + ... + c^n again need use calculus or figure out t(n) = o(c^n).

for t(n) = t(n^(1/2)) + 1 need count how many times apply recurrence before base case. again math helps here. when take square-root, logarithm gets cut in half. want know how many times can cut logarithm in half until base case. o(log log n).


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -