Polynomial time and exponential time

前端 未结 7 1573
误落风尘
误落风尘 2020-12-02 04:26

Could someone explain the difference between polynomial-time, non-polynomial-time, and exponential-time algorithms?

For example, if an algorithm takes O(n^2) time, t

7条回答
  •  半阙折子戏
    2020-12-02 04:39

    Exponential (You have an exponential function if MINIMAL ONE EXPONENT is dependent on a parameter):

    • E.g. f(x) = constant ^ x

    Polynomial (You have a polynomial function if NO EXPONENT is dependent on some function parameters):

    • E.g. f(x) = x ^ constant

提交回复
热议问题