in Algorithms retagged by
34,421 views
4 votes
4 votes
in Algorithms retagged by
by
34.4k views

1 comment

plz give me ans by back substitution.....
0
0

2 Answers

1 vote
1 vote

T(n) = 7T(n/2) + n^2

comparing with the equation (MASTER THEOREM)

T(n) = aT(n/b) + ⊖(n^k $\log_{n}p$)

we get ,a=7,b=2,k=2,p=0

now it satisfies a>b^k,

so case first of master theorem

T(n) = ⊖(n^$\log_{b}a$)

T(n)=⊖(n^3)

3 Comments

T(n) = n^2.801
0
0
we know by master theoram

T(n) = aT(n/b) + n^klogp(base n)

where a>=1 , b>1 , k>=0 and p is a real number

In above question a =7, b=2 , k=2 and p=0

if a>b^k

then Tc = O(n^loga(base b))

            = O(n^log7(base 2))

            =O(n^3)
1
1

so what will be the answer, according to the extended master theorem,

T(n) = Θ (n2.80735) that is approximate value of  θ(n3

0
0
0 votes
0 votes

Compare with master theorem ,a=7,b=2 and f(n)=n2

T(n)=nlog27 =n2.81 i.e f(n) is polynomially smaller than t(n), therefore it is first case

 therefore, ans is (nlog7) or (n2.81)