Algorithms: Recurrence

81 Views Asked by At

Here's a problem that I am struggling with... If two algorithms A and B both solve the same problem. On an input of size $n$

  1. Algorithm $A$ breaks it into $5$ pieces of size $n/2$, recursively solves each piece, and then combines the solutions in time n.
  2. Algorithm $B$ breaks it into $4$ pieces of size $n/2$, recursively solves each piece, and then combines the solutions in time $n^{1.5}$. Which algorithm has better asymptotic running time?

(1) would be $T(n) = 5 \cdot T(n/2) + n$

(2) would be $T(n) = 4 \cdot T(n/2) + n^{1.5}$ ?

How would I approach this?