QCSP on semicomplete digraphs

Similar documents
Posets, graphs and algebras: a case study for the fine-grained complexity of CSP s

A Retrospective on Datalog 1.0

Polymorphisms of small digraphs, and the complexity of CSP

Testing assignments to constraint satisfaction problems

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

Efficient Enumeration Algorithms for Constraint Satisfaction Problems

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution

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

Lecture 7: Counting classes

arxiv: v1 [cs.db] 23 May 2016

Endomorphisms and synchronization, 2: Graphs and transformation monoids

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

arxiv: v2 [cs.ds] 30 Jan 2018

NP-Completeness. Algorithms

Schema Mappings and Data Exchange

W4231: Analysis of Algorithms

Endomorphisms and synchronization, 2: Graphs and transformation monoids. Peter J. Cameron

PART 1 GRAPHICAL STRUCTURE

The Inverse of a Schema Mapping

Feedback Arc Set in Bipartite Tournaments is NP-Complete

Module 11. Directed Graphs. Contents

Unifying and extending hybrid tractable classes of CSPs

Where Can We Draw The Line?

P and NP (Millenium problem)

Boolean Functions (Formulas) and Propositional Logic

NP-Completeness of 3SAT, 1-IN-3SAT and MAX 2SAT

Vertex Cover is Fixed-Parameter Tractable

Towards a Logical Reconstruction of Relational Database Theory

CMPSCI611: The SUBSET-SUM Problem Lecture 18

Minimal-Change Integrity Maintenance Using Tuple Deletions

9.1 Cook-Levin Theorem

Structures with lots of symmetry

Linear Time Unit Propagation, Horn-SAT and 2-SAT

Complexity Classes and Polynomial-time Reductions

Binary Decision Diagrams

6c Lecture 3 & 4: April 8 & 10, 2014

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

context. (Similarly, we write ν for ν(g), etc. if there is no risk of confusion.) For a subset A V we write N G (A) = {v V ( w A)(v w)} (the set of

NP and computational intractability. Kleinberg and Tardos, chapter 8

Colourings, Homomorphisms, and Partitions of Transitive Digraphs

SAT-CNF Is N P-complete

PCP and Hardness of Approximation

Expressive Power and Abstraction in Essence

Propositional Logic Formal Syntax and Semantics. Computability and Logic

Expressiveness and Complexity of a Graph Logic

NP-Hardness. We start by defining types of problem, and then move on to defining the polynomial-time reductions.

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

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

Reductions and Satisfiability

Computability Theory

W[1]-hardness. Dániel Marx. Recent Advances in Parameterized Complexity Tel Aviv, Israel, December 3, 2017

The complexity of homomorphisms of signed graphs and signed constraint satisfaction

CSC Discrete Math I, Spring Sets

Structural characterizations of schema mapping languages

Chapter 4. Relations & Graphs. 4.1 Relations. Exercises For each of the relations specified below:

1 Definition of Reduction

A Game-Theoretic Approach to Constraint Satisfaction

The Complexity of Data Exchange

8.1 Polynomial-Time Reductions

On Detecting Global Predicates in Distributed Computations

Th(N, +) is decidable

NP versus PSPACE. Frank Vega. To cite this version: HAL Id: hal

A Simple, but NP-Hard, Motion Planning Problem

Online Ramsey Theory

Complexity of the Game Domination Problem

Counting multiplicity over infinite alphabets

CSE101: Design and Analysis of Algorithms. Ragesh Jaiswal, CSE, UCSD

NP-complete Reductions

The Satisfiability Problem [HMU06,Chp.10b] Satisfiability (SAT) Problem Cook s Theorem: An NP-Complete Problem Restricted SAT: CSAT, k-sat, 3SAT

Recitation 4: Elimination algorithm, reconstituted graph, triangulation

LOGIC AND DISCRETE MATHEMATICS

Excellent graphs Preethi Kuttipulackal Mixed Tree Domination in Graphs Thesis. Department of Mathematics, University of Calicut, 2012

Math 170- Graph Theory Notes

Solving Quantified Constraint Satisfaction Problems

Topology and Topological Spaces

Final Test in MAT 410: Introduction to Topology Answers to the Test Questions

Minimum Cost Edge Disjoint Paths

Solving quantified constraint satisfaction problems

Safe Stratified Datalog With Integer Order Does not Have Syntax

Lecture 10 October 7, 2014

Proseminar on Semantic Theory Fall 2013 Ling 720 An Algebraic Perspective on the Syntax of First Order Logic (Without Quantification) 1

The NP-Completeness of Some Edge-Partition Problems

Definition: A context-free grammar (CFG) is a 4- tuple. variables = nonterminals, terminals, rules = productions,,

Unit 8: Coping with NP-Completeness. Complexity classes Reducibility and NP-completeness proofs Coping with NP-complete problems. Y.-W.

Going beyond propositional logic

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

Part I Logic programming paradigm

View-based query processing: On the relationship between rewriting, answering and losslessness

Introduction III. Graphs. Motivations I. Introduction IV

Characterizing Graphs (3) Characterizing Graphs (1) Characterizing Graphs (2) Characterizing Graphs (4)

Exercises Computational Complexity

9. Parameter Treewidth

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Algorithms For Inference Fall 2014

Chapter 8. NP and Computational Intractability. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

Range and Roots: Two Common Patterns for Specifying and Propagating Counting and Occurrence Constraints

On the Balanced Case of the Brualdi-Shen Conjecture on 4-Cycle Decompositions of Eulerian Bipartite Tournaments

Solutions for the Exam 6 January 2014

Trees. 3. (Minimally Connected) G is connected and deleting any of its edges gives rise to a disconnected graph.

The Encoding Complexity of Network Coding

Finite Model Generation for Isabelle/HOL Using a SAT Solver

Transcription:

QCSP on semicomplete digraphs Petar -Dapić 1, Petar Marković 1 and Barnaby Martin 2 1 University of Novi Sad, Serbia 2 Middlesex University, London, UK Szeged, November 2015 Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 1 / 28

A cheat sheet in Logic We fix an only relational language when speaking logic here. A positive Horn formula is a formula in the prenex form (quantifiers are preceded only by quantifiers and their scope is until the end of the formula), such that the unquantified part is just a conjunction of atomic formulas. The graph of a positive Horn formula ϕ is the relational structure V on the set of variables V used in the formula, where R V is the set of all tuples x such that R(x) occurs as part of the formula ϕ. Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 2 / 28

[Quantified] Constraint Satisfaction Problem - definition Definition Let A be a finite relational structure. The decision problem QCSP(A) takes as input any first order sentence in prenex form such that the unquantified part is a conjunction of atoms. The accepted sentences are the ones which hold true in A. Definition The problem CSP(A) additionally stipulates that sentences are using only existential quantifiers. CSP(A) is at worst NP-complete, while QCSP(A) is at worst Pspace-complete (for polynomial time many-one reductions). Applications in non-monotonic reasoning and planning, yadda, yadda. Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 3 / 28

A Galois connection An operation compatible with all relations of the relational structure A is a polymorphism of A. All polymorphisms of A form the clone Pol(A). The subset of surjective polymorphisms is denoted as s Pol(A). A relation compatible with all operations of an algebra A is an invariant relation (or subalgebra of power, subpower) of A. The set of all subpowers of A is the relational clone Inv(A). Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 4 / 28

Chen s collapsibility and switchability The collapsibility given below is not the original definition, but an equivalent over idempotent finite algebras: Definition (Collapsibility) An algebra A is k-collapsible if for all n > k, A n is generated by the set of all n-tuples in which there are at least n k coordinates which are equal. Definition (Switch) A tuple (a 1,..., a n ) A n has a switch at i if a i 1 a i. Definition (Switchability) An algebra A is k-switchable if for all n > k, A n is generated by the set of all n-tuples with at most k switches. A is switchable if it is k-switchable for some k. Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 5 / 28

PGP and EGP The central notions to Chen s approach to QCSP are PGP and EGP. Definition (PGP and EGP) A finite algebra A has polynomially generated powers (PGP) if there exists a polynomial p(x) such that for all n, A n is generated by some set of tuples with at most p(n) elements. A has exponentially generated powers (EGP) if there exists a constant c > 0 such that for almost all n, any generating set of A n has more than 2 cn elements. Theorem (Zhuk 2015) Let A be a finite algebra. Then either A is switchable, or A has EGP. It is easy to show that collapsibility implies switchability, which implies PGP. So the above theorem gives a dichotomy between PGP and EGP for finite algebras. Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 6 / 28

Applications to QCSP Theorem (Chen) Let A be a finite idempotent algebra. Switchability of A implies that QCSP (A) reduces to CSP (A) for any relational structure A which consists of relations in Inv(A). HOWEVER: Example [Zhuk] There exists a finite relational structure A such that QCSP(A) is in P, while the algebra Pol(A) has EGP. Also, Martin and Zhuk (2015) proved that on three-element idempotent algebras which have no type 1 covers, finite relatedness and switchability imply collapsibility. They conjecture that the same holds for all idempotent algebras. Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 7 / 28

Algebraic approach - theorems Theorem (Jeavons, 1998) If Pol(Γ 1 ) Pol(Γ 2 ) and Γ 2 is finite, then CSP(Γ 2 ) logspace-reduces to CSP(Γ 1 ). Theorem (BBCJK, 2009) If s Pol(Γ 1 ) s Pol(Γ 2 ) and Γ 2 is finite, then QCSP(Γ 2 ) logspace-reduces to QCSP(Γ 1 ) Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 8 / 28

Algebraic approach - practicalities Problems with the analogy: s Pol(A) is not a clone; no reduction to cores (important!); we do not have a Mal cev characterization of the nice class, or expect one. Good thing that we know complete graphs with 3 vertices are Pspace-complete for QCSP (a reduction from Q-NAE-3-SAT in BBCJK), which implies: Theorem (BBCJK, 2009) If s Pol(A) consists only of essentially unary operations and A is finite, then QCSP(A) is Pspace-complete. Idea of the proof: all polymorphisms of a complete graph are essentially unary and they are the clone generated by all permutations of the universe. Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 9 / 28

The importance of being a core (O. Wilde) When the structure A is a core, then s Pol(A) = Pol(A) (for f Pol(A), just look at f (x, x,..., x) and it better be surjective), so s Pol(A) is a clone. Essentially unary polymorphisms are permutations of a variable. So, for a core structure A, all surjective polymorphisms are essentially unary iff all polymorphisms are essentially unary iff the only idempotent polymorphism is the identity. That last bit: use g(x) := f (x, x,..., x) and then f := g n! 1 f is an idempotent operation of the same essential arity as f (where A = n). Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 10 / 28

Semicomplete digraphs Definition A digraph is semicomplete if it is irreflexive and any two distinct vertices are connected by at least one directed edge. Why semicomplete? You gotta start someplace (Bang-Jensen, Hell and MacGillivray, 1988); Barny Martin posed the problem in Dagstuhl 2012; Why really semicomplete? They are easy (= cores), and have no weak nus (except for the tractable few), They are even easier: sinks are hit by everybody and sources hit everybody, which helps with dealing with, They are EVEN easier: when in trouble deduce that there s a loop and you ve got a contradiction. Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 11 / 28

The result Theorem Let G be a semicomplete digraph. Then Either G has at most one cycle, in which case QCSP(G) is tractable, or G has at least two cycles, a source and a sink, in which case QCSP(G) is NP-complete, or G has at least two cycles, but not both a source and a sink, in which case QCSP(G) is Pspace-complete. Proof took 50+ pages (and I said it was easy). We are not very smart. That is as it should be at this stage of the game. Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 12 / 28

Tractable and NP-complete cases When there exists both a source and a sink, universal quantification (except formal) implies failure of the formula, so QCSP reduces to CSP. K 2 and C 3 have majority polymorphisms, and thus are tractable by BBCJK. Then we prove that QCSP(K j+1 2 ) reduces to QCSP(K j 2 ) and similarly for QCSP(C j+1 3 ) and QCSP(C j 3 ). Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 13 / 28

The Good Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 14 / 28

The Good This is the case when we reduce from smooth but not strongly connected to strongly connected case. Take a polymorphism which acts on each strong component which is not a cycle as a projection and prove it is a projection on the smooth digraph with more than one strong component. Not much to say, mostly straightforward. Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 15 / 28

The Ugly Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 16 / 28

The Ugly It is the strongly connected case. Here we prove that the only strongly connected semicomplete digraphs with nontrivial idempotent polymorphisms are K 2 and C 3. We first prove it for the locally transitive (strongly connected) tournaments. Next we deal with the semicomplete digraphs which are obtained from strongly connected locally transitive tournaments by blowing up each vertex into a semicomplete graph. We call these P-graphs. (This bit we can shorten and will before the result is published). Finally, we deal with the remaining cases, which is painfully long and requires several ideas. Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 17 / 28

The Bad Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 18 / 28

The Bad Assume that a semicomplete digraph has more than one cycle and a sink, but no sources. Here we don t have only essentially unary polymorphisms, though we don t have a weak nu, either. We reduce to a single-sink extension of a smooth semicomplete digraph. Then we find a semicomplete digraph G which is also a single-sink extension of a smooth semicomplete digraph, and such that s pol(g) s Pol(G), but this one has either a pp-definable subgraph K n where n > 2, or a pp-definable subgraph K 2 2, or a pp-definable subgraph T n, where n > 2. Here K 2 2 := a copy of K 2 beats another copy of K 2, while T n := n; < {(n 1, 0)}. Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 19 / 28

The Bad, Part II So we are forced to prove that QCSP(K n ), where n > 2, QCSP(K 2 2 ) and QCSP(T n ), where n > 2, are all Pspace-complete. And here we ran out of polymorphism ideas. So we proved it directly by reducing to known Pspace-complete problems via gadgets and similar complexity-theoretic ideas. Actually, the first was proved to be Pspace-complete by (BBCJK, 2009), and we did the other two. The first two admit reductions from QNAE3 SAT, while the last one admits a reduction from Q 1 in 3 SAT. Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 20 / 28

PGP/EGP Also, we note that the polymorphism algebras of semicomplete digraphs with PSPACE-complete QCSP have EGP, while polymorphism algebras of semicomplete digraphs with QCSP in the class NP have PGP. Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 21 / 28

We prove a part of the Bad part We reduce Q-NAE-3-SAT to QCSP(K 2 2 ). 3 2 0 1 Figure : K 2 2 First we define the edge gadget which combines two copies of K 2 2 : x 3 x 2 y 3 y 2 x 0 x 1 y 0 y 1 Figure : Edge gadget Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 22 / 28

On the edge gadget Note that none of x i, y j is a sink so they can t evaluate as the sink. Variables arranged in a copy of K 2 2 (e. g. all x i ) evaluate into K 2 2 correctly iff the mapping from indices into values represents one of the four automorphisms of K 2 2. There exists a way to evaluate the two variables in the middle of the edge gadget iff the copies of K 2 2 to the the left and to the right of them evaluate as different automorphisms of K 2 2. Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 23 / 28

Clause gadget x 3 x 2 y 3 y 2 z 3 z 2 x 0 x 1 y 0 y 1 z 0 z 1 Figure : Clause gadget Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 24 / 28

On the clause gadget Now it is possible to correctly evaluate the unmarked variables iff the three automorphisms are all distinct. Put in other way, two of the bottom copies of K 2 must evaluate one way, and one the other way, into {0, 1}, otherwise it is impossible to evaluate the remaining variables in the clause gadget. Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 25 / 28

Variable gadget v v 3 v 2 x 3 x 2 v 0 v 1 x 0 x 1 Figure : Variable gadget corresponding to v connects to a position in the clause Whichever way the variable is evaluated, the link ensures that the bottom copies of K 2 in v and x evaluate the same way, and no more. Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 26 / 28

Translating the unquantified part of the NAE formula Let an unquantified (positive Horn) formula ϕ in the ternary not-all-equal predicate R be the conjunction of n predicates (clauses) in which appear variables from the set V = {u, v, w,...}. We make a (partially quantified positive Horn) formula in the language of graphs ψ which corresponds to ϕ. For each variable of ϕ we add a variable gadget in ψ, and for each predicate occurrence in ϕ we add a clause gadget in ψ. If a clause R(u, v, w) occurs in ϕ, we link the variable gadgets for u, v and w to three different positions in the corresponding clause gadget in ψ. Let τ : V {0, 1} be an evaluation of the NAE formula. We quantify existentially the variables of ψ which are in the clause gadgets or in variable gadgets with indices 2 and 3. If τ(v) = 0, we assign τ (v 0 ) = 0, τ (v 1 ) = 1 and τ (v ) = 2, while if τ(v) = 1, we assign τ (v 0 ) = 1, τ (v 1 ) = 0 and τ (v ) = 2. I.e., τ(v) = 0 iff τ (v i ) = i for i = 0, 1, while τ(v) = 1 iff τ (v i ) = 1 i for i = 0, 1. Verify: v τ (ϕ) = iff v τ (ψ) =. Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 27 / 28

Quantifying Now, let ϕ be a positive Horn formula in the language of NAE, while ψ is the associated digraph formula and τ and τ are the evaluations of the free variables of ϕ and ψ, respectively, defined in the previous slide. We associate to ( v)ϕ the formula ( v )( v 0 )( v 1 )ψ, while to ( v)ϕ we associate the formula ( v )( v 0 )( v 1 )ψ. The only way v can have any impact is if it evaluates as 0 or 1. Then it determines: if v is evaluated as 0, then v i must evaluate as 1 i for i = 0, 1; if v is evaluated as 1 then v i must evaluate as i for i = 0, 1. So universal quantification of v stipulates that the formula ψ must be true both in the evaluation which corresponds to τ(v/0) and in the evaluation corresponding to τ(v/1). Petar Marković (Novi Sad) QCSP on semicomplete digraphs Szeged, November 2015 28 / 28