Simplifying a Boolean Expression
- To: mathgroup at smc.vnet.net
- Subject: [mg68790] Simplifying a Boolean Expression
- From: "Hebhardt, Jon" <jhebhardt at textronfinancial.com>
- Date: Fri, 18 Aug 2006 03:12:48 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
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
- Follow-Ups:
- Re: Simplifying a Boolean Expression
- From: Daniel Lichtblau <danl@wolfram.com>
- Re: Simplifying a Boolean Expression