Re: Subgraphs enumeration
- From: phantastic@xxxxxxxxxx
- Date: 15 Feb 2007 00:06:21 -0800
On 14 Feb, 17:20, Markus Triska <e0225...@xxxxxxxxxxxxxxxxxx> wrote:
phantas...@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).
Thanks Markus. But in this way I obtain a list that contains all
couple of edge (distincts yes but all). What I think is to add a
criteria in order to select couple of edges where:
- left node of first edge equal to left node of second edge (eg:
e(1,2),e(1,3)) OR
- right node of first edge equal to left node of second edge (eg:
e(2,1),e(1,3) OR
- right node in common (eg: e(2,1), e(3,1))
in this way I can avoid edge's redundances but E1 or E2 are in the
form e(X,Y) so how can I work on X and/or Y?
Thanks guy :)
.
- Follow-Ups:
- Re: Subgraphs enumeration
- From: Markus Triska
- Re: Subgraphs enumeration
- References:
- Subgraphs enumeration
- From: phantastic
- Re: Subgraphs enumeration
- From: Markus Triska
- Subgraphs enumeration
- Prev by Date: Re: Prolog in Java.
- Next by Date: Re: Subgraphs enumeration
- Previous by thread: Re: Subgraphs enumeration
- Next by thread: Re: Subgraphs enumeration
- Index(es):