|
[Date Index]
[Thread Index]
[Author Index]
Re: Boolean factorization
- To: mathgroup at smc.vnet.net
- Subject: [mg113113] Re: Boolean factorization
- From: Daniel Lichtblau <danl at wolfram.com>
- Date: Wed, 13 Oct 2010 12:39:56 -0400 (EDT)
- References: <201010121748.NAA03419@smc.vnet.net>
olfa wrote:
> Hi Mathematica Community,
>
> How to factorize
> (a && b && c && d && e && f) || (a && b && c && d && g && h) || (a &&
> b && c && d && i && j)
> into
> a && b && c && d && ((e&&f) || (g&&h) || (i && j))
>
> Thank you.
One approach is to form the CNF, then split out parts with Or, form a
DNF thereof, and rejoin.
ii = (a && b && c && d && e && f) || (a && b && c && d && g && h) ||
(a && b && c && d && i && j);
jj = BooleanMinimize[ii, "CNF"];
jjOr = Cases[jj, Or[_,__]];
jjnoOr = DeleteCases[jj, Or[_,__]];
In[14]:= new = And[jjnoOr, BooleanMinimize[And@@jjOr]]
Out[14]= a && b && c && d && ((e && f) || (g && h) || (i && j))
Daniel Lichtblau
Wolfram Research
Prev by Date:
Re: something nice I found today, return multiple values from a function
Next by Date:
Re: Graphics3D. How to join random points with a single
Previous by thread:
Boolean factorization
Next by thread:
Re: Boolean factorization
|