HiveBrain v1.2.0
Get Started
← Back to all entries
debugMinor

Is finding arbitrary-but-fixed length cycles in a graph NP-Hard?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
grapharbitrarybutlengthhardfindingfixedcycles

Problem

My intuition says yes. I think so because if we could find arbitrary length cycles, couldn't we just look for an n length cycle and then solve HAM-CYCLE? But I saw a post that seems to suggest a polynomial time method for finding cycles! I feel as if perhaps I do not understand something here.

Solution

The algorithms mentioned are all fixed-parameter tractable in the size of the cycle. This means that if you fix the cycle size $k$, there's a polynomial time algorithm for finding the cycle as the number of vertices or edges increases, but the run time still increases exponentially as $k$ increases. The big-O notation you're looking at only specifies asymptotic run times as the number of edge and vertices increase, but leaves out the possibly large but constant $k!$ factor.

Context

StackExchange Computer Science Q#67045, answer score: 4

Revisions (0)

No revisions yet.