prefix rewriting and the pushdown hierarchy
play

Prefix Rewriting and the Pushdown Hierarchy Wolfgang Thomas - PowerPoint PPT Presentation

Prefix Rewriting and the Pushdown Hierarchy Wolfgang Thomas Francqui Lecture, Mons, April 2013 Reachability Problem Wolfgang Thomas Overview 1. Prefix Rewriting and the reachability problem 2. Interpretations 3. Unfoldings and Muchniks


  1. Prefix Rewriting and the Pushdown Hierarchy Wolfgang Thomas Francqui Lecture, Mons, April 2013

  2. Reachability Problem Wolfgang Thomas

  3. Overview 1. Prefix Rewriting and the reachability problem 2. Interpretations 3. Unfoldings and Muchnik’s Theorem 4. The pushdown hierarchy Wolfgang Thomas

  4. Prefix Rewriting and the Reachability Problem Wolfgang Thomas

  5. Rewriting Over Words Rewriting system: Finite set S of rules u → v Different uses of a rule u → v for the rewrite relation ⊢ Infix rewriting: xuy ⊢ xvy Post’s canonical systems: ux ⊢ xv Prefix rewriting (B¨ uchi’s regular canonical systems): ux ⊢ vx Fundamental results: Infix rewriting systems and Post’s canonical systems allow to simulate Turing machines. B¨ uchi 1965: Prefix rewriting systems generate regular sets from regular sets of “axioms”, and the derivability relation is decidable. Wolfgang Thomas

  6. The Setting of Pushdown Automata A pushdown automaton has the form P = ( P , Σ , Γ , p 0 , Z 0 , ∆ ) Configurations are words from P Γ ∗ A transition induces a move from p γ w to quw Write p γ w ⊢ quw So pushdown automata are a special from of prefix rewriting systems. Consequence of B¨ uchi’s Theorem: The reachable configurations of a pushdown automaton form a regular set. Wolfgang Thomas

  7. The Reachability Sets Given a pushdown automaton P = ( P , Σ , Γ , p 0 , Z 0 , ∆ ) and T ⊆ P Γ ∗ pre ∗ ( T ) : = { pv ∈ P Γ ∗ | ∃ qw ∈ T : pv ⊢ ∗ qw } Analogously post ∗ ( T ) . We may suppress Σ and q 0 , Z 0 and obtain a “pusdown system P = ( Q , Γ , ∆ ) with transitions of the form ( p , γ , v , q ) . Given a pushdown system P = ( P , Γ , ∆ ) and a finite automaton recognizing a set T ⊆ P Γ ∗ , one can compute a finite automaton recognizing pre ∗ ( T ) , similarly for post ∗ ( T ) . Deciding p 1 w 1 ⊢ ∗ p 2 w 2 : Set T = { p 2 w 2 } and check whether the automaton recognizing pre ∗ ( T ) accepts p 1 w 1 . Wolfgang Thomas

  8. Example P = ( P , Γ , ∆ ) with P = { p 0 , p 1 , p 2 } , Γ = { a , b , c } , ∆ = { ( p 0 a → p 1 ba ) , ( p 1 b → p 2 ca ) , ( p 2 c → p 0 b ) , ( p 0 b → p 0 ) } T = { p 0 aa } . P -automaton for T : a a p 0 s 1 s 2 A : p 1 p 2 Wolfgang Thomas

  9. Saturation Algorithm: Idea Wolfgang Thomas

  10. Saturation Algorithm Input: P -automaton A , pushdown system P = ( P , Γ , ∆ ) A 0 : = A , i : = 0 REPEAT : v IF pa → p ′ v ∈ ∆ and A i : p ′ − → q THEN add ( p , a , q ) to A i and obtain A i + 1 i : = i + 1 UNTIL no transition can be added A : = A i Output: A ′ Wolfgang Thomas

  11. Example: Result b a a a A ′ : p 0 s 1 s 2 b p 1 c b p 2 So for T = { p 0 aa } : pre ∗ ( T ) = p 0 b ∗ ( a + aa ) + p 1 b + p 1 ba + p 2 cb ∗ ( a + aa ) Wolfgang Thomas

  12. Alternative: Work in the Tree of Words Consider a prefix rewriting system over { 0, 1 } . Convert prefix rewriting to suffix rewriting. Then a rewrite step is definable in S2S. Example: Rule R : 11 → 0 leads from a word w 11 to w 0 Defining formula ϕ R ( z , z ′ ) : ∃ x ( z = x 11 ∧ z ′ = x 0 ) For a system S let ϕ S ( z , z ′ ) : = � R ∈ S ϕ R ( z , z ′ ) Wolfgang Thomas

  13. Preservation of Regularity Let L ⊆ { 0, 1 } ∗ be regular. There is an S2S-formula ϕ L ( x ) defining L in the tree T 2 We can write L ⊆ Y for ∀ y ( ϕ L ( y ) → Y ( y )) Then x ∈ post ∗ ( L ) iff ∀ Y [( L ⊂ Y and ∀ z , z ′ ( Y ( z ) ∧ ϕ S ( z , z ′ )) → Y ( z ′ )) → Y ( x )] ∀ x ( X ( x ) ↔ “ x ∈ post ∗ ( L ) ′′ ) is satisfied The formula ψ ( X ) : by a unique set. By Rabin’s Basis Theorem it must be regular. Wolfgang Thomas

  14. Interpretations Wolfgang Thomas

  15. A First Example Show Rabin’s Tree Theorem for T 3 = ( { 0, 1, 2 } ∗ , S 3 0 , S 3 1 , S 3 2 ) . Idea: Obtain a copy of T 3 in T 2 : Consider T 2 -vertices in T = ( 10 + 110 + 1110 ) ∗ . Wolfgang Thomas

  16. Interpretation: Details The element i 1 . . . i m of T 3 is coded by 1 i 1 + 1 0 . . . 1 i m + 1 0 in T 2 . Define the set of codes by ϕ ( x ) : “ x is in the closure of ε under 10-, 110-, and 1110-successors” Define the 0-th, 1-st 2-nd successors by ψ 0 ( x , y ) , ψ 1 ( x , y ) , ψ 2 ( x , y ) The structure ( ϕ T 2 , ( ψ T 2 i ) i = 0,1,2 ) restricted to ϕ T 2 is isomorphic to T 3 . Wolfgang Thomas

  17. Interpretations in General An MSO-interpretation of a structure A = ( A , R A , . . . ) in a structure B is given by a “domain formula” ϕ ( x ) for each relation R A of A , say of arity m , an MSO-formula ψ ( x 1 , . . . , x m ) such that A is isomorphic to ( ϕ B , ψ B , . . . ) Then there is a transformation OF MSO-sentenceS χ (in the signature of A ) to sentences χ ′ (in the signature of B ) such that = χ ′ . A | = χ iff B | Consequence: If A is MSO-interpretable in B and the MSO-theory of B is decidable, then so is the MSO-theory of A . Wolfgang Thomas

  18. Pushdown Graphs Consider A for language L = { a n b n | n ≥ 0 } : A = ( { q 0 , q 1 } , { a , b } , { Z 0 , Z } , q 0 , Z 0 , ∆ ) with � ( q 0 , Z 0 , a , q 0 , ZZ 0 ) , ( q 0 , Z , a , q 0 , ZZ ) , � ∆ = ( q 0 , Z , b , q 1 , ε ) , ( q 1 , Z , b , q 1 , ε ) Initial and final configuration: q 0 Z 0 The associated pushdown graph (of reachable configurations only) is: a a a . . . q 0 Z 0 q 0 ZZ 0 q 0 ZZZ 0 b b b b b b . . . q 1 Z 0 q 1 ZZ 0 q 1 ZZZ 0 Wolfgang Thomas

  19. Interpretation: Second Example A pushdown graph is MSO-interpretable in T 2 Given pushdown automaton A with stack alphabet { 1, . . . , k } and states q 1 , . . . , q m . Let G A = ( V A , E A ) be the corresponding PD graph. n : = max { k , m } Find an MSO-interpretation of G A in T n . Represent configuration ( q j , i 1 . . . i r ) by the vertex i r . . . i 1 j . A -steps lead to local moves in T n . E.g. a push step from vertex i r . . . i 1 j to i r . . . i 1 i 0 j ′ . These edges are easily definable in MSO. Hence: The MSO-theory of a PD graph is decidable. Wolfgang Thomas

  20. Prefix-Recognizable Graphs Instead of rules u → v we have rules U → Y wuth regular sets U , V . Instead of describing a move from one word wu 0 to one wv 0 describe all admissible moves from a word wu to a word wv for a rule U → V with u ∈ U , v ∈ V . This can be done by describing successful runs of the automata A U , A V on the path segments from w to wu and from w to wv . A graph is MSO-interpretable in T 2 iff its is prefix-recognizable. Wolfgang Thomas

  21. Unfolding and Muchnik’s Theorem Wolfgang Thomas

  22. Unfoldings Given a graph ( V , ( E a ) a ∈ Σ , ( P b ) b ∈ Σ ′ ) the unfolding of G from a given vertex v 0 is the following tree T G ( v 0 ) = ( V ′ , ( E ′ a ) a ∈ Σ , ( P ′ b ) b ∈ Σ ′ ) : V ′ consists of the vertices v 0 a 1 v 1 . . . a r v r with ( v i − 1 , v i ) ∈ E a i , E ′ a contains the pairs ( v 0 a 1 v 1 . . . a r v r , v 0 a 1 v 1 . . . a r v r av ) with ( v r , v ) ∈ E a , P ′ b the vertices v 0 a 1 v 1 . . . a r v r with v r ∈ P b . Wolfgang Thomas

  23. Examples Wolfgang Thomas

  24. Unfolding Preserves Decidability Theorem (Muchnik, Courcelle/Walukiewicz) If the MSO-theory of G is decidable and v 0 is an MSO-definable vertex of G , then the MSO-theory of T G ( v 0 ) is decidable. We sketch the proof for pushdown graphs. Their unfoldings are the “algebraic trees”. Wolfgang Thomas

  25. Proof Architecture Given an unfolding T of a pushdown graph G . T is finitely branching, with labels say in Σ inherited from G . For each MSO-formula ϕ ( X 1 , . . . , X n ) find a parity tree automaton A ϕ such that A ϕ accepts T ( P 1 , . . . , P n ) iff T [ P 1 , . . . , P n ) | = ϕ ( X 1 , . . . , X n ) The construction of the A ϕ follows precisely the pattern of Rabin’s equivalence theorem. Essential: In the complementation step we use the finite out-degree of G . The general case is more involved. Wolfgang Thomas

  26. Muchnik’s Theorem: Continued Result: For a sentence ϕ we obtain a tree automaton A ϕ , say with state set Q and transition set ∆ , with A ϕ accepts T iff T | = ϕ The left-hand side says: Automaton has a positional winning strategy in the associated game Γ A , T If G = ( V , E , v 0 ) for simplicity, the game graph consists of vertices in V × Q (for Automaton) in V × ∆ (for Pathfinder) Wolfgang Thomas

  27. Muchnik’s Theorem Finished The game Γ A , T is played on a graph G ′ = ( V × { 1, . . . , k } , E ′ , ( v 0 , 1 )) We use the following fact (shown next Friday): The set of vertices v from where Player Automaton wins in the parity game over G ′ = ( V ′ , E ′ , v ′ ) is MSO-definable by a formula χ ( x ) . Translation Theorem: For each sentence ϕ we can build a sentence ϕ + such that G ′ | = ϕ + = ϕ iff G | Since the MSO theory of G is decidable, we can decide the left-hand side. Wolfgang Thomas

  28. Final Step How to infer decidability of MTh ( G × { 1, 2 } ) from decidability of MTh ( G ) ? We do not address the definition of the edge relation but just give the idea: Simulate a set quantifier over G × { 1, 2 } by two set quantifiers over G . Wolfgang Thomas

  29. Pushdown Hierarchy Wolfgang Thomas

  30. Caucal’s Proposal We have now two processes which preserve decidability of MSO-theory: interpretation (transforming a tree into a graph) unfolding (transforming a graph into a tree) Let us apply them in alternation! We obtain the Caucal hierarchy or pushdown hierarchy. Wolfgang Thomas

Recommend


More recommend