Question

1. Solve with Masters theorm, show all steps T(n) = 2T(n/4) + n

1. Solve with Masters theorm, show all steps T(n) = 2T(n/4) + n

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The master method works only for following type of recurrences or for recurrences that can be transformed to following type.

T(n) = aT(n/b) + f(n) where a >= 1 and b > 1
Following are the 3 cases possible
1. If f(n) = Θ(nc) where c < Logba then T(n) = Θ(nLogba)

2. If f(n) = Θ(nclogkn) where c = Logba then T(n) = Θ(ncLogk+1 n)

3.If f(n) = Θ(nc) where c > Logba then T(n) = Θ(f(n))

Solution :

According to question :

T(n) = 2T(n/4) + n

As we see the formula we get the following values

a = 2

b = 4

f(n) = n

f(n) = Θ(nc)

c = 1.

then , logba = log4(2) =.log4(4)1/2

= 1/2

logba = 0.5 -------- (i)

as, logba < 1

or  c > logba

soit follows the Case (iii) of master's theorem.

T(n) = Θ(f(n)) = Θ(n)

Thus the given recurrence relation T(n) was in Θ(n) that complies with the f(n) of the original formula.

In case of any doubt please put in comment. Thumbs Up if it helps

Add a comment
Know the answer?
Add Answer to:
1. Solve with Masters theorm, show all steps T(n) = 2T(n/4) + n
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT