Why cant we use algorithm to find all cycles to find an hamiltonian cycle?

196 Views Asked by At

I recently came across algorithms to find all cycles in an undirected graph, and was confused when i saw that they are running linear time (example), It seem easy to use one of these to find hamilton cycle (for each cycle we find just check if it is of n nodes, e.g contains all nodes) in polynomial time, but hamilton problem is a known NP complete problem so i gotta be missing something... what am i missing here?

Thanks!

0

There are 0 best solutions below