Solving fixed-point equations by derivation tree analysis Javier Esparza Technische Universit¨ at M¨ unchen Joint work with Stefan Kiefer and Michael Luttenberger
Fixed-point equations We study systems of equations of the form X 1 = f 1 ( X 1 , . . . , X n ) = f 2 ( X 1 , . . . , X n ) X 2 · · · = f n ( X 1 , . . . , X n ) X n where the f i ’s are “polynomial expressions”.
Shortest paths Lengths d i of shortest paths from vertex 0 to vertex i in graph G = ( V , E ) are the largest solution of d i = min ( d i , d j + w ji ) ( i , j ) ∈ E where w ij is the distance from i to j .
Context-free languages Context-free grammar X → ZX | Z → aYa | ZX Y Z → b | aYa Languages generated from X , Y , Z are the least solution of L X = ( L Z · L X ) ∪ L Z = ( { a } · L Y · { a } ) ∪ ( L Z · L X ) L Y L Z = { b } ∪ ( { a } · L Y · { a } )
Nuclear chain reaction 235 U ball of radius D , spontaneous fission. Probability of a chain reaction is (1 − p 0 ) , where p α for 0 ≤ α ≤ D is least solution of � D p α = k α + R α,β f ( p β ) d β 0 for constants k α , R α,β and polynomial f ( x ) . Discretizing the interval [0 , D ] we get n � p i = k i + r i , j f ( p j ) j =1 for constants k i , r i , j .
And many others . . . Stochastic theory: Stationary distribution of Markov chains Extinction probability of branching processes Physics: Heat equation Electrostatic equilibrium Biology: RNA structure prediction Population dynamics Computer science: Dataflow equations (abstract interpretation) Reputation systems Provenance in databases
Underlying structure: ω -continuous semirings Semiring ( C , + , × , 0 , 1) : ( C , + , 0) is a commutative monoid × distributes over + ( C , × , 1) is a monoid 0 × a = a × 0 = 0 ω -continuity: the relation a ⊑ b ⇔ ∃ c : a + c = b is a partial order ⊑ -chains have limits Examples: nonnegative integers and reals plus ∞ , min-plus (tropical), languages, complete lattices, multisets, Viterbi . . . In the rest of the talk: semiring ≡ ω -continuous semiring.
Research program Develop generic solution methods valid for all semirings, or at least for large classes. • Generic implementations. • Exchange of algorithms and proof techniques between numerical mathematics, algebraic computation and language theory. In this talk: brief survey of our work on derivation tree analysis.
Research program Develop generic solution methods valid for all semirings, or at least for large classes. • Generic implementations. • Exchange of algorithms and proof techniques between numerical mathematics, algebraic computation and language theory. In this talk: brief survey of our work on derivation tree analysis.
THE generic solution method: Kleene iteration Theorem [Klee 38, Tars 55, Kui 97]: A system f of fixed-point equations w.r.t. the natural order ⊑ . over a semiring has a least solution µ f This least solution is the supremum of the Kleene approximants, denoted by { k i } i ≥ 0 , and given by k 0 = f (0) = f ( k i ) . k i +1 Basic algorithm for calculation of µ f : compute k 0 , k 1 , k 2 , . . . until either k i = k i +1 or the approximation is considered adequate.
Kleene iteration may be slow Set interpretations: Kleene iteration never terminates if µ f is an infinite set. µ f = a ∗ b • X = { a } · X ∪ { b } Kleene approximants are finite sets: k i = ( ǫ + a + . . . + a i ) b Real semiring: convergence can be very slow. • X = 0 . 5 X 2 + 0 . 5 µ f = 1 = 0 . 99999 . . . “Logarithmic convergence”: k iterations give O (log k ) correct digits. 1 k n ≤ 1 − k 2000 = 0 . 9990 n + 1
Language-theoretic characterization of µ f An equation X = f ( X ) over a semiring induces a context-free grammar G and a valuation V X = 0 . 25 X 2 + 0 . 25 X + 0 . 5 Example: Grammar: X → a X X | b X | c Valuation: V ( a ) = 0 . 25 , V ( b ) = 0 . 25 , V ( c ) = 0 . 5 V extends to derivation trees and sets of derivation trees: V ( t ) := ordered product of the leaves of t � V ( T ) := V ( t ) t ∈ T
Language-theoretic characterization of µ f An equation X = f ( X ) over a semiring induces a context-free grammar G and a valuation V X = 0 . 25 X 2 + 0 . 25 X + 0 . 5 Example: Grammar: X → a X X | b X | c Valuation: V ( a ) = 0 . 25 , V ( b ) = 0 . 25 , V ( c ) = 0 . 5 V extends to derivation trees and sets of derivation trees: V ( t ) := ordered product of the leaves of t � V ( T ) := V ( t ) t ∈ T
Language-theoretic characterization of µ f An equation X = f ( X ) over a semiring induces a context-free grammar G and a valuation V X = 0 . 25 X 2 + 0 . 25 X + 0 . 5 Example: Grammar: X → a X X | b X | c Valuation: V ( a ) = 0 . 25 , V ( b ) = 0 . 25 , V ( c ) = 0 . 5 V extends to derivation trees and sets of derivation trees: V ( t ) := ordered product of the leaves of t � V ( T ) := V ( t ) t ∈ T
X → a X X | b X | c V ( a ) = V ( b ) = 0 . 25 , V ( c ) = 0 . 5 X t 1 : X t 2 : X t 3 : X X X c X a a c c c b X V ( t 3 ) = 0 . 015625 V ( t 1 ) = 0 . 5 c V ( t 2 ) = 0 . 25 · 0 . 5 · 0 . 5 = 0 . 0625 V ( { t 1 , t 2 , t 3 } ) = 0 . 5 + 0 . 0625 + 0 . 015625 = 0 . 578125
Language-theoretic characterization of µ f Fundamental Theorem [Boz99,EKL10]: Let G be the grammar for X = f ( X ) , and let T ( G ) be the set of derivation trees of G . Then def µ f = V ( T ( G )) = V ( G ) X = f ( X ) G µ f = V V ( T ( G )) T ( G )
Derivation tree analysis Use language-theoretic results about the set of derivation trees of the associated context-free grammar to derive approximation or solution algorithms for the system of equations.
Approximating grammars Let G be the grammar for X = f ( X ) . An unfolding of G is a sequence U 1 , U 2 , U 3 , . . . of grammars such that • T ( U i ) ∩ T ( U j ) for every i � = j , and • there is a bijection between � ∞ i =1 T ( U i ) and T ( G ) that preserves the yield. From U 1 , U 2 , U 3 , . . . we get another sequence G 1 , G 2 , G 3 , . . . such that T ( G j ) = � j i =1 T ( U i )
Approximating grammars Let Op be the operator on the semiring such that • V ( G 1 ) = Op (0) and • V ( G i +1 ) = Op ( V ( G i )) for every i ≥ 1 i =1 Op i (0) By the fundamental theorem we get µ f = sup ∞ Op yields a procedure to approximate µ f .
Approximating grammars by height Goal: Yield-preserving bijection between T ( U i ) ( T ( G i ) ) and the derivation trees of G of height i (at most i ). G : X → a X X | b X | c . X � 1 � → c X [1] X � 1 � → aX � k − 1 � X � k − 1 � | aX [ k − 2] X � k − 1 � | aX � k − 1 � X [ k − 2] | bX � k − 1 � X � k � → X � k � | X [ k − 1] X [ k ] → U i ( G i ) is the grammar with X � i � ( X [ i ] ) as axiom.
Approximating grammars by height Goal: Yield-preserving bijection between T ( U i ) ( T ( G i ) ) and the derivation trees of G of height i (at most i ). G : X → a X X | b X | c . X � 1 � → c X [1] X � 1 � → aX � k − 1 � X � k − 1 � | aX [ k − 2] X � k − 1 � | aX � k − 1 � X [ k − 2] | bX � k − 1 � X � k � → X � k � | X [ k − 1] X [ k ] → U i ( G i ) is the grammar with X � i � ( X [ i ] ) as axiom.
Approximating grammars by height Goal: Yield-preserving bijection between T ( U i ) ( T ( G i ) ) and the derivation trees of G of height i (at most i ). G : X → a X X | b X | c . X � 1 � → c X [1] X � 1 � → aX � k − 1 � X � k − 1 � | aX [ k − 2] X � k − 1 � | aX � k − 1 � X [ k − 2] | bX � k − 1 � X � k � → X � k � | X [ k − 1] X [ k ] → U i ( G i ) is the grammar with X � i � ( X [ i ] ) as axiom.
Approximating grammars by height Goal: Yield-preserving bijection between T ( U i ) ( T ( G i ) ) and the derivation trees of G of height i (at most i ). G : X → a X X | b X | c . X � 1 � → c X [1] X � 1 � → aX � k − 1 � X � k − 1 � | aX [ k − 2] X � k − 1 � | aX � k − 1 � X [ k − 2] | bX � k − 1 � X � k � → X � k � | X [ k − 1] X [ k ] → U i ( G i ) is the grammar with X � i � ( X [ i ] ) as axiom.
Approximating grammars by height Goal: Yield-preserving bijection between T ( U i ) ( T ( G i ) ) and the derivation trees of G of height i (at most i ). G : X → a X X | b X | c . X � 1 � → c X [1] X � 1 � → aX � k − 1 � X � k − 1 � | aX [ k − 2] X � k − 1 � | aX � k − 1 � X [ k − 2] | bX � k − 1 � X � k � → X � k � | X [ k − 1] X [ k ] → U i ( G i ) is the grammar with X � i � ( X [ i ] ) as axiom.
Approximating grammars by height Goal: Yield-preserving bijection between T ( U i ) ( T ( G i ) ) and the derivation trees of G of height i (at most i ). G : X → a X X | b X | c . X � 1 � → c X [1] X � 1 � → aX � k − 1 � X � k − 1 � | aX [ k − 2] X � k − 1 � | aX � k − 1 � X [ k − 2] | bX � k − 1 � X � k � → X � k � | X [ k − 1] X [ k ] → U i ( G i ) is the grammar with X � i � ( X [ i ] ) as axiom.
Recommend
More recommend