Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Counting propositions

Re: Counting propositions

From: x <x-false_at_yahoo.com>
Date: Tue, 22 Jun 2004 22:10:18 +0300
Message-ID: <40d8831c@post.usenet.com>

p(a).
p(x).
p(z).
p(u).


pset(0,[]).

pset([s(0)],[X]):-p(X).
pset([s(N),N|P],[X,Y|L]):-pset([N|P],[X|L]),pset([N|P],[Y|L]),not(X=Y).

list(0,[]).
list(s(N),[s(N)|L]):-list(N,L).

lp(N,S):-list(N,L),pset(L,S).

Why the lp(N,L) goal don't stop ?

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Received on Tue Jun 22 2004 - 14:10:18 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US