embedding multi-hemirings into semirings · semirings are well studied weight struc-tures (droste...

19
Embedding Multi-Hemirings into Semirings Preprint Simon Heiden, Jan Sürmeli, and Marvin Triebel Humboldt-Universität zu Berlin, Germany {heiden,suermeli,triebel}@informatik.hu-berlin.de Abstract. Weighted languages and weighted au- tomata over multi-hemirings are capable of express- ing quantitative properties of systems such as its average or discounted costs. We study the appli- cability of well-known semiring theory and algo- rithms in the field of multi-hemirings. To this end, we embed multi-hemirings into semirings and ex- tend this embedding for weighted languages and weighted automata. We connect the rationality of a weighted multi-hemiring language with the ra- tionality of its semiring representative, and relate the behavior of a multi-hemiring automaton and its semiring representative. From this, we derive a Kleene-Schützenberger theorem for weighted lan- guages over multi-hemirings. Finally, we investigate the results of applying semiring algorithms to rep- resentative semiring automata. 1 Introduction Weighted languages 1 and weighted automata gener- alize formal languages and finite automata by quan- tifying the acceptance of a word, as studied by var- ious researchers including Schützenberger (1961); Eilenberg (1974); Salomaa et al (1978); Kupferman and Lustig (2007); Chatterjee et al (2008); Droste et al (2009). In particular, a weighted language over a weight structure S and an alphabet Σ assigns a weight (w) from S to each word w over Σ. Thus, a formal language is a weighted language over the weight structure of truth values. Weighted automata in turn generalize finite automata: The behavior of a weighted automaton M over Σ and S is a weighted language. Semirings are well studied weight struc- tures (Droste and Kuich, 2009), capable of de- scribing many interesting quantitative properties. 1 Weighted languages are also frequently called formal power series or quantitative languages. However, semirings fail to capture more complex, desirable properties such as average and discount- ing. To overcome this failure, Droste and Kuich (2013) generalize semirings to multi-hemirings. From the theoretical point of view, there are two fundamental properties of weighted languages: Ra- tionality and recognizability. A language L over A and Σ is rational (Berstel and Reutenauer, 1988) if it can be expressed as a rational expression. Lan- guage L is recognizable if there exists a weighted automaton M over A and Σ with behavior kM k = L. Schützenberger (1961) proved that rational- ity and recognizability coincide if A is a semiring, generalizing the coincidence result for formal lan- guages Kleene (1956). Droste and Kuich (2013) fur- ther generalized this coincidence for arbitrary multi- hemirings M . From the more practical point of view, there ex- ist several algorithms on semiring automata (Mohri, 2009), such as shortest distance, ε-removal, sum, product, and weighted composition. Presumably those algorithms are not directly applicable to au- tomata over the more general class of multi-hemi- ring automata. In this paper, we provide an alternative proof for the coincidence of rationality and recognizability for multi-hemiring languages, and present an approach to apply algorithms on semiring automata to multi- hemiring automata. To this end, we represent a multi-hemiring M by means of a semiring sr(M ), and extend this to weighted languages and weighted automata over M . In particular, we study the fol- lowing relations: 1. Rationality of a weighted language and its representative language sr(). We can show that rationality coincides when choosing the right basis. 1

Upload: others

Post on 19-Oct-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Embedding Multi-Hemirings into Semirings · Semirings are well studied weight struc-tures (Droste and Kuich, 2009), capable of de-scribing many interesting quantitative properties

Embedding Multi-Hemirings into SemiringsPreprint

Simon Heiden, Jan Sürmeli, and Marvin TriebelHumboldt-Universität zu Berlin, Germany

heiden,suermeli,[email protected]

Abstract. Weighted languages and weighted au-tomata over multi-hemirings are capable of express-ing quantitative properties of systems such as itsaverage or discounted costs. We study the appli-cability of well-known semiring theory and algo-rithms in the field of multi-hemirings. To this end,we embed multi-hemirings into semirings and ex-tend this embedding for weighted languages andweighted automata. We connect the rationality ofa weighted multi-hemiring language with the ra-tionality of its semiring representative, and relatethe behavior of a multi-hemiring automaton andits semiring representative. From this, we derivea Kleene-Schützenberger theorem for weighted lan-guages over multi-hemirings. Finally, we investigatethe results of applying semiring algorithms to rep-resentative semiring automata.

1 IntroductionWeighted languages1 and weighted automata gener-alize formal languages and finite automata by quan-tifying the acceptance of a word, as studied by var-ious researchers including Schützenberger (1961);Eilenberg (1974); Salomaa et al (1978); Kupfermanand Lustig (2007); Chatterjee et al (2008); Drosteet al (2009).In particular, a weighted language ` over a weight

structure S and an alphabet Σ assigns a weight `(w)from S to each word w over Σ. Thus, a formallanguage is a weighted language over the weightstructure of truth values. Weighted automata inturn generalize finite automata: The behavior of aweighted automaton M over Σ and S is a weightedlanguage.Semirings are well studied weight struc-

tures (Droste and Kuich, 2009), capable of de-scribing many interesting quantitative properties.

1Weighted languages are also frequently called formal powerseries or quantitative languages.

However, semirings fail to capture more complex,desirable properties such as average and discount-ing. To overcome this failure, Droste and Kuich(2013) generalize semirings to multi-hemirings.From the theoretical point of view, there are two

fundamental properties of weighted languages: Ra-tionality and recognizability. A language L over Aand Σ is rational (Berstel and Reutenauer, 1988) ifit can be expressed as a rational expression. Lan-guage L is recognizable if there exists a weightedautomaton M over A and Σ with behavior ‖M‖ =L. Schützenberger (1961) proved that rational-ity and recognizability coincide if A is a semiring,generalizing the coincidence result for formal lan-guages Kleene (1956). Droste and Kuich (2013) fur-ther generalized this coincidence for arbitrary multi-hemirings M .From the more practical point of view, there ex-

ist several algorithms on semiring automata (Mohri,2009), such as shortest distance, ε-removal, sum,product, and weighted composition. Presumablythose algorithms are not directly applicable to au-tomata over the more general class of multi-hemi-ring automata.In this paper, we provide an alternative proof for

the coincidence of rationality and recognizability formulti-hemiring languages, and present an approachto apply algorithms on semiring automata to multi-hemiring automata. To this end, we represent amulti-hemiring M by means of a semiring sr(M),and extend this to weighted languages and weightedautomata over M . In particular, we study the fol-lowing relations:

1. Rationality of a weighted language ` and itsrepresentative language sr(`). We can showthat rationality coincides when choosing theright basis.

1

Page 2: Embedding Multi-Hemirings into Semirings · Semirings are well studied weight struc-tures (Droste and Kuich, 2009), capable of de-scribing many interesting quantitative properties

2. Behavioral equivalence of an automatonM andits representative automaton sr(M), that is

sr(‖M‖) = ‖sr(M)‖ .

Applying those results, we reduce coincidence ofrationality and recognizability to the respective co-incidence for weighted semiring languages. Ad-ditionally, we extract cases where we may applysemiring algorithms to a multi-hemiring automatonM by applying it to its representative automatonsr(M).The remainder of this paper is structured as

follows: We repeat the necessary definitions andnotations on multi-hemirings, weighted languagesand weighted automata in Sec. 2. We introduce acanonical embedding of multi-hemirings into semi-rings in Sec. 3. We relate weighted languages overmulti-hemirings and their representative weightedlanguages in Sec. 4. We study the equivalenceof weighted automata and their representative au-tomata in Sec. 5. This leads to an alternative proofof the Kleene characterization for multi-hemiringsin Sec. 6. In Sec. 7, we discuss the applicabilityof algorithms for semiring automata in the field ofmulti-hemiring automata. Finally, we discuss re-lated and possible future work in Sec. 8, and con-clude in Sec. 9.

2 PreliminariesAn alphabet Σ is a finite set of symbols. As usual,we write ε for the empty word, Σ+ for the set ofnon-empty strings over Σ, and Σ∗ for Σ+ ∪ε. Wewrite N for the set 1, 2, 3, . . . of positive integers.

2.1 Multi-Hemirings, Hemirings,Semirings.

A structure S = 〈A,+,0〉 is amonoid if + : A×A→A is associative and 0 ∈ A is a neutral element w.r.t.+. If + is commutative, we call S commutative.A structure S = 〈A,+, ,0〉 is a multi-hemiring if〈A,+,0〉 is a monoid, and = (·m,n)m,n∈N is a fam-ily of mappings ·m,n : A × A → A such that for allm,n ∈ N and a, b, c ∈ A:

(a ·m,n b) ·m+n,p c = a ·m,n+p (b ·n,p c) (1)a ·m,n 0 = 0 ·m,n a = 0 (2)

a ·m,n (b+ c) = (a ·m,n b) + (a ·m,n c) (3)(a+ b) ·m,n c = (a ·m,n c) + (b ·m,n c) . (4)

We call + the sum and each ·m,n a product of S.

We inductively extend the product to sequencesof values as follows:

1. (Base) Let a ∈ A, then we define∏a := a.

2. (Step) Let a ∈ A and w ∈ A+, then we define∏aw := a ·1,|w|

∏w.

Examples of multi-hemirings are:

1. The Max-Average multi-hemiring

〈R ∪ −∞,max, avg,−∞〉 , (5)

where R denotes the set of real numbers,max(x, y) is the maximum of x and y, andavg = (·m,n)m,n≥1 is the family of productswith a ·m,n b = am+bn

m+n .

2. The Max-Discount multi-hemiring

〈R ∪ −∞,max,discλ,−∞〉 , (6)

where 0 < λ < 1, and discλ = (·m,n)m,n≥1 isthe family of products with a ·m,n b = a+ λnb.

Hemirings. A multi-hemiring is a hemiring if all ofits products coincide, that is, for all m,n, o, p ∈ Nand a, b ∈ A, it holds a ·m,n b = a ·o,p b. In case of ahemiring, we omit the indices, writing a · b insteadof a ·m,n b. If S is a hemiring and a1, . . . , an ∈ A,we observe ∏

a1 . . . an =

n∏i=1

ai . (7)

An example of a hemiring is the last weight hemiring

〈R ∪ −∞,max, last,−∞〉 , (8)

where last(a, b) = b if a 6= −∞ and last(a, b) = a =−∞, otherwise.

Semirings. A hemiring is a semiring if there existsa distinct neutral element 1 for its product. In caseof a semiring, 〈A, ·,1〉 is a monoid, and the productdistributes over the sum. Examples of semirings are:

1. The Boolean semiring 〈⊥,>,∨,∧,⊥,>〉.

2. The tropical semiring 〈R+∪∞,min,+,∞, 0〉,where R+ is the set of non-negative real num-bers.

3. The arctic semiring 〈R+ ∪−∞,max,+,−∞, 1〉.

4. The semiring 〈2Σ∗,∪, ·, ∅, ε〉 of formal lan-

guages, where · denotes concatenation.

5. The probability semiring 〈R+ ∪∞,+, ·, 0, 1〉.

2

Page 3: Embedding Multi-Hemirings into Semirings · Semirings are well studied weight struc-tures (Droste and Kuich, 2009), capable of de-scribing many interesting quantitative properties

Ideals and Completeness. Let D ⊆ A. Then, D isan ideal of S if the following holds for any x, y ∈ D,a ∈ A and m,n ≥ 1:

x+ y ∈ D (9)a ·m,n x ∈ D (10)x ·m,n a ∈ D (11)

Let X ⊆ A be an ideal of S. Then, S is X-completeif for any index set I and any family f = (ai)i∈Iwith ai ∈ X, the sum of the members of f is definedindepentdently from the order of the indices in Iand satisfying the following identities for all a ∈ A,m,n ≥ 1, k ∈ I, and partitions I =

⋃j∈J Ij of I:∑

i∈Iai ∈ X , (12)∑

i∈∅

ai = 0 , (13)

∑i∈k

ai = ak , (14)

∑i∈I

ai =∑j∈J

∑i∈Ij

ai

, (15)

a ·m,n

(∑i∈I

ai

)=∑i∈I

(a ·m,n ai) , and (16)(∑i∈I

ai

)·m,n a =

∑i∈I

(ai ·m,n a) . (17)

In case X = A, we call S complete. Examples forcomplete multi-hemirings are:

1. The Boolean semiring as defined above, wherethe infinite sum over some family (ai)i∈I is trueiff there exists i ∈ I with ai = true.

2. The tropical semiring as defined above.

3. The generalized arctic semiring

〈R+ ∪ ∞,−∞, sup,+,−∞, 1〉 ,

where sup(X) denotes the supremum, that isleast upper bound, for any set X based on thenatural order, and −∞+∞ = −∞.

4. The analogously generalized sup-average, andsup-discounting multi-hemirings.

5. The probability semiring

〈R+ ∪ ∞,+, ·, 0, 1〉 ,

where the infinite sum of a family (ai)i∈I is itslimit if it converges, and ∞, otherwise.

2.2 Weighted Languages overMulti-Hemirings

Let S be a multi-hemiring and Σ be an alphabet.A mapping ` : Σ+ → A is a weighted language overΣ and A, denoted by ` ∈ S〈〈Σ〉〉. The set w |`(w) 6= 0 is the support of `, denoted by `. We call` a polynomial (monomial) if ` is finite (singletonor empty). If ` is a monomial with ` ⊆ w and`(w) = x, we write (w, x) for `. We call ` elementalif ` ⊆ Σ. If ` is an elemental monomial, we call ` anatom, denoted by ` ∈ S〈Σ〉. If ` = ∅, we write 0 for`, observing 0 ∈ S〈Σ〉.

Operations on weighted languages. Let S be amulti-hemiring and Σ be an alphabet. We extendthe mappings + and to S〈〈Σ〉〉: Let `, `′ ∈ S〈〈Σ〉〉.Then ` + `′ is the weighted language over Σ andS defined by w 7→ `(w) + `′(w). Moreover, ` `′is the weighted language over Σ and S defined byw 7→

∑u,v∈Σ+,uv=w `(u) ·|u|,|v| `′(v). Droste and

Kuich (2013) have shown that S〈〈Σ〉〉 together with+, and 0 forms a hemiring. Obviously, every poly-nomial can be written as a finite sum of monomials.If S is a semiring, each monomial

(a1 . . . an, x)

can be written as the product (a1, x) (a2,1) . . . (an,1). We observe `i(w) = 0 for all i > |w| andw ∈ Σ+. Thus, the notion `+ for the series

∑i∈N `

i

is well-defined, and we conclude:

`+(w) =∑

0<i≤|w|

(`i)(w) . (18)

Rationality. Let S be a multi-hemiring and Σ bean alphabet. Let A′ ⊆ A. We define the set ofA′-rational weighted languages over Σ and S recur-sively as follows:

1. Let ` = (w, x) ∈ S〈Σ〉 with x ∈ A′∪0. Then,` is A′-rational.

2. Let `, `′ ∈ S〈〈Σ〉〉 be A′-rational. Then, ` + `′,` `′ and `+ are A′-rational.

If ` is A-rational, we call ` rational for short. IfS is a semiring, every polynomial ` with `(w) ∈ A′for all w ∈ ` is A′-rational.

2.3 Weighted Automata overMulti-Hemirings

Let S be a multi-hemiring and Σ be an alphabet. Aweighted automaton M = 〈Q,Σ, A, I, F, T 〉 over Σand S consists of a finite set Q of states, finite sub-sets I, F ⊆ Q of initial and final states, respectively,and a set T ⊆ Q× Σ×A×Q of transitions.

3

Page 4: Embedding Multi-Hemirings into Semirings · Semirings are well studied weight struc-tures (Droste and Kuich, 2009), capable of de-scribing many interesting quantitative properties

Behavior. Let π = t1 . . . tn be a non-empty se-quence of transitions ofM with ti = 〈qi, ai, xi, qi+1〉for 1 ≤ i ≤ n. Then, π is a path of M , de-noted by q1

a1/x1−−−−→A . . .an/xn−−−−→A qn+1 or shorter

q1a1/x1...an/xn−−−−−−−−−→A qn+1. We write π|Σ for the se-

quence a1 . . . an and π|A for the sequence x1 . . . xn.Path π accepts π|Σ with weight ‖A‖(π) :=

∏π|A.

The behavior ‖M‖ ∈ S〈〈Σ〉〉 of M is the weightedlanguage defined by

w 7→∑

π is a path of A accepting w

‖A‖(π) . (19)

3 Embedding Multi-Hemiringsinto Semirings

In this section, we embed a multi-hemiring S intoa hemiring hr(S), and into a semiring sr(S).Thereby we strive to reach the following goals:

1. Each element a of S has corresponding elementshr(a) and sr(a) of hr(S) and sr(S), respec-tively.

2. The operations of S, hr(S) and sr(S) cor-respond to each other, that is each opera-tion roughly is the same in all three struc-tures. For instance, hr(a+ b) corresponds tohr(a) + hr(b).

3. The transformation is at least partially re-versible. For instance, we should be able tocompute a + b by (1) transforming a and binto corresponding objects a′ and b′ in hr(S)or sr(S), (2) sum a′ and b′, and (3) translatethe result back to S.

4. The transformation preserves as many proper-ties as possible. For instance, completeness ofS implies completeness of hr(S).

The first two requirements are similar to thoseof a homomorphism. The latter two requirementsenable analysis by means of hemiring and semiringtechniques.

3.1 Embedding Multi-Hemirings intoHemirings

In this section, we embed a given multi-hemiringS = 〈A,+, ,0〉 into a canonical hemiring hr(S).A hemiring is a multi-hemiring with pairwise co-

inciding products. We unify the products ·m,n ofS by shifting the parameters m and n into the

operands, which are functions from N to A. Thatis, we change the term x ·m,n y to the term

(x← [ m) (y ←[ n) .

To this end, we define hr(A) := f : N→ A tothe set of all functions from N to A. We can conceivesuch a function f : N → A as a weighted languageover some singleton alphabet. Thus, we naturallyapply the terms support, monomial, polynomial, el-emental, and atom from weighted languages to suchfunctions. We denote a polynomial f with supportf ⊆ k1, . . . , kn by

f(k1)←[ k1, . . . , f(kn)← [ kn , (20)

or by f(k1) ← [ k1 if n = 1. Finally, if n = 0, wedenote f by 0.Intuitively, a function x ← [ m represents a value

x obtained in m steps. More general, a function frepresents a set of values, with each x ∈ A obtainedin f(x) steps. This generalization from values tosets of values allows the removal of the parametersfrom the product. We frequently encounter atoms,that is a value obtained in a single step, justifyingthe definitions

hr(x) := x← [ 1 (21)hr(x1 . . . xn) := hr(x1) . . .hr(xn) (22)

for all x, x1, . . . , xn ∈ A.In the following, we define a product and a sum

operation on hr(A), analogously to the product andsum on weighted languages.

3.1.1 The Product and its Properties

We define the product on hr(A) as the Cauchyproduct, where a, b ∈ hr(A) and k ∈ N:

(a b)(k) =∑

l+m=k

a(l) ·l,m b(m) . (23)

Let a = x ← [ m and b = y ← [ n be monomials.Then, we observe a b = x ·m,n y ←[ m+ n is againa monomial. Furthermore, the following equation isvalid:∏

hr(x1 . . . xn) =(∏

x1 . . . xn

)← [ n . (24)

3.1.2 The Sum and its Properties

We define the sum + on hr(A) pointwise, that isfor a, b ∈ hr(A) and k ∈ N we define

(a+ b)(k) := a(k) + b(k) . (25)

4

Page 5: Embedding Multi-Hemirings into Semirings · Semirings are well studied weight struc-tures (Droste and Kuich, 2009), capable of de-scribing many interesting quantitative properties

Sum of monomials. Let a = x← [ m and b = y ← [n be monomials. If m = n, then a + b = x + y ← [m is again a monomial. If x, y 6= 0 and m 6= n,then a + b = x ← [ m, y ←[ n is not necessarily amonomial but always a polynomial. If x = 0 andy 6= 0, then a + b = 0 + b = b is a monomial. Ifx = y = 0, then a + b = 0 + 0 = 0. The supportof the sum x← [ m and y ← [ n is thus either empty,singleton or consists of two elements.

Unity. The constant function 0 with empty sup-port is the unity regarding addition, that is a+ 0 =0 + a = a.

3.1.3 The Representative Hemiring

The before defined product and sum operation forma hemiring.

Lemma 1 Let S = 〈A,+, ,0〉 be a multi-hemi-ring. Then 〈hr(A),+, ,0〉 is a hemiring. 2

Proof The associativity of the Cauchy product fol-lows from Equation 1, Equation 3 and Equation 4,and its distributivity over sum from Equation 3,Equation 4.

For example, the following structure is the rep-resentative hemiring of the max-avg multi-hemiringfrom Equation 5:

〈N 7→ R+ ∪ −∞,+, ,0〉 , (26)

where

(f + g)(k) = max(f(k), g(k)) (27)

(f g)(k) = maxl+m=k

f(l)l + g(m)m

k(28)

0(k) = −∞ . (29)

As another example, the following structure is therepresentative hemiring of the max-disc multi-hemi-ring from Equation 6:

〈N 7→ R+ ∪ −∞,+, ,0〉 , (30)

where

(f + g)(k) = max(f(k), g(k)) (31)(f g)(k) = max

l+m=kf(l) + λmg(m) (32)

0(k) = −∞ . (33)

3.1.4 Preservation of ideals and completeness

Transforming S to hr(S) preserves ideals and com-pleteness. Let X ⊆ A and Y be the set of all func-tions f : N→ X.

Lemma 2 If X is an ideal of S, then Y is an idealof hr(S). 2

Proof Let f, g ∈ Y and k ∈ N. Then, (f+g)(k) =f(k) + g(k). Because X is an ideal and f, g mapinto X, f(k), g(k), f(k) + g(k) and (f + g)(k) areelements of X. Let h : N → A. Then, (f h)(k) =∑l+m=k f(k) ·l,m h(m). Due to X being an ideal

and f(l) ∈ X, f(l) ·l,m h(m) is an element of X forall l + m = k. Hence,

∑l+m=k f(k) ·l,m h(m) is in

X. The proof for h f is analogous. Therefore, Yis an ideal of hr(S).

If S is X-complete, then hr(S) is Y -complete dueto the pointwise definition of the sum. In particular,let (ai)i∈I be a family over Y . Then, we can easilydefine (∑

i∈Iai

)(k) :=

∑i∈I

ai(k) , (34)

because∑i∈I ai(k) is well-defined. The remaining

properties then follow from the X-completeness ofS.We remark that there are terms which result in

functions with infinite support. For instance∑i∈N

(x← [ 1)i

results in a mapping f with support f = N.

3.1.5 Backwards Transformation

Let f ∈ hr(A). Then, we introduce the followingnotation: We write hr−1(f) for the not necessarilywell-defined sum ∑

i∈Nf(i) . (35)

We observe that hr−1(f) is well-defined if and onlyif the sum is well-defined on the family (ai)i∈I whereI is the support of f and ai = f(i). Thus, hr−1(f)is defined if I is finite, or if S is X-complete forX = f(i) | i ∈ N.We further observe the following identities:

hr−1(0) = 0 (36)

hr−1(x←[ m) = x (37)

hr−1(hr(x)) = x (38)

We prove the following important relationship be-tween + and on A and hr(A):

Lemma 3 Let I be an index set and (wi)i∈I afamiliy of elements of A+. Let I be finite or S becomplete. Then,∑

i∈I

∏wi = hr−1

(∑i∈I

∏hr(wi)

). (39)

2

5

Page 6: Embedding Multi-Hemirings into Semirings · Semirings are well studied weight struc-tures (Droste and Kuich, 2009), capable of de-scribing many interesting quantitative properties

Proof Let g =∑i∈I

∏hr(wi) and y = hr−1(g) be

well-defined. Then, y = hr−1(g) =∑k≥1

g(k). Fur-

thermore,

g(k) =

(∑i∈I

∏hr(wi)

)(k) =

∑i∈I

(∏hr(wi)

)(k)

=∑i∈I

(∏wi ← [ |wi|

)(k) .

For n = 1, 2, . . ., let In = i ∈ I | n = |wi|. Thesupport of each (

∏wi ←[ |wi|) is |wi|, yielding

g(k) =∑i∈I

(∏wi ←[ |wi|

)(k)

=∑i∈Ik

(∏wi ← [ |wi|

)(k)

=∑i∈Ik

∏wi .

This in turns yields

y =∑k≥1

g(k) =∑k≥1

∑i∈Ik

∏wi =

∑i∈Ik,k≥1

∏wi

=∑i∈I

∏wi .

This concludes the proof.

3.2 Embedding Hemirings intoSemirings

In order to embed a multi-hemiring S into a semi-ring sr(S), we first embed S into a hemiring, yiedinghr(S). Second, we embed hr(S) into the semiringsr(S). By Golan (1999) every hemiring can be em-bedded into a semiring by constructing its Dorrohextension (Dorroh, 1932) with the natural numbers.To this end, let S = 〈A,+, ,0〉 be a hemiring.

Let go(A) denote the set N ∪ 0 × A. Semanti-cally, 〈n, x〉 abstractly denotes the term n+ x. Theoperations + and extend to sr(A) as follows:

〈α, x〉+ 〈β, y〉 := 〈α+ β, x+ y〉 (40)〈α, x〉 〈β, y〉 := 〈αβ, βx+ αy + x · y〉 (41)

where βx and αy denote∑βi=1 x and

∑αi=1 y, re-

spectively.It has been shown that applying this construc-

tion to any hemiring yields a semiring, with1-element 〈1,0〉. Thus, we define go(S) =〈go(A),+, , 〈0,0〉, 〈1,0〉〉.

Proposition 1 Let S be a hemiring. Then, go(S)is a semiring. 2

We frequently encounter values of the form 〈0, a〉.Thus, we define

go(x) := 〈0, x〉 (42)go(x1 . . . xn) := go(x1) . . .go(xn) (43)

for all x, x1, . . . , xn ∈ A. We observe go(a) go(b) = go(a b),

∏go(w) = go(

∏w) and

go(a) + go(b) = go(a+ b). Finally, we define

go−1(〈α, x〉) := x , (44)

and observe go−1(go(x)) = x.

Lemma 4 Let S be a hemiring. Let I be an indexset. Let (wi)i∈I be a family of elements of A+. LetI be finite or S be complete. Then,

∑i∈I

∏wi = go−1

(∑i∈I

∏go(wi)

). (45)

2

Proof Let g =∑i∈I∏

go(wi). Then,∏go(wi) = go

(∏wi

)yields

g =∑w∈W

go(∏

w)

=∑i∈I〈0,∏

wi〉 .

Because the sum is defined pointwise, we conclude

g =∑i∈I〈0,∏

wi〉 = 〈0,∑

i∈I∏wi

〉 = go

(∑i∈I

∏wi

).

Then,

go−1(g) = go−1

(go

(∑i∈I

∏wi

))=∑i∈I

∏wi

concludes the proof.

3.2.1 Partial Preservation of Completeness

Transforming S to go(S) partially preserves idealsand completeness. Let X ⊆ A and Y the set of allgo(x) with x ∈ X.

Lemma 5 If X is an ideal of A, then Y is an idealof go(A). 2

6

Page 7: Embedding Multi-Hemirings into Semirings · Semirings are well studied weight struc-tures (Droste and Kuich, 2009), capable of de-scribing many interesting quantitative properties

Proof Let a = 〈0, x〉, b = 〈0, y〉 ∈ Y . Then, a+b =〈0, x + y〉. Because x, y ∈ X and X is an ideal,x + y ∈ X and therefore 〈0, x + y〉 ∈ Y . Let c =〈α, z〉 ∈ go(A). Then, ac = 〈0α, 0z+αx+xz〉 =〈0, αx+ x z〉. From x ∈ X and X being an ideal,we can conclude that αx =

∑αi=1 x and x z are

elements of X. Hence, αx + x z is an element ofX, and hence a c ∈ Y . The proof for z x ∈ Y isanalogous. Hence, Y is an ideal of go(S).

If S is X-complete, then go(S) is Y -complete dueto the pointwise definition of the sum. In particular,let (ai)i∈I be a family over Y . Then, we can easilydefine ∑

i∈Iai := 〈0,

∑i∈I

ai(k)〉 , (46)

because∑i∈I ai(k) is well-defined. The remaining

properties then follow from the X-completeness ofS.

3.3 Embedding Multi-Hemirings intoSemirings

Let S be a multi-hemiring. In the following, weoften write sr(S) instead of go(hr(S)), and canon-ically extend this notion where it fits.From Lemmata 3 and 4, we can conclude:

Theorem 1 Let S be a multi-hemiring. Let I be anindex set and (wi)i∈I a family of elements of A+.Let I be finite or S complete. Then,

∑i∈I

∏wi = hr−1

(go−1

(∑i∈I

∏sr(wi)

)).

(47)2

Proof Obviously, (hr(wi))i∈I is the familiy ofsemiring representatives. Then, Lemma 3 andLemma 4 yield

hr−1

(go−1

(∑i∈I

∏sr(wi)

))

=hr−1

(go−1

(∑i∈I

∏go(hr(wi))

))

=go−1

(∑i∈I

∏go(wi)

)=∑i∈I

∏wi

3.4 Preservation of Commutativity andIdempotence

In this section, we show that the transformationspreserve some properties. That is, we consider Sto have property φ and study whether hr(S) andsr(S) also have property φ. We already have stud-ied the preservation of ideals and completeness inSec. 3.1.4 and 3.2.1.

3.4.1 Commutativity

We call S commutative if each product ·m,n is com-mutative, that is a ·m,n b = b ·m,n a for all a, b ∈ Aand m,n ≥ 1.Examples of commutative multi-hemirings are the

max-avg multi-hemiring, and the tropical semiring.The multi-hemirings max-last and max-discountingare not commutative.We show that our transformations preserve com-

mutativity.

Lemma 6 Let S be commutative. Then,

1. hr(S) is commutative.

2. If S is a hemiring, then go(S) is commutative.

3. sr(S) is commutative. 2

Proof 1. Let f, g ∈ hr(A). Let k ∈ N. Then,

(f g)(k) =∑

l+m=k

f(l) + g(m)

=∑

m+l=k

f(m) + g(l)

Due to commutativity of S, we find

(f g)(k) =∑

m+l=k

f(m) + g(l)

=∑

m+l=k

g(l) + f(m)

=∑

l+m=k

g(l) + f(m)

= (g f)(k)

2. Let S be a hemiring. Let

a = 〈α, x〉, b = 〈β, y〉 ∈ go(A) .

Then,

a b = 〈αβ, αy + βx+ x y〉 .

Due to commutativity of S, we find xy = yxand consequently

a b = 〈αβ, αy + βx+ x y〉= 〈βα, βx+ αy + y x〉= b a .

7

Page 8: Embedding Multi-Hemirings into Semirings · Semirings are well studied weight struc-tures (Droste and Kuich, 2009), capable of de-scribing many interesting quantitative properties

3. sr(S) = go(hr(S)). Because S is commuta-tive, hr(S) is commutative. Because hr(S) isa commutative hemiring, go(hr(S)) is commu-tative.

3.4.2 Idempotence

An element a ∈ A is idempotent if a+ a = a. A setX ⊆ A is idempotent if all its elements are idempo-tent. If A is idempotent, then S is idempotent.Examples of idempotent multi-hemirings are any

multi-hemirings with min, max, or sup as the sum.In contrast to that, the probability semiring is notidempotent.We show that our transformations preserve idem-

potent elements.

Lemma 7 Let X ⊆ A be idempotent.

– Let Y be the set of functions f : N→ X. Then,Y is idempotent in hr(S).

– Let S be a hemiring. Let Z be the set of pairs〈0, x〉 with x ∈ X. Then, Z is idempotent ingo(S).

– Let V be the set of all 〈0, f〉 with f ∈ Y . Then,V is idempotent in sr(S). 2

Proof

1. Let f ∈ Y . We show f + f = f . Let k ∈ N.Then, (f+f)(k) = f(k)+f(k). Because f ∈ Y ,we find f(k) ∈ X. Therefore,

(f + f)(k) = f(k) + f(k) = f(k) .

2. Let 〈0, x〉 ∈ Z. We show 〈0, x〉+ 〈0, x〉 = 〈0, x〉.From 〈0, x〉 ∈ Z, we conclude x ∈ X. Thus

〈0, x〉+ 〈0, x〉 = 〈0, x+ x〉 = 〈0, x〉 . (48)

3. The set X is the set Y is idempotent in thehemiring hr(S). Hence, V is idempotent inthe semiring

go(hr(S)) = sr(S) .

4 Relating Weighted Languagesover Multi-Hemirings andSemirings

In this section, we relate the weighted languagesover a multi-hemiring S with the weighted lan-guages over the hemiring hr(S) and the semiringsr(S). Thereby, we assume a fixed alphabet Σ.

4.1 Representative Hemiring andSemiring Languages

Let r ∈ S〈〈Σ〉〉. Then, we define the weighted lan-guage hr(r) ∈ hr(S)〈〈Σ〉〉 by

hr(r)(w) := r(w)← [ |w| . (49)

If S is a hemiring, we further define the weightedlanguage go(r) ∈ go(S)〈〈Σ〉〉 by

go(r)(w) := 〈0, r(w)〉 . (50)

Finally, we define the weighted language sr(r) ∈sr(S)〈〈Σ〉〉 by

sr(r) := go(hr(r)) . (51)

As a first relation, we observe that the operationson weighted languages carry over the embedding:

Lemma 8 Let r1, r2 ∈ S〈〈Σ〉〉 be weighted lan-guages. Then, the following equations are valid:

hr(r1 + r2) = hr(r1) + hr(r2) (52)hr(r1 r2) = hr(r1) hr(r2) (53)

hr(r+1

)= hr(r1)

+ (54)2

Proof 1st claim: hr(r1 + r2) = hr(r1) + hr(r2)

Let w ∈ Σ+. Then

hr(r1 + r2)(w) = (r1 + r2)(w)← [ |w|= r1(w) + r2(w)←[ |w|= r1(w)← [ |w|+ r2(w)← [ |w|= hr(r1)(w) + hr(r2)(w)= (hr(r1) + hr(r2))(w)

2nd claim: hr(r1 r2) = hr(r1) hr(r2)

Let w ∈ Σ+. Then

hr(r1 r2)(w) = (r1 r2)(w)← [ |w|= (

∑uv=w

r1(u) ·|u|,|v| r2(v))←[ |w|

=∑uv=w

(r1(u) ·|u|,|v| r2(v)← [ |w|)

=∑uv=w

(r1(u) ·|u|,|v| r2(v)← [ |u|+ |v|)

=∑uv=w

(r1(u)← [ |u| r2(v)←[ |v|)

=∑uv=w

(hr(r1)(u) hr(r2)(v))

= (hr(r1) hr(r2))(w)

8

Page 9: Embedding Multi-Hemirings into Semirings · Semirings are well studied weight struc-tures (Droste and Kuich, 2009), capable of de-scribing many interesting quantitative properties

3rd claim: hr(r+1

)= hr(r1)

+

Let w ∈ Σ+. From Equation 18 we conclude:

hr(r+1

)(w) = hr

(∑i>0

(ri1)

)(w)

= hr

( ∑0<i≤|w|

(ri1)

)(w)

=∑

0<i≤|w|hr(ri1)(w)

=∑

0<i≤|w|(hr(r1)

i)(w)

= (∑

0<i≤|w|hr(r1)

i)(w)

= (∑i>0

hr(r1)i)(w)

= (hr(r1)+

)(w)

Lemma 9 Let S be a hemiring. Let r1, r2 ∈ S〈〈Σ〉〉be weighted languages. Then, the following equa-tions are valid:

go(r1 + r2) = go(r1) + go(r2) (55)go(r1 r2) = go(r1) go(r2) (56)

go(r+1

)= go(r1)

+ (57)2

Proof Follows directly from 〈0, a〉〈0, b〉 = 〈0, ab〉and 〈0, a〉+ 〈0, b〉 = 〈0, a+ b〉.

Corollary 1 Let r1, r2 ∈ S〈〈Σ〉〉. Then, the follow-ing equations are valid:

sr(r1 + r2) = sr(r1) + sr(r2) (58)sr(r1 r2) = sr(r1) sr(r2) (59)

sr(r+1

)= sr(r1)

+ (60)2

4.2 Structural PropertiesWe write (S ← [ 1) for the set of all x← [ 1 ∈ hr(A).If S is a hemiring, we write 〈0, S〉 for the set of all〈0, x〉 ∈ go(A). Continuing this notation leads to

〈0, S ← [ 1〉 = 〈0, x〉 | x ∈ (S ←[ 1) .

We show that all (S ←[ 1)-rational weighted lan-guages have a particular structure: For each (S ← [1)-rational weighted language s over hr(S) thereexists a weighted language r over S with hr(r) = s.

Lemma 10 Let s ∈ hr(S)〈〈Σ〉〉 be a (S ← [ 1)-rational weighted language. Let w ∈ Σ+. Then,s(w) = x← [ |w| holds for some x ∈ A. 2

Proof Proof by mathematical induction over the(S ← [ 1)-rational weighted languages.

Basis: Let s = (u, x ←[ 1) be an atom. Thens(u) = x ←[ |u| and for all w ∈ Σ+, w 6= u:s(w) = 0← [ |w|.

Inductive Step: Assume the claim holds for (S ← [1)-rational weighted languages s1, s2 ∈ hr(S)〈〈Σ〉〉,that is si(w) = xwi ←[ |w| for all w ∈ Σ+. Letw ∈ Σ+.We have to consider the following cases:

1. Let s = s1 + s2.s(w) = (s1 + s2)(w)

= s1(w) + s2(w)= xw1 ←[ |w|+ xw2 ← [ |w|= xw1 + xw2 ← [ |w|

2. Let s = s1 s2.

s(w) = (s1 s2)(w)=

∑uv=w

(s1(u) s2(v))

=∑uv=w

(xu1 ← [ |u| xv2 ← [ |v|)

=∑uv=w

((xu1 ·|u|,|v| xv2)← [ |u|+ |v|)

= (∑uv=w

(xu1 ·|u|,|v| xv2))← [ |w|

3. Let s = s+1 .

From Equation 18 we conclude:

s(w) = (s+1 )(w)

=∑

0<i≤|w|(si1)(w)

Hence, s = s+1 is a special case of the cases

s = s1 + s2 and s = s1 s2.

If S is a hemiring, we can show a similar struc-tural property of 〈0, S〉-rational weighted languages.

Lemma 11 Let S be a hemiring. Let s ∈go(S)〈〈Σ〉〉 be a 〈0, S〉-rational weighted language.Let w ∈ Σ+. Then, s(w) = 〈0, x〉 holds for somex ∈ A. 2

Proof Proof by mathematical induction over the〈0, S〉-rational weighted languages.

Basis: Let s = (u, 〈0, x〉) be an atom. Then s(u) =〈0, x〉 and for all w ∈ Σ+, w 6= u: s(w) = 〈0,0〉.

Inductive Step: Assume that the claim holdsfor 〈0, S〉-rational weighted languages s1, s2 ∈go(S)〈〈Σ〉〉, that is si = 〈0, xwi 〉 for all w ∈ Σ+.Let w ∈ Σ+. We have to consider the followingcases:

9

Page 10: Embedding Multi-Hemirings into Semirings · Semirings are well studied weight struc-tures (Droste and Kuich, 2009), capable of de-scribing many interesting quantitative properties

1. Let s = s1 + s2.

s(w) = (s1 + s2)(w)= s1(w) + s2(w)= 〈0, xw1 〉+ 〈0, xw2 〉= 〈0, xw1 + xw2 〉

2. Let s = s1 s2.

s(w) = (s1 s2)(w)=

∑uv=w

(s1(u) s2(v))

=∑uv=w

(〈0, xu1 〉 〈0, xv2〉)

=∑uv=w

〈0, xu1 xv2〉

= 〈0,∑uv=w

(xu1 xv2)〉

3. Let s = s+1 .

From Equation 18 we conclude:

s(w) = (s+1 )(w)

=∑

0<i≤|w|(si1)(w)

Hence, s = s+1 is a special case of the cases

s = s1 + s2 and s = s1 s2.

Finally, we can combine the structural propertiesof (S ←[ 1)-rational and 〈0, S〉-rational weighted lan-guages, obtaining the following result for 〈0, S ← [ 1〉-rational weighted languages: For every 〈0, S ← [ 1〉-rational weighted language s over sr(S), there is aweighted language r over S with sr(r) = s.

Corollary 2 Let s ∈ sr(S)〈〈Σ〉〉 be an 〈0, S ← [ 1〉-rational weighted language. Let w ∈ Σ+. Then,s(w) = 〈0, x← [ |w|〉 holds for some x ∈ A. 2

4.3 Coincidence of RationalityWe now show the coincidence of rationality of aweighted language r over S and (S ←[ 1)-rationalityof hr(r).

Lemma 12 Let r ∈ S〈〈Σ〉〉 be a weighted language.Then, the following are equivalent:

1. r is rational.

2. hr(r) is (S ←[ 1)-rational. 2

Proof 1st claim: (1.) ⇒ (2.).

Let r ∈ S〈〈Σ〉〉 be a rational weighted language.We have to show: hr(r) is (S ←[ 1)-rational.

Proof by mathematical induction:

Basis: r ∈ S〈Σ〉. Then hr(r) ∈ hr(S)〈Σ〉 andhr(r) is obviously (S ← [ 1)-rational by definition ofhr(r).

Inductive step: Let r1, r2 ∈ S〈〈Σ〉〉 be rationalweighted languages and assume hr(r1) and hr(r2)to be (S ←[ 1)-rational. We consider the followingcases for a rational weighted language r ∈ S〈〈Σ〉〉:

1. r = r1 + r2,

2. r = r1 r2, or

3. r = r+1 .

We show: hr(r) is (S ←[ 1)-rational.

1. hr(r) = hr(r1 + r2) = hr(r1) + hr(r2)

hr(r1) + hr(r2) is (S ←[ 1)-rational. Then sois hr(r).

2. hr(r) = hr(r1 r2) = hr(r1) hr(r2)

hr(r1) hr(r2) is (S ←[ 1)-rational. Then so ishr(r).

3. hr(r) = hr(r+1

)= hr(r1)

+

hr(r1)+ is (S ←[ 1)-rational. Then so is hr(r).

2nd claim: (2.) ⇒ (1.).

Let s ∈ hr(S)〈〈Σ〉〉 be a (S ← [ 1)-rationalweighted language. We show the following:

Claim: If s = hr(r) for a weighted languager ∈ S〈〈Σ〉〉, then r is rational.

For all w ∈ Σ+ holds s(w) = x ← [ |w| for somex ∈ A by Lemma 10.

We show the following: If s ∈ hr(S)〈〈Σ〉〉 isa (S ← [ 1)-rational weighted language then rs ∈S〈〈Σ〉〉 with

rs(w) = s(w)(|w|)

is a rational weighted language. If s = hr(r) holdsfor some weighted language r ∈ S〈〈Σ〉〉 then rs = rand the main claim holds.

Proof by mathematical induction:

Basis: Let s = (u, x ← [ 1) ∈ hr(S)〈Σ〉 for someu ∈ Σ, x ∈ A. Then rs ∈ S〈Σ〉 with rs(u) = x andrs(w) = 0 for w ∈ Σ+, w 6= u. Then rs is rational.

10

Page 11: Embedding Multi-Hemirings into Semirings · Semirings are well studied weight struc-tures (Droste and Kuich, 2009), capable of de-scribing many interesting quantitative properties

Inductive step: For (S ← [ 1)-rational weightedlanguages s1, s2 ∈ hr(S)〈〈Σ〉〉 assume rs1 and rs2to be rational.

For all w ∈ Σ+ holds s(w) = x ←[ |w| for somex ∈ A by Lemma 10.

We consider the following cases for a (S ← [ 1)-rational weighted language s:

1. Let s = s1 + s2. Then for all w ∈ Σ+:

rs(w) = (s1 + s2)(w)(|w|)= s1(w)(|w|) + s2(w)(|w|)= rs1(w) + rs2(w)= (rs1 + rs2)(w)

Then rs = rs1 + rs2 .

rs1 and rs2 are rational by assumption. Thenrs is rational.

2. Let s = s1 s2. Then for all w ∈ Σ+:

rs(w) = (s1 s2)(w)(|w|)= (

∑uv=w

(s1(u) s2(v)))(|w|)

=∑uv=w

(s1(u)(|u|) s2(v)(|v|))

=∑uv=w

(rs1(u) rs2(v))

= (rs1 rs2)(w)

Then rs = rs1 rs2 .

rs1 and rs2 are rational by assumption. Thenrs is rational.

3. Let s = s+1 .

Let w ∈ Σ+. From Equation 18 we conclude:

s(w) = (s+1 )(w)

=∑

0<i≤|w|(si1)(w)

claim: rsi1 = ris1

Proof by mathematical induction:

Basis: i = 1 : Then for all w ∈ Σ+:

rs11(w) = s1(w)(|w|) = r1s1(w).

Then rs11(w) = r1s1(w) = xw1 , and finally rs11 =

r1s1 .

Inductive step: Assume for all w ∈ Σ+ holdsrsn1 = rns1 . Then for all w ∈ Σ+:

rsn+11

(w) = (sn+11 )(w)(|w|)

= (sn1 s1)(w)(|w|)= (

∑uv=w

(sn1 (u) s1(v)))(|w|)

=∑uv=w

(sn1 (u) s1(v))(|w|)

=∑uv=w

(sn1 (u)(|u|) s1(v)(|v|))

=∑uv=w

(rsn1 (u) rs1(v))

=∑uv=w

(rns1(u) rs1(v))

= (rns1 rs1)(w)= (rn+1

s1 )(w)

Then rsn+11

= rn+1s1 . X

Then

rs(w) = (s+1 )(w)(|w|)

= (∑

0<i≤|w|(si1)(w))(|w|)

=∑

0<i≤|w|(si1)(w)(|w|)

=∑

0<i≤|w|(rsi1)(w)

=∑

0<i≤|w|(ris1)(w)

= (r+s1)(w)

Then rs = r+s1 .

rs1 is rational by assumption. Then rs is ratio-nal.

If S is a hemiring, we can prove an analogous rela-tionship for r and go(r): Rationality of r coincideswith 〈0, S〉-rationality of go(r).

Lemma 13 Let S be a hemiring. Let r ∈ S〈〈Σ〉〉 bea weighted language. Then, the following are equiv-alent:

1. r is rational.

2. go(r) is 〈0, S〉-rational. 2

Proof 1st claim: (1.) ⇒ (2.).

Let r ∈ S〈〈Σ〉〉 be a rational weighted language.We have to show: go(r) is 〈0, S〉-rational.

Proof by mathematical induction:

Basis: r ∈ S〈Σ〉. Then go(r) ∈ go(S)〈Σ〉 andgo(r) is obviously 〈0, S〉-rational by definition ofgo(r).

11

Page 12: Embedding Multi-Hemirings into Semirings · Semirings are well studied weight struc-tures (Droste and Kuich, 2009), capable of de-scribing many interesting quantitative properties

Inductive step: Let r1, r2 ∈ S〈〈Σ〉〉 be rationalweighted languages and assume go(r1) and go(r2)to be 〈0, S〉-rational. We consider the followingcases for a rational weighted language r ∈ S〈〈Σ〉〉:

1. r = r1 + r2,

2. r = r1 r2, or

3. r = r+1 .

We show: go(r) is 〈0, S〉-rational.

1. go(r) = go(r1 + r2) = go(r1) + go(r2)

go(r1) + go(r2) is 〈0, S〉-rational. Then so isgo(r).

2. go(r) = go(r1 r2) = go(r1) go(r2)

go(r1) go(r2) is 〈0, S〉-rational. Then so isgo(r).

3. go(r) = go(r+1

)= go(r1)

+

go(r1)+ is 〈0, S〉-rational. Then so is go(r).

2nd claim: (2.) ⇒ (1.).

Let s ∈ go(S)〈〈Σ〉〉 be a 〈0, S〉-rational weightedlanguage. We show the following:

Claim: If s = go(r) for a weighted languager ∈ S〈〈Σ〉〉, then r is rational.

For all w ∈ Σ+ holds s(w) = 〈0, x〉 for somex ∈ A by Lemma 11.

We show the following: If s ∈ go(S)〈〈Σ〉〉 is a〈0, S〉-rational weighted language then rs ∈ S〈〈Σ〉〉with

rs(w) = go−1(s(w))

is a rational weighted language. If s = go(r) holdsfor some weighted language r ∈ S〈〈Σ〉〉 then rs = rand the main claim holds.

Proof by mathematical induction:

Basis: Let s = (u, 〈0, x〉) ∈ go(S)〈Σ〉 for someu ∈ Σ, x ∈ A. Then rs ∈ S〈Σ〉 with rs(u) = x andrs(w) = 0 for w ∈ Σ+, w 6= u. Then rs is rational.

Inductive step: For 〈0, S〉-rational weightedlanguages s1, s2 ∈ go(S)〈〈Σ〉〉 assume rs1 and rs2to be rational.

For all w ∈ Σ+ holds s(w) = 〈0, x〉 for somex ∈ A by Lemma 11.

Let s1(w) = 〈0, xw1 〉, s2(w) = 〈0, xw2 〉 for w ∈ Σ+

and xw1 , xw2 ∈ A.

We consider the following cases for a 〈0, S〉-rational weighted language s:

1. Let s = s1 + s2. Then for all w ∈ Σ+:

rs(w) = go−1((s1 + s2)(w))= go−1(s1(w) + s2(w))= go−1(s1(w)) + go−1(s2(w))= rs1(w) + rs2(w)

Then rs = rs1 + rs2 .

rs1 and rs2 are rational by assumption. Thenrs is rational.

2. Let s = s1 s2. Then for all w ∈ Σ+:

rs(w) = go−1((s1 s2)(w))

= go−1

( ∑uv=w

(s1(u) s2(v))

)=

∑uv=w

go−1(s1(u) s2(v))

=∑uv=w

(go−1(s1(u)) go−1(s2(v)))

=∑uv=w

(rs1(u) rs2(v))

= (rs1 rs2)(w)

Then rs = rs1 rs2 .

rs1 and rs2 are rational by assumption. Thenrs is rational.

3. Let s = s+1 .

Let w ∈ Σ+. From Equation 18 we conclude:

s(w) = (s+1 )(w)

=∑

0<i≤|w|(si1)(w)

claim: rsi1 = ris1

Proof by mathematical induction:

12

Page 13: Embedding Multi-Hemirings into Semirings · Semirings are well studied weight struc-tures (Droste and Kuich, 2009), capable of de-scribing many interesting quantitative properties

Basis: i = 1 : Then for all w ∈ Σ+:

rs11(w) = go−1(s1(w)) = r1s1(w).

Then rs11 = r1s1 .

Inductive step: Assume for all w ∈ Σ+:rsn1 (w) = rns1(w). Then for all w ∈ Σ+:

rsn+11

(w) = go−1((sn+1

1 )(w))

= go−1((sn1 s1)(w))

= go−1

( ∑uv=w

(sn1 (u) s1(v))

)=

∑uv=w

go−1(sn1 (u) s1(v))

=∑uv=w

(go−1(sn1 (u)) go−1(s1(v)))

=∑uv=w

(rsn1 (u) rs1(v))

=∑uv=w

(rns1(u) rs1(v))

= (rns1 rs1)(w)= (rn+1

s1 )(w)

Then rsn+11

= rn+1s1 . X

Then

rs(w) = go−1((s+

1 )(w))

= go−1

( ∑0<i≤|w|

(si1)(w)

)=

∑0<i≤|w|

go−1((si1)(w)

)=

∑0<i≤|w|

(rsi1)(w)

=∑

0<i≤|w|(ris1)(w)

= (r+s1)(w)

Then rs = r+s1 .

rs1 is rational by assumption. Then rs is ratio-nal.

Lemmata 12 and 13 imply the coincidence of ra-tionality of r and 〈0, S ← [ 1〉-rationality of sr(r) forr ∈ S〈〈Σ〉〉:

Lemma 14 Let r ∈ S〈〈Σ〉〉 be a weighted language.Then, the following are equivalent:

1. r is rational.

2. sr(r) is 〈0, S ←[ 1〉-rational. 2

Proof “⇒”: Let r be rational. From Lemma 12,we get that hr(r) is (S ← [ 1)-rational. ApplyingLemma 13 yields that go(hr(r)) = sr(r) is 〈0, S ←[1〉-rational.“⇐”: Let sr(r) = go(hr(r)) be 〈0, S ←[ 1〉-

rational. Then, by Lemma 13 hr(r) is (S ←[ 1)-rational. Applying Lemma 12 yields rationality ofr.

5 Relating Weighted Automataover Multi-Hemirings andSemirings

We now turn from weighted languages to weightedautomata: We represent an automaton over somemulti-hemiring S as automata hr(M) and sr(M)over hr(S) and sr(S), respectively.Let Σ be an alphabet and M be an automaton

over Σ and S. We transform M into hr(M) bychanging the weight x of each transition to x ←[1. If S is a hemiring, we further define go(M) bychanging the weight x of each transition to 〈0, x〉.Finally, we define sr(M) := go(hr(M)).We now show behavioral equivalences of au-

tomata and their representatives.

Lemma 15 Let M be an automaton over an alpha-bet Σ and a multi-hemiring S. Then,

hr(‖M‖) = ‖hr(M)‖ . 2

Proof Follows directly from Lemma 3.

Lemma 16 Let M be an automaton over an alpha-bet Σ and a hemiring S. Then,

go(‖M‖) = ‖go(M)‖ . 2

Proof Follows directly from Lemma 4.

Finally, this naturally extends to M and sr(M):

Corollary 3 Let M be an automaton over an al-phabet Σ and a multi-hemiring S. Then,

sr(‖M‖) = ‖sr(M)‖ . 2

13

Page 14: Embedding Multi-Hemirings into Semirings · Semirings are well studied weight struc-tures (Droste and Kuich, 2009), capable of de-scribing many interesting quantitative properties

6 An Alternative Proof for theKleene-SchützenbergerCharacterization

In this section, we show that a weighted languager ∈ S〈〈Σ〉〉 over an alphabet Σ and a multi-hemi-ring S is rational if and only if r is recognizable.To this end, we reduce the Kleene-Schützenbergercharacterization for multi-hemirings to the respec-tive, well-known characterization on semirings:

Proposition 2 Let S be a semiring and Σ be analphabet. Let r be a weighted language over S andΣ. Then, the following are equivalent:

1. r is rational.

2. There exists an automaton M over Σ and Swith ‖M‖ = r. 2

For a proof of this proposition, we refer to litera-ture, for instance (Kuske, 2008; Sakarovitch, 2009)We can further refine this proposition as follows.We remark that this proof is not new and can beobtained from various other proofs of the Kleene-Schützenberger characterization.

Lemma 17 Let S be a semiring and Σ be an al-phabet. Let X ⊆ S. Let r be a weighted languageover S and Σ. Then, the following are equivalent:

1. r is X-rational.

2. There exists an automaton M over Σ and Swith ‖M‖ = r, and all transitions have a weightin X. 2

Proof 1. “1 ⇒ 2”: By induction over the X-rational series.

– Basis. Let r = (w, x) be an atom withx ∈ X. Then, the weighted automa-ton consisting of one initial state p, a fi-nal state q 6= p, and a single transition〈p, w, x, q〉 obviously has behavior r.

– Let r = r1 + r2. For i = 1, 2, let Mi be anautomaton with ‖Mi‖ = ri with all tran-sitions having weights from X. Then, wecan easily construct an automaton M bywritingM1 andM2 “side by side”. For anyword w ∈ Σ+, the set of all paths accept-ing w is exactly the union of the respectivesets of M1 and M2. From the associativ-ity of the pointwise defined sum operation,we obtain ‖M‖ = ‖M1‖+ ‖M2‖. As eachtransition of M is from either Mi, eachtransition of M has a weight from X.

– Let r = r1 r2, andM1 andM2 be definedas in the previous case. Assume withoutloss of generality, that there is exactly onefinal state p in M1 with no outgoing tran-sition. Likewise, assume that M2 has ex-actly one initial state q. Let M be theautomaton obtained by the constructingthe union of M1 and M2, thereby iden-tifying p and q. Finally, let the initialstates of M1 be the initial states, and thefinal states of eachMp,q be the final statesof M . Then, it can be shown by induc-tion that each w-accepting path in M isthe concatenation of a u-accepting pathin M1 and a v-accepting path in M2 withw = uv ∈ Σ+ (and vice versa). Thus, weobtain ‖M‖ = ‖M1‖ ‖M2‖. Again, alltransition weights of M are again in X.

– Let r = r+1 . Let M1 be defined as in the

previous case. Let M be the automatonobtained from M1 as follows: For eachtransition 〈p, w, x, q〉 where q is a finalstate, and each intitial state p′, we in-troduce a transition 〈p, w, x, p′〉. Hence,for each w-accepting path π, there existsk > 0, such that w = u1 . . . uk and π =π1 . . . πk where each πi is a ui-acceptingpath in M1. From this, we obtain ‖M‖ =‖M1‖+, and all transition weights of Mare from X.

2. “1 ⇐ 2”: This direction can be proven anal-ogously to the direction “1 ⇒ 2”. First, ob-serve that we can assume without loss of gen-erality that each state of an automaton is onsome accepting path. Then, we can induc-tively construct all such automata with tran-sition weights from X, by applying the opera-tions in “1 ⇒ 2”, which in turn correspond tothe rational operations on weighted languages.

Now, we apply our transformation and its prop-erties. First, we show that each rational weightedmulti-hemiring language is recognizable.

Theorem 2 Let r be a rational weighted languageover Σ and S. Then, there exists an automaton Mover Σ and S with ‖M‖ = r. 2

Proof By Lemma 14, sr(r) is 〈0, S ←[ 1〉-rational.Then, by Lemma 17 there exists an automaton M ′over sr(S) with ‖M ′‖ = sr(r) and all transitionweights are of the form 〈0, x ← [ 1〉. Hence, thereexists an automatonM over Σ and S with sr(M) =M ′. By Corollary 3, ‖M‖ = r, concluding the proof.

14

Page 15: Embedding Multi-Hemirings into Semirings · Semirings are well studied weight struc-tures (Droste and Kuich, 2009), capable of de-scribing many interesting quantitative properties

Second, we show that each recognizable weightedmulti-hemiring language is rational.

Theorem 3 Let M be a weighted automaton overΣ and S. Then, ‖M‖ is rational. 2

Proof Then, sr(M) is a semiring automaton withall weights of the form 〈0, x ← [ 1〉. By Lemma 17,we can conclude ‖sr(M)‖ is 〈0, S ←[ 1〉-rational.Applying Lemma 14 and Corollary 3, we obtain ra-tionality of ‖M‖, concluding the proof.

7 Applying Semiring Algorithmsto Multi-Hemiring Automata

In this section, we study the applicability of algo-rithms for semiring automata in the field of multi-hemiring automata. Thereby we concentrate onalgorithms described by Mohri (2009). We firststudy the positive example of shortest distance cal-culation, then turn to the negative example of ε-removal, and finally study the problem of applica-bility in general.

7.1 Shortest DistanceLet M be a multi-hemiring automaton over S. Asstated before, M generates a weighted language‖M‖. Additionally, we may define the shortest dis-tance between two states p and q of M . Intuitively,we consider all paths from p to q, ignoring the let-ters on the transitions. Then, the shortest distanceis the sum over the weights of all such paths. Asthere may be infinitely many such paths, this onlymakes sense if S is complete for the weights in M .More formally, let X be the set of weights occur-

ring on transitions, Y ⊇ X be an ideal, and S beY -complete. Then, we write ΠM (p, q) for the set ofall paths from p to q, and define the shortest dis-tance SDM (p, q) of p and q in M by

SDM (p, q) =∑

π∈ΠM (p,q)

‖M‖(π) . (61)

Please note that each path contains at least onetransition by definition2. Therefore, ΠM (p, q) = ∅implies SDM (p, q) = 03.There are several shortest distance computation

algorithms in semiring automata, for instance Gen-All-Pairs (Mohri, 2009). In the following, we ap-ply Theorem 1 to show that the shortest distance2If S contains a multiplicative unit 1, we could also consider

empty paths. However, for our application it is necessaryto omit empty paths even if S is a semiring.

3As a direct consequence, the shortest distance of q and qis 0 if there is no non-empty path from q to q, instead of1 if one considers empty paths.

of p and q is equivalent in all three automata M ,hr(M) and sr(M). Thereby, we exploit the partialpreservation of completeness along the transforma-tions.

Lemma 18 Let S be a multi-hemiring. Let M bean automaton over a S, X be an ideal of S andall weights on transitions in M be elements of X.Then, the following holds:

SDM (p, q) = hr−1(SDhr(M)(p, q)

)= hr−1

(go−1

(SDsr(M)(p, q)

))2

Proof Following the definition and using Theo-rem 1.

As stated above, for a given complete multi-hemi-ring S, go(S) is not necessarily complete. Forthe all pairs shortest distance algorithm GenAll-Pairs, it is a prerequisite that the semiring is com-plete. Thus, given the multi-hemiring automatonM , we cannot directly apply a semiring algorithmto go(M), if it requires complete semirings. But,our setting is special with regard to the followingtwo facts:

1. All transition weights are in an ideal D, forwhich S is D-complete.

2. Paths of length 0 are necessarily omitted.

By examing GenAllPairs we can slightly adjustthe requirements matching our setting: Every com-putation in the algorithm uses only weights of tran-sitions or products and sums of these. Due to thecompleteness of the ideal every intermediately com-putated value is in the ideal, even infinite sums.Thus, every computation is well-defined. The onlydifference is that as we do not consider empty paths,if the result of the algorithm sets the distance ofempty paths to 1. But in our setting we ignoreempty paths, therefore all relevant results are inthe ideal and can be retranslated into a value ofthe multi-hemiring.

7.2 ε-RemovalLet M multi-hemiring automaton M over S andΣ. Throughout this paper, we do not consider Mto have ε-transitions. Therefore, the finite set allpaths accepting a word w ∈ Σ+ in M have thesame length |w|. Allowing ε-transitions weakensthis property. Then, the length of some path ac-cepting w is n ≥ |w|. Furthermore, the set of allpaths accepting w may then be infinite. There-fore, the behavior of M is only defined if there isan ideal X, S is X-complete, and all transition

15

Page 16: Embedding Multi-Hemirings into Semirings · Semirings are well studied weight struc-tures (Droste and Kuich, 2009), capable of de-scribing many interesting quantitative properties

weights in M are elements of X. As our trans-formations partially preserve ideals and complete-ness, they can also cope with ε-transitions, that isLemma 15, Lemma 16, and Corollary 3 still hold forautomata with ε-transitions.But, multi-hemiring automata with ε-transitions

are strictly more expressive than without. As anexample, we can consider the multi-hemiring

〈N,max, (·m,n)m,n≥1, 0〉 (62)

with

a ·m,n b =

m+ n if a, b 6= 0

0 otherwise .(63)

Now consider the alphabet u and an automatonM without ε-transitions. Then, ‖M‖(w) is either|w| if there is at least one accepting path, or 0, other-wise. Hence, the weighted language ` with supportuu and `(uu) := 3 is not recognizable. However,we can easily build an automaton with ε-transitionsrecognizing `: We only need a chain of three, arbi-trarily weighted transitions t1, t2, t3 where t1 and t2accept u, and t3 is an ε-transition.Thus, ε-removal is in general infeasible for au-

tomata over some arbitrary multi-hemiring S, andthus, removing ε-edges in sr(M) results in an au-tomaton that cannot be transformed into an au-tomaton over S.However, there are situations, we can apply an

ε-removal algorithm. Let M be an automaton oversr(S) which can be mapped to a multi-hemiringautomaton except for the ε-transitions. Let Mε bethe automaton resulting from removing all non-ε-transitions fromM . We define the ε-distance of twostates p and q as the shortest distance of p and q inthe Mε. If the ε-distance for any two states is 〈1,0〉or 〈0,0〉, we can apply the ε-removal algorithm byMohri (2009): The algorithm introduces for everytwo ε-connected states a new transition and multi-plies the ε-distance with an existing weight. As wemultiply by 〈0,1〉 or 〈0,0〉 the new transition weightcan be transformed backwards.

7.3 A General Characterization ofApplicability

In the previous two sections we have shown the ap-plicability of algorithms concerning ε-removal andshortest distance computation. In the following, westudy more general problems and the applicabilityof semiring automata in the field of multi-hemiringautomata. Let N be a class of multi-hemiring au-tomata. Let φ be a problem on N . Thereby, we re-strict ourselves to problems of the following classes:

1. Decision problems, that is a finite set of au-tomata over S either satisfies φ or not.

2. Value computation problems, that is φ maps aset of automata over S to a value from S.

3. Transformation problems, that is φ maps a fi-nite set of automata over S to some non-emptyset of automata sets over the same alphabetand S.

Additionally, each problem may have a finite set ofparameters from S. Let M be a set of automataover S. Then, we writeMsr for the set of all sr(M)with M ∈ M. Likewise, for a set P of parameters,we write Psr for the set of all sr(p) with p ∈ P .Let N be such a class of multi-hemiring au-

tomata, that for all M ∈ N , sr(M) ∈ N . Pleasenote that this is the case if

– N is the set of all automata over commutativemulti-hemirings,

– N is the set of all automata, where the closureof the transition weights with respect to sum-mation and multiplication is idempotent, or

– N is the set of all automata over anX-completemulti-hemiring with transition weights from X.

We define the notion of robustness for a problem.In our sense, a problem is robust if it has equivalentsolutions on the multi-hemiring and semiring level.In particular, we call a decision problem φ robustif for all input sets M and parameter sets P , thefollowing holds: φ(M, P ) = φ(Msr, Psr). Similarly,we call a value computation problem φ robust if forall input setsM and parameter sets P , the followingholds:

1. φ(Msr, Psr) is reversible, that ismh(φ(Msr, Psr)) is defined, and

2. φ(M, P ) = mh(φ(Msr, Psr)).

Finally, we call a transformation problem φ robustif for all input sets M and parameter sets P , thefollowing holds:

1. There exists at least some reversible set

M′ ∈ φ(Msr, Psr) ,

that is for each M ′ ∈ M′, mh(M ′) is defined,and

2. if M′ ∈ φ(Msr, Psr) is reversible, thenmh(M ′) |M ′ ∈M′ ∈ φ(M, P ).

16

Page 17: Embedding Multi-Hemirings into Semirings · Semirings are well studied weight struc-tures (Droste and Kuich, 2009), capable of de-scribing many interesting quantitative properties

Let φ be a robust problem. Let C be an algorithmthat solves φ for all semirings in S. If φ is a decisionor value computation problem, we can solve φ forevery input set M and parameter set P over somemulti-hemiring S ∈ S by following these steps:

1. ComputeMsr and Psr,

2. run C onMsr and Psr,

3. if φ is a value computation problem, then re-verse the result of C, otherwise return the resultof C.

If φ is a transformation problem, further restric-tions on C are necessary: If C computes some re-versable output set, then we may follow the samesteps as for value computation problems. This re-quirement is far from trivial as automata transfor-mations may easily introduce non-reversible transi-tion weights: The set of transition weights of somesr(M) is closed under summation, but not underarbitrary multiplication.In the remainder of this section, we list a num-

ber of robust problems. Some of the problems re-fer to weighted transducers. A weighted transducerconverts a word over an input alphabet Σi to aword over an output alphabet Σo with a certainweight. We can conceive a weighted transducer asa weighted automaton over alphabet Σi × Σo. Asa shorthand notation, we write (v1 . . . vn, w1 . . . wn)for the word 〈v1, w1〉 . . . 〈vn, wn〉 ∈ (Σi × Σo)

+.

7.3.1 Reversal

Reversal is a parameter-free transformation prob-lem. For every word w = w1 . . . wn and its mirrorwR = wn . . . w1, the problem is to construct an au-tomaton M ′ with ‖M‖(w) = ‖M ′‖(wR). Mohri(2009) studies an algorithm to solve reversal forcommutative semirings. The algorithm swaps thedirection of each transition, and makes each initial(final) state final (initial). Thereby, the weights re-main untouched. As our transformation preservescommutativity, this algorithm may be applied to atransformed multi-hemiring automaton over somecommutative multi-hemiring. Furthermore, the re-sult can be easily translated because the weightsstay unchanged. Therefore, reversal is robust. Onecould argue that this problem could be easily solveddirectly on the multi-hemiring automaton. How-ever, our approach also yields a correctness prooffor the algorithm.

7.3.2 Weighted Composition

The problem of Weighted composition is a parame-ter free transformation problem on transducers. In-

tuitively, the weighted composition of two transduc-ersM1 andM2 with Σ1o = Σ2i is an automaton thatreads a word with M1 and then reads the output ofM1 with M2, producing a new output.More formally, the weighted composition is the

transducer with input alphabet Σ1i and output al-phabet Σ2o defined by

‖M1 M2‖(v, w) =∑z∈Σn

1o

‖M1‖(v, z) ·n,n ‖M2‖(z, w) ,

for all words (v, w) ∈ (Σ1i × Σ2o)n.

Assuming the absence of ε-transitions, the sumis finite and thus defined. Mohri (2009) studiesan algorithm that solves weighted composition fortwo given semiring automata. Running this algo-rithm on sr(M1) and sr(M2) yields an automatonwhere each transition has a monomial x ←[ 2 asweight. Thus, the backwards transformation of theautomaton is defined. Likewise, it is easy to provethat the back transformed result is valid. Therefore,weighted composition is robust.

7.3.3 Sum

The sum of two automata M1 andM2 is a parameterfree transformation problem. Every result M1 +M2

fulfills the following condition:

‖M1 +M2‖(w) = ‖M1‖(w) + ‖M2‖(w)

Mohri (2009) suggests to construct the sum by in-troducing a new unique initial state which leads byε-transition to the origin initial states with weight1. As stated above, this is a situation where we canapply ε-removal. Therefore a combination of thetwo algorithms produces the desired result and wecan apply the backward transformation. Therefore,sum is robust.

7.3.4 Product

The product of two automata M1 and M2 is a pa-rameter free transformation problem. Every resultM1 ·M2 fulfills the following condition:

‖M1 ·M2‖(w) =∑

w=w1w2

‖M1‖(w1) · ‖M2‖(w2)

Mohri (2009) suggests to join the states and keepthe initial states from M1 and the final states ofM2. Additionally connect every final state of M1

with every inital state of M2 with an ε-Transitionof weight 1. Again, we can apply the ε-removal algo-rithm here and yield the desired result for which wecan apply a backward transformation. Therefore,product is robust.

17

Page 18: Embedding Multi-Hemirings into Semirings · Semirings are well studied weight struc-tures (Droste and Kuich, 2009), capable of de-scribing many interesting quantitative properties

8 Related and Future WorkValuation monoids (Droste and Meinecke, 2011)further generalize multi-hemirings: A valuationmonoid replaces the family of products by a val-uation function on words. The valuation functionis required to return 0 for any word containing 0and map every word a with |a| = 1 to a. Everymulti-hemiring induces a valuation monoid wherethe valuation function is the inductive applicationis of to a word. The induced valuation monoid isspecial in the sense that it satisfies properties suchas associativity and distributivity. Cauchy valua-tion monoids (Droste and Meinecke, 2011) standin between multi-hemirings and valuation monoids.Droste and Kuich (2013) have shown that Cauchyvaluation monoids are multi-hemirings if they sat-isfy the additional property of regularity. Thereby,regularity means that for every n ≥ 1 and everyvalue a from the carrier, the value a can be gener-ated by applying the valuation function to a wordof length n. Put differently, for every word length,every value can be generated. A possible directionof future work could be to find a similar transfor-mation as ours from Cauchy evaluation monoids tomulti-hemirings. Thus, the challenge would be tosomehow introduce regularity.In this work, we considered finite words. Chatter-

jee et al (2008), Ésik and Kuich (2009), and Drosteand Meinecke (2011) further studied infinite wordsover valuation monoids and related weight struc-tures, such as limit superior, limit inferior and limitaverage. Droste and Meinecke (2010) have con-nected such weight structures to monadic secondorder weighted logic. The question is whether someof our concepts can be translated to infinite word,as our hemiring transformation heavily relies on thelength of a word and is thus not directly applica-ble. An idea would be to consider weight structureswhere the costs of infinite words are determined bythe finite prefixes.We considered a limited set of algorithms de-

scribed by Mohri (2009) and studied their applica-bility in the field of multi-hemiring automata. Wealso sketched a more general framework to assess thegeneral applicability of such algorithms. Thereby,we did not examine the complexity of applying asemiring algorithm to a multi-hemiring automaton.Presumably the complexity depends on the com-plexity of the transformation of the input and thebackwards transformation of the output. Thereby,the transformation of the input is linear in the sizeof the input automata. Additionally, the respectivecomplexity of the multi-hemiring operations, suchas sum and product, generally differ from the com-plexity of the respective semiring operations.

9 ConclusionIn this paper, we introduced a canonical embeddingof a given multi-hemiring S into its hemiring rep-resentative hr(S). We further studied the appli-cation of the Dorroh extension as given by Golan(1999) in order to embed hr(S) into the semiringsr(S). We extended these embeddings to weightedlanguages over S, and examined the relations be-tween the weighted languages over the three struc-tures S, hr(S) and sr(S). Thereby, we have shownthat rationality for all three structures coincidesfor canoically chosen bases. We then extendedthe embedding to weighted automata, and derivedan equivalence between the automata M over S,hr(M) and sr(M). In particular, we have shownthat transforming the behavior of an automaton isequivalent to the behavior of the transformed au-tomaton. Finally, we have studied the applicabilityof semiring automaton algorithms to multi-hemiringautomata. We have shown that some algorithmsmay be directly applied, or at least could be adaptedwithout much effort. We have also given an exam-ple for an algorithm that cannot be directly applied,due to the fact that multi-hemiring automata withε-transitions are strictly more expressive than multi-hemiring automata without ε-transitions.

ReferencesBerstel J Jr, Reutenauer C (1988) Rational Seriesand Their Languages. Springer-Verlag New York,Inc., New York, NY, USA

Chatterjee K, Doyen L, Henzinger T (2008) Quanti-tative languages. In: Kaminski M, Martini S (eds)Computer Science Logic, Lecture Notes in Com-puter Science, vol 5213, Springer Berlin Heidel-berg, pp 385–400

Dorroh JL (1932) Concerning adjunctions to alge-bras. Bulletin of the American Mathematical So-ciety 38(2):85–88

Droste M, Kuich W (2009) Semirings and formalpower series. In: Droste M, Kuich W, Vogler H(eds) Handbook of Weighted Automata, Mono-graphs in Theoretical Computer Science. AnEATCS Series, Springer Berlin Heidelberg, pp 3–28

Droste M, Kuich W (2013) Weighted finite au-tomata over hemirings. Theoretical ComputerScience 485(0):38 – 48

Droste M, Meinecke I (2010) Describing average-and longtime-behavior by weighted mso logics. In:

18

Page 19: Embedding Multi-Hemirings into Semirings · Semirings are well studied weight struc-tures (Droste and Kuich, 2009), capable of de-scribing many interesting quantitative properties

Hliněný P, Kučera A (eds) Mathematical Founda-tions of Computer Science 2010, Lecture Notes inComputer Science, vol 6281, Springer Berlin Hei-delberg, pp 537–548

Droste M, Meinecke I (2011) Weighted automataand regular expressions over valuation monoids.International Journal of Foundations of Com-puter Science 22(08):1829–1844

Droste M, Kuich W, Vogler H (2009) Handbook ofWeighted Automata, 1st edn. Springer PublishingCompany, Incorporated

Eilenberg S (1974) Automata, Languages, and Ma-chines. Academic Press, Inc., Orlando, FL, USA

Ésik Z, Kuich W (2009) Finite automata. In:Droste M, Kuich W, Vogler H (eds) Handbook ofWeighted Automata, Monographs in TheoreticalComputer Science. An EATCS Series, SpringerBerlin Heidelberg, pp 69–104

Golan JS (1999) Semirings and their Applications.Kluwer Academic Publishers

Kleene SC (1956) Representation of events in nervenets and finite automata. In: Shannon C, Mc-Carthy J (eds) Automata Studies, Princeton Uni-versity Press, Princeton, NJ, pp 3–41

Kupferman O, Lustig Y (2007) Lattice automata.In: In Proc. 8th International Conference on Ver-ification, Model Checking, and Abstract Interpre-tation, Springer, pp 199–213

Kuske D (2008) Schützenberger’s theorem on for-mal power series follows from kleene’s theorem.Theoretical Computer Science 401(1-3):243–248

Mohri M (2009) Weighted automata algorithms. In:Droste M, Kuich W, Vogler H (eds) Handbook ofWeighted Automata, Monographs in TheoreticalComputer Science. An EATCS Series, SpringerBerlin Heidelberg, pp 213–254

Sakarovitch J (2009) Rational and recognisablepower series. In: Droste M, Kuich W, Vogler H(eds) Handbook of Weighted Automata, Mono-graphs in Theoretical Computer Science. AnEATCS Series, Springer Berlin Heidelberg, pp105–174

Salomaa A, Soittola M, Bauer F, Gries D (1978)Automata-theoretic aspects of formal power se-ries. Texts and monographs in computer science,Springer-Verlag

Schützenberger MP (1961) On the definition of afamily of automata. Information and Control 4(2-3):245–270

19