Skip to main content
Tweeted twitter.com/#!/StackMma/status/567732188461170691
[Edit removed during grace period]
Link
Szabolcs
  • 236.5k
  • 31
  • 641
  • 1.3k
Source Link
Juho
  • 1.9k
  • 1
  • 20
  • 33

Is there a bug in FindClique?

If h is a graph, FindClique[g, {n}] should return a clique on exactly $n$ vertices if one exists in h.

Consider the following:

h = Graph[{1 <-> 2, 1 <-> 3, 1 <-> 4, 1 <-> 6, 2 <-> 3, 2 <-> 4, 
   2 <-> 6, 3 <-> 4, 4 <-> 6}, VertexLabels -> "Name"]
FindClique[h, {3}]

The output is {}. However, there is a clique on 3 vertices in h, like {1,2,4}. Is this indeed a bug, or am I overlooking something? Interestingly, FindCycle[h, {3}, All] does find all triangles of the graph, including {1 <-> 2, 2 <-> 4, 4 <-> 1}. I would expect FindClique[h, {3}, All] to return exactly the same answer as FindCycle[h, {3}, All] in general.

I am running V10.0.0.0, by the way.