If an algorithm requires
C(n+r-1, r-1) steps
to solve a problem, where n is the number of input,
and r is a constant,
does the steps of algorithm consider exponential growth?
If an algorithm requires C(n+r-1, r-1) steps to solve a problem, where n is
Share
Assuming that C is the binomial coefficient function:
C(n + r - 1, r - 1) = (n + r - 1)! / ((r - 1)! * n!). Since r is a constant, we can disregard(r - 1)!when using the big-O notation, so we getO((n + r - 1)! / n!). I assume that this might be homework, so try to take it further from here by yourself. It is possible to reduce(n + r - 1)! / n!to a quite simple expression since it is inside of anO(), and you’ll then easily see whether or not it is exponential. (Hint: how many factors are there in(n + r - 1)! / n!?)