Re: Solving a set of boolean equations
- From: Ecirbaf <fabrice.marchant@xxxxxxxxx>
- Date: Wed, 31 Oct 2007 11:19:52 -0700
| ?- listing
solve(A) :-
A=[B,C,D],
A::0..1,
B#\C#\D#=1,
B#/\(#\C)#=0,
labeling(A).
yes
| ?- solve(Solution)
Solution = [1,1,1] ?
---------------------------------------------------------------
It seems to perfectly work.
A very beginner question : it seems to ask me if I want more
solutions, Please how to say it to express the remaining two ?
I read B-Prolog doc and tried to use 'findall' :
| ?- findall(S, solve(S), Sl)
Sl = [[1,1,1]] ?
I thought it shall be :
[[1,1,1],[0,0,1],[0,1,0]]
Please why are the last two solutions missing ?
Thanks,
Fabrice
.
- References:
- Solving a set of boolean equations
- From: Ecirbaf
- Re: Solving a set of boolean equations
- From: Neng-Fa Zhou
- Re: Solving a set of boolean equations
- From: Ecirbaf
- Solving a set of boolean equations
- Prev by Date: Evaluate Equation at runtime
- Previous by thread: Re: Solving a set of boolean equations
- Next by thread: Re: Solving a set of boolean equations
- Index(es):