Proving a graph (that has $n$ vertices and contains an $n$-clique) is in $P$?

53 Views Asked by At

I was looking at the Wikipedia article for the Clique Problem, and was curious if this section can be applied to graphs when $k$ is equal to $n$?
The run time would be $O( n^n)$, which is still polynomial, right?

1

There are 1 best solutions below

6
On BEST ANSWER

The expression $$ n^n = e^{n\log n} = (e^{n})^{\log n}$$

is not polynomial in $n$, but you are asking to decide if a graph is complete, which takes at most $\binom n 2$ steps, i.e. it's $O(n^2)$.
It may be interesting to know that the $k=\frac n2$ case can be shown to be NP-complete.