1 flag 403 views
0 votes
0 votes
How to solve this in the simplest way?

$T(n) = T(n/4) + T(3n/4) +n$
  • 🚩 Duplicate | 👮 Hira Thakur | 💬 “https://gateoverflow.in/191487/t-n-t-n-4-t-3n-4-n”

1 Answer

0 votes
0 votes

$T(n) = T(n/4) + T(3n/4) + n$

$a_{1} = 1 , a_{2} = 1$

$b_{1} = 1/4 , b_{2} = 3/4$

$g(n) = n$

$g(u) = u$

$(1/4)^p + (3/4)^p = 1$

when $p = 1, LHS = RHS$

This method gives $T(x) \epsilon \Theta(f(x))$

$f(x) = x^p.( 1 + \int_{1}^{x} g(u)/u^{p+1} )$

        $= x.( 1 + \int_{1}^{x} u/u^{2} )$                                        

        $= x.( 1 + \int_{1}^{x} 1/u )$

        $= x.( 1 + log x )$

$T(n) = \Theta(nlogn)$ , on replacing $x$ witn $n$

1. https://www.youtube.com/watch?v=Gl2v9G0Rn4k

edited by

Related questions

0 votes
0 votes
0 answers
1
rexritz asked Aug 13, 2023
301 views
$T\left ( n \right )= 8T\left ( \frac{n}{2} \right )+\left ( n\cdot logn \right )^{2.99}$Also can $\mathcal{O}(n^{3})$ be an upper bound to above recurrence relation?
1 votes
1 votes
1 answer
2
1 votes
1 votes
2 answers
3
mdboi asked Oct 28, 2022
778 views
how do i apply master theorem to this? T(n)=2T(n/2)−n^3n