|
PROG
|
(Python)
from itertools import combinations
from networkx import empty_graph, find_cliques
G = empty_graph(combinations(range((n<<1)-1), n-1))
G.add_edges_from((a, b) for a, b in combinations(G, 2) if not set(a).isdisjoint(b))
return sum(1 for c in find_cliques(G)) # Chai Wah Wu, Jan 11 2024
|