Polynomial time and exponential time

前端 未结 7 1552
误落风尘
误落风尘 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 05:04

    Polynomial time.

    A polynomial is a sum of terms that look like Constant * x^k Exponential means something like Constant * k^x

    (in both cases, k is a constant and x is a variable).

    The execution time of exponential algorithms grows much faster than that of polynomial ones.

    0 讨论(0)
提交回复
热议问题