Complexity of Decision Problems in Computational Logic Vincent Jug - - PowerPoint PPT Presentation

complexity of decision problems in computational logic
SMART_READER_LITE
LIVE PREVIEW

Complexity of Decision Problems in Computational Logic Vincent Jug - - PowerPoint PPT Presentation

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Complexity of Decision Problems in Computational Logic Vincent Jug X 2006 William Marsh Rice University Computer Science


slide-1
SLIDE 1

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion

Complexity of Decision Problems in Computational Logic

Vincent Jugé X 2006

William Marsh Rice University Computer Science Department

August 28, 2009

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-2
SLIDE 2

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Equivalence and Decidability Computational Complexity

Is the equivalence of two algorithms decidable ? In the general case, no :

Undecidability of the Halting Theorem.

In some particular cases, yes :

f : n → 0 f : n → 1

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-3
SLIDE 3

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Equivalence and Decidability Computational Complexity

How can we evaluate the computational complexity of a problem ? Look for lower bounds :

Evaluate the computational complexity of the problem for particular instances.

Look for upper bounds :

Find an algorithm solving the problem and evaluate its complexity.

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-4
SLIDE 4

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Datalog Programs Unfolding Trees Proof Trees Containment of Datalog Programs Automata

What is a Datalog program ? A set of Horn rules without function symbols. A goal predicate. Example of Datalog program Program Π : Z(X) ⇒ E(X) E(X) ∧ S(X, Y ) ⇒ O(Y ) O(X) ∧ S(X, Y ) ⇒ E(Y ) O(X) ⇒ O(X) Goal predicate : O.

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-5
SLIDE 5

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Datalog Programs Unfolding Trees Proof Trees Containment of Datalog Programs Automata

Datalog programs work on deductive databases D = ({0, 1, 2, 3}, {Z(0), S(0, 1), S(1, 2), S(2, 3)}) Π(D) = ({0, 1, 2, 3}, {Z(0), S(0, 1), S(1, 2), S(2, 3)})

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-6
SLIDE 6

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Datalog Programs Unfolding Trees Proof Trees Containment of Datalog Programs Automata

Datalog programs work on deductive databases D = ({0, 1, 2, 3}, {Z(0), S(0, 1), S(1, 2), S(2, 3)}) Π(D) = ({0, 1, 2, 3}, {Z(0), S(0, 1), S(1, 2), S(2, 3), E(0)})

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-7
SLIDE 7

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Datalog Programs Unfolding Trees Proof Trees Containment of Datalog Programs Automata

Datalog programs work on deductive databases D = ({0, 1, 2, 3}, {Z(0), S(0, 1), S(1, 2), S(2, 3)}) Π(D) = ({0, 1, 2, 3}, {Z(0), S(0, 1), S(1, 2), S(2, 3), E(0), O(1)})

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-8
SLIDE 8

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Datalog Programs Unfolding Trees Proof Trees Containment of Datalog Programs Automata

Datalog programs work on deductive databases D = ({0, 1, 2, 3}, {Z(0), S(0, 1), S(1, 2), S(2, 3)}) Π(D) = ({0, 1, 2, 3}, {Z(0), S(0, 1), S(1, 2), S(2, 3), E(0), O(1), O(1), E(2)})

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-9
SLIDE 9

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Datalog Programs Unfolding Trees Proof Trees Containment of Datalog Programs Automata

Datalog programs work on deductive databases D = ({0, 1, 2, 3}, {Z(0), S(0, 1), S(1, 2), S(2, 3)}) Π(D) = ({0, 1, 2, 3}, {Z(0), S(0, 1), S(1, 2), S(2, 3), E(0), O(1), O(1), E(2), O(3)})

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-10
SLIDE 10

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Datalog Programs Unfolding Trees Proof Trees Containment of Datalog Programs Automata

Datalog programs work on deductive databases D = ({0, 1, 2, 3}, {Z(0), S(0, 1), S(1, 2), S(2, 3)}) Π(D) = ({0, 1, 2, 3}, {Z(0), S(0, 1), S(1, 2), S(2, 3), E(0), O(1), O(1), E(2), O(3), O(3)})

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-11
SLIDE 11

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Datalog Programs Unfolding Trees Proof Trees Containment of Datalog Programs Automata

Datalog programs work on deductive databases D = ({0, 1, 2, 3}, {Z(0), S(0, 1), S(1, 2), S(2, 3)}) Π(D) = ({0, 1, 2, 3}, {Z(0), S(0, 1), S(1, 2), S(2, 3), E(0), O(1), O(1), E(2), O(3), O(3)}) Solutions of O(X) : {(1), (3)}.

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-12
SLIDE 12

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Datalog Programs Unfolding Trees Proof Trees Containment of Datalog Programs Automata

How can we prove that Π(D) contains a given atom ? By exhibiting proofs for this atom. Proof that O(3) is contained in Π(D) O(3), O(3) ⇒ O(3) ↓ O(3), E(2) ∧ S(2, 3) ⇒ O(3) ↓ E(2), O(1) ∧ S(1, 2) ⇒ E(2) ↓ O(1), E(0) ∧ S(0, 1) ⇒ O(1) ↓ E(0), Z(0) ⇒ E(0)

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-13
SLIDE 13

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Datalog Programs Unfolding Trees Proof Trees Containment of Datalog Programs Automata

How can we prove that Π(D) contains a given atom ? By exhibiting proofs for this atom. Proof that O(3) is contained in Π(D) O(3), O(3) ⇒ O(3) ↓ O(3), E(X) ∧ S(X, 3) ⇒ O(3) ↓ E(X), O(Y ) ∧ S(Y , X) ⇒ E(X) ↓ O(Y ), E(W ) ∧ S(W , Y ) ⇒ O(Y ) ↓ E(W ), Z(W ) ⇒ E(W )

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-14
SLIDE 14

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Datalog Programs Unfolding Trees Proof Trees Containment of Datalog Programs Automata

Problem We may use an unbounded number of variables. The proof of O(2n + 1) involves 2n + 1 variables. Solution We may re-use forgotten variables.

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-15
SLIDE 15

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Datalog Programs Unfolding Trees Proof Trees Containment of Datalog Programs Automata

Proof that O(3) is contained in Π(D) O(3), O(3) ⇒ O(3) ↓ O(3), E(2) ∧ S(2, 3) ⇒ O(3) ↓ E(2), O(1) ∧ S(1, 2) ⇒ E(2) ↓ O(1), E(0) ∧ S(0, 1) ⇒ O(1) ↓ E(0), Z(0) ⇒ E(0)

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-16
SLIDE 16

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Datalog Programs Unfolding Trees Proof Trees Containment of Datalog Programs Automata

Proof that O(3) is contained in Π(D) O(3), O(3) ⇒ O(3) ↓ O(3), E(X) ∧ S(X, 3) ⇒ O(3) ↓ E(X), O(Y ) ∧ S(Y , X) ⇒ E(X) ↓ O(Y ), E(W ) ∧ S(W , Y ) ⇒ O(Y ) ↓ E(W ), Z(W ) ⇒ E(W )

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-17
SLIDE 17

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Datalog Programs Unfolding Trees Proof Trees Containment of Datalog Programs Automata

Proof that O(3) is contained in Π(D) O(3), O(3) ⇒ O(3) ↓ O(3), E(X) ∧ S(X, 3) ⇒ O(3) ↓ E(X), O(Y ) ∧ S(Y , X) ⇒ E(X) ↓ O(Y ), E(X) ∧ S(X, Y ) ⇒ O(Y ) ↓ E(X), Z(X) ⇒ E(X)

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-18
SLIDE 18

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Datalog Programs Unfolding Trees Proof Trees Containment of Datalog Programs Automata

When are two Datalog programs A and B equivalent ? When A is contained in B :

When all the solutions of α(v) in A(D) are solutions of β(v) in B(D), for every finite database D.

When B is contained in A. How can we check that A is contained in B ? For every proof of an atom α(v), we must find a proof of β(v). We must find containment mappings.

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-19
SLIDE 19

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Datalog Programs Unfolding Trees Proof Trees Containment of Datalog Programs Automata

Containment : Example Program A Z(X) ⇒ E(X) E(X)∧S(X, Y ) ⇒ O(Y ) O(X)∧S(X, Y ) ⇒ E(Y ) O(X) ⇒ O(X) Goal predicate : O. Program B Z(X) ⇒ I(X) I(X) ∧ S(X, Y ) ⇒ I(Y ) I(X) ⇒ I(X) Goal predicate : I. Containment relations A is contained in B. B is not contained in A.

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-20
SLIDE 20

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Datalog Programs Unfolding Trees Proof Trees Containment of Datalog Programs Automata

Unfolding tree of A O(X), O(X) ⇒ O(X) ↓ O(X), E(Y ) ∧ S(Y , X) ⇒ O(X) ↓ E(Y ), O(V ) ∧ S(V , Y ) ⇒ E(Y ) ↓ O(V ), E(W )∧S(W , V ) ⇒ O(V ) ↓ E(W ), Z(W ) ⇒ E(W ) Unfolding tree of B I(X), I(X) ⇒ I(X) ↓ I(X), I(Y ) ∧ S(Y , X) ⇒ I(X) ↓ I(Y ), I(V ) ∧ S(V , Y ) ⇒ I(Y ) ↓ I(V ), I(W ) ∧ S(W , V ) ⇒ I(V ) ↓ I(W ), Z(W ) ⇒ I(W )

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-21
SLIDE 21

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Datalog Programs Unfolding Trees Proof Trees Containment of Datalog Programs Automata

How can we work on trees ? Words are recognized by word automata. Trees are recognized by tree automata. Different tree automata Top-down deterministic finite automata Top-down non-deterministic finite automata Bottom-up deterministic finite automata Bottom-up non-deterministic finite automata Two-way alternating finite automata TDDFA TDNDFA = BUDFA = BDNDFA = TWAFA

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-22
SLIDE 22

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Monadic Programs Decorated Trees Fix-Point Decorated Trees Automata and Certificates The Algorithm

What is a monadic program ? A program in which each internal IDB predicate is of arity 1. Example of monadic program Program B Z(X) ⇒ I(X) I(X) ∧ S(X, Y ) ⇒ I(Y ) I(X) ⇒ I(X) Goal predicate : I

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-23
SLIDE 23

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Monadic Programs Decorated Trees Fix-Point Decorated Trees Automata and Certificates The Algorithm

Decoration of a tree of A Identify the internal IDB predicates of B. Assume that some internal IDB predicates hold on some variables of the tree. Store the information

globally in unfolding trees. locally in proof trees.

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-24
SLIDE 24

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Monadic Programs Decorated Trees Fix-Point Decorated Trees Automata and Certificates The Algorithm

Example of decorated unfolding tree O(X), O(X) ⇒ O(X) ↓ O(X), E(Y ) ∧ S(Y , X) ⇒ O(X) ↓ E(Y ), O(V ) ∧ S(V , Y ) ⇒ E(Y ) ↓ O(V ), E(W ) ∧ S(W , V ) ⇒ O(V ) ↓ E(W ), Z(W ) ⇒ E(W )

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-25
SLIDE 25

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Monadic Programs Decorated Trees Fix-Point Decorated Trees Automata and Certificates The Algorithm

Example of decorated unfolding tree O(X), O(X) ⇒ O(X) ↓ O(X), E(Y ) ∧ S(Y , X) ⇒ O(X) ↓ E(Y ), O(V ) ∧ S(V , Y ) ⇒ E(Y ) ↓ O(V ), E(W ) ∧ S(W , V ) ⇒ O(V ) ↓ E(W ), Z(W ) ⇒ E(W ) IDB predicates : I. Assumed relations : I(X), I(Y ), I(V ), I(W ).

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-26
SLIDE 26

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Monadic Programs Decorated Trees Fix-Point Decorated Trees Automata and Certificates The Algorithm

Example of decorated proof tree O(X), O(X) ⇒ O(X) ↓ O(X), E(Y ) ∧ S(Y , X) ⇒ O(X) ↓ E(Y ), O(X) ∧ S(X, Y ) ⇒ E(Y ) ↓ O(X), E(Y ) ∧ S(Y , X) ⇒ O(X) ↓ E(Y ), Z(Y ) ⇒ E(Y )

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-27
SLIDE 27

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Monadic Programs Decorated Trees Fix-Point Decorated Trees Automata and Certificates The Algorithm

Example of decorated proof tree O(X), O(X) ⇒ O(X) ↓ O(X), E(Y ) ∧ S(Y , X) ⇒ O(X) ↓ E(Y ), O(X) ∧ S(X, Y ) ⇒ E(Y ) ↓ O(X), E(Y ) ∧ S(Y , X) ⇒ O(X) ↓ E(Y ), Z(Y ) ⇒ E(Y ) — I — I(X) — I — I(X), I(Y) — I — I(X), I(Y) — I — I(X), I(Y) — I — I(Y)

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-28
SLIDE 28

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Monadic Programs Decorated Trees Fix-Point Decorated Trees Automata and Certificates The Algorithm

What is a fix-point tree ? Nothing more is implied by the assumptions. There exists a least fix-point. Why are these trees important ? Equivalence between : A proof of P(X). The presence of P(X) in the least fix-point. The presence of P(X) in every fix-point.

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-29
SLIDE 29

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Monadic Programs Decorated Trees Fix-Point Decorated Trees Automata and Certificates The Algorithm

How can we recognize fix-point proof trees ? With automata : We search an infix-point certificate. The research fails when the tree is fix-point. How can we conclude over the containment ? With automata : We search a reaching-goal certificate. The research succeeds when a containment mapping exists.

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-30
SLIDE 30

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Monadic Programs Decorated Trees Fix-Point Decorated Trees Automata and Certificates The Algorithm

What is a certificate ? A mapping of variables : From the variables of a rule. To the variables of a tree. That stabilizes the body predicates. That does not stabilize the head predicate. How do we search certificates ? With top-down non-deterministic automata : We identify mapped variables in the current node. Unidentified variables are in one child sub-tree. We look for stabilized body predicates in the current node. We check if the head predicate of the rule was stabilized.

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-31
SLIDE 31

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Monadic Programs Decorated Trees Fix-Point Decorated Trees Automata and Certificates The Algorithm

Research of an infix-point certificate : Example IDB predicates : E, O. Rule : E(X) ∧ T(Y , Z) ∧ T(X, Y ) ⇒ O(Y ). Current sub-tree : G(Y ), U(Y ) ∧ H(Y ) ⇒ G(Y ) — E, O — E(Y) ↓ U(Y ), T(Y , Z)∧T(Z, W ) ⇒ U(Y ) E, O — E(Y) ↓ H(Y ), T(X, Y )⇒ H(Y ) E, O — E(Y),E(X)

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-32
SLIDE 32

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Monadic Programs Decorated Trees Fix-Point Decorated Trees Automata and Certificates The Algorithm

Research of an infix-point certificate : Example IDB predicates : E, O. Rule : E(X) ∧ T(Y , Z) ∧ T(X, Y ) ⇒ O(Y ). Current sub-tree : G(Y ), U(Y ) ∧ H(Y ) ⇒ G(Y ) — E, O — E(Y),O(Y) ↓ U(Y ), T(Y , Z)∧T(Z, W ) ⇒ U(Y ) E, O — E(Y), O(Y) ↓ H(Y ), T(X, Y )⇒ H(Y ) E, O — E(Y),E(X), O(Y)

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-33
SLIDE 33

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Monadic Programs Decorated Trees Fix-Point Decorated Trees Automata and Certificates The Algorithm

We build automata checking whether the tree Is a decorated prof tree. Contains an infix-point certificate. Contains a reaching-goal certificate. A is contained in B when every decorated proof tree of A Contains an infix-point certificate. Contains a reaching-goal certificate.

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-34
SLIDE 34

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Monadic Programs Decorated Trees Fix-Point Decorated Trees Automata and Certificates The Algorithm

We proceed by Union of automata. Complementation of automata. Intersection of automata. Emptiness-checking of automata. Complexity of the algorithm 2EXPTIME in the sizes of A and B

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-35
SLIDE 35

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Transitive Programs Labelled Proof Trees Fix-Point Labelled Proof Trees Automata The Algorithm

What is a transitive program ? A program with recursion through transitive closure only. Example of transitive program Program C ⊤ ⇒ S∗(X, X) S(X, Y ) ∧ S∗(Y , Z) ⇒ S∗(X, Z) Z(X) ∧ S∗(X, Y ) ⇒ I(Y ) Goal predicate : I

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-36
SLIDE 36

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Transitive Programs Labelled Proof Trees Fix-Point Labelled Proof Trees Automata The Algorithm

Diamond reduction Non-recursive program with New EDB diamond predicates. New diamond rules. Rules ⊤ ⇒ S∗(X, X) are erased. Rules S(X, Y ) ∧ S∗(Y , Z) ⇒ S∗(X, Z) are replaced by diamond rules.

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-37
SLIDE 37

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Transitive Programs Labelled Proof Trees Fix-Point Labelled Proof Trees Automata The Algorithm

Twelve diamond rules

1 S(X, X1) ∧ S⋄(X1, X2) ∧ S(X2, X3) ∧ S⋄(X3, X4) ∧ S(X4, Y ) ⇒ S∗(X, Y ) 2 S(X, X1) ∧ S⋄(X1, X2) ∧ S(X2, X3) ∧ S⋄(X3, Y ) ⇒ S∗(X, Y ) 3 S(X, X1) ∧ S⋄(X1, X2) ∧ S⋄(X2, X3) ∧ S(X3, Y ) ⇒ S∗(X, Y ) 4 S(X, X1) ∧ S⋄(X1, X2) ∧ S⋄(X2, Y ) ⇒ S∗(X, Y ) 5 S⋄(X, X1) ∧ S(X1, X2) ∧ S⋄(X2, X3) ∧ S(X3, Y ) ⇒ S∗(X, Y ) 6 S⋄(X, X1) ∧ S(X1, X2) ∧ S⋄(X2, Y ) ⇒ S∗(X, Y ) 7 S⋄(X, X1) ∧ S⋄(X1, X2) ∧ S(X2, Y ) ⇒ S∗(X, Y ) 8 S⋄(X, X1) ∧ S⋄(X1, Y ) ⇒ S∗(X, Y ) 9 S(X, X1) ∧ S⋄(X1, X2) ∧ S(X2, Y ) ⇒ S∗(X, Y ) 10 S(X, X1) ∧ S⋄(X1, Y ) ⇒ S∗(X, Y ) 11 S⋄(X, X1) ∧ S(X1, Y ) ⇒ S∗(X, Y ) 12 S⋄(X, Y ) ⇒ S∗(X, Y ) Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-38
SLIDE 38

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Transitive Programs Labelled Proof Trees Fix-Point Labelled Proof Trees Automata The Algorithm

Labelling of a proof tree Select atoms of an unfolding tree of the diamond reduction. Map variables of these atoms to variables of the current node. Build a logical formula from this set and this mapping. Store the couple (Set of atoms, Associated mapping) locally. Store locally a set a such couples. Example of formula Current node : I(X), S(Y , X) ∧ I(Y ) ⇒ I(X) Set of atoms : {S⋄(X, Y ), S(Y , Z)} Mapping : X → X, Y → Y , Z → Z Logical formula :

  • ∃Z

S∗(X, Y ) ∧ S(Y , Z)

  • Vincent Jugé

Complexity of Decision Problems in Computational Logic

slide-39
SLIDE 39

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Transitive Programs Labelled Proof Trees Fix-Point Labelled Proof Trees Automata The Algorithm

Example of labelled proof tree I(X), I(X) ⇒ I(X) ↓ I(X), I(Y ) ∧ S(Y , X) ⇒ I(X) ↓ I(Y ), Z(Y ) ⇒ I(Y )

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-40
SLIDE 40

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Transitive Programs Labelled Proof Trees Fix-Point Labelled Proof Trees Automata The Algorithm

Example of labelled proof tree I(X), I(X) ⇒ I(X) ↓ I(X), I(Y ) ∧ S(Y , X) ⇒ I(X) ↓ I(Y ), Z(Y ) ⇒ I(Y ) {({S⋄(X, Y ), S(Y , Z)}, {X → X, Y → Y , Z → Z})} {({S⋄(X, Y ), S(Y , Z)}, {X → X, Y → Y , Z → Z})} {({S⋄(X, Y ), S(Y , Z)}, {X → X, Y → Y , Z → Z})}

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-41
SLIDE 41

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Transitive Programs Labelled Proof Trees Fix-Point Labelled Proof Trees Automata The Algorithm

What is a fix-point labelled proof tree ? The stored formulæ do not imply directly other formulæ. There exists a least fix-point. Why are these trees important ? Equivalence between : A proof of β(v). The presence of β(v) in the root of the least fix-point. The presence of β(v) in the root of every fix-point.

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-42
SLIDE 42

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Transitive Programs Labelled Proof Trees Fix-Point Labelled Proof Trees Automata The Algorithm

What is a direct implication ?

1 If ϕ is true in a neighbour node, ϕ is true. 2 If ϕ1 ∧ ϕ2 is true, ϕ1 is true. 3 If ϕ1 and ϕ2 are true, ϕ1 ∧ ϕ2 is true. 4 If ϕ is true, (∃v) (ϕ) is true. 5 If (∃v) (ϕ1 ∧ ϕ2) is true and ϕ2 ⇒ ϕ3 is a rule,

(∃v) (ϕ1 ∧ ϕ2 ∧ ϕ3) is true.

6 If ϕ is an EDB atom of the current node, ϕ is true. 7 If (∃v) (ϕ) is true, (∃v) (ϕ ∧ S∗(x, x)) is true. 8 If (∃v) (ϕ ∧ S(x, y)) is true, (∃v) (ϕ ∧ S∗(x, y)) is true. 9 If (∃v) (ϕ ∧ S∗(x, y) ∧ S∗(y, z)) is true, (∃v) (ϕ ∧ S∗(x, z)) is

true.

10 ⊤ is true. Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-43
SLIDE 43

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Transitive Programs Labelled Proof Trees Fix-Point Labelled Proof Trees Automata The Algorithm

How do we recognize fix-point labelled proof trees ? With top-down non-deterministic automata : We select a direct implication rule. We select one or two true formulæ stored in the node. We compute the implied formula. We verify that this formula is stored in the node. How can we conclude over the containment ? With automata : The goal formula β(v) is stored in the root when a containment mapping exists.

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-44
SLIDE 44

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion Transitive Programs Labelled Proof Trees Fix-Point Labelled Proof Trees Automata The Algorithm

We build an automaton checking whether the tree Is a fix-point labelled prof tree. Does not store the goal formula β(v) in its root. A is contained in B when every labelled proof tree of A Stores the goal formula β(v) in its root. We proceed by Emptiness-checking of automata. Complexity of the algorithm 3EXPTIME in the sizes of A and B

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-45
SLIDE 45

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion

We already knew The decidability of the containment problem in monadic and transitive programs. Algorithms of non-elementary complexity. I found An algorithm deciding the containment in monadic programs in 2EXPTIME. An algorithm deciding the containment in transitive programs in 3EXPTIME. We still have to Find lower bounds for the containment problems. Search algorithms deciding directly the equivalence problems.

Vincent Jugé Complexity of Decision Problems in Computational Logic

slide-46
SLIDE 46

Introduction Datalog, Trees, Automata Containment in Monadic Programs Containment in Transitive Programs Conclusion

Questions ?

Vincent Jugé Complexity of Decision Problems in Computational Logic