The Tree-Width of Decidable Problems 1 Gennaro Parlato (U. Southampton, UK) joint work with: P. Madhusudan (UIUC, USA) Salvatore La Torre (U. Salerno,

Slides:



Advertisements
Similar presentations
CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
Advertisements

Gennaro Parlato (LIAFA, Paris, France) Joint work with P. Madhusudan Xiaokang Qie University of Illinois at Urbana-Champaign.
1 Matching Polytope x1 x2 x3 Lecture 12: Feb 22 x1 x2 x3.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
C O N T E X T - F R E E LANGUAGES ( use a grammar to describe a language) 1.
Review Binary Search Trees Operations on Binary Search Tree
CompSci 102 Discrete Math for Computer Science April 19, 2012 Prof. Rodger Lecture adapted from Bruce Maggs/Lecture developed at Carnegie Mellon, primarily.
Multicut Lower Bounds via Network Coding Anna Blasiak Cornell University.
1 Steiner Tree on graphs of small treewidth Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij.
1/25 An Infinite Automaton Characterization of Double Exponential Time Gennaro Parlato University of Illinois at Urbana-Champaign Università degli Studi.
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Pushdown Systems Koushik Sen EECS, UC Berkeley Slide Source: Sanjit A. Seshia.
The Tree-Width of auxiliary storage Gennaro Parlato (University of Southampton, UK) Joint work: P. Madhusudan – UIUC, USA.
The Language Theory of Bounded Context-Switching Gennaro Parlato (U. of Illinois, U.S.A.) Joint work with: Salvatore La Torre (U. of Salerno, Italy) P.
Yangjun Chen 1 Bipartite Graphs What is a bipartite graph? Properties of bipartite graphs Matching and maximum matching - alternative paths - augmenting.
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
On Sequentializing Concurrent Programs Ahmed Bouajjani LIAFA, University of Paris 7, France LIAFA, University of Paris 7, France Michael Emmi LIAFA, University.
The Tree-Width of automata with auxiliary storage Gennaro Parlato (LIAFA, CNRS, Paris, France) joint work with P. Madhusudan (Univ of Illinois at Urbana-Champaign,
1 Formal Methods in SE Qaisar Javaid Assistant Professor Lecture # 11.
Balanced Graph Partitioning Konstantin Andreev Harald Räcke.
Lists A list is a finite, ordered sequence of data items. Two Implementations –Arrays –Linked Lists.
Traveling with a Pez Dispenser (Or, Routing Issues in MPLS) Anupam Gupta Amit Kumar FOCS 2001 Rajeev Rastogi Iris Reinbacher COMP670P
Validating Streaming XML Documents Luc Segoufin & Victor Vianu Presented by Harel Paz.
Yangjun Chen 1 Bipartite Graph 1.A graph G is bipartite if the node set V can be partitioned into two sets V 1 and V 2 in such a way that no nodes from.
1/25 Context-Bounded Analysis of Concurrent Queue Systems Gennaro Parlato University of Illinois at Urbana-Champaign Università degli Studi di Salerno.
CS5371 Theory of Computation Lecture 8: Automata Theory VI (PDA, PDA = CFG)
Tirgul 7 Review of graphs Graph algorithms: – BFS (next tirgul) – DFS – Properties of DFS – Topological sort.
Model Checking Lecture 5. Outline 1 Specifications: logic vs. automata, linear vs. branching, safety vs. liveness 2 Graph algorithms for model checking.
Important Problem Types and Fundamental Data Structures
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 4: SMT-based Bounded Model Checking of Concurrent Software.
C o n f i d e n t i a l HOME NEXT Subject Name: Data Structure Using C Unit Title: Graphs.
Scope-Bounded Pushdown Languages Salvatore La Torre Università degli Studi di Salerno joint work with Margherita Napoli Università degli Studi di Salerno.
GRAPH Learning Outcomes Students should be able to:
Regular Model Checking Ahmed Bouajjani,Benget Jonsson, Marcus Nillson and Tayssir Touili Moran Ben Tulila
Complexity 2-1 Problems and Languages Complexity Andrei Bulatov.
Chapter 2 Graph Algorithms.
Kernel Bounds for Structural Parameterizations of Pathwidth Bart M. P. Jansen Joint work with Hans L. Bodlaender & Stefan Kratsch July 6th 2012, SWAT 2012,
Design Techniques for Approximation Algorithms and Approximation Classes.
DECIDABILITY OF PRESBURGER ARITHMETIC USING FINITE AUTOMATA Presented by : Shubha Jain Reference : Paper by Alexandre Boudet and Hubert Comon.
Minimization of Symbolic Automata Presented By: Loris D’Antoni Joint work with: Margus Veanes 01/24/14, POPL14.
On realizing shapes in the theory of RNA neutral networks Speaker: Leszek Gąsieniec, U of Liverpool, UK Joint work with: Peter Clote, Boston College, USA.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Sets.
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
Algorithm Course Dr. Aref Rashad February Algorithms Course..... Dr. Aref Rashad Part: 5 Graph Algorithms.
Scope-bounded Multistack Pushdown Systems: - fixed-point - sequentialization - tree-width 1 Salvatore La Torre Gennaro Parlato (U. Salerno, Italy) (U.
Graph Algorithms. Definitions and Representation An undirected graph G is a pair (V,E), where V is a finite set of points called vertices and E is a finite.
Module #19: Graph Theory: part II Rosen 5 th ed., chs. 8-9.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
1/24 Introduction to Graphs. 2/24 Graph Definition Graph : consists of vertices and edges. Each edge must start and end at a vertex. Graph G = (V, E)
Getting Rid of Store-Buffers in TSO Analysis Mohamed Faouzi Atig Uppsala University, Sweden Ahmed Bouajjani LIAFA, University of Paris 7, France LIAFA,
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
Chapter 13 Backtracking Introduction The 3-coloring problem
Chapter 9: Graphs.
Great Theoretical Ideas in Computer Science for Some.
Algorithms for hard problems Parameterized complexity Bounded tree width approaches Juris Viksna, 2015.
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY
C&O 355 Lecture 19 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A A A A.
COMPSCI 102 Introduction to Discrete Mathematics.
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
1 Chapter Pushdown Automata. 2 Section 12.2 Pushdown Automata A pushdown automaton (PDA) is a finite automaton with a stack that has stack operations.
On Sequentializing Concurrent Programs
Sequentializing Parameterized Programs
Graph theory Definitions Trees, cycles, directed graphs.
Automatic Verification
Bipartite Graphs What is a bipartite graph?
Lectures on Network Flows
Bipartite Graph 1. A graph G is bipartite if the node set V can be partitioned into two sets V1 and V2 in such a way that no nodes from the same set are.
Discrete Mathematics for Computer Science
Presentation transcript:

The Tree-Width of Decidable Problems 1 Gennaro Parlato (U. Southampton, UK) joint work with: P. Madhusudan (UIUC, USA) Salvatore La Torre (U. Salerno, Italy) Constantin Enea, Peter Habermehl (LIAFA, CNRS, U. Paris 7, France) Omar Inverso (U. Southampton, UK)

what is this talk about ? A new approach that explains several decidability results in a uniform way P : decision problem 2 search space

what is this talk about ? A new approach that explains several decidability results in a uniform way P : decision problem 3 search space Integer Linear programming (ILP) x 1 + x 2 + … + x n = search space: N x N x … N (tuples of natural numbers) a1a1 a2a2 anan b

what is this talk about ? A new approach that explains several decidability results in a uniform way P : decision problem 4 search space Emptiness for automata:  finite state a.  pushdown a.  multi-stack a.  dist. automata with FIFO channels  … search space: init final (runs: sequences of configurations)

what is this talk about ? A new approach that explains several decidability results in a uniform way P : decision problem search space Representation depends on the problem (ILP, Empt. …) We propose uniform repr. with labeled graphs (finite set of labels) search space = class of graphs that is MSO definable (MSO=Monadic Second Order logic)

what is this talk about ? A new approach that explains several decidability results in a uniform way P : decision problem search space finding a solution to P => exists a graph representing a solution => satisfiability of MSO on graphs Satisfibility problem for MSO – undecidable in general – decidable for bounded tree-width graphs (Courcelle/Seese’s theorem)

approach - MSO formula describing search space -show solutions have bounded tree-width -algorithm for free! (Courcelle’s theorem) Why existing decision procedures intrinsically “compute” tree-decompositions a new way to look at “old” decidable problems derive new decidability results

outline Definitions –MSO on graphs –tree-width Applications –Emptiness automata with auxiliary storage –Integer Linear Programming Conclusions

MSO on graphs For a fixed alphabet , a  -labeled graph is a structure (V, {E a } a   ) where – V is a finite set of vertices – E a  V x V is a set of edges labeled by a MSO is given by the following grammar  ::= x=y | x ∈ X | E a (x,y) |  ∨  |  ∧  | ¬  |  x.  (x) |  X.  (X) | ∀ x.  (x) | ∀ X.  (X) where – x, y are first-order variables, X is a second-order variable – E a (x,y) is an edge relation

MSO on graphs: examples A bipartite graph is a graph whose vertices can be divided into two disjoint sets U and V such that every edge connects a vertex in U to one in V. bipartite ≡ ∃ U,V. [ partition(U, V) ∧ ∀ u,v. edge(u,v) ⇒ ((u ∈ U ∧ v ∈ V) ∨ (u ∈ V ∧ v ∈ U)) ] partition(U, V) ≡ ∀ z. (z ∈ U ∨ z ∈ V) ∧ ¬(z ∈ U ∧ z ∈ V) Graph 3-Colorability: Given an undirected graph G does there exists a way to colour the nodes red, green, and blue so that no adjacent nodes have the same colour? 3-Colorability ≡ ∃ X,Y,Z. part(X, Y, Z) ∧ ∀ u,v. (u ∈ X ∧ edge(u,v)) ⇒ ¬(v ∈ X) ∧ ∀ u,v. (u ∈ Y ∧ edge(u,v)) ⇒ ¬(v ∈ Y) ∧ ∀ u,v. (u ∈ Z ∧ edge(u,v)) ⇒ ¬(v ∈ Z)

tree-width of graphs A tree decomposition of G=(V,E) is a pair (T, {bag z } z is a node of T ), where T is a tree and bag z is a subset of G nodes, such that – every node of G is in some bag – every edge of G has both endpoints in some bag – for every node of G the set of bags that contain it form a sub-tree of T The width of the tree decomposition is the maximum of |bag z |-1 over all T nodes z The tree-width of a graph G, is the minimum such width over all tree decompositions of G Tree width of a tree is 1

4 4 tree-decompositions (examples) Line graph: tw= Tree: tw= Cycle: tw=2 Clique with k nodes: tw= k-1

MSO on graphs Satisfiability problem for MSO on a class of graphs C: – Given an MSO formula , is there a graph G in C that satisfies  ? Over the class of all graphs, MSO is undecidable (even FO is undecidable) Satisfiability problem for MSO is decidable on the class of all graphs of tree width k, for any fixed k [Courcelle/Seese’s theorem]

outline Definitions –MSO on graphs –tree-width Applications –Emptiness automata with auxiliary storage –Integer Linear Programming Conclusions ✔

Emptiness for Automata with auxiliary storage -pushdown automata -multi-stack pushdown automata -distributed automata 15

pushdown automata Finite Control stack S Stack alphabet  Finite set of states Q Initial state q 1 Final states F  Q transitions : Internal moves: (q, q’) Pop moves: (q, , q’) Push moves: (q, , q’) S

nested words (search space) (Alur-Madhusudan) A nested word NW graph captures the behavior of a run – The stack is compiled down into the nested word (nesting edges) push int pop int pop int push int pop q1q1 q2q2 q3q3 q4q4 q5q5 q6q6 q7q7 q8q8 q9q9 q 10 q 11 q 12 q 13 q 14 final init

nested words (search space) (Alur-Madhusudan) The class of NWs is MSO definable – linear relation on black edges – nesting relation on matching edges the simulation of the automaton on nested word using MSO – a second order variable for each state – a second order variable for each symbol in the stack alphabet – check internal, push, and pop moves (local check) The class of NW has tree-width 2 (next slide) Decidability from Courcelle’s theorem q1q1 q2q2 q3q3 q4q4 q5q5 q6q6 q7q7 q8q8 q9q9 q 10 q 11 q 12 q 13 q 14 final γ2γ2 γ3γ3 γ4γ4 γ 11 q 13 init

Nested words have bounded tree-width Tree decomposition of NW of tw 3 Bags: u is un the bag u if (u,v) is an edge of NW add u to the bags of all nodes of the unique path in T from u to v captures summaries of procedures , 2, 8,13

multistack pushdown automata … Finite Control Finite number of stacks S 1, …,S n Stack alphabet  Finite set of states Q Initial state q 0 Final states F  Q Transitions : Internal move: (q, q’) Pop move: (q, , stack_num, q’) Push move: (q, , stack_num, q’) S1S1 S2S2 SnSn

Multiply Nested Words (MNW) A MNW graph captures the behavior of a run – Stacks are compiled down into the graph (nesting edges) The class MNWs is – MSO definable – Unbounded tree-width push 1 push 2 pop 1 pop 2 pop 1 int push 1 pop 2 pop 1

decidable emptiness problem (Madhusudan, Parlato - POPL’11) Multi-stack pushdown automata with – bounded context-switches (Rehof, Qadeer - TACAS’05) – bounded-phases (La Torre, Madhusudan, Parlato - LICS’07 ) – ordered (Breveglieri, Cherubini, Citrini, Crespi-Reghizzi - Int. J. Found. Comput. Sci.’95) – bounded-scope (La Torre, Napoli - CONCUR’11 ) (La Torre, Parlato - FSTTCS’12 )

bounded context-switches Emptiness decidable (Qadeer, Rehof - TACAS’05) In a context only one stack can be used The class of MNWs with k contexts is – MSO definable – tree-width: k + 1 …

distributed automata with queues Distributed automata with queues – finite state processes – pushdown processes process FIFO channel

queue graphs (finite processes) P1:P1: P2:P2: P3:P3: A queue graph captures the behavior of a run – queues are compiled down into the graph (blue edges) The class of queue graphs is MSO definable (linear orders for each process, FIFO edges) Unbounded tree-width

stack-queue graphs (PD processes) P1:P1: P2:P2: P3:P3: A stack-queue graph captures the behavior of a run – Stacks and queues are compiled down into the graph The class of stack-queue graphs is MSO definable Unbounded tree-width

decidable emptiness problem (POPL’11) Multi-stack pushdown automata with – bounded context-switches (Rehof, Qadeer - TACAS’05 ) – bounded-phases (La Torre, Madhusudan, Parlato - LICS’07 ) – ordered (Breveglieri, Cherubini, Citrini, Crespi-Reghizzi - Int. J. Found. Comput. Sci.’95) – Bounded-Scope (La Torre, Napoli - CONCUR’11 ) (La Torre, Parlato - FSTTCS’12 ) Distributed automata with finite processes & FIFO queues – finite state processes with polyforest architecture – pushdown processes with forest architecture + well queuing (La Torre, Madhusudan, Parlato - TACAS’08 ) – Non-confluent architectures + eager runs (Heußner, Leroux, Muscholl, Sutre - FOSSACS’10 ) (Heußner – CONCUR workshop’10 )

outline Definitions –MSO on graphs –tree-width Applications –Emptiness automata –Integer Linear Programming Conclusions ✔ ✔

Integer Linear Programming (ILP) S I is set of all solutions (s 1,s 2, …, s n ) (tuple of natural numbers) Feasibility problem: is S I empty ? x 1 + x 2 + … + x n = Instance I a 11 a 21. a m1 a 12 a 22. a m2 a 1n a 2n. a mn b1b2...bmb1b2...bm

plan representing solutions with graphs rather than tuples of natural numbers the class of all solution graphs is MSO definable If there is a solution, there is a graph representing it of path-width 2n where n is the # of variables feasibility problem reduces to the satisfiability problem of MSO on the class of 2n path-width graphs

graph representation of a solution Example 1: one constraint 3x 1 – 2x 2 + 1x 3 = 0 solution: x1=3, x2 = 5, x3=1 + + x1x1 - x2x2 x3x3 x1x1 x1x1 x2x2 x2x2 x2x2 x2x2

graph representation of a solution Example 2: (two constraints) 3 x 1 – 2 x 2 + x 3 = 0 solution: x1=3, x2 = 5, x3=1 -2 x 1 +1 x x 3 = x1x1 - x2x2 x3x3 x1x1 x1x1 x2x2 x2x2 x2x2 x2x2 b constraint 1 constraint 2

graph representation of a solution Solution graphs (logical characterization) is the class C I of all graphs G = (V, L var, {L sign i } i in [1,…m], {E i } i in [1,m] ) L var : V -> {x 1, x 2, …, x n, b } with exactly one node v with L var (v) = b L sign i : V -> {+, -} - if L var (v) = x j then L sign i (v) = sign( a i j ) - if L var (v) = b then L sign i (v) = sign( -b i ) degree i ( v ) = |a i j | if L var (v) = x j degree i ( v ) = |b i | if L var (v) = b sign i (u) ≠ sign i (v) if (u,v) is an edge of E i All the above properties can be easily defined in MSO (ϕ I )

Feasibility to satisfiability on graphs Each graph G in C I corresponds to a solution: ( #nodes labeled x 1, …, #nodes labeled x n ) If s=(s 1, …, s n ) is a solution then there is one or more graphs G in C I s.t. G has exactly s j nodes labeled with variable x j If s=(s 1, …, s n ) is a solution then there is a graph G in C I of path-width 2n representing s

bounded path-width Let s = (s 1, …, s n ) be a solution intuition: we construct G and its path decomposition by adding a node labeled x j in a balanced way Example: s=(x 1 =100, x 2 =50, x 3 =25) each 2 (=100/50) increments of x 1, increment x 2 each 4 (=100/25) increments of x 1, increment x 3

bounded path-width Two sets of counters (initially set to 0) c j (associated to var x j ) operations: - Increase(j) : c j = c j + s max - Reduce(): c j = c j – s j for all j r i (associated to i-th row of the matrix) r i = SUM j (a i,j * # increase(j)) Invariant c 1 a i,1 + … + c n a i,n r i = s max by induction after Increase(j) s max r i ’ = r j + a i,j = r j a i,j = s max c 1 a i,1 + … + (c j +s max ) + … + c n a i,n = s max after Reduce (c 1 - s 1 ) a i,1 + … + (c n - s n ) r i ’ = = s max s 1 a i,1 + … + s n a i,n = r i = r i s max

bounded path-width Two sets of counters (initially set to 0) c j (associated to var x j ) operations: - Increase(j) : c j = c j + s max - Reduce(): c j = c j – s j for all j r i (associated to i-th row of the matrix) r i = SUM j (a i,j * # increase(j) ) Algorithm: (1)Increase(max); (2)Reduce(), stop if r i =0 for all i (3)Increase(j) for all j≠max s.t. c j < 0 goto (1) Invariant c 1 a i,1 + … + c n a i,n r i = s max along execution of Algorithm |c j | ≤ 1 s max Therefore SUM (a i,j ) ≤ r i ≤ SUM (a i,j ) a i,j ≤0 a i,j ≥0

path-width decomposition - given a solution s - run algorithm according to s list of increase operations: increase( j 1 ), …, increase( j i ), … increase(j t ) xj1xj1 xj1xj1 xjixji xjixji xjixji xjixji xjixji xjixji add a node labeled x j i -match edges -oldest nodes first -remove fully matched nodes size of the each bag ≤ SUM i |r i | ≤ SUM i,j |a i,j | we can prove that this path-decomposition has width at most 2n

Conclusions 39

Conclusion/Future work A general criterion that uniformly explains many decidability results for automata with auxiliary storage (stacks, queues) Integer Linear Programming Other decidable results? Several decidability results for automata are obtained using Parikh + Presburger A Perfect Model for Bounded Verification [Esparza,Ganty, Majumdar, LICS’12] Is this a general principle that governs decidability ?

Future work (program verification) Reasoning about Concurrent programs + Weak Memory models? Automata with heap structures? -a concurrent/distributed program can be seen as as sequential program + stacks/queues -what about lists, trees, …, graphs? Behavior graphs? Can we exploit this new view to device (under-approximate) scalable solutions for the analysis of programs??? -sequentialization of programs … tree-decompositions can be seen as a tree or a sequential programs with procedure calls -New SMT encodings (bounded model checking) -Fixed point engines …

Open problem: “abab problem”

Example w = aabababbaabb [ # a (a) = # b (w)] Marking of w: aabababbaabb =w aabababbaabb (mark a) aabababbaabb (mark b) aabababbaabb (mark a) aabababbaabb (mark b) aabababbaabb (mark a) aabababbaabb (mark b) aabababbaabb (mark a) aabababbaabb (mark b) aabababbaabb (mark a) aabababbaabb (mark b) aabababbaabb (mark a) aabababbaabb (mark b) Marking M w : row row row row row row row row row row row row row

Open problem: “abab problem” Let w be any word over the alphabet {a,b}, with # a (w) = # b (w). w is called balanced word. A marking of w is a bit matrix M w of dimension (n+1) x n (rows: 0 to n) (columns: 1 to n ) first row of M is all 0’s for i>1, the i-th row is a copy of the (i-1)-th row except one position, say j, s. t. M[i-1, j]=0 and M[i, j]=1. Furthermore, if i is odd w[i]=a, otherwise w[i]=b

Open problem: “abab problem” Given a marking M w of a balanced word w, we define the width of M w as follows. The width of a row of M w is the number of its 1-sequences. The width of M w is the maximum width over all M w rows. Example: The marking-width of a balanced word w, denoted marking-width(w), is the minimum width overall markings of w. Marking M w : row width = 0 row width = 1 row width = 2 row width = 3 row width = 2 row width = 2 row width = 2 row width = 2 row width = 2 row width = 1 row width = 2 row width = 1 row width = 1 width(M w )=3

Constantin Enea, Peter Habermehl, Gennaro Parlato “abab problem” Is there a constant k s. t. for every balanced word w, w has marking-width ≤ k ?