Adding Monotonic Counters to Automata and Transition Graphs Wong - - PowerPoint PPT Presentation
Adding Monotonic Counters to Automata and Transition Graphs Wong - - PowerPoint PPT Presentation
9th International Conference Developments in Language Theory Palermo, 48 July 2005 Adding Monotonic Counters to Automata and Transition Graphs Wong Karianto karianto@informatik.rwth-aachen.de Lehrstuhl f ur Informatik VII Motivations:
Motivations: Parikh Automata (Klaedtke & Rueß, ICALP 2003)
Idea: how to recognize a language with arithmetical properties, such as Labc := {akbkck | k ≥ 1}?
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 2
Motivations: Parikh Automata (Klaedtke & Rueß, ICALP 2003)
Idea: how to recognize a language with arithmetical properties, such as Labc := {akbkck | k ≥ 1}? Use a finite automaton recognizing a+b+c+. Assign a vector to each input symbol. Put a Presburger constraint on the summed vector (x, y, z): x = y = z.
(c, (0, 0, 1)) (b, (0, 1, 0)) (a, (1, 0, 0)) (a, (1, 0, 0)) (b, (0, 1, 0)) (c, (0, 0, 1))
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 2
Outline
- 1. Parikh automata
Semi-linear sets and Parikh’s theorem Parikh automata and the Chomsky hierarchy
- 2. Monotonic-counter extensions of (infinite) graphs
Some classes of infinite graphs Monotonic-counter extensions
- 3. Reachability problem
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 3
Part 1 Parikh Automata
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 4
Semi-Linear Sets and Parikh’s Theorem
A ⊆ Nn linear: A = {¯ x0 + k1¯ x1 + . . . + km¯ xm | k1, . . . , km ∈ N} for some ¯ x0, ¯ x1, . . . , ¯ xm ∈ Nn Semi-linear set: finite union of linear sets. Example: B := {(x1, x2, x3) ∈ N3 | x1 < x2 < x3} is linear: {(0, 1, 2) + k1(0, 0, 1) + k2(0, 1, 1) + k3(1, 1, 1) | k1, k2, k3 ∈ N} .
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 5
Semi-Linear Sets and Parikh’s Theorem
A ⊆ Nn linear: A = {¯ x0 + k1¯ x1 + . . . + km¯ xm | k1, . . . , km ∈ N} for some ¯ x0, ¯ x1, . . . , ¯ xm ∈ Nn Semi-linear set: finite union of linear sets. Example: B := {(x1, x2, x3) ∈ N3 | x1 < x2 < x3} is linear: {(0, 1, 2) + k1(0, 0, 1) + k2(0, 1, 1) + k3(1, 1, 1) | k1, k2, k3 ∈ N} . Properties of semi-linear sets: effective closure under Boolean operations [Ginsburg & Spanier] equivalence to Presburger-definable sets [Ginsburg & Spanier]
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 5
Semi-Linear Sets and Parikh’s Theorem
A ⊆ Nn linear: A = {¯ x0 + k1¯ x1 + . . . + km¯ xm | k1, . . . , km ∈ N} for some ¯ x0, ¯ x1, . . . , ¯ xm ∈ Nn Semi-linear set: finite union of linear sets. Example: B := {(x1, x2, x3) ∈ N3 | x1 < x2 < x3} is linear: {(0, 1, 2) + k1(0, 0, 1) + k2(0, 1, 1) + k3(1, 1, 1) | k1, k2, k3 ∈ N} . Properties of semi-linear sets: effective closure under Boolean operations [Ginsburg & Spanier] equivalence to Presburger-definable sets [Ginsburg & Spanier] Parikh’s theorem: The Parikh image of any context-free language is effectively semi-linear.
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 5
Parikh Automata
(c, (0, 0, 1)) (b, (0, 1, 0)) (a, (1, 0, 0)) (a, (1, 0, 0)) (b, (0, 1, 0)) (c, (0, 0, 1))
Parikh finite automaton (Parikh-FA) (A, C) of dimension n ≥ 1 over Σ: finite automaton A over Σ × D (D ⊆ Nn finite, nonempty) semi-linear set C ⊆ Nn
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 6
Parikh Automata
(c, (0, 0, 1)) (b, (0, 1, 0)) (a, (1, 0, 0)) (a, (1, 0, 0)) (b, (0, 1, 0)) (c, (0, 0, 1))
Parikh finite automaton (Parikh-FA) (A, C) of dimension n ≥ 1 over Σ: finite automaton A over Σ × D (D ⊆ Nn finite, nonempty) semi-linear set C ⊆ Nn Word u := a1 · · · am is accepted iff v := (a1, ¯ d1) · · · (am, ¯ dm) ∈ L(A) exists, for some ¯ d1, . . . , ¯ dm ∈ D, and Φ(v) := ¯ d1 + · · · + ¯ dm ∈ C.
❆ ❆ ❑
extended Parikh mapping Φ: (Σ × D)∗ → Nn
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 6
Emptiness Problem
Lemma (Klaedtke & Rueß): If the Parikh image of L ⊆ (Σ × D)∗ is effectively semi-linear, then also its extended Parikh image Φ(L). Theorem (Klaedtke & Rueß): The emptiness problem for Parikh-FA’s is decidable. Proof idea. L(A, C) = ∅ iff Φ(L(A)) ∩ C = ∅
- – Both sets are semi-linear.
– Intersection of semi-linear sets is effectively semi-linear. = ⇒ (Non-)Emptiness is decidable.
- RWTH Aachen – Wong Karianto
Adding Monotonic Counters to Automata and Transition Graphs – p. 7
Parikh Automata and the Chomsky Hierarchy
Automata of the Chomsky hierarchy as the automaton component A:
finite automata pushdown automata linear-bounded automata Turing machines Parikh-TM
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 8
Parikh Automata and the Chomsky Hierarchy
Automata of the Chomsky hierarchy as the automaton component A:
finite automata pushdown automata linear-bounded automata Turing machines Parikh-FA Parikh-PDA Parikh-LBA Parikh-TM
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 8
Parikh Automata and the Chomsky Hierarchy
Automata of the Chomsky hierarchy as the automaton component A:
finite automata pushdown automata linear-bounded automata Turing machines Parikh-FA Parikh-PDA Parikh-LBA Parikh-TM (1) (1) (2) (3)
- 1. {akbkck | k ≥ 1}
- 2. {wwR | w ∈ {a, b}∗}
- 3. semi-linearity
- f
Parikh-PDA recognizable languages
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 8
Part 2 Monotonic-Counter Extensions of (Infinite) Graphs
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 9
Monotonic-Counter Graphs
Σ-labeled graph G := (V, (Ea)a∈Σ)
a · · · · · · · · · · · ·
- a
b
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 10
Monotonic-Counter Graphs
(Σ × D)-labeled graph G := (V, (E(a, ¯
d))(a, ¯ d)∈Σ×D)
(D ⊆ Nn finite, nonempty)
- (a, (1, 0)) (b, (0, 1))
a · · · · · · · · · · · ·
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 10
Monotonic-Counter Graphs
(Σ × D)-labeled graph G := (V, (E(a, ¯
d))(a, ¯ d)∈Σ×D)
(D ⊆ Nn finite, nonempty)
- Monotonic-counter extension of G:
Σ-labeled graph G := ( V , ( Ea)a∈Σ) with
- V := V × Nn and ((α, ¯
x), (β, ¯ y)) ∈ Ea iff (α, β) ∈ E(a, ¯
d) and
¯ y = ¯ x + ¯ d, for some ¯ d ∈ D.
- (a, (1, 0)) (b, (0, 1))
a (0, 0) (1, 0) a a (0, 1) (1, 1) a b b b b (2, 0) a (2, 1) b b a a (0, 2) (1, 2) a b b (2, 2) a b · · · · · · · · · · · · · · · · · ·
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 10
Some Classes of Infinite Graphs with Finite Representations
Vertices: regular sets over alphabet Γ Edges: automaton-definable relations over words, e.g.: pushdown graphs [Muller & Schupp]: transitions of ε-free pushdown automata prefix-recognizable graphs [Caucal]: generalized prefix rewriting rules synchronized rational graphs or automatic graphs [Frougny & Sakarovitch, Blumensath & Gr¨ adel]: synchronized rational relations rational graphs [Morvan]: rational relations
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 11
Hierarchy of Graph Classes
prefix-recognizable graphs synchronized rational graphs rational graphs finite graphs pushdown graphs
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 12
Hierarchy of Graph Classes
prefix-recognizable graphs synchronized rational graphs rational graphs PR-MC R-MC finite graphs pushdown graphs PD-MC F-MC SR-MC
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 12
Hierarchy of Graph Classes
prefix-recognizable graphs synchronized rational graphs rational graphs PR-MC R-MC (2) (4) finite graphs pushdown graphs PD-MC F-MC SR-MC (1) (1) (1) (3)
- 1. infinite two-dimensional grid
- 2. decidability of the reachability
problem
- 3. graphs with vertices of
unbounded degree
- 4. graphs with repetition-free
cycles of unbounded length
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 12
Synchronized Rational Graphs
Vertices: regular set V over alphabet Γ Edges: synchronized rational relations, i.e. edge relation Ea is recognized by a finite-state automaton working on pairs (X1 · · · Xm, Y1 · · · Yn) ∈ Γ∗ × Γ∗ with two one-way input tapes and simultaneously moving input heads.
X1 X2 X3 · · · Xm ⋄ · · · ⋄ · · · · · · Y1 Y2 Y3 Ym+1 Ym Yn new symbol finite memory
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 13
Synchronized Rational Graphs: Example
ε b X Y a XX b c XY Y Y b Y Y Y XXX b XXY b XY Y b · · · · · · · · · · · · c c a a
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 14
Monotonic-Counter Extensions of Synchronized Rational Graphs
(Σ × D)-labeled synchronized rational graph G := (V, (E(a, ¯
d))(a, ¯ d)∈Σ×D)
(D ⊆ Nn finite, nonempty)
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 15
Monotonic-Counter Extensions of Synchronized Rational Graphs
(Σ × D)-labeled synchronized rational graph G := (V, (E(a, ¯
d))(a, ¯ d)∈Σ×D)
(D ⊆ Nn finite, nonempty)
- Σ-labeled SRMC graph
- G := (
V , ( Ea)a∈Σ) with V := V × Nn and ((α, ¯ x), (β, ¯ y)) ∈ Ea iff (α, β) ∈ E(a, ¯
d) and
¯ y = ¯ x + ¯ d, for some ¯ d ∈ D.
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 15
Monotonic-Counter Extensions of Synchronized Rational Graphs
(Σ × D)-labeled synchronized rational graph G := (V, (E(a, ¯
d))(a, ¯ d)∈Σ×D)
(D ⊆ Nn finite, nonempty)
- Σ-labeled SRMC graph
- G := (
V , ( Ea)a∈Σ) with V := V × Nn and ((α, ¯ x), (β, ¯ y)) ∈ Ea iff (α, β) ∈ E(a, ¯
d) and
¯ y = ¯ x + ¯ d, for some ¯ d ∈ D. Proposition: G is synchronized rational. Proof sketch. Encode vertex (α, (x1, . . . , xn)) of G by means of word #1 · · · #1
- x1
· · · #n · · · #n
- xn
α Define automaton for Ea working on pairs (#x1
1 · · · #xn n α, #y1 1 · · · #yn n β):
- 1. Guess a vector ¯
d ∈ D and check whether ¯ x + ¯ d = ¯ y.
- 2. Simulate the automaton for E(a, ¯
d) on (α, β).
Bounded delay sufficient since D and Γ are finite.
- RWTH Aachen – Wong Karianto
Adding Monotonic Counters to Automata and Transition Graphs – p. 15
Part 3 Reachability Problem
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 16
Logical Decision Problems over Transition Graphs
Reachability: Given a graph G and two vertices α and β in G, is β reachable from α? First-order (FO) theory: Given a graph G and a first-order sentence ϕ, does ϕ hold in G? Monadic second-order (MSO) theory: Given a graph G and a monadic second-order sentence ϕ, does ϕ hold in G?
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 17
Logical Decision Problems over Transition Graphs
prefix-recognizable graphs PR-MC finite graphs pushdown graphs PD-MC F-MC synchronized rational graphs rational graphs undecidable decidable FO theory
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 17
Logical Decision Problems over Transition Graphs
prefix-recognizable graphs PR-MC finite graphs pushdown graphs PD-MC F-MC synchronized rational graphs rational graphs undecidable decidable MSO theory undecidable decidable FO theory
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 17
Logical Decision Problems over Transition Graphs
prefix-recognizable graphs PR-MC finite graphs pushdown graphs PD-MC F-MC synchronized rational graphs rational graphs undecidable decidable MSO theory undecidable decidable FO theory undecidable decidable reachability
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 17
Prefix-Recognizable Graphs
Σ := {a, b} Γ := {Z}
✁ ✁ ☛
rule U
a
− → V with U, V ⊆ Γ∗ regular Prefix-rewriting system R := { ε a − → Z , ε b − → Z+ } Prefix-recognizable graph G = (V, Ea, Eb) defined by R: V = Γ∗, Ea = {(Zi, Zi+1) | i ∈ N}, and Eb = {(Zi, Zj) | i, j ∈ N and i < j}.
Z2 a a Z3 a a b b b ε Z b · · · · · · · · ·
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 18
Monotonic-Counter Extensions of Prefix-Recognizable Graphs
(Σ × D)-labeled prefix-recognizable graph G := (V, (E(a, ¯
d))(a, ¯ d)∈Σ×D)
(D ⊆ Nn finite, nonempty)
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 19
Monotonic-Counter Extensions of Prefix-Recognizable Graphs
(Σ × D)-labeled prefix-recognizable graph G := (V, (E(a, ¯
d))(a, ¯ d)∈Σ×D)
(D ⊆ Nn finite, nonempty)
- Σ-labeled PRMC graph
- G := (
V , ( Ea)a∈Σ) with V := V × Nn and ((α, ¯ x), (β, ¯ y)) ∈ Ea iff (α, β) ∈ E(a, ¯
d) and
¯ y = ¯ x + ¯ d, for some ¯ d ∈ D.
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 19
Monotonic-Counter Extensions of Prefix-Recognizable Graphs
(Σ × D)-labeled prefix-recognizable graph G := (V, (E(a, ¯
d))(a, ¯ d)∈Σ×D)
(D ⊆ Nn finite, nonempty)
- Σ-labeled PRMC graph
- G := (
V , ( Ea)a∈Σ) with V := V × Nn and ((α, ¯ x), (β, ¯ y)) ∈ Ea iff (α, β) ∈ E(a, ¯
d) and
¯ y = ¯ x + ¯ d, for some ¯ d ∈ D. Reachability problem for G: Given: regular sets U, U′ ⊆ V of vertices in G and semi-linear sets C, C′ ⊆ Nn Question: are there vertices (α, ¯ x) ∈ U × C and (β, ¯ y) ∈ U ′ × C′ in G such that (β, ¯ y) is reachable from (α, ¯ x)?
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 19
Reachability Problem for PRMC Graphs
Proposition: The reachability problem for the monotonic-counter extension of any prefix-recognizable graph is decidable. Proof sketch. Let L ⊆ (Σ × D)∗ be the traces of G with U and U ′ as the set of initial and final vertices, respectively. Show U′ × C′ is reachable from U × C iff (C + Φ(L)) ∩ C′ = ∅ Right-hand side: – L is context-free and effectively constructible (Caucal 2003). – Φ(L) is effectively semi-linear. – Effective closure of semi-linear sets under + and ∩. = ⇒ (Non-)Emptiness is decidable
- RWTH Aachen – Wong Karianto
Adding Monotonic Counters to Automata and Transition Graphs – p. 20
Summary
Parikh automata correspond to adding monotonic counters with an additional semi-linearity test. No increase in language recognition power for linear-bounded automata, in contrast to finite and pushdown automata. Application to transition graphs: no increase for synchronized rational graphs, but for pushdown and prefix-recognizable graphs. For prefix-recognizable graphs, reachability remains decidable.
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 21
Further Prospects
Using more general frameworks than monotonic counters, e.g. reversal-bounded counters. Allowing intermediate tests during computations. Comparing Parikh automata to reversal-bounded counter automata. Using more general arithmetical conditions than semi-linear sets.
RWTH Aachen – Wong Karianto Adding Monotonic Counters to Automata and Transition Graphs – p. 22