3

I'm having trouble with a recursion problem of uni.

I have to get the big-O order of a recursive algorithm, this is the recursion scheme I got:

Recursion scheme

It comes from an algorithm that uses an V[a..b] array and makes this return when b-a+1 is > 3:

return V(X) + f(V, a, Y) + f(V, Z, b)

Where Y is (2a+b)/3 and Z is (a+2b)/3.

How could I solve it?

Maytham Fahmi
  • 31,138
  • 14
  • 118
  • 137
Kiba
  • 31
  • 1
  • 2
    Have a look at the [master theorem's](https://en.wikipedia.org/wiki/Master_theorem). If none of these are applicable, you might need to unfold the recursion call stack and analyze the unfolded pattern. – dfrib Feb 07 '17 at 16:06
  • I'm probably wrong, but it looks like `log_3(n)` – xvan Feb 07 '17 at 17:58

0 Answers0