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

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -