Method
The formal definition of the master method is given for a recurrence relation of the form
where and is an asymptotically positive function, as
Example
Given a recurrence relation
we compute . As and , case 2 applies. Therefore .
Search
1 min read
The formal definition of the master method is given for a recurrence relation of the form
T(n)=aT(bn)+f(n)where a≥1,b>1 and f(n) is an asymptotically positive function, as
T(n)=⎩⎨⎧Θ(nlogba)Θ(nlogbalogk+1n)Θ(f(n))iff(n)=O(nlogba−ϵ) for some ϵ>0iff(n)=Θ(nlogbalogkn) for some k≥0iff(n)=Ω(nlogba+ϵ) for some ϵ>0 and af(bn)≤kf(n) for large n.Given a recurrence relation
T(n)=T(32n)+1we compute logba=log231=0. As f(n)=O(1) and nlogba=n0, case 2 applies. Therefore T(n)=Θ(logn).