71.2k views
2 votes
List the following formulas in order of running time analysis, from greatest to least time requirements, assuming that n is very large:n2 + 1; 50 log n; 1,000,000; 10n + 10,000.

1 Answer

6 votes

Final answer:

The formulas listed in order from greatest to least time requirements are: n^2 + 1, 10n + 10,000, 50 log n, and 1,000,000. The quadratic term grows the fastest, followed by the linear and logarithmic terms, with the constant term having no growth.

Step-by-step explanation:

To list the given formulas in order of running time analysis from greatest to least time requirements, assuming that n is very large, we compare the growth rates of the functions as n increases. When n is large, the polynomial n2 grows faster than linear terms, logarithmic terms, or constant terms. Therefore, the order from greatest to least is:

  • n2 + 1
  • 10n + 10,000
  • 50 log n
  • 1,000,000

The quadratic term n2 has the highest growth rate, followed by the $linear term 10n + 10,000. The logarithmic term 50 log n has a slower growth rate compared to the linear term, and the constant term 1,000,000 does not grow as n increases.

User Mschilli
by
7.8k points