Home All Groups Group Topic Archive Search About

How to simplifying boolean algebra expression?

Author
11 Apr 2006 9:42 AM
Regardt
Hi all

I need do the following based on Boolean Algebra
ex 1. (M271/M272/M651)+(450/965)/M642/M646

All possible result
M271 + 450
M271 + 965
M272 + 450
M272 + 965
M651 + 450
M651 + 965
M642
M646

ex 2 M271/M646+M006/M651+M013
M271 + M006 + M013
M646 + M006 + M013
M271 + M651 + M013
M646 + M651 + M013

Do somebody no where I can find a code library or code to help
me to break up any Boolean Algebra expression into all possible result

Thanks in advance

PS. I also have more complex expression

Author
11 Apr 2006 12:24 PM
tommaso.gastaldi
IMvHO if operation as as simple as thos you listed you don't need any
library.
Just put the

M271/M272/M651
450/965)/M642/M646

in different list a make nested cicles doing the operations.

If the dimensions of the problem (number of lists) is passed as a
parameter
you can use recursion to make the nested cicles.

If espression are more complicated, you can pass then preliminarly to
the VB compiler
(compile in memory) for appropriate reduction...

-tom
Author
12 Apr 2006 7:14 AM
Regardt
Hi Tom

Thanks for the reply.

Quick Boolean background

The basic rules is as follows
/   (=OR),
+  (=AND),
-   (=NOT)
The BRACKET is evaluated first, as is also the case in mathematics.
The AND is always evaluated before the OR.
The NOT is shown by the '-' sign which always refers directly to the
code or bracketed expression that it precedes.

If the I were looking to resolve a specific result the nest loops would
work, but I am trying to break the
expression in to all possible simplified expression

I hope the above makes a bit more sense