Pebble weighted automata and transitive closure logics B. Bollig, - - PowerPoint PPT Presentation

pebble weighted automata and transitive closure logics
SMART_READER_LITE
LIVE PREVIEW

Pebble weighted automata and transitive closure logics B. Bollig, - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

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

slide-2
SLIDE 2

Motivations

Analysis of quantitative systems

◮ Probabilistic Systems ◮ Minimization of costs ◮ Maximization of rewards ◮ . . .

slide-3
SLIDE 3

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.

slide-4
SLIDE 4

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 = . . .

slide-5
SLIDE 5

Weighted automata

◮ Transitions carry weights from a semiring K = (K, +, ×, 0, 1).

p q ka

Example: Semirings

◮ B = ({0, 1}, ∨, ∧, 0, 1)

Boolean

◮ P = (R+, +, ×, 0, 1)

Probabilistic

◮ T = (N ∪ {∞}, min, +, ∞, 0)

Tropical

◮ N = (N, +, ×, 0, 1)

Natural

slide-6
SLIDE 6

Weighted automata

◮ Transitions carry weights from a semiring K = (K, +, ×, 0, 1).

p q ka

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.

weight(p0

k1a1

− − − → p1

k2a2

− − − → · · ·

knan

− − − → pn) = k1k2 · · · kn

◮ Weight of a word: sum of all weights of accepted runs on this word.

A(w) =

  • ρ run of A on w

weight(ρ)

slide-7
SLIDE 7

Weighted automata

◮ Transitions carry weights from a semiring K = (K, +, ×, 0, 1).

p q ka

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.

weight(p0

k1a1

− − − → p1

k2a2

− − − → · · ·

knan

− − − → pn) = k1k2 · · · kn

◮ Weight of a word: sum of all weights of accepted runs on this word.

A(w) =

  • ρ run of A on w

weight(ρ)

slide-8
SLIDE 8

Examples of weighted automata

◮ Alphabet Σ, on (N, +, ×, 0, 1).

1 1 2Σ A(u) = 2|u|. 1 1 1Σ 1Σ 1a −1b A(u) = |u|a − |u|b.

slide-9
SLIDE 9

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: k1 · · · kn ≤ (max ki)n.

slide-10
SLIDE 10

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.

slide-11
SLIDE 11

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.

1 1 2Σ

slide-12
SLIDE 12

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.

slide-13
SLIDE 13

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.

slide-14
SLIDE 14

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

◮ . . .

slide-15
SLIDE 15

Weighted MSO

Definition: Syntax of MSO

ϕ ::= k | Pa(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. ◮ Pa(x) means “position x carries an a”. ◮ x ≤ y means “position x is before position y”.

slide-16
SLIDE 16

Weighted MSO

Definition: Syntax of MSO

ϕ ::= k | Pa(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. ◮ Pa(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.

slide-17
SLIDE 17

MSO: examples

◮ ∃xPa(x) = |u|a

recognizable

◮ ∃xPa(x) ∨ ∃x[−1 ∧ Pb(x)] = |u|a − |u|b

recognizable

◮ ∀y2(u) = 2|u|.

recognizable

slide-18
SLIDE 18

MSO: examples

◮ ∃xPa(x) = |u|a

recognizable

◮ ∃xPa(x) ∨ ∃x[−1 ∧ Pb(x)] = |u|a − |u|b

recognizable

◮ ∀y2(u) = 2|u|.

recognizable

◮ ∀x∀y2(u) = 2|u|2.

not recognizable

◮ =

⇒ Recognizable are not stable under universal quantification.

slide-19
SLIDE 19

MSO: examples

◮ ∃xPa(x) = |u|a

recognizable

◮ ∃xPa(x) ∨ ∃x[−1 ∧ Pb(x)] = |u|a − |u|b

recognizable

◮ ∀y2(u) = 2|u|.

recognizable

◮ ∀x∀y2(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).

slide-20
SLIDE 20

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

slide-21
SLIDE 21

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 Σ, ∗, ← Σ, ∅, ← ⊲, ∗, → Σ, ∗, drop ⊲, ∗, → ⊳, ∗, ← Σ, •, lift Σ, ∗, →

slide-22
SLIDE 22

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 Σ, ∗, ← Σ, ∅, ← ⊲, ∗, → Σ, ∗, drop ⊲, ∗, → ⊳, ∗, ← Σ, •, lift Σ, ∗, → For ∃: nondeterministcally drop pebble 1. A Σ, ∗, → Σ, ∗, ← ⊲, ∗, → Σ, ∗, drop ⊲, ∗, →

slide-23
SLIDE 23

Transitive closure logics

◮ ϕ with at least two first order free variables.

ϕ1(x, y) = (x ≤ y) ∧ ϕ ϕn(x, y) = ∃z0 · · · ∃zn

  • x = z0 < z1 < · · · < zn = y ∧
  • 1≤ℓ≤n ϕ(zℓ−1, zℓ)
  • .

◮ The transitive closure operator is defined by

TC<

xyϕ =

  • n≥1

ϕn. x y z1 z2 z3 ϕ ϕ ϕ ϕ

slide-24
SLIDE 24

Transitive closure logics

◮ ϕ with at least two first order free variables.

ϕ1(x, y) = (x ≤ y) ∧ ϕ ϕn(x, y) = ∃z0 · · · ∃zn

  • x = z0 < z1 < · · · < zn = y ∧
  • 1≤ℓ≤n ϕ(zℓ−1, zℓ)
  • .

◮ The transitive closure operator is defined by

TC<

xyϕ =

  • n≥1

ϕn. x y z1 z2 z3 ϕ ϕ ϕ ϕ

◮ ϕ(x, y)

def

= (y = x + 1) ∧ ∀z 2. Then [TC<

xyϕ](u, 1, |u|) = (2|u|)|u|−1.

TC<

xy simulates first-order universal quantification.

slide-25
SLIDE 25

Transitive closure logics

◮ ϕ with at least two first order free variables.

ϕ1(x, y) = (x ≤ y) ∧ ϕ ϕn(x, y) = ∃z0 · · · ∃zn

  • x = z0 < z1 < · · · < zn = y ∧
  • 1≤ℓ≤n ϕ(zℓ−1, zℓ)
  • .

◮ The transitive closure operator is defined by

TC<

xyϕ =

  • n≥1

ϕn. x y z1 z2 z3 ϕ ϕ ϕ ϕ

◮ ϕ(x, y)

def

= (y = x + 1) ∧ ∀z 2. Then [TC<

xyϕ](u, 1, |u|) = (2|u|)|u|−1.

TC<

xy simulates first-order universal quantification. ◮ ψ = TC< x,y(2 ∧ y = x + 2).

ψ(u, 1, |u|) =

  • 2n

if |u| = 2n + 1 with n ≥ 1

  • therwise.
slide-26
SLIDE 26

Expressiveness

Theorem (Bollig, Gastin, Monmege, Z.)

◮ FO + TC< with bounded steps = weighted pebble automata. ◮ TC<(ϕ) where ϕ Boolean captures weighted automata. ◮ Proof resembles the translation 2-way → 1-way automata. ◮ Uses an intermediate automaton model: nested automata. ◮ We do not know if allowing unbounded steps goes beyond pebble automata. ◮ Allowing forward + backward unbounded steps goes beyond pebble

automata.

slide-27
SLIDE 27

Some short-term questions

  • 1. Algorithms. (SAT is decidable for positive semiring.)
  • 2. Relax bounded assumption.
  • 3. Weak pebbles vs. strong pebbles.
  • 4. How do these results extend to trees?
  • 5. XPath-like logics?