Tractable classes - Computer Science & E

Tractable classes - Computer Science & E

Directional Resolution: The Davis-Putnam Procedure, Revisited Presented by Omar and Walker 1 2 Table of Contents History

of Directional Resolution Definitions and Preliminaries DP-elimination Directional Resolution Tractable Classes Bounded Directional Resolution Experimental Evaluation Related Work and Conclusions Acknowledgements 3 History of Directional Resolution First

Introduced in 1960 by Davis and Putnam Proved that a restricted amount of resolution performed systematically along with order of the atomic formulas is sufficient for deciding satisfiability. Received little attention due to worst-case exponential behavior.

Overshadowed by The Davis-Putnam Procedure 4 The Davis-Putnam Procedure The second algorithm searches through the space of possible truth assignments while performing unit resolution until quiesience at each step. Is

similar to the first algorithm The elimination step was replaced with the splitting rule to avoid the memory explosion problem 5 Elimination vs. Backtracking We will call DP-Elimination

Proved that a restricted amount of resolution performed systematically along with order of the atomic formulas is sufficient for deciding satisfiability We will call DP-Backtracking The second algorithm searches through the space of possible truth assignments while

performing unit resolution until quiesience at each step. 6 Elimination vs. Backtracking DP-Elimination Uses the Elimination Rule DP-Backtracking

Replaces the Elimination Rule with the Splitting Rule. This avoids memory explosion 7 Purpose This paper wishes to prove the following:

That both methods are not the same Show the virtues of the DP-Elimination It is Satisfiabile (2-cnfs and Horn Clauses) Tractable Classes Good performance for Chain-like Structures 8 Definitions and Preliminaries

Variables Propositional Literals (Uppercase Letters) P,Q,R, (Lowercase Letters) p,q,r,

Disjunctions of Literals , , Sometimes denoted as a set { } Unit Clause A clause of size 1 9

Definitions and Preliminaries Resolution Works same as discussed in class Conjunctive Normal Form Entailed

, iff is true in all models of Horn Formula CNF formula with at least one positive literal 10 Definitions and

Preliminaries Definite Formula Positive Formula If it only contains positive literals

Negative Formula A cnf formula that has exactly one positive literal If it only contains negative literals K-cnf Formula

Clauses all have length k or less 11 What is DP-Elimination? Ordering-based restricted resolution algorithm Given Arbitrary ordering To each Clause, assign the index of the highest literal in each Clause Then resolve only Clauses having the same index. This creates a systematic elimination of literals.

Also remove literals only negative only positive 12 Directional-Resolution Input:

A cnf theory , an ordering of its variables Output: A decision of whether is satisfiable. If it is a theory equivalent to , else an empty directional extension. 13 Directional-Resolution 1.

2. 3. 4. 5. Initialize: generate an ordered partition of the clauses bucket1, ... , , where contains all the clauses whose highest literal is . For i=n to 1 do: Resolve each pair . If is empty, return , the theory is not satisfiable; else, determine the index of and add it to the appropriate bucket

End-for. Return )<= . 14 Theorem 1: (Model Generation) Let be a cnf formula an ordering. And its directional extension. Then, if the extension is not empty, any model of can be generated in time in a backtrace-free manner, consulting , as follows:

Step 1: Assign to a truth value that is consistent with clauses in bucket1 (if the bucket is empty, assign an arbitrary value); Step 2: After assigning a value , assign to will satisfy all the clauses in . 15 Proof

Suppose the contrary during the process of model generation there exists a partial model of truth assignments, for the first i-1 symbols that satisfy all the clauses in the buckets of assume that there is no truth value for

that satisfy all the clauses in the bucket of . 16 Proof Let and be two clauses in the bucket of that clash. Clearly and contain opposite signs of atom ; in one appears negatively and in the other positively. Directional Resolution will have a resolvent that must appear in earlier buckets.

Such a resolvent would not have allowed the partial model , thus leading to a contradiction. 17 Corollary 1: A theory has a non-empty directional extension iff it is satisfiable. The

effectiveness of directional resolution both for satisfiablity and for subsequent query processing depends on the size of its output theory 18 Theorem 2: (Complexity) Given a theory and an ordering d of its propositional symbols, the time complexity of algorithm directional resolution is where n

is the number of the propositional letters in the language. 19 Proof There are at most n buckets, each containing no more clauses than the final theory, and resolving pairs of clauses in each bucket is a quadratic operation.

Shows that the algorithm depends on the size of the resulting output. 20 Entailment Checking If a literal appears it is a unit clause, it is entailed.

If no literals, negate and insert the literals If empty clause is generated, the literal is entailed. Arbitrary clauses for literals. Clauses Add each negated literal to the appropriate buckets Restart process with highest bucket.

This suggests that the symbols of the subsets should appear early in the ordering. 21 Theorem 3 (entailment) Given a directional extension and a constant c, the entailment of clauses involving only the first c symbols in d is

polynomial in the size of . The entailment is only as large as the resulting output. 22 Conclusion thus far DP-elimination is satisfiable in is time

given size d. This allows for generating resolution. 23 Examples on the effect of ordering on Let For the ordering .

Initially, all clauses are contained in bucket (A), and the other buckets are empty. By applying the directional resolution along , we get: Bucket(D) = {(C,D), (D,E)} Bucket (C) = {(B,C)} Bucket (B) = {(B,E)} The directional extension along the ordering = (A,B,C,D,E) Is identical to the input theory, and each bucket contains at most one clause. 24

Examples on the effect of ordering on Let Note that the interactions The directional extensions ofplay along among clauses an the ordering important role in the effectiveness of the algorithm, and suggests

ordering that yields smaller extensions 25 Notes: Directional resolution is tractable for 2-cnf theories in all orderings, why? 2-cnf are closed under resolution The overall number of clauses of size 2 is bounded by This algorithm is not the most effective one for satisfiability of 2-cnf s, since it can be

decided in linear time. 26 Theorem 4 If is a 2-cnf theory, then algorithm directional resolution will produce a directional extension of size Corollary 2

Given a directional extension of a 2-cnf theory ,the entailment of any clause involving the first c symbols in d is 27 Induced width Let be a cnf formula defined over the variables The interaction graph of , denoted , is an undirected graph that contains one node for each propositional variable and

an arc connecting any two nodes whose associated variables appear in the same clause 28 Example Let The interaction graph is 29 Definition

1 Given a graph G and an ordering of its nodes D, the parent set of node A relative to d is the set of nodes connected to A that precede A in the ordering d. The width of A relative to d: size of this parent set The width w(d) of an ordering d: the maximum width of nodes along the ordering The width w of a graph: the minimal width of all its orderings 30

Lemma 1 Given the interaction graph and an ordering d: If A is an atom having k-1parents, then there are at most clauses in the bucket of A; if w(d) = w, then the size of the corresponding theory is 31

Proof The bucket A contains clauses defined on K literals only. For the set of K-1 symbols there are at most subsets of I symbols. Each subset can be associated with at most clauses (either positive or negative) A can also be negative or positive ,so at most we can have If the parent set is bounded by w, the extension is bounded by 32

Definition 2 Given a graph G and an ordering d: The graph generated by recursively connecting the parents of G, in a reverse order of d, is called the induced graph of G w.r.t d, denoted by

The width of is denoted by w*(d) and is called the induced width of G w.r.t d. 33 Example If the ordering is A,B,C,D,E then the width =2 The induced width of G = 2 34

Lemma 2 Let be a theory. Then , the interaction graph of its directional extension along d, is a sub graph of . 35 Theorem 5

Let be a cnf, is the interaction graph, and w*(d) is the induced width along d; then, the size of is 36 Proof The interaction graph of is a sub graph of From lemma 1,the size of theories having as their interaction graph is bounded by

Note: This means that the algorithm eliminates duplicate clauses 37 Definition

2 (K-trees) Step 1: A clique of size K is a K-tree Step 2: given a K-tree defined over , a Ktree over can be generated by selecting a clique of size K and connecting To every node in that clique. 38 Corollary 3 If is a formula whose interaction graph

can be embedded in a K-tree then there is an ordering d such that the time complexity of directional resolution on that ordering is 39 Finding an ordering yielding the smallest induced width of a graph is NP-hard So,

when given a theory and its interaction graph, lets find an ordering that yields the smallest width possible 40 Important special tractable classes that can be recognized in linear time: w*=1, the interaction graph is a tree W*=2, the interaction graph is a series

parallel networks Given any K, graphs having induced width of K or less can be recognized in 41 Example Consider a theory over the alphabet . The theory has a set of clauses indexed by I,

where: a clause for I odd is given by Two clauses for I even are given by and The induced width for those theories along the natural ordering is 2 The size of the directional extension will not exceed 42 43 Diversity

Definition 4 Given a theory and an ordering d, let + (or denote the number of times appears positively (or negatively) in relative to d. div(): div(d):The diversity of an ordering d; is the maximum diversity of its literals w.r.t the ordering d div: the diversity of a theory; is the minimal diversity over all its ordering 44

Theorem 6 Algorithm min_diversity generates a minimal diversity ordering of a theory 45 Theorem 7 Theories having zero diversity are tractable

and can be recognized in linear time If d is an ordering having a zero diversity, algorithm directional resolution will add no clauses to along d 46 Example Let The ordering is a zero diversity ordering of

47 clausal cnf theory has zero diversity; Theories in cnf forms would correspond to clausal if there is an ordering of the symbols, so that each bucket contains only one clause The size of the directional-extension is exponentially bounded in the number of

literals having only strictly positive diversities 48 Definition 5 (Induced diversity) The induced diversity of an ordering d, , is the diversity of along d, and the induced diversity of a theory is the minimal induced diversity over all its ordering

49 Although bounds the added clauses generated from each bucket, its still not polynomially computable. But it can be used for special cases 50

Theorem 8 A theory , has and is therefore tractable, if each symbol satisfies one of the following conditions: a) b) c) It appears only negatively It appears only positively

It appears in exactly 2 clauses 51 Two special nodes labeled true and false are introduced There is an arc from true to A f A is a positive unit clause

There is an arc from B to false if B is included in any negative clause 52 Diversity graph for horn theories A Horn theory can be associated with a directed graph called the diversity graph and denoted .

contains a node for each propositional letter and an arc is directed from A to B if there is a Horn clause having B in its head (B is positive) and A in its antecedent (A is negative) 53 Example Consider the following two Horn theories:

The diversity graph for both is 54 Theorem 9 A definite Horn theory has an acyclic diversity graph iff it has a zero diversity Corollary 4 If is an acyclic definite Horn theory w.r.t

ordering d, then 55 Remember This doesnt apply to full Horn theories Example: Its a Horn theory with an acyclic diversity graph, yet it has a non zero diversity

Definite theories are satisfiable and closed under resolution 56 Definition 7 (Diversity width) Let D be a directed graph and let d be an ordering of the nodes. The positive width of a node Q []is the number of arcs emanating from prior nodes (its positive parents) towards Q The negative width of Q relative to d [],

is the number of arcs emanating from Q towards nodes preceding it in the ordering d (its negative parents) 57 The diversity width (div-width) of Q, u(Q), relative to d is max{}

The div-width (u(d))of an ordering d, is the maximum div-width of each of its nodes along the ordering The div-width of a Horn theory is the minimum of u(d) over all orderings that starts with nodes true and false 58 Lemma

3 Given a diversity graph of Horn theory , and an ordering d, if A is an atom having k positive parents and j negative parents , then there are at most non negative clauses in the bucket of A 59 A minimum div-width of a graph can be

computed by a greedy algorithm like the min-diversity algorithm, using div-width criteria for node selection 60 Definition 8 (induced diversity graph and width) Given a diagraph D and an ordering d, such that true and false appear first, the induced diversity graph of D relative to d , is generated

as follow: Nodes are processed from last to first. When processing node , a directed arc from to is added if both nodes precede in the ordering and if there is a directed arc from to and from to 61 The div-width of , denoted by , is called the induced diversity width of D w.r.t d

or Constructing the induced diversity graph is at most when n is the number of vertices 62 Example 6

Given and the ordering d = F,A,B,C,D,E the induced width graph is: Its a definite theory so nodes true and false are omitted The added arcs are dotted The div-width of node E is 2 (positive=2, negative =1) 63 Lemma 4

Let be a Horn theory and d an ordering of its symbols; then the diversity graph of , , is contained in when d is an ordering which starts with true and false 64 Theorem 10 Let be a Horn theory and let d be an ordering of its symbols that start by true and false, having induced div-width along

d; then the size restricted to the non negative clauses is and the size of restricted to the negative clauses is , where is the degree of node false in the induced diversity graph 65 Definition 9 (Strongly connected

components) A strongly connected component of a directed graph is a maximal set of nodes U such that for every pair A and B in U there is a directed path from A to B and from B to A. The component graph of G=(V,E) denoted , contains one vertex for each strongly connected component of G, and there is an edge from

component to component if there is a directed edge from a node in to a node in in the graph G 66 Theorem 11 Let be a definite theory having a diversity graph D. Let be the strongly connected components

of G, let be orderings of the nodes in each of the strongly connected components, and let d be a concatenation of the orderings , that agrees with the partial acyclic ordering of the components graph 67 Theorem 11 (cont)

Let be the largest induced div-width of any component Then the size of is 68 Example 7 Given

Since the graph is acyclic, the strongly connected components contain only one node, therefore for any admissible ordering d, 69 Example 7 (cont) Given There are 2 strongly connected components,

one including D only, and another including the rest of the variables, For the ordering d = F,A,B,C,E on that component, only the arcs (C,F),(B,F),(A,F) will be added, so that the induced div-width = 2 70 Conclusion Finding an optimal width is NP-Hard Finding an optimal induced div-width is also hard

However good orderings can be generated using various heuristics (minwidth, min-diversity, min-div-width) 71 Directional resolution algorithm is both time and space exponential in the worst case Instead use an approximate algorithm

bounded directional resolution (BDR) 72 Bounded directional resolution The algorithm records clauses of size k or less when k is a constant Consequently, its complexity is

polynomial in k 73 Experimental Evaluation They implemented DP-Backtracing in C using a 2-literal clause heuristic. 74 75

DR vs. DP DP outperformed DR. 76 77 78 79 80

Chain Analysis DR significantly outperforms DP for instances which DP encountered many deadends. Almost all hard DP chain problems were unsatisfiable. 81

82 83 84 85 Related work and conclusions Since propositional satisfiability is a special case of constraint satisfaction,

the induced-width bound could be obtained by mapping a propositional formula into the relational framework of a constraint satisfaction problem and applying adaptive consistency. 86 Related work and conclusions Adaptive consistency and the elimination algorithm does not perform better then Directional Resolution under

similar constraints. 87 Final Conclusions Revise the pessimistic analysis of DPelimination by showing that the DR algorithm has merits with tractable classes. Identify new tractable classes based on diversity. Show tighter bounds on induced diversity width.

88 Final Conclusions While DR is no the most effective algorithm, ideas and concepts should be incorporated into newer, more effective algorithms. For some structural domains, DR is an effective knowledge compilation procedure.

89 Thank you

Recently Viewed Presentations

  • Using the NCIR as a Clinical Tool - North Carolina

    Using the NCIR as a Clinical Tool - North Carolina

    Using the NCIR as a Clinical Tool January 11, 2012 Mary Stanley, RN Clinical Nurse Consultant NCIR The North Carolina Immunization Registry (NCIR) is a secure, web-based clinical tool which is the official source for North Carolina immunization information.
  • An Ambiguous Grammar -

    An Ambiguous Grammar -

    A grammar is ambiguous if for a given sentence, there is more than one parse tree, i.e., there are two derivations that lead to the same sentence. <assign> Two distinct parse trees (generated by the grammar on the next slide)...
  • Hearing Loss in the Geriatric Population Strategies for

    Hearing Loss in the Geriatric Population Strategies for

    The Vestibular System. One of the oldest CNS system reflex pathways. In humans, has evolved to provide . Orientation. Equilibrium. Responsible for sensing head motion. Maintain postural control. Stabilize images on the fovea of the retina. Transmits information to the...
  • Jump into Inquiry without Drowning Meri Riddick &

    Jump into Inquiry without Drowning Meri Riddick &

    Explain: Your task . In Dive into Inquiry, Trevor MacKenzie encourages teachers to incorporate IBL into their curriculum over time and to scaffold implementation for students.He encourages teachers to start small, with familiar content, and to start with a structured...
  • Announcement No Class on Thursday, October 25th Make

    Announcement No Class on Thursday, October 25th Make

    Arial Times New Roman Calibri Default Design Announcement Lecture Objectives: Sensible and Enthalpy wheels Heat recovery system in NSM building at UT Sensible and Enthalpy Wheels Desiccant Systems: Reading assignment Desiccant wheel Desiccant wheel Variation in Cycles
  • Web server attacks in Belgium - statistics from year 2005

    Web server attacks in Belgium - statistics from year 2005

    2006 Internet Attack Statistics for Belgium Hillar Leoste Agenda About Zone-H and defacements Statistics What is • News, advisories and opinions, provided from recognized IT security news sites, trusted product vendors and pro-active members of zone-h international community...


    Individual partner not sued for partnership debt during subsistance . Individual partner cannot enforce partnership claim. In principle partners sued jointly in own names during subsistance. However Rules of Court: may be sued in business name; first assets of partnerships,...
  • DUE DATES - George Mason University

    DUE DATES - George Mason University

    DUE DATES Today At end of lab -- copy of laboratory notebook pages for today's experiment Next Week At beginning of lab - Grignard Reaction Report Today Please look over your graded Unknown ID report. Most of the problems were...