0
$\begingroup$

For example, suppose we have the truth function for (a) given by the below truth table.

truth table

We can easily express this truth function in DNF and CNF, but how can we attempt to express it in its simplest form, using any necessary connectives to do so? Is there some standard approach to this?

  • 1
    You could check out Karnaugh maps.2017-02-22

2 Answers 2

2

Much depends on what you really consider the 'simplest', and what connectives you are allowed to use.

For example: are you trying to minimize the number of connectives used? Are you trying to minimize the length of the statement? Are you trying to minimize the number of types of connectives? Are you trying to minimize the 'depth' of the statement?

For your example, here is a pretty 'small' statement that captures it:

$p \lor (q \oplus r)$ (the $\oplus$ is sometimes better known as the XOR)

But if, as you say, we can use 'any necessary connectives', then the following works as well:

$*(p,q,r)$

What is $*$? Well, it is a three place (ternary) connective that works exactly as you just defined in the truth-table!

Of course, that's cheating you say, as well you should, but the point is this: what connectives are allowed, and which ones are not? Indeed, maybe you already object to the use of the $\oplus$?

Maybe you want to stick to the 'boolean operators' $\land$, $\lor$, and $\neg$ ... In that case, take a look at K-maps for a pretty good method to get fairly small (simple?) statements ... Although this method will not always find the expression with the least number of operators.

Equivalence rules like DeMorgan, Double Negation,Absorption, etc. can often be used to 'simplify' statements as well.

If you want to use the least number of types of operators, know that an expression can be captured using NAND's or NOR's only. ... The drawback is that your statemets get long. Indeed, there is a tradeoff between the number of types of operators, and how many instances of those operators you need to use.

For circuit design, we often want to decrease the 'depth' of a statement. That is, a statement in CNF or DNF can be implemented with NOT, AND, and OR gates in 3 steps, which is a pretty important practical result ... But again that may not represent the expression with the least number of operators ... Which itself may not be realizable in just 3 layers.

So, as you see, there are many ways to think about 'simplicity' of statements.

0

The quickest way to express a truth function in its simplest form is to put it on a Karnaugh Map. Here is a link to a page on Karnaugh Maps that I found helpful: https://www.facstaff.bucknell.edu/mastascu/eLessonsHTML/Logic/Logic3.html

Once you have drawn an n-dimensional Karnaugh Map for your expression, all you have to do is place a T (or a 1, depending on how you were taught) in the boxes for which your expression is true. Then you begin circling true values in groups of $2^n$. You cannot circle them around corners but you may select entire squares worth. In addition; be aware that the edges of a Karnaugh Map loop back upon themselves (similar to a pack-man grid). You may select values on an edge and complete your circle on the opposite side.

I have done a quick example using the expression you provided us in the OP: enter image description here

Do note that a Karnaugh Map will not always yield the simplest expression. For most cases though, it will bring you close enough that the simplest expression is obvious.