You can find a $k$-clique in $n^k$ time by examining all possible sets of vertices of size $k$. So why is it NP-complete to determine if there is a clique of size greater than $k$? It looks like you can solve it in polynomial time if $k$ is a constant.
2026-04-07 00:24:29.1775521469
Why can you find a $k$-clique in polynomial time, but determining if there is a $k$-clique is NP-complete?
1.7k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
Indeed we could resolve the $k$-clique problem for fixed $k$ by inspecting $\binom{n}{k}$ subgraphs. However, the number $k$ is considered an input to the problem too.
If e.g. $k=\lfloor n/2 \rfloor$, then $\binom{n}{k}$ increases exponentially (not polynomially) with the input size.