Pebble weighted automata and transitive closure logics B. Bollig, P. Gastin, B. Monmege, M. Zeitoun LSV, ENS Cachan, CNRS, INRIA. DOTS meeting March 18, 2010
Motivations Analysis of quantitative systems ◮ Probabilistic Systems ◮ Minimization of costs ◮ Maximization of rewards ◮ . . .
Motivations Analysis of quantitative systems ◮ Probabilistic Systems ◮ Minimization of costs ◮ Maximization of rewards ◮ . . . Models ◮ Probabilistic automata (generative, reactive) ◮ Transition systems with costs or rewards ◮ . . . Special instances of weighted automata.
Motivations Sequential setting: automata on (finite) words. ◮ Weighted automata: quantitative extension of classical automata. ◮ Classical: decide whether a given word is accepted or not, ◮ Weighted: compute a value in a semiring from input word. ◮ Weighted logics: a formula evaluated on a word produces a value. ◮ How often does a Boolean property hold? ◮ Is the number of nodes selected by a request at least 10? ◮ In this talk, we focus on expressiveness. Boolean setting: Automata = FO+TC = MSO = EMSO = . . .
Weighted automata ◮ Transitions carry weights from a semiring K = ( K , + , × , 0 , 1 ) . ka p q Example: Semirings ◮ B = ( { 0 , 1 } , ∨ , ∧ , 0 , 1 ) Boolean ◮ P = ( R + , + , × , 0 , 1 ) Probabilistic ◮ T = ( N ∪ {∞} , min , + , ∞ , 0 ) Tropical ◮ N = ( N , + , × , 0 , 1 ) Natural
Weighted automata ◮ Transitions carry weights from a semiring K = ( K , + , × , 0 , 1 ) . ka p q Example: Semirings ◮ B = ( { 0 , 1 } , ∨ , ∧ , 0 , 1 ) Boolean ◮ P = ( R + , + , × , 0 , 1 ) Probabilistic ◮ T = ( N ∪ {∞} , min , + , ∞ , 0 ) Tropical ◮ N = ( N , + , × , 0 , 1 ) Natural ◮ Weight of a run: product of all transition weights in the semiring. k 1 a 1 k 2 a 2 k n a n weight ( p 0 − − − → p 1 − − − → · · · − − − → p n ) = k 1 k 2 · · · k n ◮ Weight of a word: sum of all weights of accepted runs on this word. � � A � ( w ) = weight ( ρ ) ρ run of A on w
Weighted automata ◮ Transitions carry weights from a semiring K = ( K , + , × , 0 , 1 ) . ka p q Example: Semirings ◮ B = ( { 0 , 1 } , ∨ , ∧ , 0 , 1 ) Boolean existence of accepting run. ◮ P = ( R + , + , × , 0 , 1 ) Probabilistic probability of acceptance ◮ T = ( N ∪ {∞} , min , + , ∞ , 0 ) Tropical minimal cost ◮ N = ( N , + , × , 0 , 1 ) Natural ◮ Weight of a run: product of all transition weights in the semiring. k 1 a 1 k 2 a 2 k n a n weight ( p 0 − − − → p 1 − − − → · · · − − − → p n ) = k 1 k 2 · · · k n ◮ Weight of a word: sum of all weights of accepted runs on this word. � � A � ( w ) = weight ( ρ ) ρ run of A on w
Examples of weighted automata ◮ Alphabet Σ , on ( N , + , × , 0 , 1 ) . 2 Σ 1 1 � A � ( u ) = 2 | u | . 1 Σ 1 Σ 1 a 1 1 � A � ( u ) = | u | a − | u | b . − 1 b
Weighted automata cannot compute large functions Lemma A = ( Q , µ ) weighted automaton on N . There exists M such that � A � ( u ) = O ( M | u | ) . ◮ There are O ( | Q | | u | ) runs on u , ◮ Each of which of weight exponential in | u | = n : k 1 · · · k n ≤ ( max k i ) n .
Pebble weighted automata ◮ Automaton with 2-way mechanism and pebbles { 1 , . . . , r } . ◮ Read-only head can go either direction on ⊲ u ⊳ (where ⊲ , ⊳ / ∈ Σ ). ◮ The automaton can ← , → , drop or lift a pebble with a stack policy. Only the more recently dropped pebble may be lifted. ◮ Applicable transitions depend on current (state,letter,pebbles). ( p , ka , Pebbles , D , q ) , where D ∈ {← , → , lift , drop } . ◮ Note. For Boolean word automata, this does not add expressive power.
Pebble weighted automata ◮ Automaton with 2-way mechanism and pebbles { 1 , . . . , r } . ◮ Read-only head can go either direction on ⊲ u ⊳ (where ⊲ , ⊳ / ∈ Σ ). ◮ The automaton can ← , → , drop or lift a pebble with a stack policy. Only the more recently dropped pebble may be lifted. ◮ Applicable transitions depend on current (state,letter,pebbles). ( p , ka , Pebbles , D , q ) , where D ∈ {← , → , lift , drop } . ◮ Note. For Boolean word automata, this does not add expressive power. 2 Σ 1 1
Pebble weighted automata ◮ Automaton with 2-way mechanism and pebbles { 1 , . . . , r } . ◮ Read-only head can go either direction on ⊲ u ⊳ (where ⊲ , ⊳ / ∈ Σ ). ◮ The automaton can ← , → , drop or lift a pebble with a stack policy. Only the more recently dropped pebble may be lifted. ◮ Applicable transitions depend on current (state,letter,pebbles). ( p , ka , Pebbles , D , q ) , where D ∈ {← , → , lift , drop } . ◮ Note. For Boolean word automata, this does not add expressive power. Σ , ∗ , ← 2 Σ , ∗ , → Σ , ∅ , ← ⊲ , ∗ , → Σ , ∗ , drop ⊲ , ∗ , → ⊳ , ∗ , ← Σ , • , lift Σ , ∗ , → ◮ Computes 2 | u | 2 : pebbles add expressive power.
Weighted MSO Short history Introduced by Droste & Gastin (ICALP’05) Aim: Logical characterization of weighted automata. Generalization of Elgot’s and Büchi’s theorems.
Weighted MSO Short history Introduced by Droste & Gastin (ICALP’05) Aim: Logical characterization of weighted automata. Generalization of Elgot’s and Büchi’s theorems. Extended to ◮ Trees Droste & Vogler ◮ Infinite words Droste & Kuske, Droste & Rahonis ◮ Pictures Fischtner ◮ Traces Meinecke ◮ Distributed systems Bollig & Meinecke ◮ . . .
Weighted MSO Definition: Syntax of MSO ϕ ::= k | P a ( x ) | x ≤ y | x ∈ X | ¬ ϕ | ϕ ∨ ϕ | ϕ ∧ ϕ | ∃ x ϕ | ∀ x ϕ | ∃ X ϕ | ∀ X ϕ where k ∈ K , a ∈ Σ , x , y are first-order variables, X is a set variable. Definition: Semantics ◮ A formula ϕ without free variables defines a mapping � ϕ � : Σ + → K . ◮ First order variables are interpreted as positions in the word. ◮ P a ( x ) means “position x carries an a ”. ◮ x ≤ y means “position x is before position y ”.
Weighted MSO Definition: Syntax of MSO ϕ ::= k | P a ( x ) | x ≤ y | x ∈ X | ¬ ϕ | ϕ ∨ ϕ | ϕ ∧ ϕ | ∃ x ϕ | ∀ x ϕ | ∃ X ϕ | ∀ X ϕ where k ∈ K , a ∈ Σ , x , y are first-order variables, X is a set variable. Definition: Semantics ◮ A formula ϕ without free variables defines a mapping � ϕ � : Σ + → K . ◮ First order variables are interpreted as positions in the word. ◮ P a ( x ) means “position x carries an a ”. ◮ x ≤ y means “position x is before position y ”. ◮ � ϕ 1 ∨ ϕ 2 � = � ϕ 1 � + � ϕ 2 � and � ϕ 1 ∧ ϕ 2 � = � ϕ 1 � × � ϕ 2 � . ◮ ∃ x ϕ interpreted as a sum over all positions. ◮ ∀ x ϕ interpreted as a product over all positions.
MSO: examples ◮ � ∃ xP a ( x ) � = | u | a recognizable ◮ � ∃ xP a ( x ) ∨ ∃ x [ − 1 ∧ P b ( x )] � = | u | a − | u | b recognizable ◮ � ∀ y 2 � ( u ) = 2 | u | . recognizable
MSO: examples ◮ � ∃ xP a ( x ) � = | u | a recognizable ◮ � ∃ xP a ( x ) ∨ ∃ x [ − 1 ∧ P b ( x )] � = | u | a − | u | b recognizable ◮ � ∀ y 2 � ( u ) = 2 | u | . recognizable ◮ � ∀ x ∀ y 2 � ( u ) = 2 | u | 2 . not recognizable ◮ = ⇒ Recognizable are not stable under universal quantification.
MSO: examples ◮ � ∃ xP a ( x ) � = | u | a recognizable ◮ � ∃ xP a ( x ) ∨ ∃ x [ − 1 ∧ P b ( x )] � = | u | a − | u | b recognizable ◮ � ∀ y 2 � ( u ) = 2 | u | . recognizable ◮ � ∀ x ∀ y 2 � ( u ) = 2 | u | 2 . not recognizable ◮ = ⇒ Recognizable are not stable under universal quantification. [DG’05] defined RMSO, a fragment of MSO. Theorem (Droste & Gastin’05) Weighted automata = RMSO (effective translation).
Pebble weighted automata are stable under FO Lemma Pebble weighted automata are stable under FO constructs. Proof idea for ∀ / ∃ : add first pebble interpreted as free variable. For ∀ : drop pebble 1 successively on each position. A
Pebble weighted automata are stable under FO Lemma Pebble weighted automata are stable under FO constructs. Proof idea for ∀ / ∃ : add first pebble interpreted as free variable. For ∀ : drop pebble 1 successively on each position. Σ , ∗ , ← Σ , ∅ , ← ⊲ , ∗ , → Σ , ∗ , drop ⊲ , ∗ , → ⊳ , ∗ , ← Σ , • , lift A Σ , ∗ , →
Pebble weighted automata are stable under FO Lemma Pebble weighted automata are stable under FO constructs. Proof idea for ∀ / ∃ : add first pebble interpreted as free variable. For ∀ : drop pebble 1 successively on each position. Σ , ∗ , ← Σ , ∅ , ← ⊲ , ∗ , → Σ , ∗ , drop ⊲ , ∗ , → ⊳ , ∗ , ← Σ , • , lift A Σ , ∗ , → For ∃ : nondeterministcally drop pebble 1. Σ , ∗ , → Σ , ∗ , ← ⊲ , ∗ , → Σ , ∗ , drop ⊲ , ∗ , → A
Transitive closure logics ◮ ϕ with at least two first order free variables. ϕ 1 ( x , y ) = ( x ≤ y ) ∧ ϕ � �� ϕ n ( x , y ) = ∃ z 0 · · · ∃ z n �� x = z 0 < z 1 < · · · < z n = y ∧ 1 ≤ ℓ ≤ n ϕ ( z ℓ − 1 , z ℓ ) . ◮ The transitive closure operator is defined by TC < � ϕ n . xy ϕ = n ≥ 1 z 1 z 2 z 3 y x ϕ ϕ ϕ ϕ
Recommend
More recommend