Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Logical Equations

by tilly (Archbishop)
on Jul 09, 2009 at 06:42 UTC ( [id://778490]=note: print w/replies, xml ) Need Help??


in reply to Logical Equations

I'm sorry to tell you that your problem is NP-complete, and therefore there is no efficient solution. Your problem is NP because any proposed solution can be verified in polynomial time. It is NP-complete because the known NP-complete problem 3SAT can be reduced to your problem. See http://en.wikipedia.org/wiki/Boolean_satisfiability_problem for a description of 3SAT. To see how to represent it with your format, first include a bunch of equations of the form Xi + Yi = 1 so that Yi represents (NOT Xi). Then string together a series of equations where the sum of 3 terms is >= 1, meaning at least one of them is true.

That said, there is lots of research on how to tackle this kind of problem. A term I'd suggest googling for is "Constraint Satisfaction".

Replies are listed 'Best First'.
Re^2: Logical Equations
by dHarry (Abbot) on Jul 09, 2009 at 13:41 UTC
    A "LP-based tree search" jumps to mind to solve the IP (Integer Programming) problem. I recall this works well for the general case.
      There are many NP complete problems with heuristic solutions that work well for some set of real world inputs. There are also many apparently NP complete problems where you can tackle a reduced form of the problem into something simpler to solve. However none of those solutions work well in the general case.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://778490]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-04-25 17:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found