Reduced Implicant Tries

Similar documents
A Bijective Approach to the Permutational Power of a Priority Queue

Supplementary information Efficient Enumeration of Monocyclic Chemical Graphs with Given Path Frequencies

ANA BERRIZBEITIA, LUIS A. MEDINA, ALEXANDER C. MOLL, VICTOR H. MOLL, AND LAINE NOBLE

ON INDEPENDENT SETS IN PURELY ATOMIC PROBABILITY SPACES WITH GEOMETRIC DISTRIBUTION. 1. Introduction. 1 r r. r k for every set E A, E \ {0},

Syntactical content of nite approximations of partial algebras 1 Wiktor Bartol Inst. Matematyki, Uniw. Warszawski, Warszawa (Poland)

Encapsulation theory: radial encapsulation. Edmund Kirwan *

Probablistically Checkable Proofs

Matrix Colorings of P 4 -sparse Graphs

New problems in universal algebraic geometry illustrated by boolean equations

Fractional Zero Forcing via Three-color Forcing Games

Math 301: The Erdős-Stone-Simonovitz Theorem and Extremal Numbers for Bipartite Graphs

3.1 Random variables

arxiv: v1 [math.co] 4 May 2017

The Substring Search Problem

Chapter 3: Theory of Modular Arithmetic 38

Compactly Supported Radial Basis Functions

arxiv: v1 [math.nt] 12 May 2017

Surveillance Points in High Dimensional Spaces

Relating Branching Program Size and. Formula Size over the Full Binary Basis. FB Informatik, LS II, Univ. Dortmund, Dortmund, Germany

Method for Approximating Irrational Numbers

COLLAPSING WALLS THEOREM

On the integration of the equations of hydrodynamics

10/04/18. P [P(x)] 1 negl(n).

On decompositions of complete multipartite graphs into the union of two even cycles

On a quantity that is analogous to potential and a theorem that relates to it

QIP Course 10: Quantum Factorization Algorithm (Part 3)

Encapsulation theory: the transformation equations of absolute information hiding.

ON THE INVERSE SIGNED TOTAL DOMINATION NUMBER IN GRAPHS. D.A. Mojdeh and B. Samadi

Top K Nearest Keyword Search on Large Graphs

On the ratio of maximum and minimum degree in maximal intersecting families

The Chromatic Villainy of Complete Multipartite Graphs

Pushdown Automata (PDAs)

Conspiracy and Information Flow in the Take-Grant Protection Model

4/18/2005. Statistical Learning Theory

Pascal s Triangle (mod 8)

THE CONE THEOREM JOEL A. TROPP. Abstract. We prove a fixed point theorem for functions which are positive with respect to a cone in a Banach space.

THE JEU DE TAQUIN ON THE SHIFTED RIM HOOK TABLEAUX. Jaejin Lee

When two numbers are written as the product of their prime factors, they are in factored form.

MATH 415, WEEK 3: Parameter-Dependence and Bifurcations

arxiv: v1 [math.co] 1 Apr 2011

Functions Defined on Fuzzy Real Numbers According to Zadeh s Extension

Brief summary of functional analysis APPM 5440 Fall 2014 Applied Analysis

On the ratio of maximum and minimum degree in maximal intersecting families

Stanford University CS259Q: Quantum Computing Handout 8 Luca Trevisan October 18, 2012

NOTE. Some New Bounds for Cover-Free Families

EM Boundary Value Problems

Solution to HW 3, Ma 1a Fall 2016

Duality between Statical and Kinematical Engineering Systems

Physics 2A Chapter 10 - Moment of Inertia Fall 2018

Pearson s Chi-Square Test Modifications for Comparison of Unweighted and Weighted Histograms and Two Weighted Histograms

Answering Queries Using Views with Arithmetic. comparisons.

Classical Worm algorithms (WA)

A Multivariate Normal Law for Turing s Formulae

Do Managers Do Good With Other People s Money? Online Appendix

C/CS/Phys C191 Shor s order (period) finding algorithm and factoring 11/12/14 Fall 2014 Lecture 22

Math 2263 Solutions for Spring 2003 Final Exam

On the Number of Rim Hook Tableaux. Sergey Fomin* and. Nathan Lulov. Department of Mathematics. Harvard University

Auchmuty High School Mathematics Department Advanced Higher Notes Teacher Version

ONE-POINT CODES USING PLACES OF HIGHER DEGREE

ASTR415: Problem Set #6

Section 8.2 Polar Coordinates

Math 124B February 02, 2012

PROBLEM SET #1 SOLUTIONS by Robert A. DiStasio Jr.

EQUI-PARTITIONING OF HIGHER-DIMENSIONAL HYPER-RECTANGULAR GRID GRAPHS

A Crash Course in (2 2) Matrices

FUSE Fusion Utility Sequence Estimator

Markscheme May 2017 Calculus Higher level Paper 3

On the Structure of Linear Programs with Overlapping Cardinality Constraints

Lifting Private Information Retrieval from Two to any Number of Messages

Circular Orbits. and g =

ITI Introduction to Computing II

Analysis of simple branching trees with TI-92

HOW TO TEACH THE FUNDAMENTALS OF INFORMATION SCIENCE, CODING, DECODING AND NUMBER SYSTEMS?

6 PROBABILITY GENERATING FUNCTIONS

gr0 GRAPHS Hanan Samet

The Implementation of the Conditions for the Existence of the Most Specific Generalizations w.r.t. General EL-TBoxes

Lecture 28: Convergence of Random Variables and Related Theorems

Exploration of the three-person duel

OSCILLATIONS AND GRAVITATION

Plug-and-Play Dual-Tree Algorithm Runtime Analysis

Question 1: The dipole

arxiv: v1 [math.co] 2 Feb 2018

ON THE TWO-BODY PROBLEM IN QUANTUM MECHANICS

Multiple Criteria Secretary Problem: A New Approach

Revision and Reasoning on Revision Rules in DL-based Knowledge Bases

ac p Answers to questions for The New Introduction to Geographical Economics, 2 nd edition Chapter 3 The core model of geographical economics

Information Retrieval Advanced IR models. Luca Bondi

Failure Probability of 2-within-Consecutive-(2, 2)-out-of-(n, m): F System for Special Values of m

Chapter 2: Introduction to Implicit Equations

Vanishing lines in generalized Adams spectral sequences are generic

Bridging the Gap Between Underspecification Formalisms: Hole Semantics as Dominance Constraints

Quasi-Randomness and the Distribution of Copies of a Fixed Graph

B. Spherical Wave Propagation

Additive Approximation for Edge-Deletion Problems

A Relativistic Electron in a Coulomb Potential

A Primer For Conant & Ashby's Good-Regulator Theorem

Deterministic vs Non-deterministic Graph Property Testing

Determining solar characteristics using planetary data

The Erdős-Hajnal conjecture for rainbow triangles

Synthesis for Unbounded Bit-vector Arithmetic

Transcription:

Reduced Implicant Ties Technical Repot SUNYA-CS-07-01 Novembe, 2007 Neil V. Muay Depatment of Compute Science Univesity at Albany Albany, NY 12222 email: nvm@cs.albany.edu Eik Rosenthal Depatment of Mathematics Univesity of New Haven Noth Haven, CT 06516 eik.osenthal@snet.net Abstact The goal of knowledge compilation is to enable fast queies. Such queies ae often in the fom of conjunctive nomal fom (CNF) clauses, and the quey amounts to the question of whethe the clause is implied by the knowledge base. Hee, we conside the dual type of quey which is a DNF clause; the quey then amounts to the question of whethe the knowledge base is implied by the clause. Pio appoaches had the goal of small (i.e., polynomial in the size of the initial knowledge bases) compiled knowledge bases. Typically, quey-esponse time is linea, so that the efficiency of queying the compiled knowledge base depends on its size. In [37], a taget fo knowledge compilation called the i-tie was intoduced; it has the popety that even when lage they nevetheless admit fast queies in the fom of CNF clauses. Specifically, a quey can be pocessed in time linea in the size of the quey egadless of the size of the compiled knowledge base. In this epot, these techniques ae extended to allow the dual type of quey expessed as a DNF clause. This eseach was suppoted in pat by the National Science Foundation unde gants IIS-0712849 and IIS-0712752. 1

1 Intoduction The last decade has seen a vitual explosion of applications of popositional logic. One is knowledge epesentation, and one appoach to it is knowledge compilation. Knowledge bases can be epesented as popositional theoies, often as sets of clauses, and the popositional theoy can then be compiled; i.e., pepocessed to a fom that admits fast esponse to queies. While knowledge compilation is intactable, it is done once, in an off-line phase, with the goal of making fequent on-line queies efficient. Heetofoe, that goal has not been achieved fo abitay popositional theoies. A typical quey of a popositional theoy has the fom, is a clause logically entailed by the theoy? This question is equivalent to asking, is the conjunction of the theoy and the negation of the clause unsatisfiable? Popositional logic is of couse intactable (unless N P = P), so the pimay goal of most eseach is to find elatively efficient deduction techniques. A numbe of languages fo example, Hon sets, odeed binay decision diagams, sets of pime implicates/implicants, decomposable negation nomal fom, factoed negation nomal fom, and paiwise-linked fomulas have been poposed as tagets fo knowledge compilation. (See, fo example, [2, 3, 8, 10, 18, 20, 21, 29, 47, 51]. Knowledge compilation was intoduced by Kautz and Selman [24]. They wee awae of one issue that is not discussed by all authos: The ability to answe queies in time polynomial (indeed, often linea) in the size of the compiled theoy is not vey fast if the compiled theoy is exponential in the size of the undelying popositional theoy. Most investigatos who have consideed this issue focused on minimizing the size of the compiled theoy, possibly by esticting o appoximating the oiginal theoy. Anothe appoach is consideed in [37]: admitting lage compiled theoies stoed off-line 1 on which queies can be answeed in time linea in the size of the quey. Thee, a data stuctue that has this popety called a educed implicate tie o, moe simply, an i-tie, was intoduced. In this epot, the dual (and equally intactable) type of quey is consideed: Does a DNF clause logically entail the theoy? The educed implicant tie is intoduced in Section 3.2. These ties can be thought of as compact implicant ties, which ae intoduced in Section 3.1. Note that the taget languages studied by the authos in [20, 37] ae elated but nevetheless distinct fom this wok; they enable esponse times linea only in the size of the compiled theoy, which (unfotunately) can be exponentially lage. The Ti c opeato and RIT c opeato, which ae the building blocks of educed implicant ties, ae intoduced and the appopiate theoems ae poved in Section 4. A diect implementation of the RIT c opeato would appea to have a significant inefficiency. Howeve, the INT opeato explained in Section 6 avoids this inefficiency. 1 The tem off-line is used in two ways: fist, fo off-line memoy, such as had dives, as opposed to on-line stoage, such as RAM, and secondly, fo batch pepaation of a knowledge base fo on-line usage. 2

2 Peliminaies Fo the sake of completeness, define an atom to be a popositional vaiable, a liteal to be an atom o the negation of an atom, and a clause to be a disjunction of liteals. Clauses ae often efeed to as sets of liteals in the context of CNF fomulas. Fo disjunctive nomal fom (DNF) fomulas, conjunctions of liteals ae also efeed to as clauses; if any confusion is possible, we will efe to them as DNF clauses. Consequences expessed as minimal clauses that ae implied by a fomula ae its pime implicates; minimal conjunctions of liteals that imply a fomula ae its pime implicants. Implicates ae useful in cetain appoaches to non-monotonic easoning [27, 44, 50], whee all consequences of a fomula fo example, the suppot set fo a poposed common-sense conclusion ae equied. The implicants ae useful in situations whee satisfying models ae desied, as in eo analysis duing hadwae veification. Many algoithms have been poposed to compute the pime implicates (o implicants) of a popositional boolean fomula [5, 14, 22, 23, 26, 43, 46, 54, 55]. An implicate of a logical fomula is a clause that is entailed by the fomula; i.e., a clause that contains a pime implicate. Thus, if F is a fomula and C is a clause, then C is an implicate of F if (and only if) C is satisfied by evey intepetation that satisfies F. Still anothe way of looking at implicates is to note that asking whethe a given clause is entailed by a fomula is equivalent to asking whethe the clause is an implicate of the fomula. Thoughout the pape, this question is what is meant by CNF quey. An implicant of a logical fomula is a DNF clause that entails the fomula; i.e., a clause that contains a pime implicant. Thus, if F is a fomula and D is a DNF clause, then D is an implicant of F if (and only if) F is satisfied by evey intepetation that satisfies D. Still anothe way of looking at implicants is to note that asking whethe a given fomula is entailed by a DNF clause is equivalent to asking whethe the clause is an implicant of the fomula. Thoughout the pape, this question is what is meant by DNF quey. 3 A Data Stuctue That Enables Fast DNF Quey Pocessing The goal of knowledge compilation is to enable fast queies. Pio appoaches had the goal of a small (i.e., polynomial in the size of the initial knowledge base) compiled knowledge base. Typically, queyesponse time is linea, so that the efficiency of queying the compiled knowledge base depends on its size. The appoach consideed in this pape is to admit taget languages that may be lage as long as they enable fast queies. The idea is fo the quey to be pocessed in time linea in the size of the quey. Thus, if the compiled knowledge base is exponentially lage than the initial knowledge base, the quey must be pocessed in time logaithmic in the size of the compiled knowledge base. One data stuctue that admits such fast queies is called a educed implicant tie. 3

3.1 Implicant Ties The tie is a well-known data stuctue intoduced by Moison in 1968 [30]; it is a tee in which each banch epesents the sequence of symbols labeling the nodes 2 on that banch, in descending ode. A pefix of such a sequence may be epesented along the same banch by defining a special end symbol and assigning an exta child labeled by this symbol to the node coesponding to the last symbol of the pefix. Fo convenience, it is assumed hee that the node itself is simply maked with the end symbol, and leaf nodes ae also so maked. One common application fo ties is a dictionay. The advantage is that each wod in the dictionay is pesent pecisely as a (patial) banch in the tie. Checking a sting fo membeship in the dictionay meely equies tacing a coesponding banch in the tie. This will eithe fail o be done in time linea in the size of the sting. Ties have also been used to epesent logical fomulas, including sets of pime implicates [50]. This woks fo pime implicants as well: The nodes along each banch epesent the liteals of a DNF clause, and the disjunction of all such clauses is a DNF equivalent of the fomula epesented by the tie. But obseve that this DNF fomula intoduces significant edundancy. In fact, the tie can be intepeted diectly as an NNF fomula, ecusively defined as follows: A tie consisting of a single node epesents the constant labeling that node. Othewise, the tie epesents the conjunction of the label of the oot with the disjunction of the fomulas epesented by the ties ooted at its childen. When clause sets ae stoed as ties, space advantages can be gained by odeing the liteals and teating the clauses as odeed sets. An n-liteal clause will be epesented by one of the n! possible sequences. If the clause set is a set of implicants, then one possibility is to stoe only pime implicants clauses that ae not subsumed by othes because all subsumed clauses ae also implicants and thus implicitly in the set. The space savings can be consideable, but thee will in geneal be exponentially many pime implicants. Futhemoe, to detemine whethe clause D is in the set, the tie must be examined fo any subset of D; the liteal odeing helps, but the cost is still popotional to the size of the tie. Suppose instead that all implicants ae stoed; the esulting tie is called an implicant tie. To define it fomally, let p 1, p 2,..., p n be the vaiables that appea in the input knowledge base F, and let q i be the liteal p i o p i. Liteals ae odeed as follows: q i q j iff i < j. (This can be extended to a total ode by defining p i p i, 1 i n. But neithe queies no banches in the tie will contain such complementay pais.) The implicant tie fo F is a tee defined as follows: If F is a tautology (contadiction), the tee consists only of a oot labeled 1 (0). Othewise, it is a tee whose oot is labeled 1 and has, fo any implicant D = {q i1, q i2,..., q im }, a child labeled q i1, which is the oot of a subtee containing a banch with labels coesponding to C {q i1 }. The clause D can then be checked fo membeship in time linea in the size of D, simply by tavesing the coesponding banch. Note that the node on this banch labeled q im will be maked with the end symbol. Futhemoe, given any node labeled by q j and maked with the end symbol, if j < n, it will have as childen nodes 2 Many vaiations have been poposed in which acs athe than nodes ae labeled, and the labels ae sometimes stings athe than single symbols. 4

labeled q k and q k, j < k n, and these ae all maked with the end symbol. This is an immediate consequence of the fact that a node maked with the end symbol epesents an implicant which is a pefix (in paticula, subset) of evey clause obtainable by extending this implicant in all possible ways with the liteals geate than q j in the odeing. 3.2 Reduced Implicant Ties Recall that fo any logical fomulas F and α and subfomula G of F, F[α/G] denotes the fomula poduced by substituting α fo evey occuence of G in F. If α is a tuth functional constant 0 o 1 (false o tue), and if p is a negative liteal, we will slightly abuse this notation by intepeting the substitution [0/p] to mean that 1 is substituted fo the atom that p negates. The following simplification ules ae useful (even if tivial). SR1. F F[G/G 0] F F[G/G 1] SR2. F F[0/G 0] F F[1/G 1] SR3. F F[0/p p] F F[1/p p] If C = {q i1, q i2,..., q im } is an implicant of F, it is easy to see that the node labeled q im will become a leaf if these ules ae applied epeatedly to the subtee of the implicant tie of F ooted at q im. Moeove, the poduct of applying these ules to the entie implicant tie until no applications of them emain will be a tie in which no intenal nodes ae maked with the end symbol and all leaf nodes ae, endeing that symbol meely a convenient indicato fo leaves. The esult ot this pocess is called a educed implicant tie. Conside an example. Suppose that the knowledge base F contains the vaiables p, q,, s, in that ode, and suppose that F consists of the following DNF clauses: {p, q, s}, {p, q, }, {p,, s}, and {p, q}. Initialize the educed implicant tie as a single node labeled 1 and then build it one clause at a time. Afte the fist is added to the tee, its two supesets must also be added. The esulting educed implicant tie is on the left in the diagam below. Adding the second clause implies that the node labeled by is also a leaf. Then all extensions of this banch ae entailed by {p, q, } (and thus by F), and the coesponding child is dopped esulting in the educed implicant tie in the cente. 1 1 1 p p p q q q q s s s s s s s Adding the last two clauses poduces the educed implicant tie on the ight. 5

The complete implicant tie in the example is shown below. It has eight banches, but thee ae eleven end makes epesenting its eleven implicants (nine in the subtee ooted at q, and one each at the othe two occuences of s.) 1 p q q s s s s s s s s Obsevations (educed implicant ties). 1. The NNF equivalent of the educed implicant tie is p (( q s) q ( s)). 2. In geneal, the length of a banch is at most n, the numbe of vaiables that appea in the oiginal logical fomula F. 3. In ode to have the detemination of entailment of a given clause be linea in the size of the clause, enough banches must be included in the tee so that the test fo entailment can be accomplished by tavesing a single banch. 4. When a DNF clause is added to the tie, the liteal of highest index becomes the leaf, and that banch need neve be extended; i.e., if a clause is being tested fo entailment, and if a pefix of the clause is a banch in the tie, that the clause is entailed. 5. The educed implicant tie will be stoed off-line. Even if it is vey lage, each banch is small no longe than the numbe of vaiables and can be tavesed vey quickly, even with elatively slow off-line stoage. 6. If the quey equies soting, the seach time will be n log n, whee n is the size of the quey. But the soting can be done in main memoy, and the seach time in the (off-line) educed implicant tie is still linea in the size of the quey. 4 A Pocedue Fo Computing Reduced Implicant Ties In this section a pocedue fo computing an educed implicant tie as a logical fomula is pesented. The T i c opeato is descibed in Section 4.1; it can be thought of as a single step in the pocess that 6

ceates a educed implicant tie. The RIT c opeato, descibed in Section 4.2, poduces the educed implicant tie with ecusive applications of the Ti c opeato. It will be convenient to assume that any constant that aises in a logical fomula is simplified away with epeated applications of ules SR1 and SR2 (unless the fomula is constant). 4.1 The Ti c Opeato The Ti c opeato estuctues a fomula by substituting tuth constants fo a vaiable. Lemmas 1 and 2 and the coollay that follows povide insight into the implicants of the components of Ti(F, p). Let Imp c (F) denote the set of all implicants of F. The ti c -expansion 3 of any fomula F with espect to any atom p is defined to be Ti c (F, p) = ( p F[0/p]) (p F[1/p]) (F[0/p] F[1/p]). Lemma 1. Suppose that the clause D is an implicant of the logical fomula F, and that the vaiable p occus in F but not in D. Then D Imp c (F[0/p]) Imp c (F[1/p]). Poof 1. Fist note that F D. Let I be an intepetation that falsifies F[0/p]; we must show that I falsifies D. Extend I to Ĩ by setting Ĩ(p) = 0. Clealy, Ĩ falsifies F 4, so Ĩ falsifies D. But then, since p does not occu in D, I falsifies D. The poof fo F[0/p] is identical, except that Ĩ(p) must be set to 1. Lemma 2. Let F and G be logical fomulas. Then Imp c (F) Imp c (G) = Imp c (F G). Poof 2. If D is an implicant of both F and G, then any intepetation satisfying D satisfies both fomulas and thus F G. Suppose now that D Imp c (F G). We must show that D Imp c (F) and that D Imp c (G). To see that D Imp c (F), let I be any satisfying intepetation of D. Then I satisfies (F G) and thus D Imp c (F). The poof that D Imp c (G) is entiely simila. Coollay. Let C be a clause not containing p o p, and let F be any logical fomula. Then C is an implicant of F iff C is an implicant of F[0/p] F[1/p]. 4.2 The RIT c Opeato The educed implicant tie of a fomula can be obtained by applying the Ti c opeato successively on the vaiables. Let F be a logical fomula, and let the vaiables of F be V = {p 1, p 2,..., p n }. Then the RIT c opeato is defined by 3 This is ti as in thee, not as in tie; the pun is pobably intended. 4 It is possible that thee ae vaiables othe than p that occu in F but not in F[0/p]. But such vaiables must simplify away when 0 is substituted fo p, so I can be extended to an intepetation of F with any tuth assignment to such vaiables. 7

F V = RIT c (F, V ) = p i RIT c (F[0/p i ], V {p i }) p i RIT c (F[1/p i ], V {p i }) RIT c ((F[0/p i ] F[1/p i ]), V {p i }) p i V whee p i is the vaiable of lowest index in V. Implicit in this definition is the use of simplification ules SR1-3. Theoem 2 below essentially poves that the RIT c opeato poduces educed implicant ties; econsideing the above example illustates this fact: F = {p, q, s} {p, q, } {p,, s} {p, q}, so that V = {p, q,, s}. Let F[1/p] and F[0/p] be denoted by F 1 and F 0, espectively. Since p occus in evey clause, F 1 amounts to deleting p fom each clause, and F 0 = 0. Thus, RIT c (F, V ) = ( p 0) (p RIT c (F 1, {q,, s})) RIT c ((0 F 1 ), {q,, s}) = (p RIT c (F 1, {q,, s})) whee F 1 = {q, s} {q, } {, s} {q}. Let F 1 [1/q] and F 1 [0/q] be denoted by F 11 and F 10, espectively. Obseve that F 11 = 1, and q 1 = q. Thus, RIT c (F 1, {q,, s}) = ( q RIT c (F 10, {, s})) q RIT c ((F 10 1), {, s}), whee F 10 = F 1 [0/q] = 0 0 ( s) 0 = ( s). Obseve now that F 10 [1/] = s and F 10 [0/] = 0. Thus, RIT c (F 10, {, s}) = ( 0) ( RIT c (s, {s})) RIT c ((0 s), {s}). Finally, since RIT c (s, {s}) = s, substituting back poduces RIT c (F, V ) = p (( q s) q ( s)), which is exactly the fomula obtained oiginally fom the educed implicant tie. If a logical fomula contains only one vaiable p, then it must be logically equivalent to one of the following fou fomulas: 1, 0, p, p. The next lemma, which is tivial to pove fom the definition of the RIT c opeato, says that in that case, RIT c (F, {p}) is pecisely the simplified logical equivalent. 8

Lemma 3. Suppose that the logical fomula F contains only one vaiable p. Then RIT c (F, {p}) is logically equivalent to F and is one of the fomulas 1, 0, p, p. Fo the emainde of the pape, assume the following notation with espect to a logical fomula F: Let V = {p 1, p 2,...p n } be the set of vaiables of F, and let V i = {p i+1, p i+2,..., p n }. Thus, fo example, V 0 = V, and V 1 = {p 2, p 3,..., p n }. Let F t = F[t/p i ], t = 1, 0, whee p i is the vaiable of lowest index in F. Theoem 1. If F is any logical fomula with vaiable set V, then RIT c (F, V ) is logically equivalent to F, and each banch of RIT c (F, V ) is an implicant of F. Poof 3. We fist pove logical equivalence. Poceed by induction on the numbe n of vaiables in F. The last lemma takes cae of the base case n = 1, so assume the theoem holds fo all fomulas with at most n vaiables, and suppose that F has n + 1 vaiables. Then we must show that F RIT c (F, V ) = p 1 RIT c (F 0, V 1 ) p 1 RIT c (F 1, V 1 ) RIT c ((F 0 F 1 ), V 1 ). By the induction hypothesis, F 1 RIT c (F 1, V 1 ), F 0 RIT c (F 0, V 1 ), and (F 1 F 0 ) RIT c ((F 1 F 0 ), V 1 ). Let I be any intepetation that falsifies F, and suppose fist that I(p 1 ) = 1. Then I falsifies p 1, F 1, and (F 1 F 0 ), so I falsifies each of the thee disjuncts of RIT c (F, V ); i.e., I falsifies RIT c (F, V ). The case when I(p) = 0 and the poof that any falsifying intepetation of RIT c (F, V ) falsifies F ae simila. (Any intepetation satisfying F clealy satisfies p 1 and the fist disjunct o else satisfies p 1 and the second disjunct.) Evey banch is an implicant of F since, by the distibutive laws, RIT c (F, V ) is logically equivalent to the disjunction of its banches. Lemma 4. Let C be an implicant of F containing the liteal p. Then C {p} Imp c (F[1/p]). Poof 4. Let I be an intepetation that falsifies F[1/p]. Extend I by defining I(p) = 1. Then I falsifies F, so I faslifies C. Since I assigns 1 to p, I must falsify a liteal in C othe than p; i.e., I falsifies C {p}. The theoem below says, in essence, that educed implicant ties have the desied popety that detemining whethe a clause is an implicant can be done by tavesing a single banch. If {q 1, q 2,..., q k } is the clause, it will be an implicant iff fo some i k, thee is a banch labeled q 1, q 2,..., q i. The clause {q 1, q 2,..., q i } subsumes {q 1, q 2,..., q k }, but it is not an abitay subsuming clause. To account fo this elationship, a pefix of a clause {q 1, q 2,..., q k } is a clause of the of the fom {q 1, q 2,..., q i }, whee 0 i k. Implicit in this definition is a fixed odeing of the vaiables; also, if i = 0, then the pefix is the empty (DNF) clause. 9

Theoem 2. Let F be a logical fomula with vaiable set V, and let C be an implicant of F. Then thee is a unique pefix of C that is a banch of RIT c (F, V ). Poof 5. Let V = {p 1, p 2,...p n }, and poceed by induction on n. Lemma 3 takes cae of the base case n = 1. Assume now that the theoem holds fo all fomulas with at most n vaiables, and suppose that F has n + 1. Let C be an implicant of F, say C = {q i1, q i2,...q ik }, whee q ij is eithe p ij o p ij, and i 1 < i 2 <... < i j. We must show that a pefix of C is a banch in RIT c (F, V ), which is the fomula RIT c (F, V ) = p 1 RIT c (F 0, V 1 ) p 1 RIT c (F 1, V 1 ) RIT c ((F 0 F 1 ), V 1 ). Obseve that the induction hypothesis applies to the thid banch. Thus, if i 1 > 1, thee is nothing to pove, so suppose that i 1 = 1. Then q 1 is eithe p 1 o p 1. Conside the case q 1 = p 1 ; the poof when q 1 = p 1 is entiely simila. By Lemma 4, C {p 1 } is an implicant of F 1, and by the induction hypothesis, thee is a unique pefix B of C {p 1 } that is a banch of RIT c (F 1, V 1 ). But then A = {p 1 } B is a pefix of C that is a banch of RIT c (F, V ). To complete the poof, we must show that A is the only such pefix of C. Suppose to the contay that D is anothe pefix of C that is a banch of RIT c (F, V ). Then eithe D is a pefix of A o A is a pefix of D; say that D is a pefix of A. Let D = {p 1 } E. Then E is a pefix of B in RIT c (F 1, V 1 ), which in tun means that E is a pefix of C {p 1 }. But we know fom the inductive hypothesis that C {p 1 } has a unique pefix in RIT c (F 1, V 1 ), so E = B, so D = A. If A is a pefix of D, then it is immediate that E is a pefix of C {p 1 } in RIT c (F 1, V 1 ), and, as befoe, E = B, and D = A. The coollaies below ae immediate because of the uniqueness of pefixes of implicants in RIT c (F, V ). Coollay 1. Evey pime implicant of F is a banch in RIT ( F, V ). Coollay 2. Evey subsuming implicant (including any pime implicant) of a banch in RIT c (F, V ) contains the liteal labeling the leaf of that banch. 5 An Algoithm fo Computing educed implicant ties In this section, an algoithm that poduces educed implicant ties is developed using pseudo-code. The algoithm elies heavily on Lemma 2, which states that Imp c (F 1 F 0 ) = Imp c (F 1 ) Imp c (F 0 ); i.e., the banches poduced by the thid disjunct of the RIT c opeato ae pecisely the banches that occu in both of the fist two (ignoing, of couse, the oot labels p i and p i ). The algoithm makes use of this lemma athe than diectly implementing the RIT c opeato; in paticula, the ecusive call 10

RIT c ((F[0/p i ] F[1/p i ]), V {p i }) is avoided. This is significant because that call doubles the size of the fomula along a single banch. No attempt was made to make the algoithm maximally efficient. Fo claity, the algoithm is designed so that the fist two conjuncts of the RIT c opeato ae constucted in thei entiety, and then the thid conjunct is poduced by paallel tavesal of the fist two. The algoithm employs two functions: it c and buildone. The nodes of the tie consist of five fields: label, which is the name of the liteal that occus in the node; paent, which is a pointe to the paent of the node; and minus, plus, and one, which ae pointes to the thee childen. The function it c ecusively builds the fist two conjuncts of the RIT c opeato and then calls buildone, which ecusively builds the thid conjunct fom the fist two. The eade may note that the algoithm builds a tenay tee athe than an n-ay tie. The eason is that the constuction of the subtee epesenting the thid conjunct of the RIT c opeato sets the label of the oot to 0. This is convenient fo the abstact desciption of the algoithm; it is staightfowad but tedious to wite the code without employing the one nodes. Obsevations. 1. Recall that each (sub-)tie epesents the conjunction of the label of its oot with the disjunction of the sub-ties ooted at its childen. 2. If eithe of the fist two sub-ties ae 0, then that sub-tie is empty. The thid is also empty since it is the intesection of the fist two. 3. If any child of a node is 1, then the node educes to a leaf. In pactice, in the algoithm, this will only occu in the fist two banches. 4. If both of the fist two sub-ties ae leaves, then they ae deleted by SR8 and the oot becomes a leaf. 5. No pseudocode is povided fo the staightfowad outines makeleaf, leaf, and delete. The fist two ae called on a pointe to a tienode, the thid is called on a tienode. 11

The Reduced Implicant Tie Algoithm. declae( stuctue tienode( lit: label, paent: tienode, minus: tienode, plus: tienode, one: tienode); RImplicanttie:tienode); input(g); {The logical fomula G has vaiables p 1, p 2,..., p n } RImplicanttie it c (G, 1, 0); function it c (G: wff, polaity, vaindex: intege): tienode; N new(tienode); if vaindex=0 then N.lit 1 {oot of entie tie is 1} else if polaity = 0 then N.lit p vaindex else N.lit p vaindex Gminus G[0/p vaindex ]; end it; Gplus G[1/p vaindex ]; if (Gplus = 1 o Gminus = 1) then makeleaf(n); etun( N); {Obsevation 3.} if Gplus = 0 then N.plus nil; N.one nil {Obsevation 2.} else N.plus it c (Gplus, 1, vaindex+1); if N.plus.lit = 0 then delete(n.plus ); N.plus nil; if Gminus = 0 then N.minus nil; N.one nil {Obsevation 2.} else N.minus it c (Gminus, 0, vaindex+1); if N.minus.lit = 0 then delete(n.minus ) if N.plus = nil then N.lit 0; makeleaf(n); if (leaf(n.plus) and leaf(n.minus)) {Obsevation 4.} then delete(n.plus); delete(n.minus); makeleaf(n); etun( N); if (N.plus nil and N.minus nil) then N.one buildone(n.plus, N.minus); N.one.paent N; N.one.lit 0 etun( N); 12

function buildone(n1, N2, tienode): tienode; None new(tienode); None.lit N1.lit; if leaf(n1) then None.(plus, minus, one) N2.(plus, minus, one); etun( None) if leaf(n2) then None.(plus, minus, one) N1.(plus, minus, one); etun( None); if (N1.plus = nil o N2.plus = nil) then None.plus nil else None.plus buildone(n1.plus, N2.plus); if (N1.minus = nil o N2.minus = nil) then None.minus nil else None.minus buildone(n1.minus, N2.minus); if (N1.one = nil o N2.one = nil) then None.one nil else None.one buildone(n1.one, N2.one); if leaf( None) then delete( None); etun(nil) else begin if None.plus nil then None.plus.paent None; if None.minus nil then None.minus.paent None; if None.one nil then None.one.paent None; etun( None) end end buildone. 6 Intesecting Reduced Implicant Ties In Section 5, the algoithm that poduces i-ties elies heavily on Lemma 2, which states that Imp c (F 0 F 1 ) = Imp c (F 0 ) Imp c (F 1 ); i.e., the banches poduced by the thid conjunct of the RIT c opeato epesent pecisely the implicants that ae epesented in both of the fist two (ignoing, of couse, the oot labels p i and p i ). Given any two fomulas F and G, fix an odeing of the union of thei vaiable sets, and let T F and T G be the coesponding educed implicant ties. The intesection of T F and T G, is defined to be the tie that epesents the intesection of the implicant sets with espect to the given vaiable odeing. By Theoems 1 and 5, and Lemma 2, this is the educed implicant tie fo F G. This definition captues the computation expessed in pseudocode as the function buildone in Section 5. 13

As with RIT c, the INT c opeato can be defined ecusively. It is again assumed fo convenience that the tie is epesented as a tenay tee athe than as an n-ay tie. The oot of the entie tie is 1 (fo non-contadictions), and any node at level i has odeed childen that ae eithe empty o ae ties whose oots ae labeled p i+1, p i+1, and 0. As a esult, a tie T ooted at p i can be epesented notationally as a 4-tuple < p i, T, T +, T 0 >. This tie epesents the fomula p i (T T + T 0 ), and we wite T p i to denote the second conjunct (which is equivalent to T p i ). The pedicate leaf etuns tue wheneve all sub-ties ae empty. Given two identically odeed ties T F and T G, INT(T F, T G ) is defined as follows. T F = T G = INT(T F, T G ) = T F leaf (T G ) T G leaf (T F ) leaf (T F TG ) T F TG othewise whee T F TG = <, INT(T F, T G ), INT(T + F, T + G ), INT(T 0 F, T 0 G ) > and is the oot label of both T F and T G. Fist note that the INT opeato clealy poduces a labeled tie that has the stuctue of a tenay tee exactly like its aguments. Lemma 5 and Theoem 3 show that this tie is pecisely the i-tie that is the intesection of its aguments. Obseve also that in case fou, the leaf test on T F TG is equied. When neithe agument is a leaf (as uled out by pevious cases) and yet the intesections of all coesponding sub-ties ae empty, T F TG poduces a leaf, but the two ties shae no banches. Finally, note that when consideing the implicates coesponding to a banch in an i-tie, the zeo labels ae ignoed. Lemma 5. Let T F and T G be educed implicant ties having the same vaiable odeing. Let C F be a non-empty pefix of C G, whee C F is a banch in T F and C G is a banch in T G. Then C G is a banch in INT(T F, T G ). Poof 6. By induction on n, the numbe of liteals in C F. If n = 1, then C F = {p i } is a singleton; it is also a banch in T F, which in tun must be a oot leaf. So case 3 in the definition of INT applies. The intesection will be T G, and C G is by definition a banch in T G and thus also in the intesection. Othewise, assume tue fo 1 n k, and suppose n = k + 1. Let p i be the fist liteal in C F. Since both C F and C G coespond to banches of length geate than one, case 5 must apply. Clealy, 14

p i is the oot label of T F and of T G. Each of C F {p i } and C G {p i } is non-empty, and the fome is a pefix of the latte. As a esult, C F {p i } is a banch in TF, T F +, o T F 0; without loss of geneality say T F +. Then C G {p i } is a banch in T G +. Since C F {p i } contains at most k liteals, the induction hypothesis applies. Theefoe, C G {p i } is a banch in INT(T F +, T G + ), which implies that C G is a banch in INT(T F, T G ). Obseve that all non-empty banches of the intesection tie ae constucted via zeo o moe applications of case 5, followed by one application of eithe case 2 o case 3, in the definition of INT. When the computation teminates fom case 2(3), each such banch coesponds to the identical banch in T F (T G ) and to a banch in T G (T F ) that is a pefix of the banch in the intesection. Theoem 3. Let T F and T G be the educed implicant ties fo F and G having the same vaiable odeing. Then INT(T F, T G ) is the educed implicant tie that is the intesection of T F and T G and, as a esult, is the educed implicant tie fo F G with espect to the given vaiable odeing. Poof 7. Let C be an implicant of F G. By Lemma 2, C is an implicant of both F and G. Then by Theoem 2, thee is a unique pefix C F of C that is a banch in T F ; similaly, thee is a unique pefix C G of C that is a banch in T G. We must show that some unique pefix of C is a banch in the intesection. If C is the empty clause, then both T F and T G ae singleton oots labeled 1, so is the intesection, and thee is nothing to pove. If eithe C F o C G is empty, then one of the ties is a singleton oot, the intesection is the othe tie, and the esult is immediate. So assume C, C F, and C G ae not empty. One o both of C F and C G is a pefix of the othe; without loss of geneality, assume C F is a pefix of C G. Theefoe the banch coesponding to C F in T F is a pefix of the banch in T G coesponding to C G. By Lemma 5, C G coesponds to a banch in INT(T F, T G ). No othe pefix C of C can be a banch in the intesection because by the obsevation afte Lemma 5, C would be a banch in one of T F o T G. But this would violate the unique pefix popety fo eithe C F o C G. Using Theoem 3, we can give the following definition fo the RIT c opeato. It diffes fom the definition given in section 4.2 in that it povides a fomal basis fo the computation of i-ties as tenay tees using intesection and stuctue shaing, exactly as embodied by the pseudocode in that section. RIT c (F, V ) = F ( p i B 1 ) (p i B 2 ) (1 B 3 ) V = p i V whee p i is the vaiable of lowest index in V, and 15

B 1 = RIT c (F[0/p i ], V {p i }) B 2 = RIT c (F[1/p i ], V {p i }) and B 3 = INT(B 1, B 2 ) 7 Reduced Implicant Ties as Dags Definition. Let D 1 and D 2 be diected acyclic gaphs (dags). Then D 1 and D 2 ae said to be isomophic if thee is a bijection f such that if (A, B) is an edge in D 1, then (f(a), f(b)) is an edge in D 2. If the nodes of the dags ae labeled, then the isomophism must also peseve labels: Label(A) = Label(f(A)). Fo the emainde of this pape, we will assume all isomophisms to be label-peseving. Theoem 4. Let R be a educed implicant tie, and let f be an isomophism fom R to R. Then f is the identity map on R. Poof 8. We poceed by induction on the numbe of vaiables in R. The esult is tivial if thee is only one vaiable, so assume tue fo any educed implicant tie with at most n vaiables, and suppose R has n + 1 vaiables. The oot has at most thee childen, labeled p 1, p 1, 1. Since each has a distinct label and f is label peseving, f must map each of these childen to itself. Note that the edge pesevation popety of f ensues that f maps each subtie to itself. The induction hypothesis thus applies to each subtie, and the poof is complete. The theoem, while staightfowad, is not immediate. In Figue 1, the dag has a label-peseving isomophism that is not the identity because it swaps the nodes labeled a. a a b Figue 1: Non-Identity Label-Peseving Isomophism The induction of the last theoem can easily be adapted to pove Theoem 5. Let F and G be logically equivalent fomulas. Then, with espect to a fixed vaiable odeing, RIT c (F) is isomophic to RIT c (G). 16

Note that F and G may have diffeent vaiable sets. In that case, we assume that the fixed odeing in the theoem efes to the union of these vaiable sets. As a esult, compaing the i-ties of two fomulas amounts to a (not necessaily pactical) test fo logical equivalence. On the othe hand, if the fomulas ae known to be equivalent, attention can be esticted to vaiables in the symmetic diffeence of thei vaiable sets; all othes ae edundant. 8 Reduced Implicate/Implicant Ties Recall that educed implicate ties (o i-ties) wee intoduced and futhe developed in [39] and in [40], along with the RIT and INT opeatos. Implicate ties ae the duals of implicant ties; fo eithe type of tie, the INT opeato takes two tie aguments and poduces the tie having exactly the banches that appea in both aguments. This opeato is based entiely on the stuctue of its aguments and, as a esult, is neutal with espect to implicate o implicant ties. Fo the emainde of this section, the eade is assumed to be familia with these opeatos and with the developments in [39] and in [40]. The RIT c and RIT opeatos ae cetainly diffeent, but the ecusive computations in both equie eplacing a vaiable with tuth constants. The goal of this section is to take advantage of the common subcomputations in the design of a new opeato, RIIT, that poduces educed implicate/implicant ties (ii-ties) that can detemine both implicates and implicates. 8.1 Meging i-ties and Reduced Implicant Ties The goal fo the design of the RIIT opeato is to build a tie in which both the implicates and implicants of a fomula ae epesented by the banches. So what is desied is some kind of combination of the ties built by RIT and RIT c. Let V = {p 1,..., p n } and conside T F = RIT(F, V ) and TF c = RITc (F, V ) and how they compae. Each is a tenay tie in which the i th vaiable appeas at level i. Any node of eithe tie can be uniquely specified by a position in the obvious way, whee a position is a sequence of integes taken fom {1,2,3}. (The oot is at the empty position.) Suppose position P exists in both ties; let N be the node at P in the i-tie, and let N c be the node at P in the educed implicant tie. It is obvious fom the definitions of RIT and RIT c that if N has label q, then N c has the complement label which is equivalent to q. When convenient, we will use the complement l of label l to denote q when l = q, and q when l = q. Lemma 6. Let T F and TF c be, espectively, the i-tie and the educed implicant tie fo F unde a given vaiable odeing. Suppose node N in T F and node N c in TF c ae each at position P. Then neithe N no N c is a leaf. Poof 9. Suppose N is a leaf, and suppose the banch ending in N epesents the clause C. Then C is an implicate of F. If position P coesponding to N c exists in TF c, then some extension P Q of P is a 17

banch in T c F (whee Q could be empty). So P Q epesents the DNF clause D = C {q 1,..., q m }. Clealy D is an implicant of F. This means that D = ( C {q 1,..., q m }) = F = C. Since D is a satisfiable DNF clause, all liteals in D can be simultaneously made tue, falsifying C, and this is a contadiction. If N c is a leaf, let D be the clause epesented by the banch ending in N c. Then D is an implicant of F. If position P coesponding to N exists in T F, then some extension P Q of P is a banch in T F (whee Q could be empty). So P Q epesents the CNF clause C = D {q 1,..., q k }. Clealy C is an implicate of F. This means that D = F = C = ( D {q 1,..., q m }). Since C is a falsifiable CNF clause, all liteals in C can be simultaneously made false, satisfying D, and this is a contadiction. The poof of Lemma 6 elies on entailment between implicants, fomulas, and implicates. Theefoe it applies with only tivial changes to the following coollay. Coollay 3. Let T 1 and T c 2 be the i-tie and the educed implicant tie, espectively, fo F 1 and fo F 2 unde a given vaiable odeing, whee F 2 = F 1. Suppose node N in T 1 and node N c in T c 2 ae each at position P. Then neithe N no N c is a leaf. While the coollay is stated in athe geneal fom, it will be most useful in the paticula case whee F 1 = F G and F 2 = F G. Wheneve Lemma 6 applies to i-tie T and to educed implicant tie T c, it can be concluded that the leaf node positions of T ae disjoint fom those of T c. The two ties shae some intenal stuctue but no banches. Given a position P = (i 1, i 2,..., i n ) fo leaf N in T, we may stat at the oot of T c and tace the path coesponding to P. Thee must be a node N at some position P = (i 1, i 2,..., i c ), c < n such that i c+1 {1, 2}, the position (i 1, i 2,..., i c, i c+1 ) does not exist in T c, and the position (i 1, i 2,..., i c, (3 i c+1 )) does exist in T c. In othe wods, T and T c have banches that consist of identical positions up though P. But one node at P has only a fist o only a second child, while the othe has a diffeent only child. Any path common to both ties must split at some point pio to encounteing a leaf, othewise the leaf position would be common to both ties which is impossible. This split means that the two nodes at the lowest common position must be missing diffeent fist and second childen. Note that such nodes cannot have a thid child since the intesection of the fist two must be empty. As a esult, it is staightfowad to build a tie whose banches ae pecisely the banches in both T and T c. In a simple ecusive pocess, the ties can be tavesed in paallel. A tie can be constucted that is isomophic to the common pats of the two ties. When a node is encounteed whee the ties divege, the coesponding node in the tie unde constuction can be given (essentially) the fist child fom one tie and the second child fom the othe. Note that the thid child will be empty since it is empty in both ties being tavesed. Let T F = 0, T F +, T F, T F 0 be the i-tie fo F, and let T c G = 1, c T G +, c T G, c TG 0 be the educed is defined implicant tie fo G unde a fixed vaiable odeing, whee G = F. The mege of T F and T c G to be the tie whose banches ae exactly the banches of both T F and T c G 18. In ode to type each banch

accoding to its tie of oigin, the leaf nodes will be maked as type-d o type-c. Banches leading to type-d (type-c) leaves ae called type-d (type-c) banches. Since nodes in positions common to both ties have complementay labels, we will use a toggling symbol to indicate the label that a node at a given position would have if it wee at that position in T F o in TG c. When consideing implicates, is intepeted as the identity, but fo implicants it is intepeted as complement. Note also that i-ties and educed implicant ties ae intepeted as specific (and dual) logical stuctues using conjunction and disjunction. But both must be captued by an ii-tie, and so the symbols and will be used to denote, espectively, connectives along and between banches. Connective symbols do not appea explicitly in definitions employing the 4-tuple notation, but it is assumed that in the esult of MERGE, the connective symbols ae and. Given i-tie T and educed implicant tie T c, we denote by d(t ) the tie that esults fom making the leaves of T as type-d and pepending the symbol to all its labels. We denote by c(t c ) the tie that esults fom making the leaves of T c as type-c, and complementing and then pepending to all its labels. The mege of T F and T c G may be computed as follows. T F = and T c G = d(t F ) T c G = MERGE(T F, T c G ) = c(t c G ) T F =, MERGE(T F +, c T G + ), MERGE(TF, c TG ), MERGE(TF 0, c TG 0 ) othewise Note that in the ecusive call to MERGE (fouth case), the oot labels of the two aguments ae complementay. The oot of the constucted tie uses the label of the i-tie but with pepended. This yields exactly the coect label when these nodes ae viewed fo implicates, and dually fo implicants. Fo unifomity, is pepended to all labels in the base cases as well. Fo case two, the constuction equies only that the leaves be maked as type-d and that is added to the labels, and this is exactly what d(t F ) poduces. Fo case thee, TG c is a coectly labeled educed implicant tie. When seaching fo implicants, means complement, so fo this case the labels have to be complemented and then pepended with ; in essence, evaluating c(tg c ) complements the coect labels twice. Along with Lemma 6, this poves Lemma 7. If G = F, the d-banches and c-banches of MERGE(T F, TG c ) ae disjoint and have exactly the positions of the banches of RIT(T F ) and of RIT c (T G ). The sub-tie consisting of the type-d 19

banches is identical to RIT(T F ) if and leaf maks ae emoved. The subtie consisting of the type-c banches is identical to RIT c (T G ) if labels ae complemented, and and leaf maks ae emoved. As a esult, the ii-tie fo F is defined to be MERGE(T F, TF c ). The goal, howeve, is to define the RIIT opeato to compute this tie without fist computing the i-tie and the educed implicant tie. 8.2 Intesecting ii-ties If an ii-tie is viewed simply as the MERGE of an i-tie and a educed implicant tie, then the notion of intesection need not be addessed explicitly. Intesections of implicates and implicants have aleady been computed as necessay in foming the ties to be meged. Howeve, it is necessay to addess intesection diectly in ode to compute ii-ties diectly. Given any two fomulas F and G, fix an odeing of the union V of thei vaiable sets, let T F and T G be the coesponding i-ties, and let T c F and T c G denote by T ii F and T ii G be the coesponding educed implicant ties. We the ii-ties fo F and fo G. The intesection of T ii and T ii, is defined to be F MERGE(RIT(F G, V ), RIT c (F G, V )), which is MERGE(INT(T F, T G ), INT(T c F, T c G )). This tie, while not in geneal the ii-tie of any fomula, is the tie whose d-banches coespond pecisely to the banches of RIT(F G, V ), and whose c-banches coespond pecisely to the banches of RIT c (F G, V ). Note that by Lemma 7 and the coollay to Lemma 6, this mege of the i-tie and educed implicant tie of, espectively, the diffeent fomulas (F G) and (F G) is well-defined. Ou goal hee is to define IINT, the ii-tie intesection opeato, diectly without the use of MERGE, RIT, o RIT c. The IINT opeato is defined similaly to INT. Recall that the INT opeato is a ecusion that taveses its tie aguments. The base cases that end the ecusion involve eithe the empty tie o a leaf node. This holds fo the IINT opeato as well: If one agument is empty, then so is the intesection. When one agument is a type-d leaf, then the intesection is all banches in the othe agument that end in type-d leaves. Dually, when one agument is a type-c leaf, then the intesection is all banches in the othe agument that end in type-c leaves. Let T F and T G be the ii-ties fo F and fo G, espectively, unde a fixed vaiable odeing. Let, T F +, T F, T F 0 + and, T G, T G, T G 0 be the 4-tuples denoting T F and T G, espectively. Let T γ be the sub-tie of T whose banches end in γ-leaves, γ = d, c, and let T F ii T G be the fou-tuple, IINT(T F +, T G + ), IINT(T F, T G ), IINT(T F 0, T G 0 ). Then G 20

T F = o T G = IINT(T F, T G ) = T γ F γ-leaf (T G ) T γ G γ-leaf (T F ) leaf (T F ii T G) T F ii T G othewise Lemma 8. Let T F and T G be the ii-ties of F and of G with the same vaiable odeing. Let C F be a non-empty pefix of C G, whee C F is a d-banch (c-banch) in T F and C G is a d-banch (c-banch) in T G. Then C G is a d-banch (c-banch) in IINT(T F, T G ). Poof 10. By induction on n, the numbe of liteals in C F. Without loss of geneality, assume the banches ae type-d. If n = 1, then C F = {p i } is a singleton; it is also a banch in T F, which in tun must be a oot type-d leaf. So case 3 in the definition of IINT applies, and γ = d. The intesection will be TG d, and C G is by definition a type-d banch in T G and thus also in TG d ; it is theefoe in the intesection. Othewise, assume tue fo 1 n k, and suppose n = k + 1. Let p i be the fist liteal in C F. Since both C F and C G coespond to banches of length geate than one, case 5 must apply. Clealy, p i is the oot label of T F and of T G. Each of C F {p i } and C G {p i } is non-empty, and the fome is a pefix of the latte. As a esult, C F {p i } is a banch in T + F, T F, o T 0 F ; without loss of geneality say T + F. Then C G {p i } is a banch in T + G. Since C F {p i } contains at most k liteals, the induction hypothesis applies. Theefoe, C G {p i } is a banch in IINT(T + F, T + G ), which implies that C G is a banch in IINT(T F, T G ). The poof is completely dual fo banches of type-c. Obseve that all non-empty banches of the intesection tie ae constucted via zeo o moe applications of case 5, followed by one application of eithe case 2 o case 3, in the definition of IINT. When the computation teminates fom case 2(3), each such banch coesponds to the identical banch in T F (T G ) and to a banch in T G (T F ) that is a pefix of the banch in the intesection. Theoem 6. Let T F and T G be the ii-ties fo F and G with the same vaiable odeing. Then IINT(T F, T G ) is the tie that epesents the intesection of T F and T G with espect to the given vaiable odeing. 21

Poof 11. Case 1: Let D be an implicant of F G. Let TF c and T G c be the educed implicant ties of F and of G, espectively. By Lemma 2, D is an implicant of both F and G. Then by Theoem 2, thee is a unique pefix D F of D that is a banch in T c F ; similaly, thee is a unique pefix D G of D that is a banch in TG c. We must show that some unique pefix of D is a c-banch in the intesection. If D is the empty clause, then both TF c and T G c ae singleton oots labeled 1, so is the intesection, and thee is nothing to pove. If eithe D F o D G is empty, then one of the ties is a singleton oot, the intesection is the othe tie, and the esult is immediate. So assume D, D F, and D G ae not empty. One o both of D F and D G is a pefix of the othe; without loss of geneality, assume D F is a pefix of D G. Theefoe the banch coesponding to D F in TF c is a pefix of the banch in T c G coesponding to D G. By Lemma 8, D G coesponds to a banch in IINT(TF ii, T G ii). No othe pefix D of D can be a banch in the intesection because by the obsevation afte Lemma 8, D would be a banch in one of TF c o T G c. But this would violate the unique pefix popety fo eithe TF c o T G c. Case 2: Conside an implicant C of F G. The poof is entiely dual to that of Case 1. Theoem 6 guaantees that when applied to ii-ties, IINT poduces pecisely the tie whose d- banches epesent (uniquely) the implicates (CNF clauses) epesented in both sub-ties and whose c- banches epesent (uniquely) the implicants (DNF clauses) epesented in both sub-ties. They coexist peacefully in one tie because banches may end in one type o the othe, but not both. 8.3 The RIIT Opeato If T is the ii-tie fo a logical fomula F, and if L is an odeed set of liteals, then, since L can be intepeted as eithe a disjunctive o a conjunctive clause, one can ask, espectively, whethe L is an implicate o an implicant of F. The ii-tie will have the popety that in eithe case, the answe is yes if and only if a unique pefix of L is a banch in T. The notation d-clause and c-clause will be used to indicate, espectively, disjunctive and conjunctive clauses. Similaly, d-seach and c-seach will be used to indicated that the tie is being seached fo, espectively, d-clauses o c-clauses. The choice of intepetation will detemine the connectives along banches and those between banches, node labels, and the tuth constants labeling inteio nodes. Thee is a staightfowad duality of the logical connectives in these ties. Fo i-ties, banches ae disjunctions that ae conjoined to each othe; fo educed implicant ties, banches ae conjunctions that ae disjoined. In the ii-tie, the connectives must be intepeted; i.e., whethe each connective is a disjunction o a conjunction depends upon whethe implicates o implicants ae being sought. Conside next inteio nodes labeled by tuth constants. Fo non-contadictoy non-tautological fomulas, the oot is 0 fo the i-tie, 1 fo the educed implicant tie. Assuming tenay stuctue, the thid sub-tie of an i-tie is ooted at 0; a educed implicant tie is ooted at 1. In i-ties, inteio zeos ae disjoined to the conjunction of thei childen; in educed implicant ties, inteio ones ae conjoined 22