Docsity

Solved Homework 2 for Digital Systems Design | ECE 465, Assignments of Digital Systems Design

Toggle sidebar
bg1
1
ECE 465, Spring 2010, Instructor: Prof. Shantanu Dutt
Homework 2 : Due Wed, Feb. 17
1. Prob. 3.58 with the requirement that the least-cost set of PIs to cover all minterms should be deter-
mined using Petrick’s algorithm and not the PI table part of QM; the set of all PIs are, however, to be
determined using the first stage of the QM method. 50
2. Prob. 3.60. Note that there should be a fifth variable
for the two functions for this problem (there
is a typo in the text and only four variables

are given). 60
3. Suppose we obtain all PIs of a function
using the 1st phase of the QM method. Determine whether
the following rules/methods can cause the final solution to be non-optimal or whether they will always
result in an optimal solution. Optimality is w.r.t. the total cost over all PIs selected to be in the final
expression (cost of a PI = # of lterals in its product expression + 1):
(i) The row covering rule of QM when the PIT or a subsequent RPIT is always acyclic. 75
(ii) The heuristic rule for selecting a PI for inclusion when the PIT/RPI is cyclic. 75
(iii) Petrick’s method. 75
Your comments should be supported by strong rationale and examples (the examples should not be
“start-to-finish” examples, but clear and small intermediate situation examples of the PIT/RPIT, as
discussed, for example, in the covering rules that were illustrated on the blackboard). In the cases that
you analyze a method to be non-optimal, please also state which aspects of the method contributes to
non-optimality, and why (again, use examples to make your points).
This is a thinking and analytically-oriented question. So think in-depth and clearly, and make a clear
and analytical case for your conclusions in a manner suggested above.
pf3
pf4
pf5
pf8

Partial preview of the text

Download Solved Homework 2 for Digital Systems Design | ECE 465 and more Assignments Digital Systems Design in PDF only on Docsity!

ECE 465, Spring 2010, Instructor: Prof. Shantanu Dutt

Homework 2 : Due Wed, Feb. 17

1. Prob. 3.58 with the requirement that the least-cost set of PIs to cover all minterms should be deter-

mined using Petrick’s algorithm and not the PI table part of QM; the set of all PIs are, however, to be

determined using the first stage of the QM method. 50

2. Prob. 3.60. Note that there should be a fifth variable

for the two functions for this problem (there

is a typo in the text and only four variables   are given). 60

3. Suppose we obtain all PIs of a function using the 1st phase of the QM method. Determine whether

the following rules/methods can cause the final solution to be non-optimal or whether they will always

result in an optimal solution. Optimality is w.r.t. the total cost over all PIs selected to be in the final

expression (cost of a PI = # of lterals in its product expression + 1):

(i) The row covering rule of QM when the PIT or a subsequent RPIT is always acyclic. 75

(ii) The heuristic rule for selecting a PI for inclusion when the PIT/RPI is cyclic. 75

(iii) Petrick’s method. 75

Your comments should be supported by strong rationale and examples (the examples should not be

“start-to-finish” examples, but clear and small intermediate situation examples of the PIT/RPIT, as

discussed, for example, in the covering rules that were illustrated on the blackboard). In the cases that

you analyze a method to be non-optimal, please also state which aspects of the method contributes to

non-optimality, and why (again, use examples to make your points).

This is a thinking and analytically-oriented question. So think in-depth and clearly, and make a clear

and analytical case for your conclusions in a manner suggested above.

ECE 465, Spring 2010

Homework 2

The following cyclic PIT for a particular function will be used to explain the non-optimality for the heuristic given above. PIs cost consider don’t care MTs which is omitted in the PIT.

In the above cyclic PIT, all PIs cover two MTs. So, the cycle is broken by choosing the least cost PI which is PI 4. Applying the heuristic to the cyclic PIT shown above results in choosing PI 4 first as all PIs cover 2 MTs and least cost PI 4 is chosen to break the tie.

After choosing PI 4 , a RPIT is obtained and is shown below

From the above RPIT, PI 2 and PI 6 will be chosen the cover all MTs. Now, cover of the function is given by C= PI 2 PI 4 PI 6 with a cost of 13. The optimal solution is obtained by choosing C=PI 1 PI 3 PI 5 with a cost of 12. It shows that above heuristic could produce non-optimal solution.

iii) Petrick's algorithm is optimal, since it considers all possible non-redundant combinations of PIs for correct solutions (solutions that cover all MTs) of a function f ; the proof of this statement is given below. It then exhaustively determines which of the non-redundant solutions (solutions which do not have any more PIs than needed) have the least cost. It thus is able to determine the min-cost SOP solution for f.

We now prove that Petrick's does consider all non-redundant solutions of f in its cost calculations. Suppose there is some SOP solution S for f that is not considered by Petrick's algorithm. We consider only SOP solutions whose product terms are PIs, since, if that is not the case, we can substitute a non-PI product term by a PI that covers it (at least one will exist by definition of a PI), and get a reduced cost solutions. In other words, a min-cost solutions will only have PIs as product terms. We also consider an S that is non- redundant, since if that is not the case, then we can remove at least one PI from S (while still covering all MTs) and get a reduced-cost solutions; in other words, the min-cost solutions will also be non-redundant.

Since each PI in S is present in the OR terms C(M ) of each MT M it covers, and since we take the product C of all these OR terms to obtain an SOP expression (each of whose product term represents a solutions for f ), all PIs in S will be present in some product term of C unless S is deleted using simplification rules. The only simplification rule used in Petrick's algorithm to eliminate product terms in C (i.e., solutions for f) is absorption/covering rule: ab + a = a (the other rule used: a+a = a, does not eliminate solutions; it just removes duplicates of solutions).

i i

However, if S was eliminated by using the covering rule, it means S is redundant (it has to have at least one unnecessary PI to be eliminated using the covering rule), which is a contradiction to our assumption above that S is not. Hence if S is non-redundant, it will be generated as a possible solution by Petrick's, and considered in its exhaustive cost computations to determine the min-cost solutions.