1
$\begingroup$

When we have a recurrence relation of a program, as an example:

 T(N) = N log N + 9N + 55

and the CPU capability let's say (10^6) or any other number. What is the formula or the method to estimate the run time (in second) if we run a program represented by a function of N, and a given N "inputs"?

$\endgroup$
  • $\begingroup$ That's not a recurrence relation. A recurrence relation expresses T(N) using T(N') for one or more other values N'. $\endgroup$ – gnasher729 Mar 16 '17 at 23:28
0
$\begingroup$

If you determined that the runtime of your code, on a certain computer, is T(N) = N log N + 9N + 55 microseconds, then that equation determines the runtime. Just substitute N into that equation.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.