Re: Subgraphs enumeration



phantastic@xxxxxxxxxx writes:

sub1([],[]).
sub1([H|T],X):-
sub1(T,C),
append(C,[[H]],X).

What about:

sub1([], []).
sub1([E|Es], [[E]|Rest]) :- sub1(Es, Rest).

but i've no idea as i realize sub2... any help?

Beat this:

sub2(Gs) :-
g(G),
findall([E1,E2], (member(E1, G),member(E2, G),E1 @< E2), Gs).

.