27
Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan Ren from Prof. Shantanu Dutt’s handwritten notes

Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

Embed Size (px)

Citation preview

Page 1: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

Single Function Quine-McCluskey 2-Level Minimization

Shantanu Dutt

University of Illinois at Chicago

Acknowledgement: Transcribed to Powerpoint by Huan Ren from Prof. Shantanu Dutt’s handwritten notes

Page 2: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

Basic Two-Level Minimization Steps

The basic steps are the same for K-Map and Quine McCluskey (QM):

1. Form all PIs

2. Determine a minimum cost set of PIs to cover all minterms (MTs)a) Determine EPIs, include them in the final expression and delete all MTs

they cover

b) Determine a min cost set of the remaining PIs to cover the remaining MTs. This is a really hard problem—NP-hard, i.e., to solve it optimally it takes a worst-case computation time that is exponential in the # of non-essential PIs.

Page 3: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

QM: Forming all PIs using the Tabular Method

Step 1

1. Form groups Gi of MTs/DCs, w/ a MT/DC belonging to Gi if it has i 1’s in its binary (0, 1) or ternary (0, 1, - or x) representation. Note that 0 <= i <= n (the # if variables).

2. Place the groups Gi’s in “rows” with increasing order of i.3. For each MT/DC a in Gi, look for MTs/DCs b that it has

logical adjacency with (so that they can be combined to form a larger implicant) only in Gi+1. If such a MT/DC b found in Gi+1, then the larger implicant (a, b) covers both a and b, which need to tick mark both a, b to indicate this.

4. Issues 1-3 are repeated in each subsequent “column” of larger implicants, as shown.

5. The process stops when for the current col. no adjacent implicants are found, so no larger implicants can be formed.

6. The implicants that are not tick-marked are PIs as they are not covered by any other implicant.

Page 4: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

# of

1’s

MT/

DC

ABCD

1

1 0001

2 0010

8 1000

2

3 0011

5 0101

6 0110

9 1001

3

7 0111

13 1101

# of

1’s

Impl.(MT/DC list)

ABCD Diff.

set

1

PI1

1,3 00x1 2

1,5 0x01 4

1,9 x001 8

2,3 001x 1

2,6 0x10 4

8,9 100x 1

2

3,7 0x11 4

5,7 01x1 2

5,13 x101 8

6,7 011x 1

9,13 1x01 4

Impl. (MT/DC list)

ABCD Diff.

set

PI2 1, 3 5, 7

0xx1 2,4

PI3 1, 5

9,13

xx01 4,8

PI4 2, 3

6, 7

0x1x 1,4

Necessary (but not sufficient) conditions for combining 2 implicants to form a larger implicant that covers them (if the conditions are met, only then do we need to look at the ternary notations to determine combinability):• Two MTs/DCs in only adj. groups can be combined only if their integer values differ by a power of 2.• Two implicants in adj. groups can be combined only if their difference sets are the same and the pairwise absolute differences of their MT/DC list arranged in increasing order are the same and a power of 2 (e.g.: (i) g=(1,3), h=(5,7), DS for both is {2} & |(1,3)-(5,7)| = (4,4). Thus g,h may be combinable (but this is not a sufficientcond. and need to then look at their ternary notation), and from their ternary notation, they are. The # 4 from |g-h| is added to the diff. set of the combined implicants to obtain the diff. set {2, 4} of the larger implicant. (ii) g=(3,7), h=(9,13), DS for both is {4}, |(3,7)-(9,13)| = (6,6) and thus g,h are not combinable—same #’s in the g - h vector, but they are not a power of 2.

Tricks for quick PI formation

Page 5: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

2a

QM: The PI Table (PIT)—Min-Cost MT Covering

Inclusion removal/deletion: Removal of those PIs from the PIT that are to be included in the final expr. Thus the MTs they cover are also removed.

* is used to indicate inclusion deletions (i.e.

for EPIs and pseudo-EPIs—see later for definition); these are PIs included in the final minimized expression

Page 6: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

2b

2a

2a 2b

QM: The PIT—Min-Cost MT Covering (cont.)

Rowcovering

Exclusion removal/deletion: Removal of those PIs (via covering) from the PIT that are not to be included in the final expr. Thus the MTs they cover are not removed.Note: Some other PIs in the previous PIT, e.g., (0,4), were excl. deleted as they covered no MTs in the reduced PIT.

Inclusion removal/deletion

*

How? Will see shortly.

Page 7: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

• But, K-maps can be used effectively only up to 6-variable functions, and is susceptible to human error, especially for > 4 variables.

• QM is more methodical, applies to any # of variables, and does not rely on visual skills to identify PIs or a min-cost set of PIs to cover all MTs. It is thus also less prone to human errors if done manually, but more importantly it can be programmed and be used as a CAD tool for logic minimization.

Page 8: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

QM: The PIT—Min-Cost MT Covering (cont.)

*

*

Page 9: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

QM: The PIT—Min-Cost MT Covering (cont.)

EPIs

Inclusiondeletions

PI1

PI2

*

*

Page 10: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

CC

C

C

Coveringby one PI/row of another

Coveringby one MT/colof another

• Identify “pseudo-EPIs” (EPIs in the reduced PIT), and remove them (inclusion removal—removal from PIT, and inclusion in the min. expression) and the MTs they cover.• Repeat above steps until all MTs covered

In these cases both PIs cover each other,But that may not always be the case

Exclusion deletions

PI1

PI2

QM: The PIT—Min-Cost MT Covering (cont.) A row Ri is said to cover row Rj, if Ri has X’s in all the cols that Rj has X’s in (& possibly more). The idea behind deleting the covered row Rj is that the covering row Ri does the job of Rj, and probably more. Q for optimality: At what cost?A col Ci is said to cover col Cj, if Ci has X’s in all the rows that Cj has X’s in (and possibly more).The covering col. Ci is deleted. The idea is that that any PI that covers/includes Cj will cover/include the covering col. Ci; thus the latter is auto-matically incl. in the final expr. when including Cj

Both row & col covering rules reduce the complexity of the min-cost covering problem. However row-covering does not necessarily preserve optimality (why?), while col-covering does (why?)

Page 11: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

QM: The PIT—Min-Cost MT Covering (cont.)

CC

C

C

Coveringby one MT/colof another

Exclusion deletions

Inclusion deletions

Pseudo-EPIs

PI3

PI4

f = PI1 + PI2 + PI3 + PI4

PI2

PI1

*

*

Page 12: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

QM: The PI Table—Min-Cost MT Covering (cont.)

Page 13: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

QM: The PI Table—Min-Cost MT Covering (cont.)

Better heuristics than random choice can be used, as shown in subsequent slides

*

(for incl. removal)

C

C

This is actually not a good heuristic. We will see better ones later.

(same a pseudo EPI)

(This includes checking if pseudo-EPIs exist and inclusion-deleting them as before. Go on applying all substeps in 2 until none of them apply; will see a more comprehensive procedure later)

Note: We need to explicitly consider cost of PIs in both breaking a cyclic PIT and in row coverings in order to better minimize the total # of gate i/ps in a 2-level gate impl. of the expr. Will see these considerations shortly.

***

Page 14: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

Q-M: Don’t Cares• Q-M for functions with don’t cares:

– Difference from Q-M without X’s:• Include X’s along w/ MTs when forming PIs using the tabular

method (or using K-Maps)• Eliminate PI’s that are composed of only X’s• Don’t include X’s in the PI chart/table

10146 12 x10

11157 x 3 x 11

9113 x 5 11 101

8 x124000

10110100AB

CD

CD

ABCAD

AC

f m(1,3,5,6,9)

d(2,7,8,13)

Page 15: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

Column 1 Column2 Column3

G1 1 0001 00-1(1,3) 0--1(1,3,5,7)

2 0010 0-01(1,5) --01(1,5,9,13)

8 1000 -001(1,9) 0-1-(2,3,6,7)

001-(2,3)

G2 3 0011 0-10(2,6)

5 0101 100-(8,9)

6 0110

9 1001 0-11(3,7)

01-1(5,7)

G3 7 0111 -101(5,13)

13 1101 011-(6,7)

1-01(9,13)

f m(1,3,5,6,9)

d(2,7,8,13)

PI1

PI2

PI3

PI4

Note: Do not remove intermediate implicants that have only X’s (why?). Only final PIs w/ only X’s should be removed from the final set of Pis.

Page 16: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

PI Table

PIs 1 3 5 6 9

PI1

PI2

PI3

PI4

1 6 9

PI2

PI3

∩∩

3 4f PI PI CD AC

*

Pseudo EPI

*EPI

Coveringarrows

1

1

1

Delete eithercol 1 or 5

3

1

1 12

f m(1,3,5,6,9)

d(2,7,8,13)

Page 17: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

QM+: An Extended QM-type Iterative Technique for Min-Cost Covering• In the PI Table (PIT), identify all EPIs, include them in the min. express. & delete

MTs they cover. Cost of a PI = # of literals +1 (AND & OR gate cost portions).• Repeat

– While there are MTs remaining and the reduced PIT (RPIT) is not cyclic do• Again check if EPIs can be identified in the RPIT—these new EPIs are called

pseudo or secondary EPIs—and if so take the same action as for original EPIs• While no pseudo EPIs can be identified do

– If there are still MTs in the RPIT, reduce the RPIT further by using only the col covering rule (rule 2) and only row covering in which the covering row has cost <= that of the covered row rule 1’). /* these coverings are optimal—proof? */

– If no rule could be applied above then apply only one row covering rule (rule 1) w/ the least difference in cost between covering and covered row (break ties by max # of remaining MTs covered by the covering row). /* this part is sub-optimal so need to apply in a limited manner */

• End While– End While– If the RPIT is cyclic, make it acyclic by choosing a PI for inclusion in the min

expression that either:1. Covers the max # of remaining MTs; break ties based on smaller cost, and break further ties randomly.

(Rule 3)2. OR has the smallest cost/(# of covered MTs); break ties by max. # of MTs covered, and further ties

randomly. (Rule 4)• Until(all MTs are covered)• Row covering rule (Rule 1): If row i covers row j, delete the covered (subset) row, row j. If both rows i and j cover each other, delete the row w/ higher cost (# of literals). Rule 1’ (strong Rule 1): Apply covering from row i to row j only if row i’s cost <= row j’s cost. Note that Rule 1’ is not in basic QM.•Col covering rule (Rule 2): If col i covers col j delete the covering (superset) column, col i. If both cols I and j cover each other, then delete one of them arbitrarily

Non-opt. ex:In a 7-var.func, cost(A)= (7-1) +1 =7,cost(B+C)= (2+1)+(2+1)= 6

PI A

32-mtPI C

16 X’s 16 X’s

32-mtPI B

15 X’s15 X’s

C

C

1-mt 1-mt

Page 18: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

Cyclic PI Table—Examples of Rules 3 & 4

1 1

1 1

1 1

1 1

PI64+1

PI54+1

PI43+1

PI34+1

PI24+1

PI14+1

654321PIsCost

f= m(1,2,3,4,5,6) d(12,14)

bcde

• Cyclic PI set in K-map (no EPIs) of a 5-var. function f.

• Cost of a PI = # literals + 1

• All red PIs have the same cost (each covers 2 MTs)

• The blue PI has a smaller cost as it covers 2 MTs and 2 DCs.

Min-cost PI

Note: PI4=4,6,12,14 →

# of literals = 5-2 = 3 →

cost(PI4) = 3+1 = 4

[# of literals +1]

x x

bc

de

a=0 a=1

Page 19: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

Cyclic PI Table (Contd.)• Rule 3: Heuristic for breaking the cycle in a cyclic PI chart

– Choose a PI for incl. deletion (incl. in expr., remove it and all MTs it covers) that covers the largest # of minterms

– Break a tie by choosing the PI that has the least cost .– Break a further tie by choosing a PI in the tie arbitrarily.

• For previous example, # of MT’s covered are given to be the same

• If cost is not taken into account to break ties (and if so, this also amounts to randomly choosing a PI)

– Choose PI1 arbitrarily for incl. deletion

– Reduced PIT on the right

PIs 2 4 5 6

PI2

PI3

PI4

PI5

PI6

*

* 1 3 5f=PI PI PI 3

12

2 2

4

5

Cost = 5+5+5=15

5 5

c

c

c

Page 20: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

Cyclic PI Table (Contd.)• If cost is used to break ties of max MTs covered—

Rule 3 (OR choice made by least cost/MT—Rule 4)– By above criterion, choose PI4 first (for incl. deletion)

PIs 1 2 3 5

PI1

PI2

PI3

PI5

PI6PI6

PI5

PI4

PI3

PI2

PI1

654321PIs

**

*

Cost = 4+5+5 = 144 2 6f PI PI PI

cost=2+3+3=11

1

2

3

4

3 34 4

Page 21: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

Cyclic PI Table (Contd.)

101462 x10

11x15 173 x 11

9 113 1 5 x1 101

812 14 10 100

10110100BC

DE

2630221810

2731 1231191 11

251292117101

24128 12016100

10110100BC

DE

PI1=0,4 PI2=4,5,12,13

A=0 A=1

PI3=9,11,13,15 PI4=0,16 PI5=9,25

PI6=12,28 PI7=15,31 PI8=16,17,24,25 PI9=17,19

PI10=19,23 PI11=23,31 PI12=24,28

f= m(0,4,9,12,13,15,16,17,19,23,24,25,28,31) d(5,11)

Page 22: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

• Taking # of MTs covered and cost into consideration (Rule 3, and in this case this is the same as applying the alternate Rule 4): Choose PI8 first (incl. deletion)

Cost PIs 0 4 9 12 13 15 16 17 19 23 24 25 28 31

4+1 PI1

3+1 PI2

3+1 PI3

4+1 PI4

4+1 PI5

4+1 PI6

4+1 PI7

3+1 PI8

4+1 PI9

4+1 PI10

4+1 PI11

4+1 PI12

1 1 1 1

1*

2

3

4

5

6 6

6*

7 7 7

7*

8 8

8*

9*

9 9

*

1 2 6 8 10 7

11

f PI PI PI +PI PI PI cost 4 3 4 3 4 4 (7 terms)

or PI =22 7 29

cost = 4+3+4+3+4+4 (AND gates’ cost) + 6 (6 PIs OR gate cost) = 22+6 = 28

10

11

11

Page 23: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

• # of MTs covered is ignored and only cost is taken into account w/ ties broken randomly (neither Rule 3 nor Rule 4 used)

• Choose PI2 first (incl. deletion) based only on cost (Note also: PI2’s cost/MT = 4/3, while PI8’s is 4/4, so this is not a good choice by Rule 4, nor by Rule 3 as PI2 does not cover the max. # of MTs)

Cost PIs 0 4 9 12 13 15 16 17 19 23 24 25 28 31

4+1 PI1

3+1 PI2

3+1 PI3

4+1 PI4

4+1 PI5

4+1 PI6

4+1 PI7

3+1 PI8

4+1 PI9

4+1 PI10

4+1 PI11

4+1 PI12

1*

3

2

5*

4*

1114 4 5 5

Page 24: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

• Reduced chart table: f=PI2+PI4+PI12+……

• Again cyclic! Choose PI3 by cost

Cost PIs 9 15 17 19 23 25 31

3+1 PI3

4+1 PI5

4+1 PI7

3+1 PI8

4+1 PI9

4+1 PI10

4+1 PI11

5

* 1

1 1

2

3

4 4

* 4

*

5 5

2 4 12 3 8 11 9

10

f PI PI PI +PI PI PI +PI

or PI

cost 3 4 4 3 3 4 4 (7 terms) 25 7 32

6

6or

This cost is 4 more than when using # of MTs as the selection criteria in an acyclic PI table

Page 25: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

Time-Complexity and Optimality of QM• Let p be the # of PIs and m the # of MTs in an n-variable function• # of iterations of QM (each iter. consists of EPIs/p-EPIs incl. deletion or application of rules 1

or 2): In each iteration at least 1 col or row is deleted (incl. or excl. deletions). Thus # of worst-case iterations is (p+m) (note could be (p+m) but more analysis needed for that).

• Each iteration takes (max(m*p2, p*m2)) time due to worst-case of all pair-wise comparisons among rows and cols to determine row and col coverings, and (m*p) to determine EPIs (or psuedo-EPIs).

• Thus total time complexity is ((p+m)*(max(m*p2 , p*m2))) = (max(m*p3, p2*m2, p*m3)) = (max(m*p3, p*m3)), since if p < m, then p*m3 > p2*m2, else (p >= m) m*p3 >= p2*m2

• What are the worst case values of p and m as functions of n?• Optimality issues in examples below.

The 2 examples here show that bad coverings will not always lead to a non-optimal solns, but they can, as we see later. However, QM (i.e., tech. using Rule 1, Rule 2, EPI/p-EPI and cycle-breaking only; no concept of good and bad coverings) is not optimal—it will not give us an optimal solution for all problems.

2-mt PI A4-mt PI B

4-mt PI C

8-mt PI D

8-mt PI E

X

X4 X’s

4 X’s

8-mt PI F

4 X’s

Optimal Soln. in a cyclic situation: Either F+B+C or D+E+A (cost=3n-7+3=3n-4). Either can be obtained by applying Rule 3 or 4 to the above cyclic situation to choose either of E, F or D first, followed by Rule 1 (1 “bad covering” at the end stage, A covs C, A covs B, had to be used).

2 mts

2 mts

2 mts

1 mt 1 mt

2 mts

2-mt PI A4-mt PI B

4-mt PI C8-mt PI E

X

X

6 X’s

6 X’s

Optimal Soln in a non-cyclic situation: for a 4-var. function: Possibilities: E+D+A (cost=3n-4) or B+C (cost=2n-2). 2n-2 <= 3n-4 n >= 2, so B+C is optimal for n >= 2. QM gives us B+C in spite of “bad” coverings (C covers E; B covers D).

8-mt PI D

2 mts

1 mt 1 mt

2 mts

Page 26: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

Optimality of QM (contd.)• QM is not optimal due to the sub-optimal use of row covering when the covered row is of less cost

than the covered one, i.e., if applying such “bad” coverings, QM may not give us an optimal solution.

8-mt PI A

8-mt PI B

8-mt PI C

32-mt PI D

4 X’s

2 X’s

30 X’s

4 mts

Optimal Soln: for a 7-var. function: A+D of cost (4+1) + (2+1) = 8. QM gives us either A+C or B+C, both of cost (4+1) + (4+1) = 10, due to “bad” coverings (initially, C of cost 4+1 covers D of cost 2+1 & applying Rule 1, we get rid of D).

4 mts

2 mts

Example

• No scope of applying Rule 1’ (good covering) only here. What is the solution if some bad coverings have to be applied? Take a broader/more-global view?

• How about pair-to-pair covering? This opens up covering possibilities that were not there between single PIs, and good pair to pair coverings should also preserve optimality. In the above example, PI pair A+D will cover all others like A+C or B+C using good covering, and will end up as the optimal solution (only remaining PI). So the process to be followed is:

‒ Use regular QM until the only options are bad covering(s) or the PIT/RPIT is cyclic‒ If the above happen, switch to PI-pair coverings, i.e., rows of the PIT are now PI pairs (the defns of good

& bad row/PI-pair covs. remain the same) and single PIs, coverings can apply between any 2 rows, and when a PI pair Pij is chosen (due to becoming p-EPI after >=1 good coverings), rows w/ single PIs of Pij are excl. deleted, and costs of other PI pairs that contain one of the PIs of Pij are appropriately reduced.

• However, a similar problem comes up if the only pair-to-pair coverings are bad ones or there are none. So this approach can mitigate the sub-optimality of single PI bad coverings (or no coverings in a cyclic PIT) due to good pair-to-pair coverings that open up, but not always.

• We can take the concept further to triple-PIs, etc., but in the extreme this approach “degenerates” into Petrick’s algorithm, which essentially considers all possible multi-PI sets that cover all MTs, and thus cover each other (and we only apply good coverings in this case, which are guaranteed to exist as we are considering all multi-PI sets—the optimal one good covers all others!).

Page 27: Single Function Quine-McCluskey 2-Level Minimization Shantanu Dutt University of Illinois at Chicago Acknowledgement: Transcribed to Powerpoint by Huan

Optimality of QM (contd.): Proof of optimality of “good” covering• Theorem: If row PIj covers row PIk in an PIT/RPIT and cost(PIj) <= cost(PIk) (this is the so-called “good”

covering), then if PIk is exclusion deleted from the RPIT (i.e., PIk will not be included in the final SOP expression f), then this leads to a cost of the final SOP expression f that is <= the cost of f if PIk is not exclusion deleted (i.e., PIk is included in the final expr.)

• Proof: For a PI PIr, let MT(PIr) be the set of MTs in the current RPIT covered by PIr. Case 1: MT(PIj) = MT(PIk). If PIk is included in f, then a smaller or same-cost solution can be obtained by

replacing PIk by PIj and have PIj cover MT(PIk) (and thus the same MTs as before are covered by f after this change).

Case 2: MT(PIk) is a subset of MT(PIj). Let MT(PIj - PIk) be the set of MTs in the current RPIT covered by PIj and not by PIk. There are 2 subcases here:

Case 2a: Less cost is incurred by covering MT(PIj - PIk) by PIj than any other single or multiple PIs. In other words, PIj is part of the optimal solution. Thus if PIk is chosen to cover MT(PIk), then this solution’s cost can be reduced by deleting PIk from the solution and not affecting the coverage of MT(PIk), since these MTs are covered by PIj that is already part of the optimal solution.

Case 2b: Less cost is incurred by covering MT(PIj - PIk) by a set S of one or more PIs (see figure below where S = {PIr, PIm}) other than PIj (this can happen if PIs in S become pseudo-PIs later on in the QM process due to other MTs [i.e., MTs not in MT(PIj - PIk)], and are thus needed in f in any case, and they cover MT(PIj - PIk) essentially for free). In this case also, as in Case 1, if PIk is part of the final solution (to cover MT(PIk)), then a smaller or same-cost solution can be obtained by replacing PIk by PIj and and have PIj cover MT(PIk) (and thus the same MTs as before are covered by f after this change).

Thus in all cases, PIj can replace PIk if the latter is present in f to result in a smaller or same-cost solution , while still covering all the MTs of PIk (and possibly more). Hence exclusion-deleting PIk due to “good” covering by PIj, leads to a cost of the final SOP expression f that is <= the cost of f if PIk is included in it. Thus good coverings retain the optimality of a solution. QED PIk X X

PIj X X X X

PIr X X XPIm X X X

MT(PIj – PIk)

Current or future pseudo-singleton colsSet S in Case 2b