Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Logical Equations

by moritz (Cardinal)
on Jul 08, 2009 at 18:05 UTC ( [id://778361]=note: print w/replies, xml ) Need Help??


in reply to Logical Equations

Your problem seems to be a Linear Programming problem, for which Wikipedia lists the simplex algorithm as a possible solving method.

Searching CPAN for simplex lists at least two implementations, PDL::Opt::Simplex and Algorithm::Simplex.

So you're in luck, all you have to do is to build the coefficient matrix, call one of the modules, and be happy.

Replies are listed 'Best First'.
Re^2: Logical Equations
by tilly (Archbishop) on Jul 09, 2009 at 06:10 UTC
    It is not a linear programming problem for at least two reasons. The first is that you're not maximizing a linear function over that search space. The second is that you're not allowed to have fractional numbers in the solution. So a linear algebra package would say that A+B=1, A+C=1 and B+C=1 has a solution, but that would not be a valid solution to the requested problem.
      The first is that you're not maximizing a linear function over that search space

      That's not a problem, since artist is looking of any solution, one that maximizes a certain function will do just fine

      The second is that you're not allowed to have fractional numbers in the solution.

      You're right. I misread can take values only from 0 and 1 as can take values only from 0 to 1.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-26 03:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found