in reply to Re^4: Sub set where all are connected
in thread Sub set where all are connected

Try the approach described here

Re^3: Sub set where all are connected

for the "average" case.

The complexity depends on (is related to) the max size of a clique.

So better be prepared to kill long calculations with a timeout.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice