Download Kleene Algebras and Semimodules for Energy Functions

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Kleene Algebras and Semimodules for
Energy Functions
Zoltán Ésik, Uli Fahrenberg, Axel Legay, Karin Quaas
(ATVA 2013)
Reachability Problems Workshop
25th September 2013
Introduction
- Energy/resource consumption problems:
• system where certain tasks can be repeatedly accomplished
• the system should never run out of energy (resources)
- Energy problems for, e.g.,
• weighted timed automata [Bouyer et al, 2008,2010,2012],
• multiweighted automata [Fahrenberg et al, 2011]
• vector addition systems with states [Brázdil et al, 2010]
- We introduce energy automata in order to unify these approaches
- Energy automata are semiring-weighted automata
- Close connection between energy problems and
reachability and Büchi acceptance problems for semiring-weighted automata
Energy Automata
x 7→ 2x − 2; x > 1
x 7→ x + 2; x ≥ 2
x 7→ x − 1; x > 1
s0
s1
x 7→ x + 3; x > 1
s2
x 7→ x + 1; x ≥ 0
An energy automaton is a pair (S, T ), where
• S is a finite set of states,
• T ⊆ S × E × S is a finite set of transitions labelled with energy functions.
Energy Functions
- Let [0, ∞]⊥ = R≥0 ∪ {∞, ⊥}.
- Extend the standard order on R≥0 by ⊥ < x < ∞ for all x ∈ R≥0.
- An energy function is a mapping f : [0, ∞]⊥ → [0, ∞]⊥ satisfying
• f (⊥) = ⊥,
• f (x2) − f (x1) ≥ x2 − x1 for all x1 ≤ x2 ,
• f (∞) = ∞ (unless f (x) = ⊥ for all x ∈ [0, ∞]⊥)
5
4
3
2
1
1
2
3
4
5

.5





1.5 x − 2.5



2.3
f (x) =

x − .3





4.5



2 x − 4.5
(x = 2)
(2 < x < 3)
(x = 3)
(3 < x < 4.5)
(x = 4.5)
(x > 4.5)
- We use E to denote the set of energy functions
Energy Automata
x 7→ 2x − 2; x > 1
x 7→ x + 2; x ≥ 2
x 7→ x − 1; x > 1
s0
s1
x 7→ x + 3; x > 1
s2
x 7→ x + 1; x ≥ 0
An energy automaton is a pair (S, T ), where
• S is a finite set of states,
• T ⊆ S × E × S is a finite set of transitions labelled with energy functions.
An example run:
(s0, 1.5) → (s1, 4.5) → (s1, 7) → (s2, 6) → . . .
Problems
Let E ′ ⊆ E be a subset of computable energy functions.
The Reachability Problem
Instance: E ′-automaton (S, T ), s0 ∈ S, F ⊆ S, computable x0 ∈ R≥0 .
Question: Is there some finite run of (S, T ) from (s0, x0)
that ends in some state in F ?
ReachE (S, T )(s0, F, x0)
The Büchi Acceptance Problem
Instance: E ′-automaton (S, T ), s0 ∈ S, F ⊆ S, computable x0 ∈ R≥0 .
Question: Is there some infinite run of (S, T ) from (s0, x0)
that visits states in F infinitely often?
BuchiE (S, T )(s0, F, x0 )
Background
Reachability Problem for Finite Directed Graphs
- For finite graphs, Reach(S, T )(s0, F ) is in NL
1
2
- Algebraic approach:
∗ There is a finite run from
0 1 0
⇔
1 0
=1
1 that ends in 2
0 1 1
- M is the |S| × |S|-adjacency matrix of T over Boolean algebra
- Compute M ∗ using Warshall’s algorithm
- Warshall’s algorithm extended for computing ∗ of matrices
over other structures, e.g., closed semirings [Lehmann 1977]
- For, e.g., Conway semirings, ∗ can be defined inductively by
decomposition
of matrices:
∗ ∗
∗ ∗ ∗
(a ∨ bd c)
(a ∨ bd c) bd
a b
M∗ =
M=
(d ∨ ca∗b)∗ca∗
(d ∨ ca∗b)∗
c d
The Algebra of Energy Functions
The Algebra of Energy Functions (1)
- (E, ∨, ◦,⊥, id) is an idempotent semiring with natural partial order ≤
• f ≤ g iff f (x) ≤ g(x) ,
• (f ∨ g)(x) = max(f (x), g(x)),
• (f ◦ g)(x) = f (g(x)),
• ⊥(x) = ⊥,
• id(x) = x.
- Define
∗
operation
on E:
(
x if f (x) ≤ x
f ∗(x) =
∞ if f (x) > x
- (E, ∨, ◦,∗ ,⊥, id) is a star-continuous Kleene algebra: gf ∗h = supn∈N gf nh
The Algebra of Energy Functions (2)
- (E (n×n) , ∨, ◦, Z, I) is an idempotent semiring with natural partial order ≤
•
•
•
•
•
A ≤ B iff Ai,j ≤ Bi,j for all 1 ≤ i, j ≤ n ,
(A ∨ B)i,j = W
Ai,j ∨ Bi,j ,
n
(A ◦ B)i,j = k=1 Ai,k ◦ Bk,j ,
Z is the zero (n × n)-matrix,
I is the identity (n × n)-matrix
- The matrix semiring of a star-continuous Kleene algebra is also a
star-continuous Kleene algebra: M N ∗O = supn∈N M N nO [DKV 2009]
- Every star-continuous Kleene algebra is a Conway semiring [DKV 2009]
- Thus: M ∗ can be computed by matrix decomposition:
∗ ∗
∗ ∗ ∗
a b
(a ∨ bd c)
(a ∨ bd c) bd
M=
M∗ =
c d
(d ∨ ca∗b)∗ca∗
(d ∨ ca∗b)∗
Reachability Problem
- Let E ′ ⊆ E be a subalgebra so that f ∗ ∈ E ′ for each f ∈ E ′.
- Let (S, T ) with |S| = n be an E ′-automaton.
- Goal: apply Kleene algebra framework to solve ReachE ′ (S, T )(s0, F, x0 )
f22
g
s0
f23
s1
h
s2
f32
There is a finite run
of (S, T ) from (s0, x0)
that ends in s2
⇔

∗  
⊥
⊥ max{g, h} ⊥
id ⊥ ⊥ ⊥
f22
f23 ⊥  (x0) 6= ⊥
id
⊥
f32
⊥
- Note: We can compute M ∗ because E (n×n) is a Conway semiring.
- Note: The algorithm is static.
Reachability Problem
- Let E ′ ⊆ E be a subalgebra so that f ∗ ∈ E ′ for each f ∈ E ′.
- Let (S, T ) with |S| = n be an E ′-automaton.
- Goal: apply Kleene algebra framework to solve ReachE ′ (S, T )(s0, F, x0 )
Theorem: There is a finite run of (S, T ) from (s0, x0) to some state in F
if, and only if,
I s0 T ∗F (x0) 6= ⊥.
- Note: Proof is based on the fact that E (n×n) is a star-continuous
Kleene algebra: N M ∗O = supn∈N (N M nO)
The Algebra of Energy Functions (3)
- (E, ∨, ◦,∗ ,⊥, id) is a star-continuous Kleene algebra
- (E, ≤) is a complete lattice: ∨ defined for infinite sets of energy functions
- Define ◦ operation for infinite sequences f0, f1, f2, . . . of energy functions:
(
Q∞
false if ∃n ∈ N.xn = ⊥
( i=0 fi)(x0) =
true
if ∀n ∈ N.xn 6= ⊥
where x0 ∈ [0, ∞]⊥ and xn+1 = fn(xn).
- Define
ω
operation
on energy functions:
(
false if x = ⊥ or f (x) < x
, where x ∈ [0, ∞]⊥
f ω (x) =
true
if x =
6 ⊥ and f (x) ≥ x
- Note that ◦ and
ω
do not map to [0, ∞]⊥, but {true, false}
The Algebra of Energy Functions (4)
- Let B = {true, false} be the Boolean algebra, with false < true.
- Define V be the set of mappings u : [0, ∞]⊥ → B satisfying
• u(⊥) = false
• x1 ≤ x2 ⇒ u(x1) ≤ u(x2)
- (E, V) is a Conway semiring-semimodule pair [Ésik & Kuich 2005]
• with action V × E → V : (u, f ) 7→ uf
- (E (n×n) , V n) is a Conway semiring-semimodule pair
• with action E (n×n) × V n → V n similar to matrix multiplication
• ωk : E (n×n) → V n is defined inductively by matrix decomposition.
Büchi Acceptance Problem
- Let E ′ ⊆ E be a subalgebra so that f ∗ ∈ E ′ for each f ∈ E ′.
- Let (S, T ) with |S| = n be an E ′-automaton.
- Goal: apply Kleene algebra framework to solve BuchiE ′ (S, T )(s0, F, x0)
Theorem:
There is an infinite run of (S, T ) from(s0, x0) visiting states in F infinitely often
if, and only if,
T ω F (x0) = true.
Applications
Application: Integer Update Functions
- Used in integer weighted automata and VASS
x 7→ x + 2; x ≥ 0
...
x 7→ x − 5; x ≥ 5
...
- The class Eint of integer update functions forms a subalgebra of E
Theorem: For Eint-automata, reachability and Büchi acceptance are
decidable in PTIME.
Application: Piecewise Affine Functions
- Used in the reduction to show decidability of energy problems for
single-clock weighted timed automata [Bouyer et al 2010]
5
4
3
2
1
1
2
3
4
5

.5





1.5 x − 2.5



2.3
f (x) =

x − .3





4.5



2 x − 4.5
(x = 2)
(2 < x < 3)
(x = 3)
(3 < x < 4.5)
(x = 4.5)
(x > 4.5)
- The class Epw of piecewise affine functions forms a subalgebra of E.
Theorem: For Epw -automata, reachability and Büchi acceptance are
decidable in EXPTIME.
Extensions
Extension to Multidimensional Energy Automata
- Multiple energy variables
- The static decision algorithms from our algebraic approach cannot
be applied (counterexample)
n
-automata are
- The class of n-dimensional integer piecewise affine Epwi
upward-compatible well-structured transition systems.
n
Theorem: For Epwi
-automata, reachability is decidable.
- Büchi acceptance problem: open.
Extension to Flat Energy Automata
- we lift the requirement f (x2) − f (x1) ≥ x2 − x1 for each x2 ≥ x1
- flat energy functions
• still require f to be strictly increasing
• derivative may be less than 1
- we conjecture that the algebraic approach can be extended to
flat energy functions (for one energy variable)
4
Theorem: For flat Epw
-automata, reachability is undecidable.
Extension to Energy Games
- Let (S, T ) be an n-dimensional energy automaton such that
• S = SA ∪ SB forms a partition, and
• T ⊂ (SA × E × SB ) ∪ (SB × E × SA).
- Then (S, T ) induces an n-dimensional energy game.
Theorem: Whether A wins the reachability game in Eint-automata
2
(i.e., 1-dimensional VASS) is decidable. For Eint
-automata
the same problem is undecidable.[Brázdil et al 2010].
Theorem: Whether A wins the reachability game in flat Epw -automata
is undecidable.
Bibliography
Bouyer, Fahrenberg, Larsen, Markey& Srba: Infinite runs in weighted timed automata with energy constraints.
FORMATS 2008 : 33-47
Bouyer, Fahrenberg, Larsen & Markey: Timed automata with observers under energy constraints. HSCC 2010 :
61-70
Bouyer, Larsen & Markey: Lower-bound constraint runs in weighted timed automata QEST 2012 : 128-137
Brázdil, Jancar & Kucera: Reachability Games on Extended Vector Addition Systems with States. ICALP (2)
2010 : 478-489
Droste, Kuich & Vogler (Editors): Handbook of Weighted Automata. Springer, 2009.
Ésik, Fahrenberg, Legay & Quaas: Kleene Algebras and Semimodules for Energy Automata. ATVA, (2013)
Ésik & Kuich: A Semiring-Semimodule Generalization of ω -Regular Languages I and II. Journal of Automata,
Languages and Combinatorics 10(2/3) 203-242 (2005)
Lehmann: Algebraic structures for transitive closure. Theor. Comput. Sci. 4(1): 59-76 (1977)
Fahrenberg, Juhl, Larsen & Srba: Energy games on multiweighted automata. ICTAC 2011 : 95-115