|Problems? Is your data what you think it is?|
simplify logical equationsby thealienz1 (Pilgrim)
|on Oct 19, 2004 at 08:47 UTC||Need Help??|
thealienz1 has asked for the wisdom of the Perl Monks concerning the following question:
I have been working a program for quite some time now, and well I have gotten to a certain point, which I have stumped myself. What else is new?
Currently I am running a program that generates logical equestions, for example: a0 AND a1 OR d0. My program uses AND, OR for operators and a0,a1,d0,d1,d2,d3 for variables. I noticed as my program runs I get into a certain problem. Becuase my equations progressivly get bigger and bigger I get stuck with enormous equations, but some that have repeating values.
By repeating values take a look at the following equation:
This equations can be simplified to a simpler equation:
I was using regex, but just wanted to see others solution to the problem.