Here is the Context to my question:
I have a homework question: Describe a linear time algorithm in the size of the vertices (ie O(|V|)) to determine if there is a max clique in a graph where all the vertices have a max degree of size 3. I know that there is a polynomial time algorithm to do this. What I'm struggling to come up with is an O(|V|) algorithm to do this. Also, I do realize that the largest a clique could be is of size 4.
Here is where I keep getting stumped:
It seems to me that at some point along the way you would need to enumerate all k-tuples of size 4. But how can this be done in O(|V|) time?
Also of note, is that I have tried playing around with dynamic programming to solve this, but I fail to see how to do this in linear time.
Answers, thoughts, suggestions?