Expressiveness and Complexity of a Graph Logic

Similar documents
Finite Model Theory and Its Applications


( A(x) B(x) C(x)) (A(x) A(y)) (C(x) C(y))

A Retrospective on Datalog 1.0

Graph algorithms based on infinite automata: logical descriptions and usable constructions

LTCS Report. Concept Descriptions with Set Constraints and Cardinality Constraints. Franz Baader. LTCS-Report 17-02

A. Arratia Program Schemes 1. Program Schemes. Reunión MOISES, 3 Septiembre Argimiro Arratia. Universidad de Valladolid

Logic in Algorithmic Graph Structure Theory

On Seese s Conjecture. Bruno Courcelle. Université Bordeaux 1, LaBRI

Expressive Power and Abstraction in Essence

Tree Decompositions Why Matroids are Useful

An Optimal Lower Bound on the Number of Variables for Graph Identification

More on Polynomial Time and Space

Programming with Dependent Types Interactive programs and Coalgebras

Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.

Parity games and the automaticity of. M. K. Lehtinen Pembroke College

QCSP on semicomplete digraphs

Discrete Mathematics SECOND EDITION OXFORD UNIVERSITY PRESS. Norman L. Biggs. Professor of Mathematics London School of Economics University of London

Finite model theory studies the expressive power of logical languages over collections of finite structures. Over the past few decades, deep

PART 1 GRAPHICAL STRUCTURE

Unification in Maude. Steven Eker

PSPACE Problems. The Class PSPACE. PSPACE Problems are interesting since: They form the first interesting class potentially

COMPUTATIONAL SEMANTICS WITH FUNCTIONAL PROGRAMMING JAN VAN EIJCK AND CHRISTINA UNGER. lg Cambridge UNIVERSITY PRESS

Universes. Universes for Data. Peter Morris. University of Nottingham. November 12, 2009

Inductive Synthesis. Neil Immerman. joint work with Shachar Itzhaky, Sumit Gulwani, and Mooly Sagiv

The Resolution Width Problem is EXPTIME-Complete

Structural Characterizations of Schema-Mapping Languages

Reasoning about normative update

Formal Methods in Software Engineering 1

Exercises Computational Complexity

USING QBF SOLVERS TO SOLVE GAMES AND PUZZLES. Zhihe Shen. Advisor: Howard Straubing

Compositional Software Model Checking

Online Ramsey Theory

On the Recognizability of Arrow and Graph Languages

XPath with transitive closure

Technical Report. Parameterized complexity of distances to sparse graph classes. Jannis Bulian. Number 903. February Computer Laboratory

Definability equals recognizability for graphs of bounded treewidth

This is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS

Introduction to Finite Model Theory. Jan Van den Bussche Universiteit Hasselt

Guarded Negation in query languages

Verifying Liveness Properties of ML Programs

Graph Query Verification using Monadic 2 nd -Order Logic

Decision Procedures for Recursive Data Structures with Integer Constraints

Composing Schema Mapping

Algorithmic graph structure theory

Higher-Order Model Checking

Perfect Matching Conjectures and Their Relationship to P NP

CS6382 Theory of Computation. Spring Homework #3

Easier Ways to Win Logical Games Ronald Fagin

Efficiently Reasoning about Programs

Journal of Computer and System Sciences

Semantics and Pragmatics of NLP

Logic and Databases. Phokion G. Kolaitis. UC Santa Cruz & IBM Research - Almaden

Structural characterizations of schema mapping languages

FIRST-ORDER QUERY EVALUATION ON STRUCTURES OF BOUNDED DEGREE

Decidable Verification of Uninterpreted Programs

Model Checking I Binary Decision Diagrams

We ve studied the main models and concepts of the theory of computation:

Semantics and Pragmatics of NLP Propositional Logic, Predicates and Functions

Part 1 Beauty Definitions Concepts Proofs Experiences. Hamming Seminar. Leonid Libkin. 24 October Leonid Libkin Hamming Seminar 1/59

with Dana Richards December 1, 2017 George Mason University New Results On Routing Via Matchings Indranil Banerjee The Routing Model

CMPS 277 Principles of Database Systems. Lecture #4

Games, Puzzles & Computation

A Game-Theoretic Approach to Constraint Satisfaction

A Survey on Graph Automata and Tree-Width

Course on Probabilistic Methods in Concurrency. (Concurrent Languages for Probabilistic Asynchronous Communication) Lecture 1

Foundations of Databases

Foundations of SPARQL Query Optimization

On the Hardness of Counting the Solutions of SPARQL Queries

CS 151 Complexity Theory Spring Final Solutions. L i NL i NC 2i P.

Finding a winning strategy in variations of Kayles

Craig Interpolation Theorems and Database Applications

Counting multiplicity over infinite alphabets

An IPS for TQBF Intro to Approximability

RIF RuleML Rosetta Ring: Round-Tripping the Dlex Subset of Datalog RuleML and RIF-Core

PCP and Hardness of Approximation

Behavior models and verification Lecture 6

Typed Lambda Calculus

1 Undirected Vertex Geography UVG

Typed Lambda Calculus for Syntacticians

Contents. Chapter 1 SPECIFYING SYNTAX 1

Substitution in Structural Operational Semantics and value-passing process calculi

CSE200: Computability and complexity Interactive proofs

Gang Tan, Boston College Andrew W. Appel, Princeton University

CS 512, Spring 2017: Take-Home End-of-Term Examination

Monitoring Interfaces for Faults

SAT-CNF Is N P-complete

A Parametrized Algorithm for Matroid Branch-Width

Streaming Tree Transducers

The Complexity of Data Exchange

Foundations of Schema Mapping Management

Good Will Hunting s Problem: Counting Homeomorphically Irreducible Trees

4. (a) Draw the Petersen graph. (b) Use Kuratowski s teorem to prove that the Petersen graph is non-planar.

Functional programming languages

Mutation-linear algebra and universal geometric cluster algebras

Chordal deletion is fixed-parameter tractable

Schema Mappings and Data Exchange

XPath from a Logical Point of View

Blocking Combinatorial Games

15-819M: Data, Code, Decisions

Transcription:

1 Expressiveness and Complexity of a Graph Logic (Cambridge) joint work with Philippa Gardner (Imperial College) and Giorgio Ghelli (Pisa)

2 A View of Process Algebras A term algebra T given by a functional syntax. A structural congruence on terms. A reduction or evaluation relation. One can also consider a logic for specifying and reasoning about properties of terms. The logic should be invariant under the structural congruence.

3 Graph Algebra Corradini, Montanari and Rossi (1994) introduced a term language for describing graph structured data. G ::= nil a(x, y) G G (local x)g where x, y X a set of node names, and a A a set of edge labels.

4 a(x, y) b(y, x) Examples PSfrag replacements y b x (local y)(a(x, y)) b(y, x) PSfrag replacements y a a b x

5 Structural Congruence The structural congruence is the least congruence closed with respect to and local and satisfying: G nil G (G 1 G 2 ) G 3 G 1 (G 2 G 3 ) G 1 G 2 G 2 G 1 (local x)(local y)g (local y)(local x)g (local x)(g 1 G 2 ) (local x)g 1 G 2 x fn(g 2 ) (local x)nil nil (local x)g (local y)g{y/x}, y fn(g)

6 Variations This structural congruence, given by Cardelli, Gardner and Ghelli (2001) corresponds to isomorphism under a multiset interpretation. a(x, y) a(x, y) is a graph with two edges. Other variations allow an interpretation without multiple edges, or one where structural congruence corresponds to bisimulation Buneman, Davidson, Hillebrand and Suciu (1996).

7 Graph Structures Alternatively, a graph structure is given as: where, (V E A, edge, src : X V ) V is a finite set of vertices, E a finite set of edges and A a finite set of labels. X is a set of names. edge : E A V V associates with each edge a label and a source and destination vertex. src associates a distinct vertex with each name in X.

8 Graph Logic The formulas of the graph logic of Cardelli, Gardner and Ghelli are built up from a set X of node names, a set A of label names, a set V X of node variables, a set V A of label variables and a set V R of relational variables (each with an associated arity) by the following rules:

9 Graph Logic (contd.) nil true α(ξ 1, ξ 2 ) ξ 1 = ξ 2, α 1 = α 2 φ ψ φ ψ, φ x.φ, a.φ α A V A, ξ i X V X α i A V A, ξ i X V X x V X, a V A R( ξ) R V R (µ R, x )φ( ξ) R positive in φ

10 Semantics G = σ nil iff G nil G = σ α(ξ 1, ξ 2 ) iff G σα(σξ 1, σξ 2 ). G = σ (φ ψ) iff G G 1 G 2 and G 1 = σ φ and G 2 = σ ψ. µ is a standard least fixed point operator.

11 Expressiveness and Complexity Combined (or model-checking) complexity: What is the complexity of the satisfaction relation G = φ? Data complexity: Associate with each formula φ, the set G φ = {G G = φ}. How complex can these sets be? What is the relation between the expressive power of this logic and other standard logics: second-order logic, MSO, LFP?

12 Monadic Second-Order Logic We define the monadic second-order logic of graphs by: edge(e, α, ξ 1, ξ 2 ); e 1 = e 2 ; α 1 = α 2 ; ξ 1 = ξ 2 ; φ ψ; φ. x.φ; a.φ; e.φ; X(e); X.φ; where X is a set variable ranging over sets of edges. This is closely related to the monadic second-order logic of graphs studied by Courcelle.

13 MSO If we consider the fragment of Cardelli et al. s graph logic without the least fixed point operator, we have an easy translation into MSO. The key step is (φ ψ) = X.[(φ ) X (ψ ) X ]

14 Complexity of Second-Order Logic We know: (by Fagin and Stockmeyer): A property of graphs is definable in existential second-order logic if, and only if, it is decidable in NP, and in second-order logic if, and only if, it is decidable in the polynomial hierarchy. Monadic second-order logic can express complete problems at every level of the polynomial hierarchy. There are problems of very low computational complexity that are not definable in MSO. The combined complexity of second-order logic is EXPTIME-complete, while that of MSO is PSPACE-complete.

15 Complexity of Graph Logic The translation into MSO gives us upper bounds on the complexity of graph logic (without fixed points): For any formula φ of graph logic, the class of graphs G φ is in the polynomial hierarchy. The combined complexity of graph logic is in PSPACE. We prove corresponding hardness results: Graph logic can express complete problems at every level of the polynomial hierarchy. The combined complexity of graph logic is PSPACE-complete.

16 Separating from MSO Conjecture: There are graph properties definable in MSO that are not definable in the graph logic (without fixed points). Candidates: 3-colourability, Hamiltonicity. We need techniques for proving these are not definable.

17 Games We define an Ehrenfeucht-style game for the graph logic. We associate with each formula φ, its rank (r, s, t) where r is the nesting depth of, s is the nesting depth of label quantifiers and t is the nesting depth of node quantifiers in φ. The two players, Spoiler and Duplicator, play a game of rank (r, s, t) on a board which consists of two graphs G 1, G 2 each with markers a 1,..., a m on some of the labels and p 1,..., p l on some of the nodes.

18 Games (contd.) Three kinds of move: node move label move decomposition move Spoiler wins at rank (0, 0, 0) only if G 1 and G 2 each consist of a single edge, and are isomorphic.

19 Evenness For each n, let S n be the graph on n + 1 nodes {c, v 1,..., v n } with n edges {e 1,..., e n } where e i has the label a and connects c with v i. For each k, and for all n, n > k2 k Duplicator has a winning strategy in the game played on S n and S n rank (k, k, k). with There is no formula in the graph logic without recursion which expresses the property of having an even number of edges (or nodes).

20 Strings PSfrag replacements Treating strings as a special kind of graph a b a We know that a language is expressible in MSO if, and only if, it is regular. We show that every regular language is definable in the graph logic.

21 Regular Languages We can write a formula that asserts that a graph is a string and one that asserts that a graph is a disjoint collection of strings. G is a string in L 1 ; L 2 if there is a node x and a decomposition of G into two strings G 1 and G 2 with x the final node of G 1 and the initial node of G 2 and G 1 is a string in L 1 and G 2 is a string in L 2. G is a string in L if there is a decomposition of G into two graphs, each of which is a set of strings, with each string being in L.

22 Recursion and Linear Composition The fixed point operator, when combined with greatly increases the complexity of the logic. A simpler logic was proposed which allows only linear composition. φ. ψ with G = φ. ψ if, and only if: G G 1 G 2 G 1 = φ and G 2 = ψ and G 1 consists of a single edge.

23 Recursion with Linear Composition Linear composition appears to be a first order operation. A formula with only linear composition and no fixed-points can be translated into a first-order formula. However, the logic with linear composition and the fixed-point operator is far more expressive than LFP. In particular: we can express evenness; we can express NP-complete problems.