0

I have a recursive function f(n) with time complexicity

O(f(n)) = O(combination(n, n/2) * f(n/2)^2)

where combination(a, b) means combination nuber a above b.

I tried to simplify it, but don't have enough mathematical skills. The only thing that I foud out is that

combination(n,n/2) = 2^n * (gamma(n/2 + 1/2)/(sqrt(1/2) * gamma(n/2 + 1)))

Stastny Jakub
  • 156
  • 1
  • 16
  • 1
    This question might be a better match for [cs.stackexchange](https://cs.stackexchange.com/) - StackOverflow is for questions directly related to programming, whereas CS.se is for questions related to compsci theory. – hnefatl Feb 08 '18 at 17:10
  • 1
    I'm voting to close this question as off-topic because this is a better fit for CS Stack Exchange! – Am_I_Helpful Feb 08 '18 at 17:11

2 Answers2

0

I don't have experience with calculation of complexities but this seems to me to be of order n!. At least for calculation of special case with n=2^i. With integers combination(n, n/2) is equal to n!/((n/2)!)^2.

f(2^i) = (2^i)! / ((2^(i-1))!)^2 * f(2^(i-1))^2
       = (2^i)! / ((2^(i-1))!)^2 * (2^(i-1))! / ((2^(i-2))!)^2)^2 * f(2^(i-2))^4
       = (2^i)! / ((2^(i-2))!)^4 * f(2^(i-2))^4
       ...
       = (2^i)! / (1!)^(2^i) = n!
Ante
  • 5,350
  • 6
  • 23
  • 46
0

I have allready solved it in this thread on satck exchange:

https://math.stackexchange.com/questions/2642848/time-complexicity-of-recursive-function?noredirect=1#comment5458208_2642848

Stastny Jakub
  • 156
  • 1
  • 16