You are on page 1of 13

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/220176941

Automata theory based on lattice-ordered semirings

Article  in  Soft Computing · March 2011


DOI: 10.1007/s00500-010-0565-3 · Source: DBLP

CITATIONS READS

4 259

3 authors:

Xian Lu Yun Shang


Chinese Academy of Sciences Chinese Academy of Sciences
8 PUBLICATIONS   32 CITATIONS    38 PUBLICATIONS   196 CITATIONS   

SEE PROFILE SEE PROFILE

Ruqian lu
Chinese Academy of Sciences
106 PUBLICATIONS   551 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Mutually unbiased bases View project

quantum computing View project

All content following this page was uploaded by Xian Lu on 26 January 2015.

The user has requested enhancement of the downloaded file.


Soft Comput (2011) 15:269–280
DOI 10.1007/s00500-010-0565-3

ORIGINAL PAPER

Automata theory based on lattice-ordered semirings


Xian Lu • Yun Shang • Ruqian Lu

Published online: 10 March 2010


 Springer-Verlag 2010

Abstract In this paper, definitions of K automata, K and MV algebras (BL algebras), which is the main alge-
regular languages, K regular expressions and K regular braic model of multiple valued logics. In particular, they
grammars based on lattice-ordered semirings are given. It set up automata theory based on the lattice-ordered com-
is shown that KNFA is equivalent to KDFA under some mutative semirings, and found that languages of automata
finite condition, the Pump Lemma holds if K is finite, and still have characters of MV algebras.
KNFA is equivalent to KNFA. Further, it is verified that With the development of non-commutative theory,
the concatenation of K regular languages remains a K pseudo MV algebras were proposed by dropping the
regular language. Similar to classical cases and automata commutativity axiom from MV algebras (Georgescu and
theory based on lattice-ordered monoids, it is also found Iorgulescu 2001; Rachunek 2002). They could be applied
that KNFA, K regular expressions and K regular grammars to the programming languages and non-commutative logics
are equivalent to each other when K is a complete lattice. (Baudot 2000; Hajek 2003). Especially, they are in close
relation with lattice-ordered groups which play an impor-
Keywords Lattice-ordered semirings  K automata  tant role in the development of non-commutative quantum
K regular languages  K regular expressions  structures (Dvurečenskij 2002; Dvurečenskij and Pulman-
K regular grammars nová 2000).
Further, Shang and Lu (2007) discussed the semiring
reducts on pseudo MV algebras, established the relation
1 Introduction between pseudo MV algebras and lattice-ordered non-
commutative semirings. They set up automata theory based
It is well known that semirings are powerful tools in the on these non-commutative algebraic structures. And they
study of formal languages and automata theory. Many showed us that some properties of languages of automata
algebraic properties of formal languages and automata can such as intersection and reversal have close relation with
be characterized by semiring structures (Di Nola and Gerla the commutativity of algebraic operation in semirings. Li
2004; Droste and Gastin 2005; Eilenberg 1974; Gerla 2003, and Pedrycz and others proposed automata theory based on
2004, Krob 1998; Simon 1988). Certainly, from the alge- lattice-ordered monoid, and get more good properties
braic point of view, we see that some semiring structures similar to classical automata theory (Ignjatović et al. 2008;
have close relation with some algebraic models of logics. Li et al. 2006; Li and Pedrycz 2005, 2006; Sheng and Li
Recently, Di Nola and Gerla (2004) introduced the se- 2006).
miring reducts of MV algebras and established the rela- In this paper, we discuss more properties of automata
tionship between lattice-ordered commutative semirings and languages based on lattice-ordered semirings besides
the union, intersection and reversal of languages in (Shang
and Lu 2007). In detail, we give the definitions of KDFA,
X. Lu  Y. Shang (&)  R. Lu
KNFA, K regular expressions and K regular grammars. It
Institute of Mathematics, Academia Sinica, AMSS, Beijing
100190, People’s Republic of China is proved that the concatenation of K regular languages is
e-mail: shangyun602@163.com still a K regular language, KNFA and KDFA are

123
270 X. Lu et al.

equivalent under some finite condition and KNFA is If f is a transposition semiring bimorphism, then f is
equivalent to KNFA. Further, we prove that in the finite called a transposition semiring isomorphism.
case Pump Lemma corresponding to K automata is a trivial
Proposition 2.3 (Shang and Lu 2007) Let A ¼
conclusion of the equivalence between KNFA and KDFA.
ðAL ; _L ; ^L ; L ; !L ; *L ; 0L ; 1L Þ be a left pseudo BL alge-
At last, we also get the equivalence among KNFA, K
bra. Then ðAL ; _L ; L ; 1L Þ is a lattice-ordered semiring.
regular expressions and K regular grammars when K is a
complete lattice, which generalizes the results for the Proposition 2.4 (Shang and Lu 2007) Let A ¼
classical automata. Certainly, some properties are similar ðAR ; _R ; ^R ; R ; !R ; *R ; 0R ; 1R Þ be a right pseudo BL
to those in (Li and Pedrycz 2005; Sheng and Li 2006). algebra. Then AR ¼ ðAR ; R ; ^R ; 0R Þ is a dual lattice-
This paper is organized as follows. In the next section, ordered semiring.
some preliminaries on lattice-ordered semirings are pre-
Definition 2.5 (Shang and Lu 2007) A right _-coupled
sented. In Sect. 3, we give the basic definitions and notions
semiring A is a structure ðR1 ; R2 ; a; bÞ such that
about K automata. In Sect. 4, we prove the equivalence
between KNFA and KDFA when K is finite and the (i) R1 ¼ ðA; _; 0; ; eÞ and R2 ¼ ðA; ^; e; 0 ; 0Þ are a lat-
equivalence between KNFA and KNFA. In Sect. 5, we tice-ordered semiring and a dual lattice-ordered
verify that K regular languages are closed under the semiring respectively,
operation of concatenation. In Sect. 6, we establish the (ii) a : A ! A; b : A ! A are a pair of transposition
equivalence between K regular expressions and KNFA semiring isomorphisms from R1 into R2,
when K is a complete lattice. In Sect. 7, we prove that K (iii) aðbðxÞÞ ¼ x; bðaðxÞÞ ¼ x,
regular grammars are equivalent to KNFA. We give our (iv) for every x; y 2 A; x _ y ¼ x 0 ðbðxÞ  yÞ ¼ ðx
0
conclusions in the last section. aðyÞÞ  y.

2 Lattice-ordered semirings Proposition 2.6 (Shang and Lu 2007) Let G ¼


ðG; _; ^; þ; ; 0Þ be an arbitrary l-group and u 2 G; u  0.
Definition 2.1 (Di Nola and Gerla 2004) A semiring We put by definition: x 0 y ¼ ðx þ yÞ ^ u; x ¼ u  x;
R ¼ ðR; þ; 0; ; eÞ is an algebraic structure where 0 and e x  ¼ x þ u; x  y ¼ ðx  u þ yÞ _ 0. Then C1 ¼ ð½0; u ;
are distinct elements of R, ? and  are binary operations on _; 0; ; uÞ is a lattice-ordered semiring, and C2 ¼ ð½0; u ;
R satisfying: ^; u; 0 ; 0Þ is a dual lattice-ordered semiring. Further
ðC1 ; C2 ; a ¼ ; b ¼  Þ is a right coupled semiring.
(i) (R, ?) is a commutative monoid with identity 0;
(ii) ðR; Þ is a monoid with identity e; Proposition 2.7 (Shang and Lu 2007) Let A ¼
(iii) Multiplication distributes over addition; ðR1 ; R2 ; a; bÞ be a right coupled semiring, where R1 ¼
(iv) 8r 2 R; 0  r ¼ r  0 ¼ 0. ðA; _; 0; ; eÞ and R2 ¼ ðA; ^; e; 0 ; 0Þ. Then ðA; 0 ; ; a;
b; 0; eÞ is a right pseudo MV algebra.
Definition 2.2 (Di Nola and Gerla 2004) A semiring
R ¼ ðR; þ; 0; ; eÞ is called lattice-ordered semiring iff it Proposition 2.8 (Shang and Lu 2007) Let A ¼
has the structure of a lattice such that for all a; b 2 R: ðA; R ; R ;R ;  R ; 0R ; 1R Þ be a right pseudo MV algebra.
Then the reducts R_A ¼ ðA; _R ; 0R ; R ; 1R Þ and R^A ¼
(i) a þ b ¼ a _ b; ðA; ^R ; 1R ; R ; 0R Þ are a lattice-ordered semiring and a
(ii) a  b  a ^ b. dual lattice-ordered semiring respectively. And ðR_A ,
A semiring R is dual lattice-ordered iff it has the R^A ;R ;  R Þ is a right-coupled semiring.
structure of a lattice such that for all a; b 2 R: Certainly, for left pseudo MV algebras, we have similar
(i) a þ b ¼ a ^ b, results. From the above discussions, one can see that lat-
(ii) a  b  a _ b. tice-ordered semiring structures are in close relation with
the pseudo MV algebras.
Let R and S be semirings. A transposition morphism In the following, K ¼ ðR; þ; 0; ; e; ^; _Þ denotes a
between R and S is a mapping f : R ! S such that lattice-ordered non-commutative semiring. For dual lattice-
(i) f ð0Þ ¼ 0; f ðeÞ ¼ e, ordered semiring, we can discuss similarly.
(ii) for all r; r 0 2 R, f ðr þ r 0 Þ ¼ f ðrÞ þ f ðr 0 Þ and For any lattice-ordered non-commutative semiring, the
f ðr  r 0 Þ ¼ f ðr 0 Þ  f ðrÞ. following properties hold:

123
Automata theory based on lattice-ordered semirings 271

Proposition 2.9 Let a; b; c 2 K. If a  b, then a  Definition 3.6 (KDFA) A KDFA is a KNFA whose
c  b  c and c  a  c  b. transform function E satisfies that, for any p 2 Q and any
r 2 R there exists at most one q 2 Q such that
Proof From a  b, we have a þ b ¼ a _ b ¼ b. There-
Eðp; r; qÞ 6¼ 0.
fore, ða  cÞ _ ðb  cÞ ¼ ða þ bÞ  c ¼ b  c, that is,
a  c  b  c. Similarly, there is c  a  c  b. h Now we define the languages accepted by the automata
above.
Proposition 2.10 Let a1 ; a2 ; . . .; an 2 K, and ai1 ; ai2 ; . . .;
aik ð1  i1 \i2 \    \ik  nÞ be any subsequence. Then Definition 3.7 Let M ¼ ðQ; R ; I; T; EÞ be a KNFA. For
a1  a2      an  ai1  ai2      aik . any s 2 R and s0 ¼ r01    r0n 2 HR , where R is the free
monoid over R, the K language accepted by M is defined to
Proof Since a  b  a, we know a  b  c  a  c, a 
be a mapping LðMÞ : R ! K given by
b  c  a  b and a  b  c  b  c. We get a1  a2     "
an  ai1  ai1 þ1      an  ai1  ai2  ai2 þ1   _ _
an  ai1  ai2      aik      an  ai1  ai2      aik LðMÞðsÞ ¼ Iðp0 Þ  Eðp0 ; r01 ; p1 Þ     
jjs0 jj¼s p0 ;...;pn 2Q
by Proposition 2.9. h 
Eðpn1 ; r0n ; pn Þ  Tðpn Þ ð2Þ
3 K automata
Proposition 3.8 When  is not considered, this is the K-
In this section, we give the definitions of all kinds of K language defined in (Shang and Lu 2007).
automata and K languages.
Obviously, for a KNFA M there is Eðpi1 ; r0i ; pi Þ 6¼ 0
Definition 3.1 (Length) Let HR ¼ fa1 a2    an jai 2 for some iBn if Iðp0 Þ  Eðp0 ; r01 ; p1 Þ     
R [ fg; n  1g, where R is an alphabet. For any s 2 HR , Eðpn1 ; rn ; pn Þ  Tðpn Þ 6¼ 0. If r0i ¼ , then pi1 ¼ pi
0

the ‘‘length’’ of s, denoted by |s|, is defined as the count of and Eðpi1 ; r0i ; pi Þ ¼ e. Therefore, we can delete
all nonempty characters in s. If jsj  1, jjsjj denotes the this Eðpi1 ; r0i ; pi Þ from Iðp0 Þ  Eðp0 ; r01 ; p1 Þ     
sequence composed of all nonempty characters of s in their Eðpn1 ; r0n ; pn Þ  Tðpn Þ without affecting the value of Eq. 2.
original order; define jjsjj ¼  if jsj ¼ 0. Thus the language function Eq. 2 can be simplified as:
_
Definition 3.2 (K Automata) Let R ¼ R [ fg. A K LðMÞðsÞ ¼ IðpÞ  Eðp; s; qÞ  TðqÞ ð3Þ
p;q2Q
automata is a quintuple: M ¼ ðQ; R ; I; T; EÞ, in which
(i) Q is the nonempty set of states; Especially, the value of  is:
"
(ii) R is the set of input characters; _ _
(iii) I : Q ! K is the initial state function; LðMÞðÞ ¼ Iðp0 Þ  Eðp0 ; ; p1 Þ     
T : Q ! K is the terminal state function; n  0 p0 ;...;pn 2Q
(iv)  ð4Þ
(v) E : Q
HR
Q ! K is the transform function, Eðpn1 ; ; pn Þ  Tðpn Þ
where for any s ¼ r01    r0n 2 HR ðn  2Þ
_
Eðp; s; qÞ ¼ Eðp; r01 ; p1 Þ      Eðpn1 ; r0n ; qÞ If M is a KNFA, Eq. 4 can be simplified as:
p1 ;...;pn1 2Q _
LðMÞðÞ ¼ IðpÞ  TðpÞ ð5Þ
ð1Þ p2Q

From Eq. 1, we know that E is totally determined by Definition 3.9 (K Regular Languages) The K language
EjQ
R
Q (restricted in the domain Q
R
Q). accepted by any KNFA is called K regular language.

Proposition 3.3 Obviously if the alphabet of the K auto- In the following sections, for two KNFAs (note that
mata is R, rather than R , the K automata defined above is KNFA and KDFA are special type of KNFA) M1 and M2 ,
exactly the K  R automata in (Shang and Lu 2007). we say they are equivalent or M1 could be simulated by
M2 if they accept the same K language, that is,
Definition 3.4 (KNFA) A KNFA is a K automata whose LðM1 Þ ¼ LðM2 Þ. We say that a type of automata T1 (for
transform function E satisfies: 8q 2 Q; Eðq; ; qÞ ¼ e. example, T1 could be the class of all KNFAs) is more
Definition 3.5 (KNFA) A KNFA is a KNFA whose powerful than another type of automata T2 if for any
transform function E satisfies: 8p; q 2 Q; p 6¼ q; automaton M2 2 T2 there exists some M1 2 T1 such that
Eðp; ; qÞ ¼ 0. M2 could be simulated by M1 . We say T1 and T2 are

123
272 X. Lu et al.

equivalent if T1 is more powerful than T2 , and meanwhile Clearly, SM is finite when K is finite. Hence we give the
T2 is more powerful than T1 . equivalence of KNFA and KDFA.
Corollary 4.2 If K is finite, then KNFA and KDFA are
equivalent.
4 KDFA, KNFA and KNFA
Generally, We have not proved whether KNFA is
As we know, DFA and NFA with and without empty- more powerful than KDFA or not. As a comparison, in
moves are equivalent in classical automata theory Li and Pedrycz (2005), it was proved that N L-FFA is
(Hopcroft et al. 2001). In this section we also obtain more powerful than D L-FFA, and they are equivalent
similar results for K automata under some finite if and only if L is locally finite. Here, we proved
condition. that KNFA and KDFA are equivalent under the finite-
Denote the domain of any function f to be Dðf Þ. For a ness of SM , which is a weaker condition than locally
KNFA M ¼ ðQ; R ; I; T; EÞ denote RM ¼ DðIÞ [ DðEÞ finiteness.
[DðTÞ. Assume SM is the subsemiring in K generated by As an application of Corollary 4.2, now we present
RM (the minimum subsemiring containing RM ), we could Pump Lemma in the frame of lattice-ordered non-com-
prove the following conclusion. mutative semirings.
Theorem 4.1 For any KNFA M, if SM is finite, then M Theorem 4.3 (Pump Lemma) Let M ¼ ðQ; R ; I; T; EÞ be
could be simulated by a KDFA. a KNFA and N be the cardinal of KQ . If K is finite, then for
any s 2 Rþ , if jsj [ N then it can be divided as s ¼ uvw
Proof SQ M is finite since SM and Q are finite. Similar to the
such that LðMÞðsÞ ¼ LðMÞðuvi wÞ where u; w 2 R ; v 2 Rþ
mechanism of Sect. 4 of Ying (2005), we construct a
and i 2 N.
KDFAM 0 ¼ ðSQ 0 0 0
M ; R ; I ; T ; E Þ as:
 _ Proof Suppose M0 is the KDFA constructed from M in
e; if X ¼ I
I 0 ðXÞ ¼ ; T 0 ðXÞ ¼ XðpÞ  TðpÞ: the same way as that in Theorem 4.1. Denote
0; otherwise p2Q s ¼ r1    rn 2 Rþ . It is proved that LðM 0 ÞðsÞ ¼ T 0 ðXn Þ,
For any WX 2 SQ Q where Xn ¼ YXn1 ;rn ; . . .; X1 ¼ YI;r1 . Denote I ¼ X0 . When
M and r 2 R, define YX;r 2 SM as:
YX;r ðqÞ ¼ p2Q XðpÞ  Eðp; r; qÞ. For all X; Y 2 SQ n [ N, there must be Xj ¼ Xk for some 0  j\k  n. Let
M , we
also define E0 to be: v ¼ rjþ1    rk ; u ¼ r1    rj ; w ¼ rkþ1    rn . It is easy to
 see that the terminal state of the path accepting uvi w in M0
0 e; if Y ¼ YX;r is always Xn . Therefore, LðMÞðuvi wÞ ¼ LðM 0 Þðuvi wÞ ¼
E ðX; r; YÞ ¼
0; otherwise T 0 ðXn Þ ¼ LðM 0 ÞðsÞ ¼ LðMÞðsÞ. h
r1 r2
For any s ¼ r1 r2    rn 2 Rþ , the path I!X1 ! Moreover, the classes of nondeterministic automata with
rn
X2    !Xn and the terminal state Xn are determined by and without empty-moves based on lattice-ordered semi-
I and s. Note that Xi ¼ YXi1 ;ri in this path. Therefore, rings are equivalent.
_
LðM 0 ÞðsÞ ¼ I 0 ðX0 Þ  E0 ðX0 ;r1 ;X1 Þ   Theorem 4.4 The KNFA and KNFA are equivalent.
X0 ;Xn 2SQ
M
Proof Since KNFA is a special type of KNFA, we only
E0 ðXn1 ;rn ;Xn Þ  T 0 ðXn Þ
need to prove that for any KNFA M1 , there exists an
¼ I 0 ðIÞ  E0 ðI;r1 ;X1 Þ   equivalent KNFA M2 .
E0 ðXn1 ;rn ;Xn Þ  T 0 ðXn Þ ¼ T 0 ðXn Þ For any KNFA, M1 ¼ ðQ; R ; I; T; EÞ, construct a
_
¼ Xn ðpn Þ  Tðpn Þ KNFA, M2 ¼ ðQ; R; I; T 0 ; E0 Þ as follows. First we denote
W
pn 2Q Eðp; k ; qÞ ¼ p1 ;...;pk1 2Q ½Eðp; ; p1 Þ      Eðpk1 ; ; qÞ
" # for k  2 and Eðp; 0 ; qÞ ¼ e, Eðp; 1 ; qÞ ¼ Eðp; ; qÞ. Then
_ _
¼ Xn1 ðpn1 Þ  Eðpn1 ;rn ;pn Þ  Tðpn Þ define
pn 2Q pn1 2Q _  
_ E0 ðp; r; qÞ ¼ Eðp; k ; pk Þ  Eðpk ; r; qÞ
¼ Iðp0 Þ  Eðp0 ;r1 ;p1 Þ   k  0;pk 2Q
p0 ;...;pn 2Q _  
0
T ðpÞ ¼ Eðp; k ; pk Þ  Tðpk Þ
Eðpn1 ;rn ;pn Þ  Tðpn Þ k  0;pk 2Q

In the case of s ¼ , LðM 0 ÞðÞ ¼ I 0 ðIÞ  T 0 ðIÞ ¼ T 0 ðIÞ For any given set of states fp1 ; . . .; pk g, if k [ jQj, then
¼ _p2Q IðpÞ  TðpÞ ¼ LðMÞðÞ. Therefore, we can simu- there must be pi ¼ pj for some 1  i\j  k since Q is finite.
late a KNFA with a KDFA if S is finite. h Thus, Eðp0 ; ; p1 Þ      Eðpk1 ; ; pk Þ  Eðp0 ; ; p1 Þ    

123
Automata theory based on lattice-ordered semirings 273

2
Eðpi1 ; ; pi Þ  Eðpj ; ; pjþ1 Þ      Eðpk1 ; ; pk Þ by _ _
W
Proposition 2.10. Therefore, Eðp; k ; qÞ  l  jQj Eðp; l ; qÞ
4 Eðpmi ; miþ1 mi 1 ; qmi Þ
W  miþ1 mi 1  jQj qmi 2Q
for any k  0. Then T 0 ðpÞ ¼ k  jQj;pk 2Q Eðp; k ; pk Þ Tðpk Þ 
W  Eðqmi ; rmiþ1 ; pmiþ1 Þ
and E0 ðp; r; qÞ ¼ k  jQj;pk 2Q Eðp; k ; pk Þ Eðpk ; r; qÞ . 2 3
_ _
In the following, we denote m0 ¼ 0; mnþ1 ¼ m and S ¼ 4 Eðpmn ; mm n
; pm Þ  Tðpm Þ5
fð0; m1 ; . . .; mnþ1 Þjmiþ1  mi  jQj þ 1; mnþ1 mmn  jQj pm 2Q

mn  jQj; i ¼ 0; . . .; n  1g f0g


Nnþ1 , _ Y
n1

T ¼ f0g
Nnþ1  S. For any s ¼ r1 r2    rn , the Eq. 2 is ¼ Iðp0 Þ  E0 ðpmi ; rmi þ1 ; pmi þ1 Þ  T 0 ðpmn Þ
pmi 2Q;i  n i¼0
_ _ Y
n1
LðM1 ÞðsÞ ¼ Iðp0 Þ  ¼ LðM2 ÞðsÞ
mi \miþ1 pmi 2Q i¼0
2 3 In the case of s ¼ , by Eq. 4,
_

4 Eðpmi ;  miþ1 mi 1
; qmi Þ  Eðqmi ; rmiþ1 ; pmiþ1 Þ5 " #
_ _
qmi 2Q n
LðM1 ÞðÞ ¼ Iðp0 Þ  Eðp0 ;  ; pn Þ  Tðpn Þ
 Eðpmn ; mmn ; pm Þ  Tðpm Þ n  0 p0 ;pn 2Q
" #
_ _ Y
n1 _ _
n
¼ Iðp0 Þ  ¼ Iðp0 Þ  Eðp0 ;  ; pn Þ  Tðpn Þ
S[T pmi 2Q i¼0 0  n  jQj p0 ;pn 2Q
2 3 2 3
_ _ _

4 Eðpmi ; miþ1 mi 1 ; qmi Þ  Eðqmi ; rmiþ1 ; pmiþ1 Þ5 ¼ Iðp0 Þ  4 Eðp0 ; n ; pn Þ  Tðpn Þ5
qmi 2Q p0 2Q n  jQj;pn 2Q
mmn _
 Eðpmn ;  ; pm Þ  Tðpm Þ ¼ 0
Iðp0 Þ  T ðp0 Þ ¼ LðM2 ÞðÞ
ð6Þ p0 2Q

For any ðm0 ; . . .; mnþ1 Þ 2 T, there is mjþ1  mj  1 [ jQj


Therefore, a KNFA could be simulated by a KNFA. h
for some 0  j\n or mnþ1  mn [ jQj. Then
"
Y
n1 _ 5 K regular languages
Iðp0 Þ  Eðpmi ; miþ1 mi1 ; qmi Þ
i¼0 qmi 2Q
# In this section, we will discuss the properties of K regular
mmn languages in detail. We will see that non-commutativity of
Eðqmi ; rmiþ1 ; pmiþ1 Þ  Eðpmn ;  ; pm Þ  Tðpm Þ
the operations in lattice-ordered semirings will play an
" important role in some properties of languages such as
Y
j1 _
 Iðp0 Þ  Eðpmi ; miþ1 mi1 ; qmi Þ intersection, reversal, but not affect the union, concatena-
i¼0 qmi 2Q tion and Kleene closure.
#
_ Definition 5.1 (Shang and Lu 2007) Let f ; g; h 2 KR be
l
Eðqmi ; rmiþ1 ; pmiþ1 Þ  Eðpmj ;  ; qj Þ
K subsets
l  jQj;qj 2Q

 Eðqj ; rmjþ1 ; pmjþ1 Þ      Eðpmn ; mmn ; pm Þ  Tðpm Þ (i) The union of f and g, denoted by f [ g, is defined as
ðf [ gÞðsÞ ¼ f ðsÞ _ gðsÞ for any s 2 R .
W W (ii) The intersection of f and g, denoted by f \ g, is defined
Therefore, ðm0 ;...;mnþ1 Þ2T ð  Þ  ðm0 ;...;mnþ1 Þ2S ð  Þ in Eq. 6
and as ðf \ gÞðsÞ ¼ f ðsÞ ^ gðsÞ for any s 2 R . The gen-
eralized intersection of f and g, denoted by f u g, is
_ _ Y
n1
LðM1 ÞðsÞ ¼ Iðp0 Þ  defined as ðf u gÞðsÞ ¼ f ðsÞ  gðsÞ for any s 2 R .
S pmi 2Q i¼0 (iii) The reversal of f, namely f 1 , is defined as
2 3
_ f 1 ðsÞ¼f ðs1 Þ, where s¼r1 r2 rn , s1 ¼ rn r2 r1 .

4 Eðpmi ;  miþ1 mi 1
; qmi Þ  Eðqmi ; rmiþ1 ; pmiþ1 Þ5
qmi 2Q Note that the empty-move  was not considered in
 Eðpmn ;  mmn
; pm Þ  Tðpm Þ (Shang and Lu 2007). The K  R automaton defined in
_ Y
n1 Shang and Lu (2007) is the KNFA in this paper except that
¼ Iðp0 Þ  the value of  accepted by automaton is defined here, while
pmi 2Q;i  n i¼0 its value is missed in Shang and Lu (2007). However, it is

123
274 X. Lu et al.

easy to check that the following properties also hold even For any s ¼ r1    rn 2 Rþ , we have E3 ðp; s; qÞ ¼
when the value of  is taken into account. E1 ðp; s; qÞ when p; q 2 Q1 and E3 ðp; s; qÞ ¼ E2 ðp; s; qÞ
when p; q 2 Q2 . It is easy to check that if p 2 Q1 ; q 2 Q2
Proposition 5.2 (Shang and Lu 2007) K regular lan-
then
guages are closed under the operation of union. _ _
E3 ðp; s; qÞ ¼ E1 ðp; s1 ; p0 Þ  T1 ðp0 Þ
The M1  M2 and M1 ^ M2 are constructed straightfor- jjs1 s2 jj¼s;si 2R p0 2Q1 ;p00 2Q2
ward as the product of M1 and M2 in Shang and Lu (2007),  I2 ðp00 Þ  E2 ðp00 ; s2 ; qÞ
we omit the details here.
if p 2 Q2 ; q 2 Q1 then E3 ðp; s; qÞ ¼ 0. Therefore, for any
Theorem 5.3 (Shang and Lu 2007) For every KNFA M1 W
s 2 Rþ ; LðM3 ÞðsÞ ¼ I ðpÞ  E3 ðp; s; qÞ  T3 ðqÞ ¼
and M2, LðM1  M2 Þ ¼ LðM1 Þ u LðM2 Þ iff the multiplica- W W W p;q2Q3 3
¼ s 0 q;p 2Q2 ðpÞ
00 I 1  E1 ðp; s1 ; p0 Þ T1 ðp0 Þ 
tion operation satisfies the commutative law. jjs1 s2 jj
00
p;p 2Q1
00
W
I2 ðp Þ  E2 ðp ; s2 ; qÞ  T2 ðqÞ ¼ s1 s2 ¼s LðM1 Þðs1 Þ  LðM2 Þ
W W
Theorem 5.4 (Shang and Lu 2007) For every KNFA M1 ðs2 Þ. If s ¼ ; LðM3 ÞðÞ ¼ p2Q1 I1 ðpÞ  T3 ðpÞ ¼ p2Q1
and M2, LðM1 ^ M2 Þ ¼ LðM1 Þ \ LðM2 Þ iff the multiplica- I1 ðpÞ  T1 ðpÞ  LðM2 ÞðÞ ¼ LðM1 ÞðÞ  LðM2 ÞðÞ. Thus
tion operation is the infimum operation in lattice-ordered LðM3 Þ ¼ LðM1 Þ  LðM2 Þ. h
semiring K.
The K regular languages are closed under the operations
Theorem 5.5 (Shang and Lu 2007) For any KNFA M of union and concatenation, so we could infer the following
and its reversal M 1 ; LðMÞ ¼ LðM 1 Þ iff the multiplication theorem:
operation satisfies the commutative law.
Corollary 5.8 (Kleene Closure) The K regular languages
From the above, we find that the non-commutative are closed under the Kleene star operation.
property of multiplication can determine intersection and
reversal of languages of automata. However, in the fol- Further, all K regular languages form a non-commuta-
lowing, we show that it does not affect the concatenation of tive semiring. Let 0 denote the K language R ! f0g and 1
languages. Thus the Kleene closure holds in the frame of denote R ! feg. RegðKÞ denotes the set of K regular
lattice-ordered non-commutative semirings. languages. It is easy to see 0; 1 2 RegðKÞ.

Definition 5.6 (Concatenation) For any K regular lan- Corollary 5.9 ðRegðKÞ; _; 0; ; 1Þ is a non-commutative
guages l1 and l2 , their concatenation, denoted by l1  l2 , is semiring.
defined as Proof First, for all l1 ; l2 ; l3 2 RegðKÞ, then
_
ðl1  l2 ÞðsÞ ¼ l1 ðs1 Þ  l2 ðs2 Þ l1  ðl2 _ l3 Þ ¼ ðl1 _ l2 Þ  ðl1 _ l3 Þ. In fact, for any s 2 R ,
_
jjs1 s2 jj¼s;si 2R ðl1  ðl2 _ l3 ÞÞðsÞ ¼ l1 ðs1 Þ  ðl2 _ l3 Þðs2 Þ
jjs1 s2 jj¼s;si 2R
Theorem 5.7 For any K regular languages l1 and l2 , _
their concatenation is also a K regular language. ¼ l1 ðs1 Þ  ðl2 ðs2 Þ _ l3 ðs2 ÞÞ
jjs1 s2 jj¼s;si 2R
Proof Assume the KNFA of li is Mi ¼ ðQi ; R ; Ii ; Ti ; Ei Þ _
(i ¼ 1; 2) where Q1 \ Q2 ¼ /. First we construct a KNFA ¼ ðl1 ðs1 Þ  l2 ðs2 ÞÞ _ ðl1 ðs1 Þ
M3 ¼ ðQ3 ; R ; I3 ; T3 ; E3 Þ as: Q3 ¼ Q1 [ Q2 , jjs1 s2 jj¼s;si 2R

I1 ðpÞ; if p 2 Q1  l3 ðs2 ÞÞ
I3 ðpÞ ¼ ;
0; if p 2 Q2 ¼ ðl1  l2 ÞðsÞ _ ðl1  l3 ÞðsÞ

T1 ðpÞ  LðM2 ÞðÞ; if p 2 Q1
T3 ðpÞ ¼ ¼ ððl1  l2 Þ _ ðl1  l3 ÞÞðsÞ:
T2 ðpÞ; if p 2 Q2

8
> Ei ðp; r; qÞ; if p; q 2 Qi
>
> hW iW
>
>
< p0 2Q1 E1 ðp; r; p0 Þ  T1 ðp0 Þ  I2 ðqÞ
E3 ðp; r; qÞ ¼ hW i ð7Þ
>
> 00 00
> 00 2Q T1 ðpÞ  I2 ðp Þ  E2 ðp ; r; qÞ ; if r 2 R; p 2 Q1 ; q 2 Q2
>
> p 2
:
0; if p 2 Q2 ; q 2 Q1

123
Automata theory based on lattice-ordered semirings 275

Easy to check that ðRegðKÞ; _; 0Þ is an Abelian Lðu  ðv þ wÞÞðsÞ


_
monoid and ðRegðKÞ; ; 1Þ is a non-Abelian monoid. ¼ LðuÞðs1 Þ  Lðv þ wÞðs2 Þ
Hence ðRegðKÞ; _; 0; ; 1Þ forms a non-commutative jjs1 s2 jj¼s;si 2R
_
semiring. h ¼ LðuÞðs1 Þ  ðLðvÞðs2 Þ _ LðwÞðs2 ÞÞ
Similarly, the family of NL-FFA languages is also jjs1 s2 jj¼s;si 2R
_
closed under the operations of union, concatenation and the ¼ ðLðuÞðs1 Þ  LðvÞðs2 ÞÞ _ ðLðuÞðs1 Þ  LðwÞðs2 ÞÞ
Kleene closure (Li and Pedrycz 2005). jjs1 s2 jj¼s;si 2R
0 1
_
¼@ LðuÞðs1 Þ  LðvÞðs2 ÞA
6 K regular expressions
jjs1 s2 jj¼s;si 2R
0 1
In this section, we prove that the regular expressions based _
on lattice-ordered non-commutative semirings are equiva- _@ LðuÞðs1 Þ  LðwÞðs2 ÞA

jjs1 s2 jj¼s;si 2R
lent to KNFA, which generalizes the result for classical
automata theory (Hopcroft et al. 2001). ¼ Lðu  vÞðsÞ _ Lðu  wÞðsÞ
We first define the K regular expressions and their ¼ Lððu  vÞ þ ðu  wÞÞðsÞ
languages in a recursive way. In the following definition u,
v, w are variables varying through all K regular expres- Namely, u  ðv þ wÞ ¼ ðu  vÞ þ ðu  wÞ. In a similar way,
sions, and L(u), L(v), L(w) are their K languages, there is ðu þ vÞ  w ¼ ðu  wÞ þ ðv  wÞ. h
respectively.
Proposition 6.3 Assume that u is a K regular expression
Definition 6.1 Suppose K is complete lattice and R is an over R, then Lðu1 ÞðsÞ ¼ LðuÞðsÞ _ Lðu2 ÞðsÞ _    Lðun ÞðsÞ
alphabet. A K regular expression u over R is an element of for all s 2 Rn .
ðR [ K [ f; /g [ fþ; ; 1; ð; ÞgÞ which satisfies one of
the following conditions: Proof Let s ¼ r1    rn ,
_
Lðuk ÞðsÞ ¼ LðuÞðs1 Þ      LðuÞðsk Þ
(i) u ¼ / is a K regular expression over R; Lð/ÞðsÞ ¼ 0
jjs1 sk jj¼s;si 2R
for all s 2 R .
(ii) u ¼  is a K regular expression over R; LðÞðsÞ ¼ e if for all k  n þ 1. Since the length of s is n, there must exist
s ¼  and LðÞðsÞ ¼ 0 otherwise. empty sequences in s1 ; . . .; sk . Denote these nonempty
(iii) u ¼ r 2 R is a K regular expression over R; sequences by si1 ; . . .; sil ðl  nÞ in their original order. Then
LðrÞðsÞ ¼ e if s ¼ r and LðrÞðsÞ ¼ 0 otherwise. by Proposition 2.10,
(iv) If v is a K regular expression over R, then for any LðuÞðs1 Þ      LðuÞðsk Þ  LðuÞðsi1 Þ      LðuÞðsil Þ
k; l 2 K; u1 ¼ ðk  vÞ; u2 ¼ ðv  lÞ are K regular
expressions over R, their languages are Lðu1 ÞðsÞ ¼ Obviously, each LðuÞðsi1 Þ      LðuÞðsil Þ is contained in
k  LðvÞðsÞ, Lðu2 ÞðsÞ ¼ LðvÞðsÞ  l, respectively. the expanded form of Lðul ÞðsÞ. Therefore,
(v) If v, w are K regular expressions over R, then Lðuk ÞðsÞ  LðuÞðsÞ _ Lðu2 ÞðsÞ _    _ Lðun ÞðsÞ
(a) u ¼ ðv þ wÞ is a K regular expression over R; and Lðu1 ÞðsÞ ¼ LðuÞðsÞ _ Lðu2 ÞðsÞ _    _ Lðun ÞðsÞ. h
LðuÞðsÞ ¼ LðvÞðsÞ _ LðwÞðsÞ for all s 2 R ;
(b) u ¼ ðv  wÞ is a K regular expression over Now we prove that K regular expressions are equivalent
R; LðuÞ ¼ LðvÞ  LðwÞ; we denote u1 ¼ u, to KNFA.
ukþ1 ¼ ðuk  uÞ for k  1; Theorem 6.4 Given a K regular expression u, its lan-
(c) u ¼ ðv1 Þ is a K regular expression over guage L(u) is a K regular language.
R; LðuÞ ¼ LðvÞ _ Lðv2 Þ _   .
Proof We prove this theorem inductively.
Before the main theorem, we first give two characters
about K regular expressions: (1) If u ¼ /, the corresponding KNFA is M ¼
ðQ; R ; I; T; EÞ with IðpÞ ¼ 0; TðpÞ ¼ 0 for all
Proposition 6.2 K regular expressions satisfy the dis- p 2 Q. It is easy to see that LðuÞ ¼ LðMÞ.
tributive law. (2) If u ¼ , the corresponding KNFA is
Proof For any s 2 R , we have M ¼ ðQ; R ; I; T; EÞ, in which IðpÞ ¼ TðpÞ ¼ e for

123
276 X. Lu et al.

all p 2 Q and Eðp; r; qÞ ¼ 0 for all r 2 R; p; q 2 Q. It


Define E2 as:
is easy to see that LðuÞ ¼ LðMÞ. W
(3) If u ¼ r for some r 2 R, its KNFA is • if p ¼ q ¼ p0 ; E2 ðp; r; qÞ ¼ n;m  N;ri ;si 2Q1 I1 ðr1 Þ 
M ¼ ðfp; qg; R ; I; T; EÞ, where IðpÞ ¼ TðqÞ ¼ e, Fðr1 ; r2 ; nÞ  E1 ðr2 ; r; s1 Þ  Fðs1 ; s2 ; mÞ  T1 ðs2 Þ;
W
IðqÞ ¼ TðpÞ ¼ 0, and • if p ¼ p0 ; q 2 Q1 ; E2 ðp; r; qÞ ¼ n;m  N;ri ;s1 2Q1 I1 ðr1 Þ
 Fðr1 ; r2 ; nÞ  E1 ðr2 ; r; s1 Þ  Fðs1 ; q; mÞ;
e; if d ¼ r; r ¼ p; t ¼ q W
Eðr; d; tÞ ¼ • if p 2 Q1 ; q ¼ p0 ; E2 ðp; r; qÞ ¼ n;m  N;r1 ;si 2Q1 Fðp; r1 ;
0; otherwise
nÞ  E1 ðr1 ; r; s1 Þ  Fðs1 ; s2 ; mÞ  T1 ðs2 Þ;
W
It is easy to prove LðMÞ ¼ LðuÞ. • if p; q 2 Q1 ; E2 ðp; r; qÞ ¼ n;m  N;r1 ;s1 2Q1 Fðp; r1 ; nÞ
(4) Now we are to prove Lðk  uÞ and Lðu  lÞ are K E1 ðr1 ; r; s1 Þ  Fðs1 ; q; mÞ.
regular languages. Assume the KNFA of u is
For any s ¼ r1    rn 2 Rþ ,
M ¼ ðQ; R ; I; T; EÞ. We construct Mk ¼ _
ðQ; R ; Ik ; T; EÞ from M as: 8p 2 Q; Ik ðpÞ ¼ I2 ðp0 Þ  E2 ðp0 ; s; pn Þ  T2 ðpn Þ
k  IðpÞ. It is easy to prove Lðk  uÞ ¼ LðMk Þ. Con- p0 ;pn 2Q2
_
struct Ml ¼ ðQ; R ; I; Tl ; EÞ where Tl ðpÞ ¼ TðpÞ ¼ E2 ðp0 ; r1 ; p1 Þ      E2 ðpn1 ; rn ; pn Þ  T2 ðpn Þ
l; 8p 2 Q. Similarly, it is easy to see Lðu  lÞ p1 ;...;pn 2Q2
¼ LðMl Þ. Hence Lðk  uÞ and Lðu  lÞ are K regular _ _ _
¼ I1 ðr10 Þ
languages. p1 ;...;pn 2Q2 r10 ;ri ;s0n ;si 2Q1 k0 ;kn  N;ki  2Nþ1
(5) Given K regular expressions u and v, now we prove:
if L(u) and L(v) are K regular languages then Lðu þ  Fðr10 ; r1 ; k0 Þ  E1 ðr1 ; r1 ; s1 Þ
vÞ; Lðu  vÞ and Lðu1 Þ are K regular languages. Fðs1 ; r2 ; k1 Þ      Fðsn1 ; rn ; kn1 Þ
(a) It can be proved that Lðu þ vÞ is K regular  E1 ðrn ; rn ; sn Þ  Fðsn ; s0n ; kn Þ  T1 ðs0n Þ
_
language in a similar way to the proof of ¼ I1 ðr1 Þ  E1 ðr1 ; r1 ; s1 Þ  Fðs1 ; r2 ; k1 Þ
Proposition 4.2 of Shang and Lu (2007). ri ;si 2Q1 ;ki  1
(b) It has been proved that Lðu  vÞ ¼ LðuÞ  LðvÞ is
 E1 ðr2 ; r2 ; s2 Þ      Fðsn1 ; rn ; kn1 Þ
K regular language in Theorem 5.7;
(c) Assume the KNFA of L(u) is M1 ¼  E1 ðrn ; rn ; sn Þ  T1 ðsn Þ
_ _
ðQ1 ; R ; I1 ; T1 ; E1 Þ, the cardinal of Q1 is N. ¼ I1 ðr1 Þ  E1 ðr1 ; r1 ; s1 Þ
Define 0  l  n1;1  i1 \\il  n1 ri ;si 2Q1

Fðp; q;nÞ      E1 ðri1 ; ri1 ; si1 Þ


8W
>
> p ;...;p 2Q T1 ðpÞ  I1 ðp1 Þ Fðsi1 ; ri1 þ1 ; 1Þ      E1 ðrn ; rn ; sn Þ  T1 ðsn Þ
> 1 n1 1
< _
T1 ðp1 Þ     I1 ðpn1 Þ  T1 ðpn1 Þ  I1 ðqÞ; n 1 ¼ LðuÞðr1   rii Þ
¼
>
> e; n ¼ 0;p ¼ q 0  l  n1;1  i1 \\il  n1
>
:
0; otherwise  LðuÞðri1 þ1   ri2 Þ      LðuÞðril þ1   rn Þ
_
for all p; q 2 Q1 and n 2 N. It is easy to prove: ¼ Lðulþ1 ÞðsÞ
0  l  n1
Fðp; q; nÞ  Fðq; r; mÞ ¼ Fðp; r; n þ mÞ ð8Þ
Fðp; q; n þ 1Þ  Fðp; q; nÞ ð9Þ by Eqs. 8, 9. Therefore, LðM2 ÞðsÞ ¼ Lðu1 ÞðsÞ by Propo-
sition 6.3.
Construct the KNFA M2 ¼ ðQ2 ; R ; I2 ; T2 ; E2 Þ of Lðuþ Þ: In the case of s ¼ , by Eqs. 5, 10, 11 and Proposition
W
Q2 ¼ Q1 [ fp0 g where p0 2
6 Q1 , 2.10, LðM2 ÞðÞ ¼ T2 ðp0 Þ ¼ ð_r2Q1 I1 ðrÞ  T1 ðrÞÞ ð_r;s2Q1
 I1 ðrÞ  T1 ðrÞ  I1 ðsÞ  T1 ðsÞÞ ¼ _r2Q1 I1 ðrÞ  T1 ðrÞ ¼ L
e; p ¼ p0 ðM1 ÞðÞ. Obviously, LðuÞðÞ ¼ Lðu1 ÞðÞ, so LðM2 ÞðsÞ ¼
I2 ðpÞ ¼ ; ð10Þ
0; otherwise Lðu1 ÞðsÞ for any s 2 R . h
W
Fðp; r; nÞ  T1 ðrÞ; p 2 Q1 Conversely, we can also prove the reverse of the theo-
T2 ðpÞ ¼ Wr2Q1 ;n  N
r;s2Q1 ;n  N I1 ðrÞ  Fðr; s; nÞ  T1 ðsÞ; p ¼ p0 rem above. The mechanism is a straightforward extension
ð11Þ of Theorem 3.4 of Hopcroft et al. (2001).

123
Automata theory based on lattice-ordered semirings 277

P W
Theorem 6.5 Suppose that K is complete lattice. Then Further, Lð i;j Iðpi Þ  Rni;j  Tðpj ÞÞðÞ ¼ i;j Iðpi Þ  LðR0i;j Þ
W
any K regular language is the language of some K regular ðÞ  Tðpj Þ ¼ i Iðpi Þ  Tðpi Þ ¼ LðMÞðÞ.
expression. P
In a similar way, we know Lð i;j Iðpi Þ  Rni;j  Tðpj ÞÞðrÞ ¼
W 0
W
Proof For a K regular language f, denote its KNFA to be i;j Iðpi Þ  LðRi;j ÞðrÞ  Tðpj Þ ¼ i;j Iðpi Þ
M ¼ ðQ; R ; I; T; EÞ where Q ¼ fp1 ; . . .; pn g. Now we Eðpi ; r; pj Þ  Tðpi Þ ¼ LðMÞðrÞ.
define K regular expression Rki;j ðk ¼ 0; . . .; n; i; j ¼ (2). If jsj ¼ l  2, denote s ¼ r1    rl . We show that
1; . . .; nÞ over R as follows: _
LðRni;j ÞðsÞ ¼ Eðpi ; r1 ; q1 Þ    
• when k = 0, define R0i;j ¼ q1 ;...;ql1 2Q
 P
þ  Eðql1 ; rl ; pj Þ
P r Eðpi ; r; pj Þ  r; if i ¼ j
r Eðpi ; r; pj Þ  r; otherwise
When h = 1,
• when 1  k  n, define Rki;j ¼ Rk1 k1 k1
i;j þ Ri;k  Rk;j þ
k1 k1 þ k1 LðRhi;j ÞðsÞ ¼ LðR0i;j ÞðsÞ _ LðR0i;1  R01;j ÞðsÞ _ LðR0i;1
½Ri;k  ðRk;k Þ  Rk;j
 ðR11;1 Þþ  R01;j ÞðsÞ
By this definition, we have ¼ LðR0i;1  R01;j ÞðsÞ _ LðR0i;1  ðR01;1 Þþ  R01;j ÞðsÞ
8
> 0; if s ¼ ; i 6¼ j (
>
< LðR0i;1 Þðr1 Þ  LðR01;j Þðr2 Þ; if l ¼ 2
0 e; if s ¼ ; i ¼ j ¼
LðRi;j ÞðsÞ ¼ 0 0 þ 0
LðRi;1 Þðr1 Þ  LððR1;1 Þ Þðr2    rl1 Þ  LðR1;j Þðrl Þ; if l  3
> Eðpi ; s; pj Þ; if s 2 R
>
: ¼ LðR0i;1 Þðr1 Þ  LðR01;1 Þðr2 Þ      LðR01;1 Þðrl1 Þ  LðR01;j Þðrl Þ
0; if jsj  2
¼ Eðpi ; rl ; p1 Þ  Eðp1 ; r2 ; p1 Þ      Eðp1 ; rl1 ; p1 Þ  Eðp1 ; rl ; pj Þ
Now we prove LðMÞðsÞ ¼ ðRi;j Iðpi Þ  Rni;j  Tðpj ÞÞðsÞ: _
¼ Eðpi ; r1 ; q1 Þ      Eðql1 ; rl ; pj Þ
(1). If jsj ¼ l  1, first we prove LðRni;j ÞðsÞ ¼ LðR0i;j ÞðsÞ by q1 ;...;ql1 2fp1 g

induction. Obviously LðRhi;j ÞðsÞ ¼ LðR0i;j ÞðsÞ if h = 0.


Now there is LðRhi;j ÞðsÞ ¼ LðR0i;j ÞðsÞ for h\n by The hypothesis holds for h \ n, in the case of h = n we
hypothesis. When h = n, have
LðRhi;j ÞðÞ ¼ LðRn1 n1 n1
i;j ÞðÞ _ LðRi;n  Rn;j ÞðÞ
LðRhi;j ÞðsÞ ¼ LðRn1 n1 n1
i;j ÞðsÞ _ LðRi;n  Rn;j ÞðsÞ
n1 þ
_ LðRn1 n1 þ n1
i;n  ðRn;n Þ  Rn;j ÞðÞ
_ LðRn1 n1
i;n  ðRn;n Þ  Rn;j ÞðsÞ

¼ LðR0i;j ÞðÞ _ LðR0i;n  R0n;j ÞðÞ ¼ LðRn1 n1 n1


i;j ÞðsÞ _ LðRi;n  Rn;j ÞðsÞ
n1 2
_ LðR0i;n  ðR0n;n Þþ  R0n;j ÞðÞ _ LðRn1 n1
i;n  ðRn;n þ ðRn;n Þ þ   
8 l2
< 0 _ 0 _ 0; if i 6¼ j
> þ ðRn1
n;n Þ Þ  Rn1
n;j ÞðsÞ
¼ e _ 0 _ 0; if i ¼ j 6¼ n ¼ LðRn1 n1 n1
i;j ÞðsÞ _ LðRi;n  Rn;j ÞðsÞ
>
:
e _ e _ e; if i ¼ j ¼ n _ LðRn1 n1 n1
i;n  Rn;n  Rn;j ÞðsÞ _   
¼ LðR0i;j ÞðÞ n1 l2
_ LðRn1
i;n  ðRn;n Þ  Rn1
n;j ÞðsÞ
For any r 2 R, we get

LðRhi;j ÞðrÞ ¼ LðRn1 n1 n1


i;j ÞðrÞ _ LðRi;n  Rn;j ÞðrÞ
n1 þ
_ LðRn1 n1
i;n  ðRn;n Þ  Rn;j ÞðrÞ

¼ LðR0i;j ÞðrÞ _ LðR0i;n  R0n;j ÞðrÞ


_ LðR0i;n  ðR0n;n Þþ  R0n;j ÞðrÞ
8
>
> Eðpi ; r; pj Þ _ 0 _ 0; if i 6¼ j; i 6¼ n; j 6¼ n
>
>
>
< Eðpi ; r; pj Þ _ Eðpi ; r; pj Þ _ Eðpi ; r; pj Þ;
> if i ¼6 j; i ¼ n; j 6¼ n
¼ Eðpi ; r; pj Þ _ Eðpi ; r; pj Þ _ Eðpi ; r; pj Þ; if i 6¼ j; i 6¼ n; j ¼ n
>
>
>
> Eðpi ; r; pj Þ _ 0 _ 0; if i ¼ j; i 6¼ n; j 6¼ n
>
>
:
Eðpi ; r; pj Þ _ Eðpi ; r; pj Þ _ Eðpi ; r; pj Þ; if i ¼ j ¼ n
¼ Eðpi ; r; pj Þ ¼ LðR0i;j ÞðrÞ

123
278 X. Lu et al.

¼ _fEðpi ; r1 ; q1 Þ      Eðql1 ; rl ; pj Þ such that G0 ¼ ðV 0 ; R; S; P0 Þ and all generators in P0 are in


jq1 ; . . .; ql1 2 Q; no qi is pn g the form of ‘‘A ! r ’’ or ‘‘A ! rB ’’ where
A; B 2 V 0 ; r 2 R.
_ fEðpi ; r1 ; q1 Þ      Eðql1 ; rl ; pj Þ
jq1 ; . . .; ql1 2 Q; one qi is pn g    Proposition 7.3 If GK ¼ ðG; lÞ is a K regular grammar
and G ¼ ðV; R; S; PÞ, then there is an equivalent K regular
_ fEðpi ; r1 ; q1 Þ      Eðql1 ; rl ; pj Þ
grammar G0K ¼ ðG0 ; l0 Þ and G0 ¼ ðV 0 ; R; S0 ; P0 Þ, where S0
jq1 ; . . .; ql1 2 Q; every qi is pn g never appears on the right side of any generator of P0 .
_
¼ Eðpi ; r1 ; q1 Þ      Eðql1 ; rl ; pj Þ
q1 ;...;ql1 2Q
As we know, the languages of regular grammars are
regular languages in classical automata theory. It is easy to
transform a right linear grammar to a DFA and vice versa.
P
Therefore, we have proved Lð i;j Iðpi Þ  Rni;j  Tðpj ÞÞðsÞ ¼ Now we extend this mechanism in the framework of lat-
W
q0 ;...;ql2Q Iðq0 Þ tice-ordered non-commutative semirings and obtain the
Eðq0 ; r1 ; q1 Þ      Eðql1 ; rl ; ql Þ  Tðql Þ ¼ LðMÞðsÞ. same results.
P
Hence f ¼ Lð i;j Iðpi Þ  Rni;j  Tðpj ÞÞ. h
Theorem 7.4 The K languages of K regular grammars
In fact, a generalization of the results of Theorem 6.4 are K regular languages.
and 6.5 is known as Kleene-Schuetzenberger Theorem
Proof Suppose GK ¼ ðG; lÞ with G ¼ ðV; R; S; PÞ is a K
(Theorem VII.5.1 of Eilenberg 1974). Similarly, the Kle-
regular grammar. Without lose of generality, we could
ene Theorem of automata based on lattice-ordered monoid
assume generators in P are in the form of
also holds (Li and Pedrycz 2005).
‘‘A ! r; A ! rB ’’ by Proposition 7.2, and assume S does
not appear on the right side of any generator in P by
Proposition 7.3. Construct a KNFAM ¼ ðQ; R; I; T; EÞ as
7 K regular grammars follows:
(i) Q ¼ V [ fZg and Z 62 V,
In this section, we show that the K regular languages are 
exactly the K languages generated by K regular grammars. e; if X ¼ S
(ii) IðXÞ ¼
There are similar results when based on lattice-ordered 0; otherwise

monoid (Sheng and Li 2006). e; if X ¼ Z
(iii) TðXÞ ¼ if S !  62 P; TðXÞ ¼
A K grammar GK consists of G and l, where G ¼ 0; otherwise
8
ðV; R; S; PÞ is a classical grammar and l is a mapping from < lðS ! Þ; if X ¼ S
P to K. Denote the language of G to be L(G). As we know, e; if X ¼ Z if S !  2 P;
:
every s 2 LðGÞ could be generated by at least one ordered 0; otherwise
sequence ðP1 ; . . .; Pk Þ starting from S where Pi 2 P. Denote (iv) EðA; a; BÞ ¼ lðA ! aBÞ if A ! aB 2 P; EðA; a; ZÞ
the set of all such sequences generating s to be P(s). The K ¼ lðA ! aÞ if A ! a 2 P; EðX; r; YÞ ¼ 0 for all
language of GK is defined by: other ðX; r; YÞ 2 Q
R
Q.
LðGK ÞðsÞ For s ¼ r1    rn 2 Rþ , we get
W _
ðP1 ;...;Pk Þ2PðsÞ lðP1 Þ      lðPk Þ; if s 2 LðGÞ
¼ LðMÞðsÞ ¼ IðQ0 Þ  EðQ0 ; r1 ; Q1 Þ     
0; otherwise Q0 ;...;Qn 2Q
ð12Þ EðQn1 ; rn ; Qn Þ  TðQn Þ
_
We say two K grammars are equivalent if they share the ¼ EðS; r1 ; Q1 Þ      EðQn1 ; rn ; ZÞ
same language. Q1 ;...;Qn1 2Q
_
¼ lðS ! r1 Q1 Þ      lðQn1 ! rn Þ
Definition 7.1 [K Regular Grammars] GK is a K regular
Q1 ;...;Qn1 2Q
grammar if G is a classical right linear grammar. _
¼ lðP1 Þ  lðP2 Þ      lðPn Þ
Here, two conclusions in the classical automata theory ðP1 ;...;Pn Þ2PðsÞ
also exist in K regular grammar. Their proofs are ¼ LðGK ÞðsÞ
straightforward.
Proposition 7.2 GK ¼ ðG; lÞ is a K regular grammar As to s ¼ , if  2 LðGÞ W
then LðGK ÞðÞ ¼ lðS ! Þ by
with a classical right linear grammar G ¼ ðV; R; S; PÞ. definition and LðMÞðÞ ¼ Q0 2Q IðQ0 Þ  TðQ0 Þ ¼ IðSÞ
There is an equivalent K regular grammar G0K ¼ ðG0 ; l0 Þ TðSÞ ¼ lðS ! Þ; if  62 LðGÞ then LðGK ÞðÞ ¼ 0 by

123
Automata theory based on lattice-ordered semirings 279

W
definition and LðMÞðÞ ¼ Q0 2Q IðQ0 Þ  TðQ0 Þ ¼ 0. 8 Conclusions
Therefore, there is always LðMÞðsÞ ¼ LðGK ÞðsÞ. h
In this paper, we mainly introduced finite state automata,
The reverse of above theorem also holds:
regular languages, regular grammars and regular expres-
Theorem 7.5 Any K regular language is the K language sions based on lattice-ordered non-commutative semirings.
of some K regular grammar. We proved that the Pump Lemma holds under some finite
condition, K regular languages are closed under the con-
Proof Suppose M ¼ ðQ; R ; I; T; EÞ is an arbitrary
catenation operation, and KNFA, K regular expressions
KNFA. We construct a K regular grammar GK ¼ ðG; lÞ as
and K regular grammars are equivalent when K is a
follows: G ¼ ðQ [ fSg; R; S; PÞ where S 62 Q
W complete lattice.
(i) S ! rQ1 2 P and lðS ! rQ1 Þ ¼ Q0 2Q IðP0 Þ  However, there are some interesting problems left to
EðQ0 ; r; Q1 Þ for 8Q1 2 Q; 8r 2 R; be solved in the future. As stated above, KNFA could be
(ii) Q0 ! rQ1 2 P and lðQ0 ! rQ1 Þ ¼ EðQ0 ; r; Q1 Þ for simulated by KDFA when K is a finite lattice-ordered
8Q0 ; Q1 2 Q; 8r 2 R; semiring, and KNFA is equivalent to KNFA. Naturally,
W
(iii) Q0 ! r 2 P and lðQ0 ! rÞ ¼ Q1 2Q EðQ0 ; r; Q1 Þ we want to find out the necessary and sufficient condi-
TðQ1 Þ for 8Q0 2 Q; 8r 2 R; tion in which KNFA and KDFA are equivalent. Among
(iv) S !  2 P and lðS ! Þ ¼ LðMÞðÞ. the operations of languages, K regular languages are not
universally closed under intersection and reversal. It
Then for any s ¼ r1    rn 2 Rþ , we get
_ leads to that ðRegðKÞ; _; 0; ; 1Þ is just a non-commuta-
LðGK ÞðsÞ ¼ lðP0 Þ      lðPn Þ tive semiring rather than a lattice-ordered non-commu-
ðP0 ;...;Pn Þ2PðsÞ tative semiring. Next we are concerned with how far is
_
¼ lðS ! r1 Q1 Þ  lðQ1 ! r2 Q2 Þ the structure ðRegðKÞ; _; 0; ; 1Þ away from a lattice-
Q1 ;...;Qn1 2Q ordered semiring. Another further important problem is
     lðQn2 ! rn1 Qn1 Þ  lðQn1 ! rn Þ to investigate the properties of pushdown automata
! and Turing machines based on K, and to compare them
_ _
¼ IðQ0 Þ  EðQ0 ; r1 ; Q1 Þ with the classical theory and the theory in the current
Q1 ;...;Qn1 2Q Q0 2Q paper.
 EðQ1 ; r2 ; Q2 Þ      EðQn2 ; rn1 ; Qn1 Þ
! Acknowledgments This work was supported by NSFC Major
_ Research Program 60496324; NSFC No. 6002530760234010,
 EðQn1 ; rn ; Qn Þ  TðQn Þ 60603002; Pre-973 Project 2001CCA03000; 863 High-Tech Project
Qn 2Q 2001AA113130; 973 Project 2001CB312004; CAS Brain and Mind
_ Science Project; China Postdoctoral Science Foundation.
¼ IðQ0 Þ  EðQ0 ; r1 ; Q1 Þ     
Q0 ;...;Qn 2Q

EðQn1 ; rn ; Qn Þ  TðQn Þ References


¼ LðMÞðsÞ
Baudot R (2000) Non-commutative programming language NoClog.
In: Symposium LICS, Santa Barbara (Short Presentations), pp 3–
Because S !  is the only one in P generating , there is 9
LðGK ÞðÞ ¼ lðS ! Þ ¼ LðMÞðÞ by Eq. 12. Therefore, we Di Nola A, Gerla B (2004) Algebras of Lstrok; ukasiewicz Logic and
have LðGK Þ ¼ LðMÞ. h their semiring reducts. In: Litvinov GL, Maslov VP (eds)
Proceedings of the conference on idempotent mathematics and
From the above two theorems, we find that K regular mathematial physics
languages and K regular grammars are equivalent. From Droste M, Gastin P (2005) Weighted automata and weighted logics.
In: Proceedings of 32nd international colloquium on automata,
Theorem 6.4 and Theorem 6.5, we conclude that K regular languages and programming (ICALP’05), LNCS, Springer,
languages and K regular expressions are equivalent when Lisboa
K is a complete lattice. Therefore, we have the following Dvurečenskij (2002) Pseudo-MV algebras are intervals in l-groups.
conclusion: J Austral Math Soc 72:427–445
Dvurečenskij, Pulmannová (2000) New trends in quantum structures.
Corollary 7.6 K regular languages, K regular expres- Kluwer, Dordrecht
sions and K regular grammars are equivalent when K is a Eilenberg S (1974) Automata, languages, and machines. Academic,
New York
complete lattice. Georgescu G, Iorgulescu A (2001) Pseudo-MV algebras. Multi-
Valued Logic 6:95–135
From the above proofs, we see that the results about K
Gerla B (2003) Many-valued Logic and semirings. Neural Netw
regular grammars follow directly the classical proof. Worlds 5:467–480

123
280 X. Lu et al.

Gerla B (2004) Automata over MV algebra. In: Proceedings of 34th Li YM, Pedrycz W (2006) The equivalence between fuzzy Mealy and
international symposium on multiple-valued logic, pp 49–54 Moore machines. Soft Comput 10:953–959
Hajek P (2003) Observations on non-commutative fuzzy logic. Soft Ying M (2005) A theory of computation based on quantum logic (I).
Comput 8:38–43 Theor Comput Sci 344(2):134–207
Ignjatović J, Ćirić M, Bogdanović S (2008) Determinization of fuzzy Rachunek J (2002) A non-commutative generalized of MV-algebras.
automata with membership values in complete residuated Czechoslovak Math J 52:255–273
lattices. Inf Sci 178:164–180 Simon I (1988) Recognizable sets with multiplicities in the tropical
Hopcroft JE, Motwani R, Ullman JD (2001) Introduction to automata semiring. Lect Notes Comput Sci 324:107–120
theory, languages, and computation, 2nd edn. Addison Wesley, Shang Y, Lu R (2007) Semirings and pseudo MV algebras. Soft
Krob D (1998) Some automata-theoretic aspects of min-max-plus Comput 11:847–853
semirings. In: Gunawardena J (eds) Idempotency. Cambridge Sheng L, Li YM (2006) Regular grammars with values in lattice-
University Press, Cambridge, pp 70–79 ordered monoid and their languages. Soft Comput 10:79–86
Li ZH, Li P, Li YM (2006) The relationships among several types of
fuzzy automata. Inf Sci 176:2208–2226
Li YM, Pedrycz W (2005) Fuzzy finite automata and fuzzy regular
expressions with membership values in lattice-ordered monoids.
Fuzzy Sets Syst 156:68–92

123

View publication stats

You might also like