Solving a set of boolean equations



Hi !

Languages I know are some ASMs, C, C++ and the excellent OCaml.
I have looked a bit at Prolog more than 20 years ago and I now
encounter a problem that makes remember to it :

Please consider you have some boolean equations.
For example these 2 :

X xor Y xor Z = true
X and not Y = false

A solving program should produce for (X, Y, Z) :
{(false, false, true), (false, true, false), (true, true, true)}

Of course an actual question includes much more than 3 variables and
trying the 2^nbr_of_var cases would be impossible...

Although not obvious in current languages, I imagine this contraint
problem would be far easier to solve with Prolog.

Please do you have - small - program example(s) that handle this
kind of problem ?
It would be, for a very beginner, much easier to start with hacking
into existing things.
But maybe the problem I spoke about is common and it soon exists
softs that efficiently solve it ?

Thanks for any hint...

Fabrice

.



Relevant Pages

  • Re: Solving a set of boolean equations
    ... Languages I know are some ASMs, C, C++ and the excellent OCaml. ... I have looked a bit at Prolog more than 20 years ago and I now ... X xor Y xor Z = true ... over Z/2Z are solved (using bitwise operations to ...
    (comp.lang.prolog)
  • Re: Solving a set of boolean equations
    ... Languages I know are some ASMs, C, C++ and the excellent OCaml. ... I have looked a bit at Prolog more than 20 years ago and I now ... X xor Y xor Z = true ... A solving program should produce for: ...
    (comp.lang.prolog)
  • Re: In which cases/problems is Prolog faster than Java?
    ... We've OOP languages built from functional languages foundations ... they are envy of imperative programming styles. ... still a predicate either in plain Prolog or encapsulated in a Prolog ... People often use Java not because its OO features per se but because ...
    (comp.lang.prolog)
  • Re: Is Prolog good for AI? (was: Minsky still posting)
    ... > than a programming language suitable for large scale direct human use. ... but it was Prolog nor AI. ... >> than most other languages. ... PHP because it solves a very specific problem. ...
    (comp.lang.prolog)
  • Re: Mainstreaming Prolog a Pragmatic Approach?
    ... > striking feature of Prolog. ... languages with pointers into structures. ... Japanese Fifth Generation project's adoption of the logic programming ... Another part of the problem is recursion. ...
    (comp.lang.prolog)