Question

Assume that I want to find out if a function is part of theta group n^3. After some algebraic steps I manage to get the following function:

c1 <= 4 / n - 4/n^2.5 + 4/n^4 <= c2

At that step I should find the constants n0, c1 and c2. Everybody whom I ask tells me that I should guess them without the need for an exact analysis of the zero point.

But how can I guess them? How you would look for these constants in a structured manner, when dealing with a complex function like above?

EDIT

It is easy to find an upper bound if the function contains already an upper limit e.g.

c1 <= 10 - 1/n^2 <= c2

In this case the upper bound, c2, would be 10. But how do you deal with c1 and n0 in such a case?

Was it helpful?

Solution

For a big-theta proof, you don't need the best possible constants. You could make "ridiculous" choices like c1 = 0.001 and c2 = 1000 and n0 = 1000000 and everything would be fine as long as you can finish the proof. (One of my professors liked to do this while lecturing.)

If for whatever reason you want tight constants, then you need to learn how to minimize/maximize a function over an interval. Calculus is useful here. Note that there can be a trade-off between, for example, how tight c1 is and how tight n0 is. In your second example, since 1/n^2 is decreasing, we need c1 <= 10 - 1/n0^2, so the larger n0 is, the closer c1 can be to 10.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top