What would be a common algorithm with an order of Θ(2^n)? When I say "order", I mean time complexity analysis. I was thinking exponential growth but are there any that are more computer science oriented?
|
|
The naive algorithm for $3$-coloring takes time $2^n$, though this is not optimal (Wikipedia mentions a $1.3289^n$ algorithm). Lots of other NP-complete programs have $2^n$ algorithms (or in general $c^n$), and it is conjectured that some of them in fact require time $c^n$; if this is true then randomness doesn't help for efficient computation (BPP=P). |
|||||||
|
|
A typical algorithm with $\mathcal O(2^n)$ performance is the naive algorithm to calculate the Fibonacci-numbers. As they are defined as $$\begin{eqnarray*}F_0&=&0\\F_1&=&1\\F_n&=&F_{n-1}+F_{n-2}\end{eqnarray*}$$ |
|||||||||||||||
|
|
According to Wikipedia, "Solving the traveling salesman problem using dynamic programming" is an exponential time problem. They write $2^{O(n)}$, I'm not sure it's the same as $O(2^n)$. Am I right in thinking that it is the same? |
|||
