• Nem Talált Eredményt

Weighted Recognizability over Infinite Alphabets Maria Pittou

N/A
N/A
Protected

Academic year: 2022

Ossza meg "Weighted Recognizability over Infinite Alphabets Maria Pittou"

Copied!
35
0
0

Teljes szövegt

(1)

Weighted Recognizability over Infinite Alphabets

Maria Pittou

a

and George Rahonis

a

Dedicated to the memory of Zolt´an ´Esik Abstract

We introduce weighted variable automata over infinite alphabets and com- mutative semirings. We prove that the class of their behaviors is closed under sum, and under scalar, Hadamard, Cauchy, and shuffle products, as well as star operation. Furthermore, we consider rational series over infinite alpha- bets and we state a Kleene-Sch¨utzenberger theorem. We introduce a weighted monadic second order logic and a weighted linear dynamic logic over infinite alphabets and investigate their relation to weighted variable automata. An application of our theory, to series over the Boolean semiring, concludes to new results for the class of languages accepted by variable automata.

Keywords: infinite alphabets, semirings, weighted variable automata, weighted MSO, weightedLDL

1 Introduction

The last two decades a large body of research has been devoted to the develop- ment of models for infinite state systems which have finite control structure and handle data from an unbounded domain. This research led to the concept of finite automata over infinite alphabets. Motivating examples for such models consist, for instance, XML schemas, software with integer parameters, and system specification and verification. Later on, it came up that finite automata over infinite alphabets can contribute also to a series of interesting topics namely, the problem of query graph databases [33], reasoning about systems with resource generation capabilities [10, 11], learning theories [30], and systems with freshness needed in object-oriented languages and security protocols [6].

Several models of automata with data values, i.e., over infinite alphabets have been investigated, namely register [24, 28, 29, 37], data [5], pebble [28, 36, 39], nominal [10], variable [21, 22], and P automata [9]. All these models refer to qualitative aspects of infinite state systems. Furthermore, rational [1, 25] and logic definable languages [4, 36] have been studied over infinite alphabets.

aDepartment of Mathematics, Aristotle University of Thessaloniki, 54124 Thessaloniki, Greece.

E-mail:{mpittou,grahonis}@math.auth.gr

DOI: 10.14232/actacyb.23.1.2017.16

(2)

In this paper we intend to study automata models over infinite alphabets in the quantitative setup. Our motivation origins from the fact that several applications require a quantitative analysis of systems, for instance the resource usage control where resource variables are mapped to infinite domains [10, 11]. It is well-known that weighted automata is a reasonable tool for the description of quantitative fea- tures of computing systems [14]. According to our best knowledge, a quantitative counterpart for automata over infinite alphabets does not exist. In [8] the authors considered quantitative infinite alphabets to model controlled variables for the con- troller synthesis problem from incompatible situations. For our investigation, we chose the concept of variable automata from [21, 22]. Variable automata are sim- ple in their definition and implementation in contrast to other proposed models.

Despite their simplicity, variable automata and their extensions appeared to be expressive enough for several applications. Indeed, in [2] the authors introduced fresh variable automata to describe web services in which the agents exchange data ranging over infinite domains. Furthermore, in [3], fresh variable automata were equipped with guards consisting of equalities and disequalities. In [10] variable automata were extended to consume data words, in order to express security poli- cies (safety properties) for model checking programs that dynamically generate and operate over resources. Very recently, variable automata have been also used for querying graph databases [43]. In a similar approach, a variableLTLwas has been investigated in [23]. More precisely, the atomic propositions in that logic were pa- rameterized with variables over some finite or infinite domain in order to express specifications over large, possibly infinite domains. The model checking problem has been also studied for that setting (cf. also [38]).

We consider our weighted variable automata over an infinite alphabet Σ and a commutative semiring K, and provide a systematic study of the class of their behaviors. Our framework builds upon the techniques which were developed in [26, 27] for variable tree automata over infinite ranked alphabets. We prove that, if in addition the semiringK is idempotent, then the class of series accepted by our models is closed under sum, and scalar, Hadamard, Cauchy, and shuffle products, as well as under star operation. As we indicate by a simple example, the proofs for the aforementioned properties require new techniques than the well-known ones for recognizable series [14]. We define rational series over infinite alphabets and state a Kleene-Sch¨utzenberger type theorem. Furthermore, we introduce a weighted monadic second order logic and a weighted linear dynamic logic over infinite al- phabets. We show the expressive equivalence of the latter logic to our weighed au- tomata, whereas the corresponding equivalence requires fragments on the weighted monadic second order logic. Therefore, several well-known results from classical weighted automata theory hold also for our weighted automata over infinite alpha- bets. Moreover, by considering the Boolean semiringB, we derive as an application of our theory new results for the class of variable automata of [21, 22]. This shows the robustness of our theory and the theory of variable automata [21, 22].

Apart from this Introduction, the paper contains 7 sections. In Section 2 we present some preliminary background. In Section 3 we introduce our weighted variable automata and in Section 4 we establish the closure properties of the class

(3)

of series accepted by our models. Then, in Section 5 we consider rational series over infinite alphabets and state our Kleene-Sch¨utzenberger theorem. Sections 6 and 7, respectively are devoted to weighted monadic second order logic and weighted linear dynamic logic, and their relation to weighted variable automata. In Section 8 we expose the new results on variable automata derived by our theory. Finally, in the Conclusion, we present some ideas for future research.

A preliminary version of this paper appeared in [32] (cf. also [31]).

2 Preliminaries

Let Σ be an alphabet, i.e., a nonempty (potentially infinite) set. As usually, we denote by Σ the set of all finite words over Σ and Σ+= Σ\ {ε}, whereεis the empty word. A subsetL⊆Σis a language over Σ.A wordw=σ0. . . σn−1, where σ0, . . . , σn−1∈Σ (n≥1), is written also asw=w(0). . . w(n−1) where w(i) =σi for every 0 ≤i ≤n−1. For every finite word w = w(0). . . w(n−1) and every 0≤i≤n−1 we denote byw≥ithe suffixw(i). . . w(n−1). IfSis a set, thenP(S) will denote the powerset ofS, and the notationS0f inSmeans thatS0 is a finite subset ofS.

Asemiring (K,+,·,0,1) is an algebraic structure such that (K,+,0) is a com- mutative monoid, (K,·,1) is a monoid, 06= 1,· is both left- and right-distributive over +, and 0·k = k·0 = 0 for every k ∈ K. If no confusion arises, we shall denote the semiring simply byKand the·operation simply by concatenation. The semiringKis calledcommutative if the monoid (K,·,1) is commutative. Moreover, K is calledadditively idempotent (or simply idempotent), if k+k =k for every k∈K. Finally,K is calledlocally finite if every finitely generated subsemiring is finite. Interesting examples of semirings are the following:

- the semiring (N,+,·,0,1) of natural numbers, - theBoolean semiring B= ({0,1},+,·,0,1),

- thetropical ormin-plus semiring (R+∪ {∞},min,+,∞,0) whereR+={r∈ R|r≥0},

- thearctical ormax-plus semiring (R+∪ {−∞},max,+,−∞,0), - theViterbi semiring ( [0,1],max,·,0,1),

- every bounded distributive lattice with the operations supremum and infi- mum, and especially thefuzzy semiring F = ([0,1],max,min,0,1).

All the above semirings, except the first one, are idempotent.

Let Σ be an alphabet and K a semiring. A formal series (or simply series) over Σ and K is a mapping s : Σ → K. For every w ∈ Σ we write (s, w) for the value s(w) and refer to it as the coefficient of s on w. The support of s is

(4)

the set supp(s) = {w ∈ Σ | (s, w) 6= 0}. A series with finite support is called a polynomial. The constant series ek (k ∈ K) is defined, for every w ∈ Σ, by

ek, w

=k. Moreover, for every w ∈Σ, we denote by wthe series determined, for everyu∈Σ, by (w, u) = 1 if u=w and 0, otherwise. The class of all series over Σ andK is denoted as usual byKhhΣii, and the class of polynomials over Σ andK byKhΣi. The characteristic series 1L∈KhhΣiiof a languageL⊆Σ is defined by (1L, w) = 1 ifw∈Land (1L, w) = 0 otherwise.

Let s, r ∈ KhhΣii and k ∈ K. The sum s+r, the scalar products ks and sk as well as the Hadamard product sr are defined elementwise by (s+ r, w) = (s, w) + (r, w), (ks, w) = k·(s, w), (sk, w) = (s, w)·k, and (sr, w) = (s, w)·(r, w), respectively, for everyw ∈Σ. It is well-known that the structures

KhhΣii,+,,e0,e1 and

KhΣi,+,,e0,e1

are semirings, which moreover are commutative (resp. idempotent) wheneverKis commutative (resp. idempotent).

TheCauchy product of r and sis the seriesr·s∈KhhΣiidefined for every w∈Σ by

(r·s, w) = X

u,v∈Σ w=uv

((r, u)·(s, v)).

The nth-iteration rn ∈ KhhΣii (n ≥ 0) of a series r ∈ KhhΣii is defined inductively by

r0=ε and rn+1=r·rn forn≥0.

Then, we have (rn, w) = X

u1,...,un∈Σ w=u1...un

((r, u1)·. . .·(r, un)) for every w ∈Σ. A series r ∈ KhhΣiiis called proper whenever (r, ε) = 0. If r is proper, then for everyw∈Σ andn >|w|we have (rn, w) = 0. Thestar r∈KhhΣiiof a proper series r ∈ KhhΣii is defined by r = P

n≥0

rn. Thus, for every w ∈ Σ we have (r, w) = X

0≤n≤|w|

(rn, w).

Finally, theshuffle product of rand sis the seriesrs∈KhhΣiidefined for everyw∈Σ by

(rs, w) = X

u,v∈Σ w∈uv

((r, u)·(s, v))

whereuvdenotes the shuffle product ofuandv.

Next we turn to weighted automata. For this we assume the alphabet Σ to be finite. A weighted automaton over Σ and K is a quadruple A = (Q, in, wt, ter) whereQis thefinite state set, in:Q→Kis theinitial distribution,wt:Q×Σ× Q→ K is a mapping assigning weights to the transitions of the automaton, and ter:Q→K is thefinal (orterminal)distribution.

Letw=w(0). . . w(n−1)∈Σ. Apath of Aover wis a sequence of transitions

(5)

Pw:= ((qi, w(i), qi+1))0≤i≤n−1. Theweight ofPwis given by the value weight(Pw) =in(q0)· Y

0≤i≤n−1

wt((qi, w(i), qi+1))·ter(qn).

Thebehavior of Ais the serieskAk: Σ→K whose coefficients are given by (kAk, w) =X

Pw

weight(Pw) for everyw∈Σ.

A series s ∈ KhhΣii is called recognizable if s = kAk for some weighted automatonA over Σ and K. As usual we denote by Rec(K,Σ) the class of rec- ognizable series over Σ and K. Two weighted automata A= (Q, in, wt, ter) and A0= (Q0, in0, wt0, ter0) over Σ andK are calledequivalent ifkAk=kA0k.

Finally, a weighted automaton A = (Q, in, wt, ter) over Σ and K is called normalized if there exist two statesqin, qter∈Q,qin6=qter, such that:

- in(q) = 1 ifq=qin, andin(q) = 0 otherwise, - ter(q) = 1 ifq=qter, andter(q) = 0 otherwise, and - wt((q, σ, qin)) =wt((qter, σ, q)) = 0

for every q ∈ Q, σ ∈ Σ. We shall denote a normalized weighted automaton A= (Q, in, wt, ter) simply by A = (Q, qin, wt, qter). The next result has been proved by several authors, cf. for instance [18].

Proposition 1. Let A = (Q, in, wt, ter) be a weighted automaton over Σ and K. We can effectively construct a normalized weighted automaton A0 such that (kA0k, w) = (kAk, w)for every w∈Σ+ and(kA0k, ε) = 0.

3 Weighted variable automata

In this section we introduce the notion of our weighted variable automata. We show that the well-known constructions on weighted automata are not sufficient to obtain the closure properties of the class of series recognized by our models.

Therefore, we provide some supplementary matter and we state Lemma 1 which will be needed in the sequel in our constructions.

Let Σ, Σ0 be (infinite) alphabets. A relabeling from Σ to Σ0 is a mapping h: Σ → P(Σ0). Next let Γ ⊆f in Σ, Z be a finite set whose elements are called bounded variables andyan element which is called afree variable. We assume that the sets Σ,Z, and{y} are pairwise disjoint. A relabelinghfrom Γ∪Z∪ {y}to Σ is calledvalid if

(i) it is the identity on Γ,1

1Abusing notation we identify{σ}withσ, for everyσΓ.

(6)

(ii) card(h(z)) = 1 for every z∈Z,

(iii) his injective onZ and Γ∩h(Z) =∅, and (iv) h(y) = Σ\(Γ∪h(Z)).

The above definition means that the application ofhon a wordwover Γ∪Z∪ {y}

assigns to every occurrence of a symbolz ∈Z in wthe same symbol from Σ, but it is possible to assign different symbols from Σ to different occurrences ofy in w.

This justifies the names bounded and free for the set of variablesZand the variable y, respectively. It should be clear that a valid relabeling from Γ∪Z∪ {y} to Σ is well-defined if it is defined only on Z satisfying conditions (ii) and (iii). We shall denote by V R(Γ∪Z∪ {y},Σ) the set of all valid relabelings from Γ∪Z∪ {y} to Σ, and simply byV R(Γ∪Z∪ {y}) if the alphabet Σ is understood.

We set ∆ = Γ∪Z∪ {y}and letw∈Σ. Thepreimage of wover ∆ is the set preim(w) ={u∈∆| there existsh∈V R(∆) such thatu∈h−1(w)}.

Now we are ready to introduce our weighted variable automata over the infinite alphabet Σ and a semiringK.

Definition 1. A weighted variable automaton (wva for short) over Σ andK is a pair A = hΣ, Ai where Σ is an infinite alphabet and A = (Q, in, wt, ter) is a weighted automaton over ΓA and K. The input alphabet ΓA of A is defined by ΓA= ΣA∪Z∪ {y}, where ΣAf inΣ,Z is a finite alphabet of bounded variables, andy is a free variable.

Thebehavior of Ais the serieskAk: Σ→Kwhose coefficients are determined by

(kAk, w) = X

u∈preimΓA(w)

(kAk, u)

for everyw∈Σ. Clearly, the above sum is finite and thus (kAk, w) is well-defined for everyw∈Σ.

Two wvaAandA0 over Σ andK are calledequivalent wheneverkAk=kA0k.

A seriesrover Σ andKis calledv-recognizableif there exists a wvaAsuch that r =kAk. We shall denote byV Rec(K,Σ) the class of v-recognizable series over Σ andK. It should be clear that every weighted automatonAover a subalphabet Σ0f inΣ and K can be considered as a wva such that its transitions labelled by variables carry the weight 0. Therefore, we get the next result, where the strictness of the inclusion trivially holds by the definition of wva.

Proposition 2. S

Σ0f inΣ

Rec(K,Σ0)(V Rec(K,Σ).

Throughout the paper Σ will denote an infinite alphabet,Z a finite set of bounded variables,ya free variable, and Ka commutative semir- ing. In addition, in the present and the next section,Kwill be assumed to be idempotent.

(7)

In the sequel, we will call a wva A=hΣ, Aiover Σ andK, simply a wva.

Definition 2. A wvaA=hΣ, Aiis called normalized ifA is normalized.

Proposition 3. LetA=hΣ, Aibe a wva. We can effectively construct a normalized wva A0 such that (kA0k, w) = (kAk, w) for everyw∈Σ+ and(kA0k, ε) = 0.

Proof. We immediately obtain our result by Proposition 1 and Definition 2.

In the sequel, we wish to investigate closure properties of the classV Rec(K,Σ).

For this, we cannot apply the well-known constructions from classical weighted au- tomata theory. For instance, let A=hΣ, Ai be a normalized wva, where A = ({qin, q, qter}, qin, wtA, qter), ΓA = {a} ∪ {z} ∪ {y} and transitions with non-zero weights given bywtA((qin, a, q)) =wtA((q, z, qter)) = 1. Consider also the normal- ized wvaA0=hΣ, A0iwhereA0= ({q0in, q0ter}, qin0 , wtA0, q0ter), ΓA0 ={a0}∪{z0}∪{y0} and wtA0((q0in, a0, qter0 )) = wtA0((q0in, y0, qter0 )) = 1. Moreover, let us assume that a6=a0. Clearly, (kAk, aa0) = 1 and (kA0k, a0) = 1. Nevertheless, if we consider the disjoint union ofA andA0, say the weighted automaton B, then a, a0 ∈ΓB which implies that we cannot apply a valid relabeling assigning the lettera0 toz. This in turn, implies that the wordaa0 does not belong to the support of the wva derived by the weighted automatonB. Furthermore, another problem of this construction is the choice of the free variable among y and y0 which moreover causes new in- consistencies. Similar, even more complex, situations arise for the constructions of wva proving closure under further properties like Hadamard, Cauchy, and shuffle product. Therefore, we state Lemma 1 below which will be of great importance to our constructions for the closure properties of the classV Rec(K,Σ). We shall need some preliminary matter.

Let A=hΣ, Ai be a wva where A= (Q, in, wt, ter) with ΓA = ΣA∪Z∪ {y}, and Σ0f in Σ such that Σ0A 6= ∅. We define on V R(ΓA) the relation ≡Σ0

determined for everyh1, h2∈V R(ΓA) by

h1Σ0 h2 iff h1(σ)∩Σ0=h2(σ)∩Σ0 for everyσ∈Z∪ {y}.

It should be clear that ≡Σ0 is an equivalence relation. Moreover, since Z ∪ {y}

and Σ0 are finite, the index of ≡Σ0 is finite. LetV be a set of representatives of V R(ΓA)/≡Σ0. For everyh∈V, we letZh={z∈Z|h(z)∈Σ0}and Γh= ΣA∪ Σ0∪(Z\Zh)∪{y}, and we consider the weighted automatonAh= (Qh, inh, wth, terh) over Γh and K, where Qh = {qh|q∈Q} is a copy of Q, inh(qh) = in(q) and terh(qh) = ter(q) for every qh ∈ Qh. The weight assignment mapping wth is defined as follows. For everyqh, q0h∈Qh, σ∈Γh, we let

wth((qh, σ, qh0)) =





wt((q, σ, q0)) ifσ∈ΣA∪(Z\Zh)∪ {y}

wt((q, z, q0)) ifσ=h(z) andz∈Zh

wt((q, y, q0)) ifσ∈h(y)∩Σ0

0 otherwise

.

(8)

Without any loss, we assume that the setsQh are pairwise disjoint. We letQV = [

h∈V

Qh, ΓV = ΣA ∪Σ0 ∪Z ∪ {y}, and consider the wva A0,V)=

Σ, A0,V)

over Σ and K, where A0,V) = (QV, inV, wtV, terV) is a weighted automaton with input alphabet ΓV. Its initial and final distribution are defined, respectively, by inV (q) = inh(q), terV (q) = terh(q) for every q ∈ Qh, h ∈ V. The weight assignment mappingwtV :QV ×ΓV ×QV →K is given by

wtV((q, σ, q0)) =

wth((q, σ, q0)) ifq, q0 ∈Qhfor some h∈V

0 otherwise

for everyq, q0 ∈QV, σ∈ΓV.

Since the weighted automaton A0,V) is the disjoint union of Ah, h∈ V, we get that

A0,V)

=X

h∈V

kAhk. Therefore, for everyw∈Σ, we have

A0,V)

, w

= X

u∈preimΓV(w)

A0,V)

, u

=X

h∈V

X

u∈preimΓh(w)

(kAhk, u).

Lemma 1. kAk=

A0,V) .

Proof. Letw=w(0). . . w(n−1)∈Σ. Consider a word u=u(0). . . u(n−1)∈ preimΓA(w) and a valid relabeling h ∈ V R(ΓA) with w ∈ h(u). We define the wordu0 =u0(0). . . u0(n−1)∈ΓV as follows:

u0(i) =

u(i) if (u(i)∈ΣA∪Z\Zh) or (u(i) =y andw(i)∈/ Σ0A) w(i) if (u(i)∈Zh) or (u(i) =yand w(i)∈Σ0A)

for every 0≤i≤n−1.

We consider the set of valid relabelings V0⊆V as follows: g∈V0 implies that g(z) = h(z) for every z ∈Zh∩ {u(i)|0≤i≤n−1} and g(y)∩Σ0 =h(y)∩Σ0 whenever u(i) =y and w(i)∈ Σ0 for some 0 ≤ i ≤ n−1. Let Pu(A) be a path of A over u. Then, by construction of A0,V), for every g ∈ V0, there exists a pathPu(A0g)ofAgoveru0 withweight

Pu(A0 g)

=weight Pu(A)

. Clearly, there are r=card(V0) such paths and sinceK is idempotent, we get X

g∈V0

weight Pu(A0 g)

= weight

Pu(A)

. On the other hand, for everyg∈V \V0 and pathPu(A0 g)ofAg, we haveweight

Pu(A0 g)

= 0. Therefore, we obtain X

Pu(A)

weight Pu(A)

=X

g∈V

X

P(Ag)

u0

weight Pu(A0 g)

.

We define the valid relabelingh0∈V R(ΓV) as follows:

(9)

- h0(z) =h(z) for everyz∈Z\Zh, and we let, nondeterministically,

- h0(z) ∈Σ\(ΣA∪Σ0∪h(Z\Zh)∪ {w(i)|0≤i≤n−1 andw(i)∈h(y)}) for every z∈Zh.

Then we havew∈h0(u0) which implies thatu0∈preimΓV (w).

Conversely, let u0 =u0(0). . . u0(n−1) ∈preimΓV(w). Hence, there is a valid relabelingh0∈V R(ΓV) such thatw∈h0(u0). By construction ofA0,V), there is a valid relabelinghfrom ΓA to Σ and a wordu=u(0). . . u(n−1)∈ΓA such that

u(i) =

u0(i) ifu0(i)∈ΣA∪Z\Zh

z ifu0(i) =h(z) andz∈Zh

y ifu0(i)∈(h(y)∩Σ0)∪ {y}

for every 0 ≤ i ≤ n−1. Keeping the previous notations, for every g ∈ V0, there is a path Pu(A0 g) of the weighted automaton Ag over u0. By construction of A0,V), all such paths Pu(A0 g) (g ∈ V0) have the same weight and there exist r = card(V0) such paths. Furthermore, for every g ∈ V0 and Pu(A0g) there is a path Pu(A) of A over u with weight

Pu(A)

= weight Pu(A0 g)

, and since K is idempotent we getweight

Pu(A)

= X

g∈V0

weight Pu(A0 g)

. On the other hand, for everyg∈V\V0and pathPu(A0 g)ofAg, we have thatweight

Pu(A0 g)

= 0. Therefore X

g∈V

X

P(Ag)

u0

weight Pu(A0g)

= X

Pu(A)

weight Pu(A)

. We consider the relabeling h00

from ΓA to Σ defined in the following way. It is the identity on ΣA, h00(z) = h0(z) for every z ∈ Z\Zh, h00(z) = h(z) for every z ∈ Zh, and h00(y) = h0(y)∪ ((h(y)∩Σ0)\h(Zh)) (in fact (h(y)∩Σ0)∩h(Zh) =∅sincehis a valid relabeling on ΓA). Triviallyh00 is a valid relabeling and w ∈ h00(u) which implies that u∈ preimΓA(w).

We conclude that for everyw∈Σ we have A0,V)

, w

= X

u0∈preimΓV(w)

A0,V) , u0

= X

u0∈preimΓV(w)

X

g∈V

(kAgk, u0)

= X

u0∈preimΓV(w)

X

g∈V

X

P(Ag)

u0

weight Pu(A0g)

= X

u∈preimΓA(w)

X

Pu(A)

weight Pu(A)

= X

u∈preimΓA(w)

(kAk, u) = (kAk, w) and we are done.

(10)

4 Closure properties of the class V Rec (K, Σ)

In this section, we investigate closure properties of the class of v-recognizable series over the infinite alphabet Σ and the semiringK. More precisely, we show that the classV Rec(K,Σ) is closed under sum, and under scalar, Hadamard, Cauchy and shuffle products, as well as star operation.

Proposition 4. The classV Rec(K,Σ)is closed under sum.

Proof. Let r(i) ∈ V Rec(K,Σ) with i = 1,2. Then there exist two wva A(i) = Σ, A(i)

with A(i) = Q(i), in(i), wt(i), ter(i)

and Γ(i) = Σ(i)∪Z(i)

y(i) , ac- cepting r(i), for i = 1,2. Without any loss, we assume that Q(1) ∩Q(2) = ∅ and Z(1)

y(1) ∩ Z(2)

y(2) = ∅. We consider the wva A(1)

(Σ(2),V1) =

Σ, A(1) (Σ(2),V1)

withA(1)

(Σ(2),V1)= Q(1)V

1, in(1)V

1, wt(1)V

1, terV(1)

1

over Γ(1)∪Σ(2) andK and the wvaA(2)

(Σ(1),V2)=

Σ, A(2) (Σ(1),V2)

withA(2)

(Σ(1),V2)= Q(2)V

2, in(2)V

2, wt(2)V

2, ter(2)V

2

over Γ(2) ∪Σ(1) and K, determined by the procedure before Lemma 1. More- over, without any loss, we assume that Q(1)V

1 ∩Q(2)V

2 = ∅. By Lemma 1 we have

A(1) (Σ(2),V1)

= r(1) and

A(2) (Σ(1),V2)

= r(2). Let Q = Q(1)V

1 ∪Q(2)V

2 and Γ = Σ(1)∪Σ(2)∪Z(1)∪Z(2)∪ {y}, wherey denotes a new free variable different from y(1) andy(2). We consider the wvaA=hΣ, AiwithA= (Q, in, wt, ter) where in andterare defined, for everyq∈Q, respectively by

in(q) =

( in(1)V

1 (q) ifq∈Q(1)V

1

in(2)V

2 (q) ifq∈Q(2)V

2

and ter(q) =

( terV(1)

1 (q) ifq∈Q(1)V

1

terV(2)

2 (q) ifq∈Q(2)V

2

.

The weight assignment mappingwt:Q×Γ×Q→K is defined as follows:

wt((q, σ, q0)) =















 wt(1)V

1 ((q, σ, q0)) ifq, q0 ∈Q(1)V

1, σ∈Γ\ {y}

wt(2)V

2 ((q, σ, q0)) ifq, q0 ∈Q(2)V

2, σ∈Γ\ {y}

wt(1)V

1 q, y(1), q0

ifq, q0 ∈Q(1)V

1, σ=y wt(2)V

2 q, y(2), q0

ifq, q0 ∈Q(2)V

2, σ=y

0 otherwise

for everyq, q0 ∈Q, σ∈Γ.

We show that kAk= A(1)

+ A(2)

. For this, letw∈Σ, u∈preimΓ(w), and h ∈ V R(Γ) such that w ∈ h(u). Then, for every path Pu(A) of A over u, by construction of A, we point out the following cases. (i) There exists a path Pu(1) of A(1)

(Σ(2),V1) over u(1) with weight(Pu(1)) = weight Pu(A)

, where u(1) is obtained fromu by replacing every occurrence ofy with y(1). (ii) There exists a pathPu(2) of A(2)

(Σ(1),V2)over u(2) with weight(Pu(2)) =weight Pu(A)

, whereu(2)

(11)

is obtained fromuby replacing every occurrence ofywithy(2). Suppose firstly that (i) holds. We consider the valid relabeling h(1) ∈V R Γ(1)∪Σ(2)

such thath(1) coincides withhon Σ(1)∪Σ(2)∪Z(1) andh(1) y(1)

=h(y)∪h Z(2)

. Trivially, w∈h(1) u(1)

which implies that u(1) ∈preimΓ(1)∪Σ(2)(w). Similarly, in case (ii) we get thatu(2)∈preimΓ(2)∪Σ(1)(w).

Conversely, let w∈Σ, u(1) ∈preimΓ(1)∪Σ(2)(w), andh(1) ∈V R Γ(1)∪Σ(2) such that w ∈ h(1) u(1)

. Then, for every path Pu(1) of A(1)

(Σ(2),V1) over u(1), by construction of A, there exists a path Pu(A) of A over u with weight

Pu(A)

= weight(Pu(1)), where uis obtained fromu(1) by replacing every occurrence ofy(1) with y. We define the valid relabeling h ∈ V R(Γ) which coincides withh(1) on Σ(1)∪Σ(2)∪Z(1),h(z)∈Σ\(Σ(1)∪Σ(2)∪h(1) Z(1)

∪(h(1) y(1)

∩{w(i)|0 ≤i≤n−1})) for z ∈Z(2) and h(y) =h(1) y(1)

\ {h(z)|z ∈Z(2)}.

Trivially,w∈h(u) which implies thatu∈preimΓ(w).

Next assume thatu(2) ∈preimΓ(2)∪Σ(1)(w) and h(2) ∈V R Γ(2)∪Σ(1)

such that w∈h(2) u(2)

. Then, for every pathPu(2) ofA(2)

(Σ(1),V2)overu(2), by construction of A, there exists a pathPuA0 ofAoveru0 withweight

Pu(A)0

=weight(Pu(2)), where u0 is obtained from u(2) by replacing every occurrence of y(2) with y. We define the valid relabeling h0 ∈ V R(Γ) which coincides with h(2) on Σ(1)∪Σ(2)∪Z(2), h0(z) ∈ Σ\ Σ(1)∪Σ(2)∪h(2) Z(2)

∪ h(2) y(2)

∩ {w(i)|0≤i≤n−1}

for z ∈Z(1) and h0(y) =h(2) y(2)

\ {h0(z) |z ∈Z(1)}. Trivially, w ∈h0(u0) which implies thatu0 ∈preimΓ(w).

We conclude that for everyw∈Σ we have (kAk, w) = X

u∈preimΓ(w)

(kAk, u) = X

u∈preimΓ(w)

X

Pu(A)

weight Pu(A)

= X

u(1)∈preimΓ(1)∪Σ(2)(w)

X

Pu(1)

weight(Pu(1))

+ X

u(2)∈preimΓ(2)∪Σ(1)(w)

X

Pu(2)

weight(Pu(2))

= X

u(1)∈preimΓ(1)∪Σ(2)(w)

A(1) (Σ(2),V1)

, u(1)

+ X

u(2)∈preimΓ(2)∪Σ(1)(w)

A(2) (Σ(1),V2)

, u(2)

=

A(1) (Σ(2),V1)

, w

+

A(2) (Σ(1),V2)

, w

=

A(1)

, w

+

A(2)

, w

=

A(1)

+

A(2)

, w

=

r(1)+r(2), w

(12)

where the sixth equality holds by Lemma 1, and we are done.

Proposition 5. The classV Rec(K,Σ)is closed under the scalar products.

Proof. Let r ∈ V Rec(K,Σ) and k ∈ K. Then there exists a wva A = hΣ, Ai with A = (Q, in, wt, ter) accepting r. We consider the wva A0 = hΣ, A0i with A0 = (Q, in0, wt, ter) wherein0(q) =k·in(q) for everyq∈Q. Then, by standard arguments we getkA0k=kkAk, and we are done.

Proposition 6. The classV Rec(K,Σ)is closed under Hadamard product.

Proof. Let r(i) ∈ V Rec(K,Σ) with i = 1,2. Then there exist two wva A(i) = Σ, A(i)

with A(i) = Q(i), in(i), wt(i), ter(i)

over Γ(i) = Σ(i) ∪Z(i)∪ y(i) , accepting r(i) for i = 1,2. Without any loss, we assume that Q(1)∩Q(2) = ∅ and Z(1)

y(1) ∩ Z(2)

y(2) = ∅. We consider the wva A(1)

(Σ(2),V1) =

Σ, A(1) (Σ(2),V1)

with A(1)

(Σ(2),V1) = Q(1)V

1, in(1)V

1, wt(1)V

1, terV(1)

1

over Γ(1)∪Σ(2) and A(2)

(Σ(1),V2)=

Σ, A(2) (Σ(1),V2)

withA(2)

(Σ(1),V2)= Q(2)V

2, in(2)V

2, wt(2)V

2, terV(2)

2

over Γ(2)∪ Σ(1) determined by the procedure described before Lemma 1. Moreover, without any loss, we assume thatQ(1)V

1 ∩Q(2)V

2 =∅. By Lemma 1 we get

A(1) (Σ(2),V1)

=r(1) and

A(2) (Σ(1),V2)

=r(2).

We consider the set Z(1)

y(1) × Z(2)

y(2) \{y}wherey= y(1), y(2) , and a maximal subset G ⊆ Z(1)

y(1) × Z(2)

y(2) \ {y} satisfying the next condition: every element ofZ(1)(resp. ofZ(2)) occurs in at most one pair inG as a left (resp. as a right) coordinate. Assume thatG1, . . . , Gmis an enumeration of all such sets of pairs of variables. Moreover, we letQ=Q(1)V

1 ×Q(2)V

2 and ΓGj = Σ(1)∪Σ(2)∪Gj ∪ {y} for every 1 ≤ j ≤ m, and we consider the wva AGj = Σ, AGj

with AGj = Q, inGj, wtGj, terGj

over ΓGj. For every 1 ≤ j ≤ m, the initial and terminal distribution are given respectively, byinGj q(1), q(2)

= in(1)V

1 q(1)

·in(2)V

2 q(2)

andterGj q(1), q(2)

=ter(1)V

1 q(1)

·ter(2)V

2 q(2)

, and the weight assignment mappingwtGj :Q×ΓGj ×Q→Kis defined by

wtGj

q(1), q(2) , σ,

q0(1), q0(2)

=



 wt(1)V

1 q(1), σ, q0(1)

·wt(2)V

2 q(2), σ, q0(2)

ifσ∈Σ(1)∪Σ(2) wt(1)V

1 q(1), x(1), q0(1)

·wt(2)V

2 q(2), x(2), q0(2)

ifσ= x(1), x(2)

∈Gj∪ {y}

0 otherwise

for every q(1), q(2)

, q0(1), q0(2)

∈Q, σ∈ΓGj.

(13)

By Proposition 4, the series X

1≤j≤m

AGj

is recognizable. We will show that A(1)

A(2)

= X

1≤j≤m

AGj .

To this end, let w=w(0). . . w(n−1) ∈Σ, u(1) ∈preimΓ(1)∪Σ(2)(w),u(2) ∈ preimΓ(2)∪Σ(1)(w),h(1)∈V R Γ(1)∪Σ(2)

, andh(2)∈V R Γ(2)∪Σ(1)

such that w ∈h(1) u(1)

∩h(2) u(2)

. For every w(t)∈ Σ, 0≤ t ≤n−1, we have either w(t)∈ Σ(1)∪Σ(2) and hence u(1)(t) =u(2)(t) =w(t), or w(t)∈Σ\Σ(1)∪Σ(2) and one of the following cases holds.

• There exist bounded variablesz(1)∈Z(1),z(2)∈Z(2)such thatu(1)(t) =z(1), u(2)(t) =z(2) andh(1) u(1)(t)

=h(2) u(2)(t)

=w(t).

• There exists a bounded variablez(1)∈Z(1)such thatu(1)(t) =z(1),u(2)(t) = y(2) andh(1) u(1)(t)

=w(t)∈h(2) u(2)(t) .

• There exists a bounded variablez(2) ∈Z(2)such thatu(1)(t) =y(1),u(2)(t) = z(2) andh(2) u(2)(t)

=w(t)∈h(1) u(1)(t) .

• u(1)(t) =y(1),u(2)(t) =y(2), andw(t)∈h(1) u(1)(t)

∩h(2) u(2)(t) . We consider the wordu=u(0). . . u(n−1) by

u(t) =

w(t) ifw(t)∈Σ(1)∪Σ(2) u(1)(t), u(2)(t)

otherwise

for every 0 ≤ t ≤ n−1. For every 1 ≤ j ≤ m, we define a valid relabel- ing hj ∈ V R ΓGj

such that hj(σ) = h(1) x(1)

for every σ = x(1), x(2)

∈ Z(1)× Z(2)

y(2) ∩Gj, and hj(σ) =h(2) x(2)

for everyσ= x(1), x(2)

∈ y(1) ×Z(2)

∩Gj. Henceu∈preimΓGj (w) for some 1≤j ≤m.

By the definition of the listG1, . . . , Gm, there is a setJ ⊆ {1, . . . , m}, such that for every path

Pu(1) :

q(1)0 , u(1)(0), q(1)1 . . .

qn−1(1) , u(1)(n−1), q(1)n

ofA(1)

(Σ(2),V1)overu(1), and Pu(2) :

q(2)0 , u(2)(0), q(2)1 . . .

qn−1(2) , u(2)(n−1), q(2)n

ofA(2)

(Σ(1),V2)overu(2), there exists a path Pu(Gj):

q(1)0 , q(2)0

, u(0),

q1(1), q1(2) . . .

q(1)n−1, qn−1(2)

, u(n−1),

q(1)n , q(2)n

ofAGj overu, for everyj∈J. Conversely, for every pathPu(Gj)ofAGj overu(j∈ J) there are two pathsPu(1) ofA(1)

(Σ(2),V1)overu(1) andPu(2) ofA(2)

(Σ(1),V2)overu(2) respectively, obtained in the obvious way. Moreover, in caseweight

Pu(Gj)

6= 0, for everyj∈J, it holds

(14)

weight Pu(Gj)

=inGj

q(1)0 , q0(2)

· Y

0≤t≤n−1

wtGj

q(1)t , qt(2)

, u(t),

q(1)t+1, q(2)t+1

·terGj

q(1)n , q(2)n

=in(1)V

1

q0(1)

·in(2)V

2

q(2)0

· Y

0≤t≤n−1

 wt(1)V

1

qt(1), u(1)(t), qt+1(1)

·wt(2)V

2

qt(2), u(2)(t), q(2)t+1

·terV(1)

1

q(1)n

·terV(2)

2

q(2)n

=in(1)V

1

q0(1)

· Y

0≤t≤n−1

wt(1)V

1

q(1)t , u(1)(t), q(1)t+1

·ter(1)V

1

qn(1)

·in(2)V

2

q0(2)

· Y

0≤t≤n−1

wt(2)V

2

q(2)t , u(2)(t), qt+1(2)

·terV(2)

2

q(2)n

=weight(Pu(1))·weight(Pu(2)).

Conversely, if weight(Pu(1)) 6= 0, weight(Pu(2)) 6= 0, then by the consideration of the list G1, . . . , Gm, there is at least one 1 ≤ j ≤ m with weight

Pu(Gj)

= weight(Pu(1))·weight(Pu(2)). Therefore, and since Kis idempotent, we obtain2

X

1≤j≤m

X

P(Gj)

u

weight Pu(Gj)

= X

Pu(1),P

u(2)

weight(Pu(1))·weight(Pu(2)).

We conclude

 X

1≤j≤m

AGj

, w

= X

1≤j≤m

AGj

, w

= X

1≤j≤m

X

u∈preimΓGj(w)

AGj

, u

= X

1≤j≤m

X

u∈preimΓGj(w)

X

P(Gj)

u

weight Pu(Gj)

= X

u(1)∈preimΓ(1)∪Σ(2)(w) u(2)∈preimΓ(2)∪Σ(1)(w)

X

Pu(1)

Pu(2)

(weight(Pu(1))·weight(Pu(2)))

= X

u(1)∈preimΓ(1)∪Σ(2)(w)

X

Pu(1)

weight(Pu(1))

2It should be clear that forj∈ {1, . . . , m} \Jthe pathsPu(Gj)do not exist, hence by definition weight

Pu(Gj)

= 0.

Hivatkozások

KAPCSOLÓDÓ DOKUMENTUMOK

In fact, we prove (cf. Theorem 1) that a weighted tree language over an arbitrary semiring is recognizable if and only if it can be obtained as the image of a local weighted

In this paper, we consider a weighted FO logic, a weighted LTL, ω-star-free series and counter-free weighted B¨ uchi automata over idempotent, zero-divisor free and totally

R yu , Weighted W 1,p estimates for solutions of nonlinear parabolic equations over non-smooth domains, Bull.. R yu , Global weighted estimates for the gradient of solutions

linear dierential equation, variational method, weighted Hardy type

Keywords: computational linguistics, weighted rational transductions, statistical language modeling, N-gram models, weighted finite-state automata..

Droste & Gastin [3, page 52] consider mc-rational and c-rational formal power series that are the semantics of mc-rational and c-rational expressions defined as follows:

Key words: q−integers, q−Meyer-König-Zeller Durrmeyer type operators, A-Statistical convergence, Weighted space, Weighted modulus of smoothness, Lipschitz class.. Abstract: We

Abstract: A new weighted geometric inequality is established by Klamkin’s polar moment of inertia inequality and the inversion transformation, some interesting applica- tions of