2

I am doing boolean simplification using Quine-McCluskey which works well.

However, I now need to perform the simplification with some known term combinations.

For example, I want to simplify:

(A+B)C

If I know that:

A+B == true

then this simplifies to:

C

Or if I know that:

BC == false

then it simplifies to

AC

Is there an algorithm that can simplify boolean expressions given a list of known terms?

Chris
  • 1,685
  • 10
  • 15
  • Some time ago, I was facing the same problem. There is a minimizer called Espresso, which is supposed to be very good. However, at the time, I wasn't able to make much progress. Maybe now, there is more info on the web (at least, there is a Wikipedia entry for it). It might be worth taking a look at it. – Eduardo Feb 24 '12 at 22:30
  • Thanks for your comment, but I haven't been able to find a description of the Espresso algorithm, so I don't know if it can handle simplifying with the aid of known terms. – Chris Feb 28 '12 at 15:40
  • I have solved this problem. See my answer below. – Chris Feb 28 '12 at 15:50

1 Answers1

2

I've discovered a nice solution to this problem.

Quine-McCluskey is able to handle a truth-table where some of the terms are marked as "don't care", which means that the term will never occur, so the minimized expression can return true or false.

For example:

A B result
0 0 0
0 1 don't care
1 0 don't care
1 1 con't care

It can clearly be seen that the above function can be minimized to just return 'false', as that is the only result that we care about.

So to deal with known terms, all that has to be done is set the result to "don't care" for any terms in the truth table where a known term evaluates to false. The Quine-McCluskey algorithm then generates the minimized function taking the known terms into account.

For example, if we have a function of A and B, and we know that A == false, then any line on the truth-table where A is true can be marked as "don't care" because we know it will never occur.

Chris
  • 1,685
  • 10
  • 15