630 views
1 votes
1 votes
Let $G=(V,E)$ be a undirected graph. We say $S \subseteq V$ is a clique if and only if for all $u,\: v \: \in S$, the edge $(u, v)$ is in $E$.

Now let $G=(V,E)$ be a graph in which each vertex has degree at most 5. Give an algorithm to find the largest clique in $G$. What is the complexity of your algorithm?

1 Answer

1 votes
1 votes
Since the degree of each vertex is 5. So the largest clique cannot have more than 6 vertices.  So take all the subgraphs of the graph who has less than or equal to 6vertices and find the largest clique among them. Note that we can always find clique of size 3. So we have to check for the graphs having vertices >3 and <=6

Related questions