MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Boolean factorization

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113110] Re: Boolean factorization
  • From: Patrick Scheibe <pscheibe at trm.uni-leipzig.de>
  • Date: Wed, 13 Oct 2010 12:39:23 -0400 (EDT)
  • References: <201010121748.NAA03419@smc.vnet.net>

Hi,

it is easy to transform it into CNF with BooleanConvert

a && b && c && d && (e || g || i) && (e || g || j) && (e || h || 
   i) && (e || h || j) && (f || g || i) && (f || g || j) && (f || h ||
    i) && (f || h || j)

But to simplify the latter part, you'll have to split the formula and
apply BooleanMinimize manually.

expr = (a && b && c && d && e && f) || (a && b && c && d && g && 
     h) || (a && b && c && d && i && j);

And @@ BooleanMinimize /@ 
  And @@@ GatherBy[List @@ BooleanConvert[expr, "CNF"], 
    Head[#] === Or &]

Cheers
Patrick

On Tue, 2010-10-12 at 13:48 -0400, 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.
> 



  • Prev by Date: Re: local variables - Module, For loop
  • Next by Date: Re: C-pointers from Mathematica
  • Previous by thread: Re: Boolean factorization
  • Next by thread: How to concatenate matrices?