Question Details

T1(n) = 4T1 n2 +nlog45. Which is true?

Options

A

T 1 ( n ) = θ ( n 2 )

B

T1(n)=θ(nlogn)

C

T1(n)=θ(nlog45logn)


D

T1(n)=θ(n2logn)

Show Answer

Correct Answer :

Option A

T 1 ( n ) = θ ( n 2 )

Solution :

The correct option is:
T 1 ( n ) = θ ( n 2 )

Step-by-Step Explanation:
The given recurrence relation is:
T 1 ( n ) = 4 T 1 n 2 + n log 4 5

We can analyze this recurrence relation using the Master Theorem, which is applicable to recurrences of the form:
T ( n ) = a T n b + f ( n )

By comparing the terms, we identify the parameters:
- Coefficient of the recursive term, a = 4
- Dividing factor of the input size, b = 2
- Non-recursive cost function, f(n) = nlog4(5)

Next, we compute the critical exponent value:
n log b a = n log 2 4 = n 2

Now we compare f(n) = nlog4(5) with nlogb(a) = n2.
Since 4 < 5 < 16, we know that:
1 < log 4 5 < 2

The value of log4(5) is approximately 1.161. Since 1.161 is strictly less than 2, the non-recursive part grows strictly slower than n2:
f ( n ) = O n 2 - ε
for a constant ε = 2 - log4(5) ≈ 0.839 > 0.

According to Case 1 of the Master Theorem, when the recursive work dominates the non-recursive overhead, the overall time complexity is determined by the recursive work:
T 1 ( n ) = θ n log b a = θ ( n 2 )

Unlock Our Free Library

Access expert-curated educational resources and study materials—completely free.

Discover more resources

You may also like

Mock Tests

View All
  • GATE
  • beginner
  • 3 hours
  • computer science and information technology

  • GATE
  • intermediate
  • 3 hours
  • computer science and information technology

Ask AI Tutor
5 left
Q1 View Question & Options
AI Tutor is solving this question...
Reading question context & options...