103k views
2 votes
find a function f(n) that is asymptotically worse than polynomial time but still better than exponential time.

User Awrobinson
by
8.8k points

1 Answer

1 vote

Final answer:

A subexponential time function is worse than polynomial time but better than exponential time. An example of a subexponential function is f(n) = 2^n.

Step-by-step explanation:

In mathematics, a function that is worse than polynomial time but better than exponential time is called subexponential time. One example of a subexponential time function is the Subexponential function, which is denoted as f(n) = 2n.

Let's compare the growth rates of subexponential, polynomial, and exponential functions with an example. If we evaluate each function for n = 10, we get:

  • Subexponential: f(10) = 210 = 1024
  • Polynomial: f(10) = 102 = 100
  • Exponential: f(10) = 210 = 1024

As you can see, the subexponential function grows faster than the polynomial function but slower than the exponential function.

User Hoang Huynh
by
9.3k points