2082 4

Design and Analysis of Algorithms20825 marksNumerical: Recursion tree methodSolving Recurrences

Solve the recurrence relation T(n) = 2T(n/2) + n using recursion tree method.

Solve the recurrence relation T(n) = 2T(n/2) + n using recursion tree method. [5]

  • Recurrence: $T(n) = 2T\left(\dfrac{n}{2}\right) + n$ - Branching factor: $a = 2$ (each node makes 2 recursive calls) - Subproblem shrink factor: $b = 2$ (size divided by 2) - Cost at a node of size $m$: $m$ (the "$+n$" term) - Base case: $T(1) = \Theta(1)$ Level $i$ Number of nodes Size per nod...
Up nextFind the best and worst case for Bubble sort.