Section 1.6: Problem 1 Solution
Working problems is a crucial part of learning mathematics. No one can learn... merely by poring over the definitions, theorems, and examples that are worked out in the text. One must work part of it out for oneself. To provide that opportunity is the purpose of the exercises.
James R. Munkres
In Example 1 of this section, verify that there is no solution using only three devices.
Example 1: Inputs: , , . Output: To agree with the majority of , , and . Devices available: two-input OR, two-input AND. One solution is , which uses five devices and has a delay of 3. But a better solution is , which uses four devices and has the same delay.
If all three devices are then, regardless of their inputs and positions, the result is iff all inputs are . Hence, this does not work. Similarly, using only results in iff at least one input is , which still does not work. Now, the tree of the circuit has three vertices corresponding to devices. The top vertex has to be one of them. It has two child vertices. There are two possible cases.
First case is where both child vertices are devices themselves. Now, similar to the text, consider the table of -values corresponding to the requirements ( ’s are omitted):
Note that each child device can take as its inputs sentence symbols only, as we are trying to use three devices only. Depending on whether it is a or device, it can return either in two cells corresponding to the truth values of both of its parameters (e.g. returns in the top two cells of the first column), or in six cells corresponding to the truth values of at least one of its parameters.
By we marked those cells that need to be added in each case (they have value , while the pattern we need has ), and by those that need to be removed (vice versa). The top device takes either intersection or union of two of these patterns. Looking at these patterns we conclude that there is no way to combine two of them, so that their intersection or union is what we need. For example, if one child device is , wlog , then the pattern misses two cells, so that the top device should be , but there is no other pattern having both missing cells that would not have anything extra that we do not need. Similarly, if a child device is , wlog , then the pattern has two extra cells, meaning that the top device should be , but then the other child device should be as well, but the intersection of any two -patterns has five cells.
The second case is where the top device has one child vertex being a device and the other being an input. Here are patterns for sentence symbols and their negations.
Since each pattern has one or more extra cells, the top device should be . At the same time, there is at least one missing cell in each pattern, so that the top device should be . In other words, it is not enough to just apply or to a sentence symbol or its negation and some other formula to obtain what we need. For example, implies whenever is true, regardless of the values assigned to and (we have the extra cell corresponding to ). Similarly, requires to be true, regardless of the values assigned to and (we have the missing cell corresponding to ).