I have this problem and I need help with it, this is my code:
cliques=[clique for clique in nx.find_cliques(GC) if len(clique)>2]
for clique in cliques:
if len (clique)==3:
GC.remove_edge()
print "Clique to appear: ",clique
#draw the graph
nx.draw(GC)
plt.show()
first I searched in my graph to find cliques, after that I test if the clique of length 3, if its true I want to delete one edge So I can eliminate complete-graph(3). How can I do that?
Thanks
size >= 3
will containcomplete_graph(3)
. You don't care about the rest? – Falsehood