MathGroup Archive 2006

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

Search the Archive

Simplifying a Boolean Expression


Can Mathametica be used to simplify the following type of logic typically
found in programming applications, and if so, how do I go about setting it
up?

 

EXAMPLE

Variables A and T can have the values "none", "dense", "sparse"

The variable X will be assigned a value of either "onepass" or "twopass"
based on the following logic:

 

IF

[(A="none") AND (T="none")] OR [(A="dense") OR (A="sparse") AND (T="none")]
OR [(A="dense") AND (T="dense")] THEN X = "onepass"

ELSE IF

[{A="sparse") AND (T="sparse")] OR [(A="sparse") AND (T="dense")] THEN X =
"twopass"

 

I want to be able to express this type of problem in Mathematica and have it
return the simplest logic for assigning a value to X.  

 

Regards,

Jon

 

Work:  401-752-3821

Cell:    508-873-9780



  • Prev by Date: NonlinearFit + Sums
  • Next by Date: Re: too many special linear matrices
  • Previous by thread: Re: NonlinearFit + Sums
  • Next by thread: Re: Simplifying a Boolean Expression