39
To appear in: Theoretical Computer Science, Special Issue of “11th Int. Conf. on Automata and Formal Languages 2005”. Skew and infinitary formal power series * Manfred Droste and Dietrich Kuske Institut f¨ ur Informatik Universit¨ at Leipzig Augustusplatz 10-11 D-04109 Leipzig email: {droste,kuske}@informatik.uni-leipzig.de Abstract We investigate finite-state systems with weights. Departing from the classical theory, in this paper the weight of an action does not only depend on the state of the system, but also on the time when it is executed; this reflects the usual human evaluation practices in which later events are considered less urgent and carry less weight than close events. We first characterize the terminating behaviors of such systems in terms of rational formal power series. This generalizes a classical result of Sch¨ utzenberger. Secondly, we deal with nonterminating behaviors and their weights. This includes an extension of the B¨ uchi-acceptance condition from finite automata to weighted automata and provides a characterization of these nonterminating behaviors in terms of ω-rational formal power series. This generalizes a classical theorem of B¨ uchi. 1 Introduction In automata theory, Kleene’s fundamental theorem [Kle56] on the coincidence of regular and ra- tional languages has been extended in several directions. Sch¨ utzenberger [Sch61] showed that the formal power series (weight functions) associated with weighted finite automata over words and an arbitrary semiring for the weights, are precisely the rational formal power series. Weighted automata have recently received much interest due to their applications in image compression (Culik II and Kari [CK93], Hafner [Haf99], Katritzke [Kat01], Jiang, Litow and de Vel [JLd00], Eramian [Era02]) and in speech-to-text processing (Mohri [Moh97], [MPR00], Buchsbaum, Gi- ancarlo and Westbrook [BGW00]). On the other hand, B¨ uchi [B¨ uc60] extended Kleene’s result to languages of infinite words, showing that finite automata recognize precisely the ω-rational languages. This result stimu- lated a huge amount of more recent research on automata acting on various infinite structures, and B¨ uchi-automata are used for formal verification of reactive systems with infinite processes. * This work was carried out while M. Droste was affiliated with the Technische Universit¨ at Dresden and D. Kuske with the University of Leicester.

Skew and infinitary formal power series

Embed Size (px)

Citation preview

To appear in: Theoretical Computer Science, Special Issue of “11th Int. Conf. on Automataand Formal Languages 2005”.

Skew and infinitary formal power series∗

Manfred Droste and Dietrich KuskeInstitut fur InformatikUniversitat Leipzig

Augustusplatz 10-11D-04109 Leipzig

email:{droste,kuske}@informatik.uni-leipzig.de

Abstract

We investigate finite-state systems with weights. Departing from the classical theory, inthis paper the weight of an action does not only depend on the state of the system, but alsoon the time when it is executed; this reflects the usual human evaluation practices in whichlater events are considered less urgent and carry less weight than close events. We firstcharacterize the terminating behaviors of such systems in terms of rational formal powerseries. This generalizes a classical result of Schutzenberger.

Secondly, we deal with nonterminating behaviors and their weights. This includes anextension of the Buchi-acceptance condition from finite automata to weightedautomata andprovides a characterization of these nonterminating behaviors in terms ofω-rational formalpower series. This generalizes a classical theorem of Buchi.

1 Introduction

In automata theory, Kleene’s fundamental theorem [Kle56] on the coincidence of regular and ra-tional languages has been extended in several directions. Schutzenberger [Sch61] showed that theformal power series (weight functions) associated with weighted finite automata over words andan arbitrary semiring for the weights, are precisely the rational formal power series. Weightedautomata have recently received much interest due to their applications in image compression(Culik II and Kari [CK93], Hafner [Haf99], Katritzke [Kat01], Jiang, Litow and de Vel [JLd00],Eramian [Era02]) and in speech-to-text processing (Mohri [Moh97], [MPR00], Buchsbaum, Gi-ancarlo and Westbrook [BGW00]).

On the other hand, Buchi [Buc60] extended Kleene’s result to languages of infinite words,showing that finite automata recognize precisely theω-rational languages. This result stimu-lated a huge amount of more recent research on automata acting on various infinite structures,and Buchi-automata are used for formal verification of reactive systems with infinite processes.

∗This work was carried out while M. Droste was affiliated with the Technische Universitat Dresden and D. Kuskewith the University of Leicester.

For theoretical background on formal power series, we referthe reader to [SS78, KS86, BR88,Kui97], and for background on automata on infinite words to [Tho90, PP04].

In this paper, we wish to extend Buchi’s and Schutzenberger’s approaches to weighted au-tomata on infinite words. Whereas Schutzenberger’s result for automata on finite words worksfor weights taken in an arbitrary semiring, it is clear that for weighted automata on infinite wordsquestions of summability and convergence arise. Thereforewe assume that the weights are takenin the real numbers, endowed with maximum and addition as operations. This max-plus semiringof real numbers is fundamental in max-plus algebra (Gaubertand Plus [GP97], Cuninghame-Green [CG95]) and in algebraic optimization problems [Zim81], and related semirings also oc-curred in other investigations on formal power series (e.g., [Kui97, DG99, DG00]). We note thata different approach of weighted automata acting on infinitewords has been considered beforein connection with digital image processing by Culik and Karhumaki [CK94].

We will introduce the concept of automata acting on infinite words and with weights in thereal max-plus semiring. Their behavior is described by the function associating to each wordthe cost the automaton needs for evaluating it. However, thearising infinite sums of weightsof the transitions in an infinite computation sequence usually diverge. In order to enforce theirconvergence, here we introduce a deflation parameterq ∈ [0, 1). That is, we assume that ina computation sequence, the weight of a later transition is decreased by multiplication with apower ofq. This is a usual mathematical procedure in order to obtain convergence of series. Iteven enables one to compare their “rate of former divergence”. Moreover it also reflects the usualhuman evaluation practices in which later events are considered less urgent and carry less weightthan close events, a phenomenon investigated intensively as ’discounting’ in Markov decisionprocesses, economis and game theory [Sha53, FV97, dAHM03].Note that multiplication with anonnegative real constitutes an endomorphism of the max-plus semiring.

Therefore we derive, as our first new result, a generalization of Schutzenberger’s classicalresult on automata on finite words, where the weights are taken in an arbitrary semiring, butnow changed along computation sequences by a given endomorphism. In fact, we show that alsounder this notion several different concepts of automata investigated before in the literature againcoincide. If the endomorphism is the identity, we obtain Schutzenberger’s theorem as a particularcase. This result is of independent interest, since such twisted (“skew”) multiplications have beenconsidered in the area of Ore series in difference and differential algebra, cf. [Ore33, Gau94,Gal85, BP96]. In this context we note that “many” monoids arise as the endomorphism monoidof a field (see [DG87]), hence even fields may have very many automorphisms each giving riseto a notion of recognizable series. We prove analogues of classical preservation theorems forhomomorphisms between different alphabets or semirings. We also show that when consideringthe max-plus semiring and multiplication with reals as endomorphisms, then different numbersyield indeed different collections of recognizable series.

Then we turn to automata on infinite words with weights in the real max-plus semiring asdescribed above. Theω-recognizable seriesare those which can be obtained as the behavior of afinite weighted automaton acting on infinite words. We define rational operations on series overinfinite words like sum and skew product, Kleene iteration andω-iteration. Theω-rational seriesthen are those which can be obtained by these operations fromthe monomial.

Our second main result states that theω-recognizable and theω-rational formal power series

2

over the real max-plus semiring with deflation parameterq coincide, for eachq ∈ [0, 1). Weshow that from this one can obtain Buchi’s classical result on the coincidence ofω-recognizableandω-rational languages as a consequence. This is essentially due to the fact that the Booleansemiring can be naturally embedded into the (idempotent) max-plus semiring.

2 Weighted automata

First let us recall basic definitions of semirings. For background, we refer the reader to [SS78,KS86, BR88, Kui97]. A structure(K,⊕,�, 0, 1) is a semiring if (K,⊕, 0) is a commutativemonoid,(K,�, 1) is a monoid,� is both left- and right-distributive over⊕, and0�x = x�0 = 0for anyx ∈ K. Important examples include

• the natural numbers(N,+, ·, 0, 1) with the usual addition and multiplication,

• the Boolean semiringB = ({0, 1},∨,∧, 0, 1),

• the tropical semiringRmax = (R≥0 ∪ {−∞},max,+,−∞, 0) (that is also known asmax-plus semiring) withR≥0 = [0,∞) and−∞ + x = −∞ for eachx ∈ Rmax. Observe thatin this semiring−∞ acts as zero, i.e., neutrally with respect tomax, and0 as one, i.e.,neutral with respect to+.

If there is no ambiguity, we denote a semiring just byK.A mappingϕ : K1 → K2 between two semiringsK1 andK2 is calledhomomorphismif

ϕ(x ⊕ y) = ϕ(x) ⊕ ϕ(y) andϕ(x � y) = ϕ(x) � ϕ(y) for all x, y ∈ K1, andϕ(0) = 0 andϕ(1) = 1. A homomorphismϕ : K → K is anendomorphismof K.

For all of this paper, we fix a semiring(K,⊕,�, 0, 1) and an endomorphismϕ : K → KofK. Furthermore, we fix an alphabetA.

We next define weighted automata. The underlying idea is to provide the transitions of afinite automaton with weights in the semiringK. For later purposes, we includeε-transitions.So letA = (Q,T, in, out) where

• Q is a finite set ofstates,

• T ⊆ Q× (A ∪ {ε}) ×K ×Q is a finite set oftransitions,

• in, out : Q→ K areweight functionsfor entering and leaving the system.

A path is a wordP = t1t2 . . . tn ∈ T ∗ with ti = (qi, ai, xi, qi+1). Its label is the wordw =a1a2 . . . an ∈ A∗. Then we writeP : q1

w→A qn+1 to denote thatP is aw-labeled path fromq1 to

qn+1. In order to get weights for words, we have to assume that theε-transitions do not form anyloop: the tupleA = (Q,T, in, out) is a weighted automaton withε-transitionsprovided thereis no nonemptyε-labeled pathP : q → q for any stateq ∈ Q (these automata are often called“cyclefree”, but since we only consider them, we omit this here). It is aweighted automatonifT ⊆ Q× A×K ×Q.

3

The running weightrwt(P ) of the pathP = t1t2 . . . tn ∈ T ∗ with labelw is defined induc-tively:

rwt(ε) = 1

rwt((q1, a, x, q2)P ) =

{

x� rwt(P ) if a = ε

x� ϕ(rwt(P )) otherwise,

its weightis given by

wt(P ) = in(q1) � rwt(P ) � ϕ|w|(out(qn+1))

where|w| is the length of the wordw.Let w ∈ A∗ be some word. The behavior ofA is some mappingS : A∗ → K, for such

mappings, it is usual in the area of weighted automata to denote the valueS(w) for w ∈ A∗ by(S,w). Now thebehavior||A|| of the weighted automaton withε-transitionsA is the mapping||A|| : A∗ → K defined by

(||A||, w) =∑

{wt(P ) | P is a path with labelw}

for w ∈ A∗. Since our automata do not haveε-loops, there are only finitely many paths labeledbyw, hence the sum on the right is finite. If it is empty, then(||A||, w) = 0.

Definition 2.1 A mappingS : A∗ → K is calledϕ-recognizableif there exists a weightedautomatonA with ||A|| = S. By Recϕ(A

∗), we denote the set of all functions that areϕ-recognizable.

First we show that weighted automata have the same computational power as weighted au-tomata withε-transitions.

Lemma 2.2 Let A be a weighted automaton withε-transitions. Then there exists a weightedautomatonA′ such that||A|| = ||A′||.

Proof. Let A = (Q,T, in, out). Forq, r ∈ Q, let eqr =∑

{rwt(P ) | P : q → r is ε-labeled}.

Note that, in case there is noε-path fromq to r, we haveeqr = 0. Furthermore, we writeqa� s

iff there exists a transition(q, a, x, r) and anε-labeled path fromr to s. Now define a new set oftransitions by

T ′ = {(q, a,∑

(q,a,x,r)∈T

(x� ϕ(ers)), s) | qa� s ∈ Q} .

We also define new weights for entering the system:

in′(r) =∑

{in(q) � eqr | q ∈ Q}

and letA′ = (Q,T ′, in′, out). ThenA′ is a weighted automaton.

4

For a transitiont′ = (q, a, y, s) ∈ T ′ let P(t′) comprise all paths inA of the form(q, a, x, r)Pwith P : r → s an ε-labeled path inA. Furthermore, we associate the set of pathsP(P ′) =P(t′1) P(t′2) . . .P(t′n) with any pathP ′ = t′1t

′2 . . . t

′n in A′.

Note that fort′ = (q, a, y, s) ∈ T ′, we have

y = rwtA′(t′) =∑

{x� ϕ(ers) | (q, a, x, r) ∈ T}

=∑

{x� ϕ(rwtA(P )) | (q, a, x, r) ∈ T, P : r → s is ε-labeled}

=∑

{rwtA(P ) | P ∈ P(t′)}

Then, by induction, it follows

rwtA′(P ′) =∑

{rwtA(P ) | P ∈ P(P ′)}.

for any pathP ′ : iw→A′ j. Then we can continue

wtA′(P ′) = in′(i) � rwtA′(P ′) � ϕ|w|(out′(j))

=∑

q∈Q

(in(q) � eqi) �∑

P∈P(P ′)

rwtA(P ) � ϕ|w|(out(j))

=∑

q∈Q

in(q) �∑

P1:qε→Ai

rwtA(P1)

�∑

P∈P(P ′)

rwtA(P ) � ϕ|w|(out(j))

=∑

q∈Q

P1:qε→Ai

P∈P(P ′)

(in(q) � rwtA(P1) � rwtA(P ) � ϕ|w|(out(j))

)

=∑

q∈Q

P1:qε→Ai

P∈P(P ′)

(in(q) � rwtA(P1P ) � ϕ|w|(out(j))

)

Anyw-labeled path inA splits uniquely into its maximalε-labeled prefixP1 and the remainderPthat starts with a non-ε-transition. This remainder belongs to a unique setP(P ′) for some pathP ′

in A. SinceP ′ is alsow-labeled, we obtain

(||A′||, w) =∑

P ′:iw→A′j

wtA′(P ′)

=∑

P ′:iw→A′j

q∈Q

P1:qε→Ai

P∈P(P ′)

(in(q) � rwtA(P1P ) � ϕ|w|(out(j))

)

=∑

P :qw→Aj

(in(q) � rwtA(P ) � ϕ|w|(out(j))

)

5

=∑

P :qw→Aj

wtA(P ) = (||A||, w)

ut

We note that the automatonA′ from the proof above has the additional property that it is’weight-deterministic’, i.e., if(q, a, x, r) and(q, a, y, r) are transitions inA′, thenx = y. Also,for all q, s ∈ Q an da ∈ A, there exists a transition(q, a, y, s) ∈ T ′. We could, of course,restrictT ′ by deleting all transitions with weighty = 0 without changing the behavior ofA′.

Next we show thatϕ-recognizability of a series can also be described algebraically by repre-sentations, similarly to the classical case (withϕ = id), cf. [BR88].

Let n ∈ N and(Kn×n,�) be the monoid of(n× n)-matrices over the semiringK (with theusual matrix multiplication). We extendϕ to an endomorphismϕ ofKn×n by setting(ϕ(B))ij =ϕ(bij) for each matrixB ∈ Kn×n. We call a mappingµ : A∗ → Kn×n aϕ-morphismif µ(ε) = E(the unit matrix) and for all wordsu, v ∈ A∗, we haveµ(uv) = µ(u) � ϕ|u|(µ(v)). We call atriple (in, µ, out) a ϕ-representationof the functionS : A∗ → K if µ : A∗ → Kn×n is aϕ-morphism and(||A||, w) = in�µ(w)�ϕ|w|(out) for w ∈ A∗ whereϕ(out) is the vector definedby applyingϕ to each coordinate ofout.

Now letA = (Q,T, in, out) be a weighted automaton withQ = {1, 2, . . . , n}. We define amappingµ : A∗ → Kn×n by letting

µ(w)ij =∑

P :iw→j

rwt(P )

for anyw ∈ A∗ andi, j ∈ Q. Then for anyu, v ∈ A∗ andi, k ∈ Q, we have

µ(uv)ik =∑

P :iuv→k

rwt(P )

=∑

j∈Q

P1:iu→j

P2:jv→k

rwt(P1P2)

=∑

j∈Q

P1:iu→j

P2:jv→k

rwt(P1) � ϕ|u|(rwt(P2))

=∑

j∈Q

P1:iu→j

rwt(P1) � ϕ|u|(∑

P2:jv→k

rwt(P2))

=∑

j∈Q

(µ(u))ij � ϕ|u|((µ(v))jk)

=∑

j∈Q

(µ(u))ij � (ϕ|u|(µ(v)))jk

= (µ(u) � ϕ|u|(µ(v)))ik,

soµ is aϕ-morphism.

6

Now considerin as a(1 × n)-row vector andout as(n × 1)-column vector, in the naturalway. For anyw ∈ A∗, we obtain

(||A||, w) =∑

P :iw→j

(in(i) � rwt(P ) � ϕ|w|(out(j))

)

=∑

i,j∈Q

in(i) �∑

P :iw→j

rwt(P ) � ϕ|w|(out(j))

=∑

i,j∈Q

(in(i) � µ(w)ij � ϕ|w|(out(j))

)

= in � µ(w) � ϕ|w|(out).

Thus(in, µ, out) is aϕ-representation for||A||.Conversely, let(in, µ, out) be ann-dimensionalϕ-representation. LetQ = {1, 2, . . . , n} and

defineT ⊆ Q×A×K×Q by letting(i, a, x, j) ∈ T iff (µ(a))ij = x. ThenA = (Q,T, in, out)is a weighted (weight-deterministic) automaton and it is easy to see that(in, µ, out) is a ϕ-representation of||A||.

Thus we have shown

Proposition 2.3 LetS : A∗ → K. ThenS is ϕ-recognizable iff there is aϕ-representation ofS.

3 Finitary formal power series

Recall that(K,⊕,�, 0, 1) is a semiring andϕ is an endomorphism of this semiring. A mappingS : A∗ → K is also called aformal power series(FPS for short). On the setKA∗

of mappingsS : A∗ → K, we define the operation⊕ pointwise:(S ⊕ T,w) = (S,w) ⊕ (T,w). TheCauchyproductof two FPS is defined by

(S � T,w) =∑

u,v∈A∗

uv=w

(S, u) � (T, v) .

We generalize this definition to theϕ-skew productby taking into account the endomorphismϕ:

(S �ϕ T,w) =∑

u,v∈A∗

uv=w

(S, u) � ϕ|u|(T, v) .

The structure(KA∗,⊕,�ϕ,0,1) is denoted byKϕ 〈〈A

∗〉〉 (here,(0, w) = 0 forw ∈ A∗, (1, w) =0 for w ∈ A+, and(1, ε) = 1).

Lemma 3.1 The structureKϕ 〈〈A∗〉〉 is a semiring, thesemiring of skew formal power series.

7

Proof. It is straightforward to check that(Kϕ 〈〈A∗〉〉 ,⊕,0) is a commutative monoid. In order

to show that�ϕ is associative, letS, T, U ∈ Kϕ 〈〈A∗〉〉 andw ∈ A∗. Then

((S �ϕ T ) �ϕ U,w) =∑

uv=w

[(S �ϕ T, u) � ϕ|u|(U, v)]

=∑

uv=w

[∑

u1u2=u

((S, u1) � ϕ|u1|(T, u2)) � ϕ|u|(U, v)

]

=∑

u1u2v=w

[((S, u1) � ϕ|u1|(T, u2)) � ϕ|u1u2|(U, v)]

=∑

u1u2v=w

[(S, u1) � ϕ|u1|((T, u2) � ϕ|u2|(U, v))]

= (S �ϕ (T �ϕ U), w)

Distributivity from the left is shown as follows:

(S �ϕ (T ⊕ U), w) =∑

uv=w

((S, u) � ϕ|u|((T ⊕ U), v))

=∑

uv=w

((S, u) � (ϕ|u|(T, v) ⊕ ϕ|u|(U, v)))

=∑

uv=w

[(S, u) � ϕ|u|(T, v) ⊕ (S, u) � ϕ|u|(U, v)]

=∑

uv=w

((S, u) � ϕ|u|(T, v)) ⊕∑

uv=w

((S, u) � ϕ|u|(U, v))

= (S �ϕ T,w) ⊕ (S �ϕ U,w) = ((S �ϕ T ) ⊕ (S �ϕ U), w)

Since checking distributivity from the right is almost the same, we omit it here. Finally,S�ϕ1 =1 �ϕ S = S andS �ϕ 0 = 0 �ϕ S = 0 is easily checked. ut

Since our definition of�ϕ involves the “skew parameter”ϕ, the semiringKϕ 〈〈A∗〉〉 deviates

strongly from the semiring of classical formal power seriesover any semiring: foru ∈ A∗ andx ∈ K, let xu denote the monomial power series with(xu,w) = 0 for w 6= u and(ux, u) = x.Then, fora ∈ A andy ∈ K, the Cauchy product satisfies1a � yε = ya = yε � 1a, but for theskew product, we have1a�ϕ yε = ϕ(y)a andyε�ϕ 1a = ya.

For a seriesS, letSn = S �ϕ Sn−1 with S0 = 1. Then, forw ∈ A∗,

(Sn, w) =∑

{∏

i=1...n

ϕ|u1u2...ui−1|(S, ui) | ui ∈ A∗, w = u1u2 . . . un

}

.

We define theiteration ofS by

(S+, w) =∑

1≤n≤|w|

(Sn, w)

8

for w ∈ A+ and(S+, ε) = 0. Furthermore,S∗ = S+ ⊕ 1. The seriesS is quasiregularprovided(S, ε) = 0.

Definition 3.2 Let Ratϕ(A∗) denote the least class of formal power series that contains the

monomialxu for x ∈ K andu ∈ A ∪ {ε} and is closed under the operations⊕, �ϕ, and+

applied to quasiregular formal power series. The series inRatϕ(A∗) are calledϕ-rational.

Forϕ the identity, the setRatϕ(A∗) consists of those formal power series that are classically

termed “rational”. In this case, Schutzenberger showed thatRatϕ(A∗) = Recϕ(A

∗). We willshow the same fact for arbitrary endomorphisms.

LetE be a term over the signature(⊕,�ϕ,+ ) with constants of the formxa for x ∈ K and

a ∈ A ∪ {ε}. The evaluation||E|| is defined canonically in the semiringKϕ 〈〈A∗〉〉. The termE

is a rational expressionif the operation+ is only applied to subexpressions whose value is aquasiregular formal power series. LetExp denote the set of all rational expressions. It is obviousthat they give rise precisely to the rational formal power series.

LetQ be a finite set of states,T ⊆ Q × Exp × Q a finite set of transitions,ι ∈ Q an initialstate, andF ⊆ Q a set of accepting states. The label||P || ∈ Kϕ 〈〈A

∗〉〉 of a pathP is definedinductively:

||ε|| = 1ε

||(i, E, j)P || = ||E|| �ϕ ||P ||

The quadrupleA = (Q,T, ι, F ) is called ageneralized weighted automatonprovided the labelof any nonempty pathP : q → q is quasiregular for anyq ∈ Q. The behavior of the generalizedweighted automaton is the formal power series given by

(||A||, w) =∑

{(||P ||, w) | P : ι→ F is a path with(||P ||, w) 6= 0}

(here we writeP : ι→ F to denote that the pathP leads from the initial stateι to some acceptingstate inF .) Note that, due to our assumption on the label of loops, thisis well defined since, foranyw ∈ A∗, there are only finitely many pathsP in A with (||P ||, w) 6= 0. Such automata havebeen investigated for the caseϕ = id before, e.g., by Kuich and Salomaa [KS86].

Thedepthof a rational expression is defined in the obvious way:

depth(xa) = 0

depth(E+) = 1 + depth(E)

depth(E �ϕ E′) = 1 + max(depth(E), depth(E ′))

depth(E ⊕ E ′) = 2 + max(depth(E), depth(E ′)) .

Let A be a generalized weighted automaton. SinceT is finite, there is a rational expressionoccurring in a transition ofA that has maximal depth; its depth is thedepth ofA. Finally, thebreadthof a generalized weighted automaton measures how often its depth is realized:

breadth(A) = |{(i, E, j) ∈ T | depth(E) = depth(A)}| .

SinceT is finite, this is always a finite number.

Lemma 3.3 LetA be a generalized weighted automaton. ThenA is ϕ-recognizable.

9

Proof. By induction on the lexicographic order on the pair(depth(A), breadth(A)), we willconstruct a generalized weighted automaton of depth0 whose behavior is||A||.

Let A = (Q,T, ι, F ) be a generalized weighted automaton withdepth(A) > 0. Let(i, E, j) ∈ T with depth(E) = depth(A). Then one of the following three cases decreasesthe breath ofA (if breadth(A) > 1) or the depth ofA (otherwise):E = (E1 ⊕ E2): If E1 = E2, then replace the transition(i, E, j) by (i, 2ε �ϕ E1, j) whichdoes not change the behavior of the generalized weighted automaton. Otherwise, consider thegeneralized weighted automatonA′ = (Q,T ′, ι, F ) with

T ′ = T \ {(i, E, j)} ∪ {(i, E1, j), (i, E2, j)} .

To any pathP = t1t2 . . . tn in A, associate a setP of paths inA′ by

P = {t′1t′2 . . . t

′n | t′i = ti for ti 6= (i, E, j),

t′i ∈ {(i, E1, j), (i, E2, j)} otherwise} .

If |P | = 1, thenP = {P} or P = {(i, E1, j), (i, E2, j)}. In both cases,||P || =∑

P ′∈P ||P ′||.By induction, one obtains this for pathsP of arbitrary length. Since{P | P is a path inA} is apartition of the set of paths ofA′, we obtain||A|| = ||A′||.E = E1 �ϕ E2: LetQ′ = Q∪{?},

T ′ = T \ {(i, E, j)} ∪ {(i, E1, ?), (?,E2, j)}

andA′ = (Q′, T ′, ι, F ). LetP ′ : ι → F be a path inA′. Then neither the first nor the last stateof P ′ is ?. LetP be obtained fromP ′ by contracting subpaths of the form(i, E1, ?)(?,E2, j) into(i, E, j). Then||P ′|| = ||P ||. Furthermore, the mappingP ′ 7→ P maps the set of pathsι → Fin A′ bijectively onto the set of pathsι→ F in A. Hence||A|| = ||A′||.E = E+

1 : LetQ′ = Q∪{?},

T ′ = T \ {(i, E, j)} ∪ {(i, E1, ?), (?,E1, ?), (?, 1ε, j)}

andA′ = (Q′, T ′, ι, F ). For a pathP = t1t2 . . . tn in A, let

P = {t′1t′2 . . . t

′n | t′i = ti if ti 6= (i, E, j), and otherwise

t′i : i→ j is a path inA′ of the form(i, E1, ?)(?,E1, ?)∗(?,1ε, j)} .

Then{P | P is a path inA} is a partition of the paths inA′ that do not start or end in?. Weshow(||P ||, w) =

∑{(||P ′||, w) 6= 0 | P ′ ∈ P} for w ∈ A∗ by induction on the length of the

pathP . Suppose|P | ≤ 1, i.e.,P ∈ T ∪ {ε}. If P 6= (i, E, j), thenP = {P} and therefore||P || =

P ′∈P ||P ′||. Now considerP = (i, E, j). Forw = ε, we obtain(||P ||, ε) = 0 since||E1|| and therefore||E|| = ||E1||

+ are quasiregular. Furthermore,E1 is quasiregular. Hence thereis no pathP ′ in P with (||P ′||, ε) 6= 0. Since the empty sum equals0, we therefore obtain

10

∑{(||P ′||, ε) 6= 0 | P ′ ∈ P} = 0 = (||P ||, ε). Now letw ∈ A+. Then

(||P ||, w) = (||E+1 ||, w) = (||E1||

+, w)

=∑

1≤n≤|w|

(||E1||n, w)

=∑

0≤m<|w|

(||E1 �ϕ Em1 �ϕ 1ε||, w) .

Since||E1|| is quasiregular, the pathsP ′ = (i, E1, ?) (?,E1, ?)m (?, 1ε, j) in A′ with (||P ′||, w) 6=

0 satisfy0 ≤ m < |w|. Hence

(||P ||, w) =∑

0≤m<|w|

(||E1 �ϕ Em1 �ϕ 1ε||, w)

=∑

{(||P ′||, w) 6= 0 | P ′ ∈ P} .

This proves the base case of the induction. The actual induction step is straightforward and usesthe distributivity in the semiringK.

Now letw ∈ A∗. Then

(||A||, w) =∑

{(||P ||, w) 6= 0 | P : ι→A F}

=∑{

(||P ′||, w) 6= 0 | P : ι→A F, P ′ ∈ P}

=∑

{(||P ′||, w) 6= 0 | P ′ : ι→A′ F}

= (||A′||, w) .

This finishes the third case.The above inductive decomposition of the transitions yields a generalized weighted automa-

ton A = (Q,T, ι, F ) of depth0 with behaviorS. Hence(i, E, j) ∈ T implies thatE is amonomial overA ∪ {ε}. Then we can define a weighted automaton withε-transitionsA′ withthe same behavior:

Q′ = Q

T ′ = {(i, a, x, j) ∈ Q× (A ∪ {ε}) ×K ×Q | (i, xa, j) ∈ T}

in(i) =

{

1 if i = ι

0 otherwise

out(i) =

{

1 if i ∈ F

0 otherwise

By Lemma 2.2, we can dispense of theε-transitions of this automaton, hence the formal powerseriesS = ||A|| is recognizable. ut

A weighted automatonA = ({1, 2, . . . , n}, T, in, out) is callednormalizedprovided

11

1. in(i) =

{

1 if i = 1

0 otherwiseandout(i) =

{

1 if i = 2

0 otherwise.

2. Furthermore, inT , there are no transitions of the form(i, a, x, 1) or (2, a, x, i).

Hence,1 is a ‘source’ and2 a ‘sink’ state as in the usual sense in physics.

Lemma 3.4 Let S be aϕ-recognizable formal power series. Then there exists a normalizedweighted automatonA with (||A||, w) = (S,w) for w ∈ A+ and(||A||, ε) = 0.

Proof. We can, without loss of generality, assume thatS is the behavior of the weighted au-tomatonA′ = ({3, 4, . . . , n), T ′, in′, out′). SetQ = {1, 2} ∪Q′ = {1, 2, . . . , n},

T = T ′ ∪ {(1, a,∑

(i,a,x,j)∈T ′

(in′(i) � x), j) | a ∈ A, j ∈ Q′}

∪ {(i, a,∑

(i,a,x,j)∈T ′

(x� ϕ(out′(j))), 2) | a ∈ A, i ∈ Q′}

∪ {(1, a,∑

(i,a,x,j)∈T ′

(in′(i) � x� ϕ(out′(j))), 2) | a ∈ A}

and letA = (Q,T, in, out) be the normalized weighted automaton determined by these data.Since for any statei ∈ Q, we havein(i) � out(i) = 0, the normalized automatonA satisfies

(||A||, ε) = 0 as required. Now leta ∈ A. Then

(||A′||, a) =∑

{wt(P ) | P is ana-labeled path inA′}

=∑

{in′(i) � rwt(P ) � ϕ(out′(j)) | P : ia→A′ j} .

Hence(||A′||, a) is the running weight of the onlya-labeled path(1, a, y, 2) from 1 to 2 in A.Sincein(1) = out(2) = 1, it equals the weight of this path. For all other pathsc : i

a→ j in A,

we havewt(c) = 0 sincein(i) = 0 or out(j) = 0. Thus, indeed,(||A′||, a) = (||A||, a).Now letw ∈ A+ have length at least2. Then there are lettersa, b ∈ A and a wordv ∈ A∗

with w = avb. We obtain

(||A′||, w) =∑

{wt(P ) | P is aw-labeled path inA′}

=∑

{in′(i) � rwt(P ) � ϕ|w|(out′(j)) | P : iw→A′ j}

=∑

i,j∈Q′

in′(i) �

P :iw→A′j

rwt(P )

� ϕ|w|(out′(j))

.

12

Next we consider the summands appearing in this expression,i.e., leti, j ∈ Q′ be arbitrary andrecall thatw = avb.

in′(i)�

P :iw→A′j

rwt(P )

� ϕ|w|(out′(j))

=∑

i′,j′∈Q′

(i,a,x,i′)∈T ′

P ′:i′v→

A′ j′

(j′,b,y,j)∈T ′

(in′(i) � x� ϕ(rwt(P ′)) � ϕ|av|(y) � ϕ|w|out′(j))

=∑

i′,j′∈Q′

(i,a,x,i′)∈T ′

(in′(i) � x)

� ϕ

P ′:i′v→A′j′

rwt(P ′))

�ϕ|av|

(j′,b,y,j)∈T ′

(y � ϕ(out′(j)))

.

Note that herei andj are fixed.In order to get(||A′||, w), we have to sum up all these values fori, j ∈ Q′. By associativity of

⊕ and distributivity inK, we get

(||A′||, w) =∑

i′,j′∈Q′

(i,a,x,i′)∈T ′

(in′(i) � x)

� ϕ

P ′:i′v→A′j′

rwt(P ′))

�ϕ|va|

(j′,b,y,j)∈T ′

(y � ϕ(out′(j)))

.

This expression looks remarkably like the one before, the only difference is that in the first andlast inner sums,i andj are not fixed, i.e., the range of these sums is larger than it was before.Note that the first inner sum

(i,a,x,i′)∈T ′(in′(i)�x) equals the weight of the onlya-labeled path

(1, a, x(i′), i′) from 1 to i′ in A. Similarly, the last inner sum∑

(j′,b,y,j)∈T ′(y�ϕ(out′(j))) is theweight of the onlyb-labeled path(j′, b, y(j′), 2) from j′ to 2 in the automatonA. Finally, themiddle inner sum can alternatively be taken over all paths inA instead ofA′ since they start andend in states fromQ′ ⊆ Q and no path inA that leavesQ′ can ever return toQ′. Hence we obtain

(||A′||, w) =∑

i′,j′∈Q′

x(i′) � ϕ

P ′:i′v→Aj′

rwt(P ′))

� ϕ|va|y(j′)

.

Sincein(1) = out(2) = 1 andin(i) = out(j) = 0 otherwise, we can infer(||A||, w) = (||A′||, w).ut

Lemma 3.5 LetS be aϕ-recognizable formal power series. ThenS is ϕ-rational.

13

Proof. We first show the lemma for a quasiregular formal power seriesS. By Lemma 3.4,there is a normalized weighted automatonA recognizingS. Then we can consider this automa-ton as a generalized weighted automaton({1, 2, . . . , n}, T, 1, {2}) with behaviorS (a transition(i, a, x, j) from A is replaced by the transition(i, xa, j)). In this generalized weighted automa-ton, all transitions(i, E, j) satisfy that||E|| is quasiregular sinceA has noε-transitions.

If n = 2, we haveS =∑

{||E|| | (1, E, 2) ∈ T}, henceS is rational. Now letn > 2. We willconstruct an equivalent generalized weighted automaton with fewer states in two steps.

First, we eliminate multiple loops fromn to n. Let T1 = T \ {(n,E, n) | E ∈ Exp} ∪{(n,E ′, n)} whereE ′ =

∑{E ∈ Exp | (n,E, n) ∈ T}. Let A1 = (Q,T1, 1, {2}) denote the

resulting generalized weighted automaton. For a transition t ∈ T1, let

t =

{

{t} if t 6= (n,E, n)

T ∩ ({n} × Exp × {n}) otherwise

and defineP = t1 t2 . . . tk for a pathP = t1t2 . . . tk of A1. For t ∈ T1, we then have||t|| =∑

t′∈t ||t′||. By induction, using the distributivity in the semiringKϕ 〈〈A

∗〉〉, it follows ||P || =∑

P ′∈P ||P ′||. Note that the initial (resp. final) state ofP equals the initial (final, resp.) state ofP ′ ∈ P . Furthermore,{P | P is a path inA1} is a partition of the set of paths inA. Now letw ∈ A∗ and letC denote the set of pathsP : ι→A1 F with (||P ||, w) 6= 0. Then

(||A1||, w) =∑

P∈C

(||P ||, w)

=∑

P∈C

P ′∈P

(||P ′||, w)

=∑

P ′:ι→AF

(||P ′||,w) 6=0

(||P ′||, w)

= (||A||, w)

Hence the behaviors ofA andA1 coincide. Note furthermore that all transitions inA1 are labeledby regular expressions that denote quasiregular formal power series.

Next, we can delete the staten. Let

T2 = T1 \ (({n} × Exp ×Q) ∪ (Q× Exp × {n})) ∪ T ′

where

T ′ = {(i, E1�ϕE∗2 �ϕ E3, j) | (i, E1, n), (n,E2, n), (n,E3, j) ∈ T1, i, j < n} .

Note thatE1 �ϕ E∗2 �ϕ E3 is a rational expression sinceE2 is a label of a transition inA1 and

therefore||E2|| is quasiregular. Since the skew product of the quasiregularformal power series||E1||with any formal power series is again quasiregular, the formal power series||E1�ϕE

∗2�ϕE3||

is quasiregular. ThenA2 = ({1, 2, . . . , n − 1}, T2, 1, {2}) is a generalized weighted automaton.

14

All its transitions are labeled by quasiregular formal power series. We show||A1|| = ||A2||: for atransitiont ∈ T2, let t = {t} if t ∈ T1. Otherwise, there are transitions(i, E1, n), (n,E2, n) and(n,E3, j) in A1 with t = (i, E1�ϕE

∗2�ϕE3, j). Then we sett = (i, E1, n) (n,E2, n)∗ (n,E3, j).

For a pathP = t1t2 . . . tk of A2, let P = t1 t2 . . . tk. Then{P | P : 1 →A2 2} is a partition ofthe set of pathsP ′ : 1 →A1 2. In order to show||A1|| = ||A2||, it therefore suffices to show

(||P ||, w) =∑

P ′∈P(||P ′||,w) 6=0

(||P ′||, w) (1)

for any pathP in A2 and any wordw ∈ A∗. First, letP = t ∈ T2 andw ∈ A∗. If t ∈ T1, we getimmediately (1) sincet = {t}. So assumet /∈ T1. Then there are transitions(i, E1, n), (n,E2, n)and(n,E3, j) in A1 with t = (i, E1 �ϕ E

∗2 �ϕ E3, j). Hence

(||t||, w) = (||E1 �ϕ E∗2 �ϕ E3||, w)

=∑

w=u1u2u3

(||E1||, u1) � ϕ|u1|(||E2||∗, u2) � ϕ|u1u2|(||E3||, u3)

since(||E2||m, u2) = 0 for m > |u2|, we can resume:

=∑

w=u1u2u30≤m≤|w|

(||E1||, u1) � ϕ|u1|(||E2||m, u2) � ϕ|u1u2|(||E3||, u3)

=∑

0≤m≤|w|

(||E1 �ϕ Em2 �ϕ E3||, w)

On the other hand, letP ′ ∈ t, i.e.,P ′ = (i, E1, n) (n,E2, n)m (n,E3, j) for somem ∈ N. Ifm > |w|, then(||P ′||, w) = 0. Hence

0≤m≤|w|

(||E1 �ϕ Em2 �ϕ E3||, w) =

P ′∈t(||P ′||,w) 6=0

(||P ′||, w) .

Thus, we showed (1) for arbitrary transitionst ∈ T2. The equation (1) follows in its full strengthfor paths inA2 by induction on the length of the pathP that relies on the distributivity. Thus,indeed,||A2|| = ||A1|| = ||A|| = S. Hence, by induction on the number of states, any quasiregularformal power series is rational.

Now let S be non-quasiregular andx = (S, ε) ∈ K. Then the formal power series||xε|| isrational. By Lemma 3.4, there is a recognizable and quasiregular formal power seriesS ′ withS = xε⊕ S ′. By what we showed above,S ′ is rational. HenceS is rational as well. ut

Altogether, we have obtained:

Theorem 3.6 LetK be a semiring andϕ an endomorphism ofK. LetA be an alphabet and letS : A∗ → K be a formal power series. Then the following are equivalent:

1. S is ϕ-recognized by a weighted automaton withε-transitions.

15

2. S is ϕ-recognized by a weighted automaton.

3. S is ϕ-recognized by a generalized weighted automaton.

4. S is ϕ-rational.

5. S has aϕ-representation.

Proof. The implication (1)→(2) is Lemma 2.2, the converse implication is trivial. The equiv-alence of (2) and (5) was shown in Prop. 2.3. The implications(3)→(2)→(4) can be foundin Lemmas 3.3 and 3.5, resp. To show the remaining implication (4)→(3), let E be aϕ-rational expression. Then consider the generalized weighted automatonA given byQ = {1, 2},T = {(1, E, 2)}, ι = 1 andF = {2}; its behavior is obviously||E||. ut

4 Preservation properties

In analogy to classical results on formal power series [SS78, BR88, KS86], here we show thatalso in our setting certain homomorphismsh : A∗ → B∗ and also homomorphisms betweensemirings define transformations of series which preserve rationality resp. recognizability of theseries. Such a homomorphismh is calledlength-preservingif |h(u)| = |u| for anyu ∈ A∗, andh is finite-to-one, if h−1(w) is finite for anyw ∈ B∗. Equivalent to this is thath(a) 6= ε foranya ∈ A, and also that|u| ≤ |h(u)| for u ∈ A∗. An endomorphismϕ of K is idempotentifϕ ◦ ϕ = ϕ. First we note:

Lemma 4.1 Let h : A∗ → B∗ be a monoid homomorphism. Assume that eitherh is length-preserving or thath is finite-to-one andϕ is idempotent. Thenh : Kϕ 〈〈A

∗〉〉 → Kϕ 〈〈B∗〉〉

defined by(h(S), w) =

v∈A∗

h(v)=w

(S, v)

for S ∈ Kϕ 〈〈A∗〉〉 andw ∈ B∗ is a semiring homomorphism.

Note thath is well-defined since, for anyw ∈ B∗, the seth−1(w) is finite.

Proof. Recall that|u| ≤ |h(u)| for eachu ∈ A∗. Henceε is the only preimage ofε, and ifw 6= ε, thenϕ|h(w)| = ϕ|w|. Since(0, v) = 0 for anyv ∈ A∗, we haveh(0) = 0. Sinceε is theonly preimage ofε, we also get(h(1), ε) = 1. No other wordw in B∗ has a preimagev with(1, v) 6= 0, i.e.,(h(1), w) = 0 for w ∈ B+. Henceh(1) = 1.

Now letS, T ∈ Kϕ 〈〈A∗〉〉 be two formal power series andw ∈ B∗. Then

(h(S ⊕ T ), w) =∑

v∈h−1(w)

(S ⊕ T, v)

16

=∑

v∈h−1(w)

(S, v) ⊕∑

v∈h−1(w)

(T, v)

= (h(S), w) ⊕ (h(T ), w).

Furthermore

(h(S �ϕ T ), w) =∑

v∈h−1(w)

(S �ϕ T, v)

=∑

v∈h−1(w)

x,y∈A∗

xy=v

(S, x) � ϕ|x|(T, y)

=∑

x,y∈A∗

h(x)h(y)=w

(S, x) � ϕ|x|(T, y)

sinceϕ|x| = ϕ|h(x)|, we can continue

=∑

x,y∈A∗

h(x)h(y)=w

(S, x) � ϕ|h(x)|(T, y)

=∑

u,v∈B∗

uv=w

x,y∈A∗

h(x)=u,h(y)=v

(S, x) � ϕ|u|(T, y)

=∑

u,v∈B∗

uv=w

x∈A∗

h(x)=u

(S, x)

� ϕ|u|

y∈A∗

h(y)=v

(T, y)

=∑

u,v∈B∗

uv=w

(h(S), u) � ϕ|u|(h(T ), v)

= (h(S) �ϕ h(T ), w).

Thus, indeed,h(S ⊕ T ) = h(S) ⊕ h(T ) andh(S �ϕ T ) = h(S) �ϕ h(T ). ut

Now we can show

Theorem 4.2 Let h : A∗ → B∗ be a monoid homomorphism andS ∈ Kϕ 〈〈A∗〉〉. Assume

furthermore that eitherh is length-preserving or thath is finite-to-one andϕ is idempotent.

1. If S is ϕ-rational, thenh(S) is ϕ-rational.

2. If S is ϕ-recognizable, thenh(S) is ϕ-recognizable.

17

Proof. The first statement is shown by induction on the constructionof rational formal powerseries. LetS = xw be a monomial. Thenh(S) = xh(w) is a monomial as well. Now letSbe quasiregular. By our assumption onh, the empty wordε is the only preimage ofε underh.Henceh(S) is quasiregular. Now letw ∈ B∗. Then

((h(S))+, w) =∑

1≤n≤|w|

(h(S)n, w)

=∑

1≤n≤|w|

(h(Sn), w) sinceh is a homomorphism

=∑

1≤n≤|w|

v∈h−1(w)

(Sn, v)

=∑

v∈h−1(w)

1≤n≤|v|

(Sn, v)

since, ifv ∈ h−1(w), then|v| ≤ |h(v)| = |w|, and if |v| < n ≤ |w|, then(Sn, v) = 0

=∑

v∈h−1(w)

(S+, v)

= (h(S+), w).

Thus,h preserves rationality.The second statement is immediate by the first in conjunctionwith Theorem 3.6. ut

Theorem 4.3 Let α : (K,ϕ) → (K ′, ψ) be a homomorphism (i.e.,α is a semiring homomor-phism that commutes with the endomorphismsϕ andψ: α ◦ ϕ = ψ ◦ α). Thenα : Kϕ 〈〈A

∗〉〉 →K ′ψ 〈〈A

∗〉〉 defined by(α(S), w) = α(S,w) is a semiring homomorphism that preserves ratio-nality of formal power series.

Proof. We have for any wordw ∈ A∗:

(α(1Kε), w) = α(1K , w) =

{

α(1K) = 1K′ if w = ε

α(0K) = 0K′ otherwise

and(α(0), w) = α(0, w) = α(0K) = 0K′. Now letS, T ∈ Kϕ 〈〈A∗〉〉 andw ∈ A∗. Then

(α(S ⊕ T ), w) = α(S ⊕ T,w) = α((S,w) ⊕ (T,w))

= α(S,w) ⊕ α(T,w) = (α(S), w) ⊕ (α(T ), w)

Furthermore,

(α(S �ϕ T ), w) = α∑

w=uv

((S, u) � ϕ|u|(T, v)

)

18

=∑

w=uv

(α(S, u) � ψ|u|α(T, v)

)

= (α(S) �ψ α(T ), w)

Henceα is indeed a semiring homomorphism. Sinceα(0K) = 0K′, it preserves monomials andquasiregularity. Furthermore, for a quasiregular formal power seriesS, we have

(α(S)+, w) =∑

1≤n≤|w|

(α(S)n, w)

= α∑

1≤n≤|w|

(Sn, w)

= α(S+, w) = (α(S+), w)

Thus, the homomorphismα preserves rationality of formal power series. ut

As a consequence of Theorems 4.3 and 3.6,α also preserves the recognizability of formalpower series. Alternatively, we might extendα : K → K ′ in the canonical way to the monoidmorphismα : (Kn×n, ·) → (K ′n×n, ·) by α((xij)) = (α(xij)). It is easy to check that ifS ∈ Kϕ 〈〈A

∗〉〉 is represented by(in, µ, out), thenα ◦ µ : A∗ → K ′n×n is aψ-morphism andα(S) is represented by(α ◦ in, α ◦ µ, α ◦ out).

For a formal power seriesS, let the supportsupp(S) denote the set of wordsw with (S,w) 6=0.

Corollary 4.4 LetK be a semiring such thatx � y = 0 or x ⊕ y = 0 impliesx = 0 or y = 0.Letϕ be an endomorphism ofK with ϕ−1(0) = {0}. LetS be aϕ-recognizable formal powerseries. Thensupp(S) ⊆ A∗ is a regular word language.

Proof. Let B = ({0, 1},∨,∧, 0, 1) denote the Boolean semiring and letψ : {0, 1} → {0, 1}denote the identical mapping. Then define the mappingα : K → B by α(x) = 0 iff x = 0. Byour assumptions onK, α is a semiring homomorphism. Furthermore,αϕ(x) = 0 iff ϕ(x) = 0iff x = 0 iff α(x) = 0 iff ψα(x) = 0. Hence we can apply the above theorem:α(S) isψ-rationaland thereforeψ-recognizable. But, as is well-known, a seriesT ∈ B 〈〈A∗〉〉 is idB-recognizableiff supp(T ) ⊆ A∗ is a regular language. Sincesupp(S) = supp(α(S)), the result follows. ut

Let L ⊆ A∗ be a word language,K some semiring, andϕ an endomorphism ofK. Thecharacteristic series1L ∈ Kϕ 〈〈A

∗〉〉 of L is defined by(1L, w) = 1 for w ∈ L and(1L, w) = 0otherwise.

Lemma 4.5 Let L ⊆ A∗ be a regular word language. Then its characteristic series1L is aϕ-recognizable formal power series.

19

Proof. SinceL is regular, there exists a finite deterministic automaton(Q,T, ι, F ) whose lan-guage isL. LetA′ = (Q,T ′, in, out) be the weighted automaton defined by

T ′ = {(i, a, 1, j) | (i, a, j) ∈ T}

in(i) =

{

1 if i = ι

0 otherwise

out(i) =

{

1 if i ∈ F

0 otherwise

Then one can easily check that||A′|| = 1L sinceϕ(1) = 1. ut

5 Weighted automata over the semiringRmax

In this section, we will consider the semiringK = Rmax. It is our aim to compare the setsRecϕ(A

∗) for different endomorphismsϕ of Rmax. To this aim, we first characterize all endo-morphisms. Forq ∈ R≥0, let q · (−∞) = −∞. Then the mappingq : Rmax → Rmax : x 7→ q · xis a semiring endomorphism ofRmax.

Lemma 5.1 Let ϕ be a semiring endomorphism ofRmax. Then there existsq ≥ 0 such thatϕ(x) = q · x for anyx ∈ Rmax.

Proof. Let q = ϕ(1). Form,n ∈ N, we then have

ϕ(n) = ϕ(1 + 1 + · · · + 1︸ ︷︷ ︸

n times

) = ϕ(1) + ϕ(1) + · · · + ϕ(1)︸ ︷︷ ︸

n times

= n · q

and therefore

q · n = ϕ(n) = ϕ(n

m+n

m+ · · · +

n

m︸ ︷︷ ︸

m times

) = ϕ(n

m) + ϕ(

n

m) + · · · + ϕ(

n

m)

︸ ︷︷ ︸

m times

= m · ϕ(n

m)

which impliesϕ( nm

) = q · nm

. Thus, forx ∈ Q≥0, the homomorphismϕ acts as desired. Nowlet x < y < z with x, z rational. Thenϕ(y) = ϕ(max(x, y)) = max(ϕ(x), ϕ(y)) impliesq · x = ϕ(x) ≤ ϕ(y) and similarlyϕ(y) ≤ q · z. Since this holds for all rational numbersenclosingy, we obtainϕ(y) = q · y. ut

Lemma 5.2 LetS ∈ Recq(A∗), x ∈ Rmax, w ∈ A∗, andp, q > 0. Thenxw �p S ∈ Recq(A

∗).

20

Proof. Let v ∈ A∗. Then

(xw �p S, v) = maxab=v

((xw, a) + p|a|(S, b))

=

{

x+ p|w|(S, b) if wb = v

−∞ otherwise

=

(

xw �q

p|w|

q|w|S, v

)

Sincexw is a monomial, it isq-rational. SinceS is q-recognizable, so isp|w|

q|w|S. Hence this latter

series isq-rational implying thatxw �qp|w|

q|w|S is q-rational and thereforeq-recognizable. ut

Thus, the setRecp(A∗) ∩ Recq(A

∗) contains all characteristic series1L for L ⊆ A∗ regular,is closed under finite summation, and under skew multiplication by a monomial from the left.Next we prepare the proof that it is not closed under skew multiplication with a monomial fromthe right.

For this, letσ ∈ A and define, forp > 0, the seriesTp : A∗ → Rmax by (Tp, σn) = pn and

(Tp, w) = −∞ for w /∈ σ∗.

Lemma 5.3 Let1 6= p 6= q be positive real numbers, the seriesTp is p- but notq-recognizable.

Proof. We prove the lemma through a sequence of claims whose conjunction yields the abovestatement.

Claim 1 The seriesTp is p-recognizable.

Proof. Consider the weighted automatonA = ({1}, T, in, out) with in(1) = 0, out(1) = 1, andT = {(1, σ, 0, 1)}. Then forσn, there is precisely one path inA whose weight is0 +

0≤i<n pi ·

0 + pn · 1 = pn. ut

Prelude. Now suppose by contradictionTp ∈ Recq(A∗). Then there exists a weighted automa-

tonA = (Q,T, in, out) such that||A||q = Tp. Choosea, b > 0 such that

1. a < y < b2

for all (i, α, y, j) ∈ T with y > 0.

2. a < in(i) < b2

for all i ∈ Q with in(i) > 0.

3. a < out(i) < b2

for all i ∈ Q with out(i) > 0.

In the proofs of the following claims, we will choosen ∈ N (depending on the order relationbetweenp, q, and1). Suppose, for the moment,n ∈ N has been fixed. Sincemax(x, y) ∈ {x, y},there exists a pathP = t0t1 . . . tn−1 in A with ti = (ri, σ, xi, ri+1) ∈ T and

pn = wt(P ) = in(r0) +∑

0≤i<n

qixi + qnout(rn) .

21

For0 ≤ i ≤ n, let

yi =

in(r0) + x0 if i = 0

xi if 0 < i < n

out(rn) if i = n .

Thenpn =∑

0≤i≤n qiyi, 0 ≤ yi ≤ b, anda < yi wheneveryi > 0.

Claim 2 Tp /∈ Recq(A∗) for 1 < p < q.

Proof. Choosen ∈ N such that

|Q| < logq(pn(q − 1)

b+ 1) − 1 and

(p

q

)n

< a .

The former is possible sincep > 1, i.e., the right-hand side grows unboundedly forn→ ∞. Thelatter is possible sincep < q, i.e., p

q< 1 anda > 0. Now choose the pathP as explained in

the prelude. Supposeyn > 0. Thenpn =∑

0≤i≤n qiyi ≥ qnyn ≥ qna contradicting

(p

q

)n

< a.

Henceyn = 0. Let j = max{i | 0 ≤ i < n, yi > 0}. Thenj < n and

pn =∑

0≤i≤j

qiyi ≤ b∑

0≤i≤j

qi = bqj+1 − 1

q − 1.

Hencej ≥ logq(pn(q−1)

b+ 1) − 1 > |Q|. Therefore, there are0 ≤ k < ` ≤ j with rk = r`. Let,

for m ∈ N, Pm denote the patht0t1 . . . tk−1(tk . . . t`−1)m+1t` . . . tn−1. The length of this path is

n + m(` − k) and its label isσn+m(`−k). Since0 ≤ xi for 0 ≤ i ≤ n − 1, and since ≤ j, weobtain

qj+m(`−k)xj ≤ rwt(Pm)

≤ (||A||q, σn+m(`−k))

= pn+m(`−k)

and thereforepn

xj · qj≥

((q

p

)`−k)m

for all m ∈ N. But sinceq > p, the sequence on the right grows unboundedly form → ∞, acontradiction. ut

Claim 3 Tp /∈ Recq(A∗) for 1 < q < p.

Proof. Choosen ∈ N such that qbq−1

<(p

q

)n

which is possible sincep > q. With the path from

the prelude, we obtain

pn =∑

0≤i≤n

qiyi ≤ b∑

0≤i≤n

qi = bqn+1 − 1

q − 1≤ b

qn+1

q − 1.

22

Hence (p

q

)n

≤qb

q − 1

contradicting our choice ofn. ut

Claim 4 Tp /∈ Recq(A∗) for q ≤ 1 < p.

Proof. Choosen ∈ N such thatpn > b(n+ 1) which is possible sincep > 1. With the path fromthe prelude, we obtainpn =

0≤i≤n qiyi ≤ b(n+ 1) a contradiction. ut

Claim 5 Tp /∈ Recq(A∗) for q < p < 1.

Proof. Choosen ≥ |Q| + 1 such thataq|Q| > pn which is possible sincep < 1. Let P bethe path from the prelude. Suppose there is0 ≤ j ≤ |Q| with yj > 0. Thenaq|Q| ≤ qjyj ≤∑

0≤i≤n qiyi = pn, contradicting our choice ofn. Thus, for0 ≤ j ≤ |Q|, we haveyj = 0. Let

1 ≤ k < ` ≤ |Q| + 1 with ik = i` and consider the path

P ′ = t0t1 . . . tk−1t`t`+1 . . . tn−1

of lengthn− `+ k which is labeled byσn−`+k. Then

wt(P ′) = in(r0) +∑

0≤i≤k−1

qixi +∑

`≤i≤n−1

qi−`+kxi + qn−`+kout(rn)

=∑

0≤i≤k−1

qiyi

︸ ︷︷ ︸

=0 sincek≤|Q|

+qk−`∑

`≤i≤n

qiyi

= qk−`∑

0≤i≤n

qiyi since∑

0≤i≤`−1

qiyi = 0

= qk−`pn

Thuspn−`+k = (||A||, σn−`+k) ≥ qk−`pn implying pk−` ≥ qk−`. Sincek < `, this impliesp < q,a contradiction. ut

Claim 6 Tp /∈ Recq(A∗) for p < 1 andp < q.

Proof. Choosen ∈ N with pn

qj < a for each0 ≤ j ≤ n which is possible because ofp < 1 andp

q< 1. With the path from the prelude, we getpn =

0≤i≤n qiyi. Since this is positive, there is

0 ≤ j ≤ n with yj > 0 and thereforeyj > a. But then

pn =∑

0≤i≤n

qiyi ≥ qjyj ≥ qja

contradicts our choice ofn. ut

23

This finishes the proof of the lemma since the above claims cover all possible order relationsof p, q, and1 for 1 6= p 6= q. ut

Let p, q > 0 be distinct withp 6= 1 6= q. Then the setsRecp(A∗) andRecq(A

∗) are incompa-rable by the above lemma. Ifp = 1, then we only know thatRecp(A

∗) is no subset ofRecq(A∗)

sinceTq ∈ Recq(A∗) \Recp(A

∗). The other inclusion is disproved by the following proposition.

Proposition 5.4 Let 0 < q 6= 1 andσ ∈ A. Then the seriesS : A∗ → Rmax given byσn 7→ nandsupp(S) = σ+ is 1- but notq-recognizable. Hence (together with Lemma 5.3)Recp(A

∗) 6⊆Recq(A

∗) for p, q > 0 distinct.

Proof. Let A = ({1}, T, in, out) be the weighted automaton within(1) = out(1) = 0 andT = {(1, σ, 1, 1)}. Then it is easily checked that||A||1 = S.

Now supposeS ∈ Recq(A∗) for some0 < q < 1. Then there exists a weighted automatonA

with ||A||q = S. Let b be as in the prelude of the proof above (i.e.,b2> 0 dominates all values

appearing inA). Then one can easily check that(||A||q, w) ≤ b1−q

, i.e., ||A||q is bounded asopposed toS, a contradiction.

Next supposeS ∈ Recq(A∗) for someq > 1. We refer a last time to the prelude in the proof

of the lemma above that yields a valuea. Choosen ∈ N such thatqn a

q|Q| > n which is possible

sinceq > 1. Then the path from the prelude yieldsn =∑

0≤i≤n qiyi. Let j ≥ n − |Q| with

yj > 0. Thenn =∑

0≤i≤n qiyi ≥ qja ≥ qn a

q|Q| , a contradiction to our choice ofn. Thus, forj ≥ n− |Q|, we haveyj = 0. There existn− |Q| ≤ k < ` ≤ n with ik = i`. Consider the pathP ′ = t0t1 . . . tk−1t` . . . tn−1. Then

n− `+ k ≥ wt(P ′)

= in(r0) +∑

0≤i≤k−1

qixi +∑

`≤i≤n−1

qi−`+kxi + qn−`+kout(rn)

=∑

0≤i≤k−1

qiyi + qk−` ·∑

`≤i≤n

qiyi

︸ ︷︷ ︸

=0 since`>n−|Q|

=∑

0≤i≤k−1

qiyi +∑

k≤i≤n

qiyi

︸ ︷︷ ︸

=0 sincek≥n−|Q|

= n

Hencek ≥ ` contradicting our choice ofk and`. ut

Theorem 5.5 Let p 6= q be positive real numbers. ThenRecp(A∗) andRecq(A

∗) are incompa-rable. Furthermore, the intersectionRecp(A

∗) ∩ Recq(A∗)

• contains all monomials and characteristic series1L for regular word languagesL,

• is closed under finite summation and containsxw�rS for xw a monomial,S ∈ Recp(A∗)∩

Recq(A∗), andr > 0, and

24

• does not necessarily containS �r xw for xw a monomial,S ∈ Recp(A∗) ∩Recq(A

∗) andr 6= 1 positive.

Proof. The incomparability ofRecp(A∗) andRecq(A

∗) follows from Lemma 5.3 and Prop. 5.4.Any monomial isq-recognizable for anyq > 0 and so are the characteristic series of regular

word languages by Lemma 4.5.Since any setRecq(A

∗) is closed under finite summation, so is the intersectionRecp(A∗) ∩

Recq(A∗). The seriesxw �r S is contained inRecp(A

∗) ∩ Recq(A∗) by Lemma 5.2.

Now choose someσ ∈ A and note thatTr = 1σ∗ �r 1ε. By Lemma 4.5,1σ∗ is contained inRecp(A

∗) ∩ Recq(A∗). Sincep 6= q, we can w.l.o.g. assumer 6= p. But thenTr /∈ Recp(A

∗) andthereforeTr /∈ Recp(A

∗) ∩ Recq(A∗). ut

Let p 6= q be positive real numbers. ThenRecp(A∗)∩Recq(A

∗) contains monomials, certaincharacteristic series, and satisfies the above closure properties. We conjecture that it is the leastset of formal power series having these properties. If this is indeed the case, thenRecp(A

∗) ∩Recq(A

∗) =⋂

r>0 Recr(A∗).

6 Weighted Buchi-Automata over Rmax

In this section, we will consider non-terminating executions of a weighted automaton. For theseconsiderations, we restrict the parameterq to values satisfying0 ≤ q < 1.

However, first we recall the classical definition of aBuchi-automaton: it is a quadrupleA =(Q,T, I, F, F∞) with Q a finite set,T ⊆ Q×A×Q andI, F, F∞ ⊆ Q. A finite wordw ∈ A∗ isaccepted byA if it is accepted in the usual way by the automaton(Q,T, I, F ). An infinite wordw ∈ Aω is accepted byA if there exists aw-labeled pathP in A which starts in some state fromIand passes infinitely often throughF∞. The set of all words inA∞ accepted byA is denoted byL∞(A). A languageL ⊆ A∞ is Buchi-recognizableif there exists a Buchi-automatonA withL = L∞(A).

Now we generalize this concept to weighted Buchi-automata.

Definition 6.1 A weighted Buchi-automatonis a tupleA = (Q,T, in, out, out∞) such that(Q,T, in, out) and(Q,T, in, out∞) are weighted automata with weights inRmax.

For a finite wordw ∈ A∗, we define

(||A||, w) = (||(Q,T, in, out)||, w) .

For an infinite pathP = (pi, ai, xi, pi+1)i∈N let P �n denote the prefix ofP of lengthn. Then theweight ofP is defined by

wt(P ) = lim sup{in(p1) + rwt(P �n) + qnout∞(pn+1) | n ∈ N}

and the behavior ofA at infinite wordsw is given by

(||A||, w) = sup{wt(P ) | P is a path labeled byw} .

25

Definition 6.2 A mappingS : A∞ → K is q-Buchi-recognizableif there exists a weightedBuchi-automatonA with ||A|| = S. By ω−Recq(A

∗), we denote the set of all functions that areq-Buchi-recognizable.

Lemma 6.3 Let P = (pi, ai, xi, pi+1)i∈N be some path in the weighted Buchi-automatonA =(Q,T, in, out, out∞). If wt(P ) > −∞, then there is an increasing sequence(ni)i∈N of naturalnumbers without∞(pni+1) > −∞ for i ∈ N and

wt(P ) = in(p1) + limn→∞

rwt(P �n) = in(p1) + supn∈N

rwt(P �n) ,

in particular, the limit on the right hand side exists.

Proof. There are natural numbersn1 < n2 . . . with

wt(P ) = limi→∞

(in(p1) + rwt(P �ni) + qniout∞(pni+1)) .

Sincewt(P ) > −∞, we can assumeout∞(pni+1) > −∞ for all i ∈ N. Since the setQ isfinite, there is some constantc ∈ R with 0 ≤ out∞(pni+1) < c for all i ∈ N. Hence we getlimi→∞(qniout∞(pni+1)) = 0 and therefore

wt(P ) = in(p1) + limi→∞

rwt(P �ni) .

Finally note that transition weightsxn 6= −∞, i.e., xn ≥ 0 for n ∈ N. Hence the sequence(rwt(P �n))n∈N is non-decreasing which implies that any two of its subsequences have the samelimit which equals the supremum. Thus we obtain

wt(P ) = in(p1) + limn→∞

rwt(P �n) = in(p1) + supn∈N

rwt(P �n) .

ut

Corollary 6.4 Let A = (Q,T, in, out, out∞) be a weighted Buchi-automaton. Then there ex-ists a weighted Buchi-automatonA = (Q,T, in, out, out∞) with ||A|| = ||A|| and out∞(i) ∈{0,−∞} for i ∈ Q.

Proof. We define new weights for leaving the system by

out∞(p) =

{

0 if out∞(p) > −∞

−∞ if out∞(p) = −∞ .

It is immediate by the previous lemma that||A|| = ||A||. ut

26

Culik II and Karhumaki [CK94] used another definition of the behavior of a weighted au-tomaton on infinite words: LetT : A∗ → R ∪ {−∞,∞} be a function. We define a function−→T : A∞ → R ∪ {−∞,∞} by

(−→T ,w) = lim sup

n→∞(T,w�n)

for w infinite and(−→T ,w) = −∞ for w finite.1 For a weighted automaton, they define the

behavior|A| by

|A| =−−→||A|| .

Therefore, the behavior according to their definition is−∞ at finite words. Even with this re-striction, there are functionsS : A∞ → R ∪ {−∞,∞} that are the behavior of some weightedBuchi-automaton according to our definition, but not the behavior of a weighted automaton ac-cording to the definition by Culik II and Karhumaki. LetA = {a, b} and

(S,w) =

{

−∞ if w ∈ A∗ orw contains infinitely manybs

0 if w ∈ A∗aω .

LetA = ({1, 2}, T, in, out, out∞) with

T = ({1} × A× {0} × {1, 2}) ∪ {(2, a, 0, 2)}

in = {(1, 0), (2,−∞)}

out = Q× {−∞}

out∞ = {(1,−∞), (2, 0)}

Since1 is the only state with entering weight not−∞, any path contributing to the behaviorhas to start in the state1 and, similarly, it has to pass through the state2 infinitely often. Sincethis is possible iff the label of the path belongs toA∗aω, we obtain||A|| = S.

On the other hand, there is no functionT : A∗ → K whose limit−→T is S (the proof is

analogous to the proof thatA∗aω is not the limit−→L of any subsetL of A∗, cf. [PP04]).

Let A be a deterministic automaton and letL ⊆ A+ be the language accepted byA. If weconsiderA as a Buchi-automaton, it accepts the language

−→L . A similar fact can be shown for

weighted automata, but in this context, we do not have a satisfactory notion of “deterministicweighted automaton”. Therefore, in the following lemma, this is replaced by the restriction onlabels of paths. Furthermore, we have to assume the automaton to becomplete: for any stateiand any lettera, there is an edge(i, a, x, j) for some weightx ∈ K and some statej.2

Lemma 6.5 LetA = (Q,T, in, out) be a complete weighted automaton such that there are onlyfinitely manyw-labeled paths inA for any infinite word. LetA′ = (Q,T, in,−∞, out) with−∞(i) = −∞ for i ∈ Q. Then|A| = ||A′||.

1Actually, Culik II and Karhumaki work in the semiring(R, +, ·, 0, 1), but the idea of their definition is capturedby this formula.

2These conditions are required by our proof, we are not sure whether they can be relaxed.

27

Proof. Let w = w1w2w3 · · · ∈ Aω (with wi ∈ A). By our assumption onA, there are onlyfinitely many pathsP 1, P 2, . . . , P p in A whose label isw. Let P j = (ijk, wk, x

jk, i

jk+1)k∈N. For

simplicity, letajn = in(ij1)+∑

1≤k≤n qk−1xjk+q

nout(ijn+1) be the weight of the prefix of lengthnof the pathP j. Then the weight of the pathP j equalslim supn→∞ ajn. Hence we obtain

(||A′||, w) = max{lim supn→∞

ajn | 1 ≤ j ≤ p}

= max1≤j≤p

(inf{supn>k

ajn | k ∈ N})

= inf{max1≤j≤p

(supn>kj

ajn) | k1, k2, . . . , kp ∈ N}.

The last equality holds since the complete lattice(K,max,min) satisfies the infinite distributivitylaw. Since

{max1≤j≤p

(supn>k

ajn) | k ∈ N} ⊆ {max1≤j≤p

(supn>kj

ajn) | k1, k2, . . . , kp ∈ N}

we can infer(||A′||, w) ≤ inf{max

1≤j≤p(supn>k

ajn) | k ∈ N} .

Conversely, letk1, k2, . . . , kp ∈ N. We may assume thatk1 ≥ kj for 1 ≤ j ≤ p.3 Thensupn>kj

ajn ≥ supn>k1 ajn and therefore

inf{max1≤j≤p

(supn>kj

ajn) | k1, k2, . . . kp ∈ N} ≥ inf{max1≤j≤p

(supn>k1

ajn) | k1 ∈ N} .

Thus, we showed(||A′||, w) = inf{max

1≤j≤p(supn>k

ajn) | k ∈ N} .

Fork ∈ N, we have

max1≤j≤p

(supn>k

ajn) = sup{ajn | 1 ≤ j ≤ p, n > k}

= sup{max1≤j≤p

ajn | n > k}.

Note that, forn ∈ N, max1≤j≤p ajn equals(||A||, w�n) since the automatonA is complete.4 Hence

we have

(||A′||, w) = inf{max1≤j≤p

(supn>k

ajn) | k ∈ N}

= infk∈N

supn>k

(||A||, w�n)

= (|A|, w).

ut

3This is the place where we desperately need that there are only finitely many paths labeled byw.4This would not necessarily be the case ifA were not complete.

28

Recall that the class ofω-rational languages inA∞ is the smallest class of languages thatcontains all singletons and is closed under the operations union, product, Kleene-iteration andω-iteration (the latter two applied to languages inA∗). Now we define the corresponding notionsin our context.

A mappingS : A∞ → Rmax = K is aninfinitary formal power series; the set of all infinitaryformal power series is denoted byKq 〈〈A

∞〉〉. Any (finitary) formal power seriesS can beconsidered as an infinitary formal power series by setting(S,w) = −∞ for w ∈ Aω. Theoperationmax can naturally be extended to infinitary formal power series.The sum+q of afinitary FPSS and an infinitary FPST is defined by

(S +q T,w) = supuv=wu∈A∗

((S, u) + q|u|(T, v)) .

If S andT are both finitary, then this is precisely the operation�q we considered so far. Theformal difference in the definition is the replacement ofmax by sup. This has no effect forwfinite since in that case we consider only the supremum of a finite set. Ifw is infinite, the set{(S, u) + q|u|(T, v) | u ∈ A∗, uv = w} can be infinite; hence we consider its supremum.

For a sequencexi ∈ K, let

i∈N

xi = lim supn→∞

i=1,2,...n

xi = infi∈N

supn≥i

i=1,2,...n

xi .

Let S be a quasiregular finitary formal power series. We define itsω-iteration by

(Sω, w) = sup

{∑

i∈N

q|u1u2...ui−1|(S, ui) | ui ∈ A∗, w = u1u2 . . .

}

for w ∈ Aω and(Sω, w) = −∞ for w ∈ A∗. In general,S +q T andSω can take the value+∞ /∈ Rmax, i.e., in generalS +q T, S

ω /∈ Kq 〈〈A∞〉〉. To avoid this, we assume from now on

that0 ≤ q < 1. SupposeS andT are bounded, i.e., there is someb ∈ R with (S,w) ≤ b for anyw ∈ A∗ and similarly forT . Then(S, u)+q|u|(T, v) ≤ 2b and

i∈Nq|u1u2...ui−1|(S, ui) ≤

b1−q

foranyui ∈ A∗. Thus, for bounded finitary FPS, we haveS +q T, S

ω ∈ Kq 〈〈A∞〉〉. In particular,

rational finitary FPS are bounded sinceq < 1. Hence the following definition makes sense:

Definition 6.6 Let ω−Ratq(A∗) denote the least class of infinitary FPS that contains the mono-

mialsxu for x ∈ K andu ∈ A ∪ {ε} and is closed under the operationsmax, +q, + andω (thelatter two applied to quasiregular finitary formal power series).

Using calculations very similar to those in the proof of Lemma 3.1, one can verify thatKq 〈〈A

∞〉〉 is a left semimodule over the semiringKq 〈〈A∗〉〉. More specifically, letS1, S2 ∈

Kq 〈〈A∗〉〉 andU1, U2 ∈ Kq 〈〈A

∞〉〉. ThenS1 +q (S2 +q U1) = (S1 +q S2) +q U1, S1 +q

max(U1, U2) = max(S1 +q U1, S1 +q U2), andmax(S1, S2) +q U1 = max(S1 +q U1, S2 +q U2).Also note thatT +q T

ω = T ω for anyT ∈ Kq 〈〈A∗〉〉 quasiregular.

29

Lemma 6.7 Let U ∈ ω−Ratq(A∗). Then there existn ∈ N and S, Si, Ti ∈ Ratq(A

∗) suchthatSi andTi are quasiregular (1 ≤ i ≤ n) and

U = max(S,max{Si +q Tωi | 1 ≤ i ≤ n}). (1)

Proof. The obvious proof method is to use induction on the construction of anω-rational in-finitary formal power series: clearly, any rational FPS is ofthe desired form (1) withn = 0. Solet U,U ′ ∈ ω−Ratq(A

∗) be of the form (1) withSi andTi rational and quasiregular. Thenso is max(U,U ′) by the associativity ofmax. From now on, assumeU to be finitary andU ′ = max(S,max{Si +q T

ωi | 1 ≤ i ≤ n}) for someS, Si, Ti ∈ Ratq(A

∗) with Si, Ti quasireg-ular. Then

U +q U′ = max(U +q S,max{U +q Si +q T

ωi | 1 ≤ i ≤ n}) .

is of the form (1). IfU is in addition quasiregular,Uω = U +q Uω satisfies the statement as

well. ut

Lemma 6.8 Anyω-rational infinitary formal power series isω-recognizable.

Proof. We first show the statement for theω-rational infinitary formal power seriesS +q Tω

whereS, T ∈ Ratq(A∗) are quasiregular. SinceS is quasiregular, it is by Lemma 3.4 the behavior

of a normalized weighted automatonA1 = ({1, 2, . . . , k}, T1, in1, out1) with in1(i) = 0 iff i = 1,out1(i) = 0 iff i = 2 and−∞ otherwise. Similarly, the quasiregular finitary formal powerseriesT is the behavior of a normalized weighted automatonA2 = ({k + 1, k + 2, . . . , k +`}, T2, in2, out2) with in2(k + i) = 0 iff i = 1 andout2(k + i) = 0 iff i = 2 and−∞ otherwise.Identifying the states2, k + 1, andk + 2 gives a graph with vertex setQ = {1, 2, . . . , k, k +3, k + 4 . . . , k + `} and edge setT given by

T1 ∪ {(f(i), x, a, f(j)) | (i, x, a, j) ∈ T2}

wheref(k+1) = f(k+2) = 2 andf(k+i) = k+i for 2 < i ≤ `. LetA = (Q,T, in,−∞, out∞)with in(i) = 0 iff i = 1, out∞(i) = 0 iff i = 2 and−∞ otherwise.

Next, we show that(||A||, w) ≤ (S +q Tω, w) for w ∈ Aω. Consider an infinitew-labeled

pathP = (pi, ai, xi, pi+1)i∈N in A. If wt(P ) = −∞, we get immediatelywt(P ) ≤ (S+qTω, w).

So assumewt(P ) > −∞. Then the first statep1 of P has to be1 for otherwisein(p1) = −∞and thereforewt(P ) = −∞. Sincewt(P ) > −∞, there has to be an infinite sequencei1 < i2 <i3 . . . with out∞(pij ) > −∞, i.e.,pij = 2. Let this sequence be maximal, i.e., assumepi = 2iff i occurs in this sequence. Hence the infinite pathP can be decomposed into finite nonemptypathsP0 = (pi, ai, xi, pi+1)1≤i<i1 : 1 → 2 andPj = (pi, ai, xi, pi+1)ij≤i<ij+1

: 2 → 2 for j > 0.Letwj be the label of the finite pathPj. Then we have

wt(P ) = infn≥0

supk>n

wt(P0P1 . . . Pk)

= infn≥0

supk>n

(

rwt(P0) + q|P0|

k∑

i=1

q|P1P2...Pi−1|rwt(Pi)

)

30

≤ infn≥0

supk>n

(

(S,w0) + q|w0|

k∑

i=1

q|w1w2...wi−1|(T,wi)

)

= (S,w0) + q|w0| infn≥0

supk>n

k∑

i=1

q|w1w2...wi−1|(T,wi)

= (S,w0) + q|w0|∑

i∈N

q|w1w2...wi−1|(T,wi)

≤ (S,w0) + q|w0|(T ω, w1w2 . . . )

≤ (S +q Tω, w)

Hence(||A||, w) = sup{wt(P ) | P is a path labeled byw} ≤ (S +q Tω, w).

Conversely, letwj ∈ A∗ with w0w1w2 · · · = w. If (S,w0) = −∞ or (T,wj) = −∞ for somej ∈ N, we obtain immediately

(S,w0) + q|w0|∑

j∈N

q|w1...wj−1|(T,wj) ≤ (||A||, w) .

So assume(S,w0) > −∞ and(T,wj) > −∞ for all j ∈ N. SinceS is the behavior ofA1,there is a pathP0 in A1 labeled byw0 such that(S,w0) = wtA1(P0). SinceA1 is normalized,this impliesP0 : 1 → 2. Similarly, for j > 0, there is a pathPj in A2 labeled bywj such that(T,wj) = wtA2(Pj) andPj : k + 1 → k + 2 for j ∈ N. Replacing statei in the pathPj bythe statef(i) results in a pathf(Pj) : 2 → 2 in A with rwtA2(Pj) = rwtA(f(Pj)). HenceP = P0f(P1)f(P2) . . . is a path inA labeled byw. Now we have

(S,w0)+q|w0|∑

j∈N

q|w1...wj−1|(T,wj)

= rwtA(P0) + q|w0|∑

j∈N

q|w1...wj−1|rwtA(Pj)

= infn∈N

supk>n

(k∑

j=0

q|w0w1...wj−1|rwtA(Pj)

)

= infn∈N

supk>n

(in(1) + rwtA(P �ik) + q|w0w1...wik

|out(2))

(whereik is the length of the pathP0 f(P1) . . . f(Pk))

≤ infn∈N

supk>n

(in(1) + rwtA(P �k) + qkout∞(pk)

)

(wherepk is the state encountered after performingP �k)

= wt(P ) ≤ (||A||, w).

31

Hence we have

(S +q Tω, w) = sup{(S,w0) + q|w0|

j∈N

q|w1...wj−1|(T,wj) | w = w0w1 . . . }

≤ (||A||, w).

Hence we showed that the behavior ofA equalsS +q Tω at infinite words. The same holds

trivially at finite words since, forw ∈ A∗, we have(||A||, w) = −∞ = (S +q Tω, w).

By Lemma 6.7, anyω-rational infinitary formal power series is the maximum of a rationalfinitary formal power series and finitely many formal power series of the formS+qT

ω consideredso far. For any of these constituents, we find a weighted Buchi-automaton. The behavior of thedisjoint union of these automata is the desired weighted Buchi-automaton. ut

Theorem 6.9 Let0 ≤ q < 1 andU : A∞ → Rmax. ThenU is ω-rational iff it is ω-recognizable.

Proof. By Lemma 6.8, it suffices to show that anyω-recognizable infinitary formal power seriesis ω-rational. So letS = ||A|| whereA = (Q,T, in, out, out∞) is a weighted Buchi-automaton.Then

||A|| = max(||(Q,T, in, out,−∞)||, ||(Q,T, in,−∞, out∞)||) .

The behavior of the weighted automaton(Q,T, in, out,−∞) is a rational formal power seriesby Theorem 3.6. Hence it remains to consider weighted Buchi-automata of the formA =(Q,T, in,−∞, out∞). By Corollary 6.4, we can assumeout∞(s) ∈ {0,−∞} for anys ∈ Q.

Fors, t ∈ Q, letAst = (Q,T, ins,−∞, outt∞) be a weighted Buchi automaton defined by

ins(k) =

{

in(k) if s = k

−∞ otherwiseandoutt∞(k) =

{

out∞(k) if t = k

−∞ otherwise.

We next show||A|| = maxs,t∈Q ||Ast||. Note that any path inA is also a path inAst and viceversa. So letP = (pi, ai, xi, pi+1)i≥1 be some infinite path. Sinceins(k) ≤ in(k) andoutt∞(k) ≤out∞(k) for anyk ∈ Q, we get immediately

wtAst(P ) = lim supn→∞

(ins(p1) + rwtAst(P �n) + qnoutt∞(pn+1))

≤ lim supn→∞

(in(p1) + rwtA(P �n) + qnout∞(pn+1))

= wtA(P ).

Since this holds for anys, t ∈ Q and any pathP , we obtainmaxs,t∈Q wtAst(P ) ≤ wtA(P ).Conversely, we have

wtA(P ) = infk∈N

sup{in(p1) + rwtA(P �n) + qnout∞(pn+1) | n ≥ k}

= infk∈N

maxt∈Q

sup{in(p1) + rwtA(P �n) + qnout∞(t) | n ≥ k, pn+1 = t}

32

= maxt∈Q

infk∈N

sup{inp1(p1) + rwtAp1t(P �n) + qnoutt∞(t) | n ≥ k, pn+1 = t}

≤ maxs,t∈Q

infk∈N

sup{ins(p1) + rwtAst(P �n) + qnoutt∞(t) | n ≥ k, pn+1 = t}

≤ maxs,t∈Q

infk∈N

sup{ins(p1) + rwtAst(P �n) + qnoutt∞(pn+1) | n ≥ k}

= maxs,t∈Q

lim supn→∞

(ins(p1) + rwtAst(P �n) + qnoutt∞(pn+1))

= maxs,t∈Q

wtAst(P )

Hence we showedwtA(P ) = maxs,t∈Q wtAst(P ) for any infinite pathP . But this implies||A|| =maxs,t∈Q ||Ast||.

So it remains to be shown that||Ast|| isω-rational fors, t ∈ Q. If ins(s) = −∞ or outt∞(t) =−∞, we have||Ast|| = −∞. Hence we may assume thatoutt∞(t) = 0 ≤ ins(s). We define thefollowing two weighted automataA1 = (Q,T, in1, out1) andA2 = (Q,T, in2, out2):

in1(k) = ins(k) =

{

in(k) if s = k

−∞ otherwiseandin2(k) =

{

0 if t = k

−∞ otherwise

andout1 = out2 = outt∞. LetS1 = ||A1|| and letS2 be the quasiregular formal power series thatagrees with||A2|| on all non-empty words. ThenS1 andS2 are rational formal power series andT = S1 +q S

ω2 is ω-rational. We show||Ast|| = T :

Recall that(||Ast||, w) = −∞ for w ∈ A∗, i.e., we only need to consider infinite words. LetP = (pi, xi, ai, pi+1)i∈N be an infinite path with labelw. If p1 6= s or t occurs only finitely manytimes inP , thenwtAst(P ) = −∞ ≤ (T,w). Otherwise, we can chopP into nonempty finitesubpathsP = P0P1P2 . . . with P0 : s

w0→ t andPi : twi→ t for i > 0 such thatPi does not visit the

statet except at the beginning and end. SinceP0 : sw0→ t andin1(s) ≥ out1(t) = 0, we obtain

rwtAst(P0) = rwtA1(P0) ≤ wtA1(P0) ≤ (S1, w0) .

Similarly, we can infer

rwtAst(Pi) = rwtA2(Pi) = wtA2(Pi) ≤ (S2, wi)

for i > 0. Hence we have

wtAst(P ) = infk∈N

sup{(ins(s) + rwt(P �n) + qnoutt∞(pn+1)) | n ≥ k}

= infk∈N

sup{(ins(s) + rwt(P �n) + qnoutt∞(t)) | n ≥ k, pn+1 = t}

sinceoutt∞(p) = −∞ for p 6= t. Sinceoutt∞(t) = 0, we can continue by

= ins(s) + infk∈N

sup{rwt(P0P1 . . . Pm) | |P0P1 . . . Pm| ≥ k}

33

= ins(s) + rwt(P0)+

q|P0| infk∈N

sup{rwt(P1P2 . . . Pm) | |P1P2 . . . Pm| ≥ k}

= ins(s) + rwt(P0) + q|P0| lim supm∑

i=1

q|P1P2...Pi−1|rwt(Pi)

Recall thatins(s) = in(s) = in1(s) andout1(t) = 0. Henceins(s) + rwt(P0) = wtA1(P0) ≤(S1, w0). Furthermore,in2(t) = out2(t) = 0 impliesrwt(Pi) = wtA2(Pi) ≤ (S2, wi) for i > 0.We can therefore continue by

wtAst(P ) ≤ (S1, w0) + q|w0| lim supn∑

i=1

q|w1w2...wn|(S2, wi)

≤ (S1, w0) + q|w0|(Sω2 , w1w2 . . . )

≤ (T,w0w1 . . . )

It follows that ||Ast|| ≤ T . For the inverse direction, we can assume(T,w) > −∞. Recall that(T,w) = supuv=w((S1, u) + q|u|(Sω2 , v)). Hence there areu ∈ A∗ andv ∈ Aω with uv = w,(S1, u) > −∞ < (Sω2 , v). Sinceu is finite, there is au-labeled pathPu in A1 with wtA1(Pu) =(S1, u). From(S1, u) > −∞, we can inferPu : s

u→ t. Furthermore,

(Sω2 , v) = sup{∑

i∈N

q|v1v2...vi−1|(S2, vi) | v = v1v2 . . . , (S2, vi) > −∞}

= sup{lim supn→∞

0≤i≤n

q|v1v2...vi−1|(S2, vi) | v = v1v2 . . . , (S2, vi) > −∞}.

Sincevi is finite, we findvi-labeled pathsP (vi) in A2 with wtA2(P (vi)) = (S2, vi). Since(S2, vi) > −∞, these paths lead fromt to t, i.e.,P (vi) : t

vi→ t. Sincein2(t) = out2(t) = 0, weeven haverwtA2(P (vi)) = (S2, vi). Hence

0≤i≤n

q|v1v2...vi−1|(S2, vi) = rwt(P (v1)P (v2) . . . P (vn)) .

With out2(t) = 0 we therefore obtain

(Sω2 , v) = sup{lim supn→∞

rwt(P (v1)P (v2) . . . P (vn)) + q|v1v2...vn| · out2(t)

| v = v1v2 . . . , (S2, vi) > −∞}.

Hence we have

34

(T,w) = sup{in1(s) + rwt(Pu) + q|u|out1(t)+

q|u| lim supn→∞

rwt(P (v1)P (v2) . . . P (vn)) + q|v1v2...vn| · out2(t)

| w = uv1v2 . . . , (S1, u) > −∞, (S2, vi) > −∞}

= sup{lim sup(in1(s) + rwt(PuP (v1)P (v2) . . . P (vn)) + q|uv1v2...vn| · out2(t))

| w = uv1v2 . . . , (S1, u) > −∞, (S2, vi) > −∞}

Sincein1(s)+rwt(PuP (v1)P (v2) . . . P (vn))+q|uv1v2...vn| ·out2(t) = wtAst(PuP (v1)P (v2) . . . ),we obtain

≤ sup{wtAst(P ) | P is aw-labeled path}

= (||Ast||, w).

Hence we showed that the behavior ofAst is ω-rational for anys, t ∈ Q. ut

Finally, we wish to derive the classical Buchi-result forω-languages formally from Theo-rem 6.9. Letq ∈ [0, 1). Recall that ifL ⊆ A∞, then its characteristic series1L ∈ Rmax 〈〈A

∞〉〉satisfies(1L, w) = 0 iff w ∈ L and(1L, w) = −∞ if w ∈ A∞ \ L. In particular(q1L, w) =1L(w) for anyw ∈ A∞.

Lemma 6.10 LetL ⊆ A∞ andq ∈ [0, 1). Then L is Buchi-recognizable iff1L ∈ ω−Recq(A∗).

Proof. First, letA = (Q,T, I, F, F∞) be a Buchi-automaton acceptingL. Then construct theweighted Buchi-automatonA′ = (Q,T ′, in, out, out∞) by

T ′ = {(i, a, 0, j) | (i, a, j) ∈ T}

in(i) =

{

0 if i ∈ I

−∞ otherwise

out(i) =

{

0 if i ∈ F

−∞ otherwise

out∞(i) =

{

0 if i ∈ F∞

−∞ otherwise

(Note that in contrast to the situation in the proof of Lemma 4.5, hereA might not be determin-istic.) Using the fact that themax-operation of the semiringRmax is idempotent, it easily followsthat ||A′|| = 1L.

Conversely, letA′ = (Q,T ′, in, out, out∞) be a weighted Buchi-automaton with||A′||q = 1L.Letw ∈ A∞. Then(||A′||q, w) ∈ {0,−∞} and we havew ∈ L iff (||A′||q, w) = 0 iff there existsaw-labeled pathP with weight0 (sinceRmax contains no elementsx with −∞ < x < 0). Aninfinite pathP = (pi, ai, xi, pi+1)i∈N has weight0 iff in(p0) = 0, qi · xi = 0 for eachi ≥ 0, and

lim sup{qn · out∞(pn+1) | n ∈ N} = 0 .

35

We define a Buchi-automatonA = (Q,T, I, F, F∞) as follows. Put

T = {(i, a, j) | ∃x ≥ 0 : (i, a, x, j) ∈ T ′}

and letI (F , F∞, resp.) comprise all statesi ∈ Q such thatin(i) ≥ 0 (out(i) ≥ 0, out∞(i) ≥ 0,resp.).

Observe thatlimn→∞ qn · out∞(p) = 0 for eachp ∈ Q with out∞(p) ≥ 0. We obtainw ∈ Liff (||A′||q, w) = 0 iff (||A′||q, w) ≥ 0 iff w ∈ L(A). HenceL = L(A) is Buchi-recognizable. ut

Lemma 6.11 LetL ⊆ A∞ andq ∈ [0, 1). ThenL is anω-rational language iff its characteristicseries1L ∈ ω−Ratq(A

∗).

Proof. Observe that forL1, L2 ⊆ A∞ andL ⊆ A∗ in Rmax,q 〈〈A∞〉〉 we have1L1∪L2 =

max(1L1 ,1L2), 1L1·L2 = 1L1 +q 1L2 , and, if ε /∈ L, then1L+ = (1L)+ and1Lω = (1L)

ω.Hence, ifL is ω-rational, then1L is anω-rational series.

Now consider the mappingα : Rmax → Rmax with α(−∞) = −∞ andα(x) = 0 forx ∈ R≥0. Thenα is a semiring homomorphism that trivially commutes with multiplicationwith q, i.e.,α is a homomorphism as in Theorem 4.3. Let the mappingα : Rmax,q 〈〈A

∞〉〉 →Rmax,q 〈〈A

∞〉〉 be defined by(α(S), w) = α(S,w). Thenα(S) = 1supp(S), and as in the proof ofTheorem 4.3, one easily checks that

α(max(T, T ′)) = max(α(T ), α(T ′))

α(S +q T′) = α(S) +q α(T ′)

α(S+) = α(S)+

α(Sω) = α(S)ω

for any infinitary seriesT andT ′ and finitary (quasiregular) seriesS. Now let S = 1L beω-rational. By the above,α(1L) can be obtained byω-rational operations applied to characteristicseries of lettersa ∈ A ∪ {ε}. But 1L = α(1L) and, by our first observation, we obtainL byapplying theω-rational operations in the same way as for1L to singleton languages{a} fora ∈ A ∪ {ε}. HenceL is ω-rational. ut

Corollary 6.12 LetL ⊆ A∞. ThenL is Buchi-recognizable iffL is ω-rational.

Proof. Immediate by Lemmas 6.10 and 6.11 and by Theorem 6.9. ut

7 Comparison with recent literature

This paper is the full version of [DK03]. In the mean time, weighted automata on infinite wordshave also been investigated in [EK05, Rah05], using different approaches. In [EK05], the authors

36

assume the semiring to satisfy certain completeness assumptions which allow them to form thearising infinite sums and products. In [Rah05], the author deals with the reals and operationsmax and min, which also permits him to deal with the convergence issue. Recently, skew formalpower series on Conway semirings have also been investigated by [Kui05, Kui05a]. Pech andScalzitti prove in some special cases an extension of McNaughton’s theorem on the coincidenceof Buchi- and Muller-automata for words to the weighted setting(personal communication).

We may also extend our skew setting slightly by considering different endomorphismsϕafor eacha ∈ A. The behavior of weighted automata can then be defined analogously; aSchutzenberger type result was derived in [Ulb03]. In [DV05], the authors give a different proofof Theorem 3.6(2)↔(4); this rests on a reduction to the classical Schutzenberger result (statedeven for singleton alphabets, only). The present result gives further equivalences with directarguments.

References

[BGW00] A. Buchsbaum, R. Giancarlo, and J. Westbrook. On thedeterminization of weightedfinite automata.Siam J. Comput., 30:1502–1531, 2000.

[BP96] M. Bronstein and M. Petkovsek. An introduction to pseudo-linear algebra.Theoret.Comp. Science, 157:3–33, 1996.

[BR88] J. Berstel and C. Reutenauer.Rational Series and Their Languages. EATCS Mono-graphs. Springer Verlag, 1988.

[Buc60] J.R. Buchi. Weak second-order arithmetic and finite automata.Z. Math. LogikGrundlagen Math., 6:66–92, 1960.

[CG95] R.A. Cuninghame-Green. Minimax algebra and applications. Advances in Imagingand Electron Physics, 90:1–121, 1995.

[CK93] K. Culik II and J. Kari. Image compression using weighted finite automata.Com-puter & Graphics, 17:305–313, 1993.

[CK94] K. Culik II and J. Karhumaki. Finite automata computing real functions.SIAM J. ofComputing, pages 789–814, 1994.

[dAHM03] L. de Alfaro, T.A. Henzinger, and R. Majumda. Discounting the future in systemstheory. InICALP’03, Lecture Notes in Comp. Science vol. 2719, pages 1022–1037.Springer, 2003.

[DG99] M. Droste and P. Gastin. The Kleene-Schutzenberger theorem for formal powerseries in partially commuting variables.Information and Computation, 153:47–80,1999.

37

[DG00] M. Droste and P. Gastin. On aperiodic and star-free formal power series in par-tially commuting variables. InFormal Power Series and Algebraic Combinatorics(Moscow, 2000), pages 158–169. Springer, 2000.

[DK03] M. Droste and D. Kuske. Skew and infinitary formal power series. InICALP’03,Lecture Notes in Comp. Science vol. 2719, pages 426–438. Springer, 2003.

[DG87] M. Dugas and R. Gobel. All infinite groups are Galois groups over any field.Trans.Amer. Math. Soc., 304:355–384, 1987.

[DV05] M. Droste and H. Vogler. Recognizable and rational formal power series with gen-eral discounting. Submitted, 2005.

[EK05] Z. Esik and W. Kuich. A semiring-semimodule generalization ofω-regular lan-guages I and II.Journal of Automata, Languages and Combinatorics, 2005. Specialissue on ”Weighted automata” (M. Droste and H. Vogler, eds.), in print.

[Era02] M. Eramian. Image texture analysis using weighted finite automata. PhD thesis,Univ. of Western Ontario, London, Ontario, Canada, 2002.

[FV97] J. Filar and K. Vrieze.Competitive Marcov Decision Processes. Springer Verlag,1997.

[Gal85] A. Galligo. Some algorithmic questions on ideals ofdifferential operators. InProc.EUROCAL ’85, vol. 2, Lecture Notes in Comp. Science vol. 204, pages 413–421.Springer, 1985.

[Gau94] S. Gaubert. Rational series over dioids and discrete event systems. InProceedings ofthe 11th Int. Conf. on Analysis and Optimization of Systems:Discrete Event Systems,Sophia Antipolis, 1994, Lecture Notes in Control and Information Sciences vol. 199.Springer, 1994.

[GP97] S. Gaubert and M. Plus. Methods and applications of(max,+) linear algebra. Tech-nical Report 3088, INRIA, Rocquencourt, January 1997.

[Haf99] U. Hafner.Low bit-rate image and video coding with weighted finite automata. PhDthesis, Universitat Wurzburg, Germany, 1999.

[JLd00] Z. Jiang, B. Litow, and O. de Vel. Similarity enrichment in image compressionthrough weighted finite automata. InCOCOON 2000, Lecture Notes in Comp. Sci-ence vol. 1858, pages 447–456. Springer, 2000.

[Kat01] F. Katritzke.Refinements of data compression using weighted finite automata. PhDthesis, Universitat Siegen, Germany, 2001.

[Kle56] S.E. Kleene. Representation of events in nerve netsand finite automata. InAutomataStudies, pages 3–42. Princeton University Press, Princeton, N.J.,1956.

38

[KS86] W. Kuich and S. Salomaa.Semirings, Automata, Languages. Springer, 1986.

[Kui97] W. Kuich. Semirings and formal power series: Their relevance to formal languagesand automata. InHandbook of Formal Languages Vol. 1, chapter 9, pages 609–677.Springer, 1997.

[Kui05] W. Kuich. Conway semirings and skew formal power series. In Z.Esik and Z. Fulop,editors,Automata and Formal Languages, pages 164–177. University of Szeged,2005.

[Kui05a] W. Kuich. On skew formal power series. In S. Bozapalidis, A. Kalampakas, G. Ra-honis, editors,Algebraic Informatics, pages 7–30. Aristotle University Press, Thes-saloniki, 2005.

[Moh97] M. Mohri. Finite-state transducers in language andspeech processing.Computa-tional Linguistics, 23:269–311, 1997.

[MPR00] M. Mohri, F. Pereira, and M. Riley. The design principles of a weighted finite-statetransducer library.Theoretical Comp. Science, 231:17–32, 2000.

[Ore33] O. Ore. Theory of non-commutative polynomials.Annals Math., 34:480–508, 1933.

[PP04] D. Perrin and J.-E. Pin.Infinite Words. Pure and Applied Mathematics vol. 141.Elsevier, 2004.

[Rah05] G. Rahonis. Infinite fuzzy computations.Fuzzy Sets and Systems, 153:275–288,2005.

[Sch61] M.P. Schutzenberger. On the definition of a family of automata.Inf. Control, 4:245–270, 1961.

[Sha53] L.S. Shapley. Stochastic games.Proc. National Acad. of Sciences USA, 39:1095–1100, 1953.

[SS78] A. Salomaa and M. Soittola.Automata-Theoretic Aspects of Formal Power Series.EATCS Texts and Monographs in Computer Science. Springer, 1978.

[Tho90] W. Thomas. Automata on infinite objects. In J. van Leeuwen, editor,Handbook ofTheoretical Computer Science, pages 133–191. Elsevier Science Publ. B.V., 1990.

[Ulb03] G. Ulbrich. Gewichtete Automaten mit dynamischer Kostenberechnung. Diplomathesis, TU Dresden, 2003.

[Zim81] U. Zimmermann. Linear and Combinatorial Optimization in Ordered AlgebraicStructures. Annals of Discrete Mathematics vol. 10. North Holland, 1981.

39