A note on finitely ambiguous distance automata

A note on finitely ambiguous distance automata

Information Processing North-Holland Letters 28 December 44 (1992) 329-331 1992 A note on finitely ambiguous distance automata * Hing Leung Fachh...

248KB Sizes 0 Downloads 195 Views

Information Processing North-Holland

Letters

28 December

44 (1992) 329-331

1992

A note on finitely ambiguous distance automata * Hing Leung Fachhereich

Informatik,

J. W. Goethe-UniL;ersitci’t, Postfach

111 932, W-6000 Frankfurt

am Main 11, Germany

Communicated by L. Boasson Received 2 September 1992

Keywords:

Distance

automata;

ambiguity;

finite automata;

1. Introduction Weber [4] has shown that for any finitely ambiguous distance automaton, the distance must either be bounded or if the distance is unbounded, the growth of the distance is linear in the lengths of accepted strings. The proof is based on a careful analysis of the condition, summarized in a “nonramification” lemma [4,5] under which a distance automaton can become finitely ambiguous. In this paper, we present a short and simple proof of the result. Our method only assumes that the ambiguity is finite without going into any characterizations of distance automata that are finitely ambiguous. Note that a weaker version of the result, which addresses a special kind of distance automata with the distance being the measure of nondeterminism in a nondeterministic finite automaton (in short, NFA), has been proved using two different methods, a combinatorial method [l] and an algebraic method [2].

Correspondence to: Dr. H. Leung, Department of Computer Science, New Mexico State University, NM 88003, USA. Email: [email protected]. * This research is supported by an Alexander von Hum. boldt research fellowship. 0020-0190/92/$05.00

0 1992 - Elsevier

Science

Publishers

theory

of computation

If the distance automaton is not finitely ambiguous, it has been shown in [l] and [3] that the growth of the distance could be sublinear in the lengths of accepted strings.

2. Basic definitions A distance automaton A4 is an NFA
a, q’>w

iff q’ E 6(q, a>.

Given a certain path p in M, we define the distance of the path, denoted d,(p), to be the sum of the distances of all transitions occurring in the path. The distance of an accepted string w in M, denoted d,(w), is Min{d,(p) I Q is an accepting path for w in M). The distance of M is defined to be SupId, I w E L(m)). If the distance of M is unbounded, we define the growth of the distance in M to be the function g, : N N such that g,(k) = Max({d,(w) I w E L(M) and I w I sz k) u (0)). Let A be Max{d,(q,

B.V. All rights reserved

a, s’)

19, 9’ E Q, a ~2, 4’ EA(q, a)}. 329

Volume

44, Number

6

INFORMATION

PROCESSING

The ambiguity of an accepted string w in M, denoted amb,(w), is the number of different accepting paths for w in M. The ambiguity of M is defind to be Sup(amb,,,,(w) I w E L(M)).

3. Theorem Theorem. (Weber [4]) Let M be a finitely ambiguous distance automaton. Then either the distance is bounded or the growth of the distance in M is linear in the lengths of accepted strings. Proof. Let us assume that the distance automaton M has finite ambiguity r. We consider two cases in the proof of the theorem. Case 1: We assume that (d,(w)\ w E L(M), amb,(w) = r} is infinite. By assumption, there exists a string x E L(M) such that amb,(x) = r and d,(x) > A( I Q I r - 1). For 1 < k G r, let us denote the kth accepting path pk for X in M by (qk,“, qk,l,qk,2,...)qk,lx,) where qk,, E Q, 0 G i G l x I, and qk,a is the starting state qS. Given a prefix x’ of x, we define the configuration reached by x’ with respect to x, config(x’>, to be the r-tuple (q,,,Xf,, . . . , qr,,xrl). Let us decompose x into x1 EX*, a, ~2, XzEZ*, c*,

a,EZ:

)...,

X,_lEz*,

U,_,E-z,

X,E

such that

x =xrarx2u2..

. X,-~am-~Xm

and for 0 ] yjxj+r I, we demand config f config(yjxj+,). Since the maximum number of different configurations is ] Q ] r and due to the way that x is decomposed, we have m < I Q I r. By the following claim, the growth of the distance in M is linear. Claim 1: Let z(h)

= (~,)~a,(x~)~a~...a,_,(x,)~.

We have z(h) E L(M) 330

and d,(z(h))

> h.

LETTERS

28 December

1992

Proof: We can similarly decompose the r accepting paths of x according to the way x is decomposed. Furthermore, let us pump each individual path in the same way as how x is pumped for obtaining z(h). We observe that each individual path after being pumped remains an accepting path and in addition remains distinct from each other; the former is true because of the condition that config = config(yjxj+ ,> for 0 f j < m. Hence z(h) is an accepted string. Since by assumption the number of accepting paths cannot be bigger than r, all the possible accepting paths for z(h) have been exhausted. Let us examine an accepting path pk for x carefully. Since d,(x) > A( I Q ] r - 1) and number of a,‘s is less than I Q I r, there must exist one section of pk corresponding to a substring xi which has non-zero distance, otherwise the total distance on pk is less than or equal to A times ( Q ] r - 1 which implies that d,(x) < A( I Q I r 11, a contradiction. Thus when pumped for h times, the h contiguous sections of the “pumped” path each corresponding to the same substring xi will contribute together a distance of at least h. The same is true for every accepting path when being pumped. Therefore, d,(z(h)) 2 h. This ends the proof of Claim 1. Case 2: Let r’ be the largest natural number such that {d,(w) I w E L(M), amb,(w) = r’} is infinite and r’ < r. We want to reduce Case 2 to Case 1. We define d, to be MaxId,( w E L(M), amb,(w) > r ‘}, which is well defined by the definition of r’. Let us define a deterministic finite automaton (in short, DFA) M’ such that L(M’) = {w E L(M)\ d,(w) f d,}. M’ can be constructed by applying the subset construction to the NFA

(Q x IO, l,...,d,,j, {(a

2, a’, (q,, 01,

d)IqWOddo})>

where for 0 = d’ --d. By changing the set of final states in M’, we can construct a DFA M” such L(M”) =x* L(M’).

Volume

44. Number

6

INFORMATION

PROCESSING

Now, consider the Cartesian product M X M” of the NFA M and the DFA M” with the set of final states defined in such a way that L(MXM”)

=L(M)

nL(M”)

={wEL(M)ld,(w)>d,}. Since M” is a DFA, the ambiguity of M X M” is determined by the ambiguity behaviour of M. We can extend M x M” to be a distance automaton with the distance function being inherited from M. It is immediate to see that the following claim is correct. Claim 2: For w E L(MX M”), d,,,,,(w) = d,(w) and amb,,,.(w) = amb,(w). Claim 3: The ambiguity of M X M” is r ‘. Proof: First recall the assumption that {d,(w) 1w E L(M), amb,(w) = r’) is infinite. There must exist a string w E L(M) such that amb,(w) =r’ and d,(w)> d,. Thus, w E L(M X M”). Hence, the ambiguity of M X M” is at least r’. Let w’ E L(M X M”). Then ambMxMt,(w’) = amb,(w’) G r’ since d,(w’) = d Mx,,,,lt(~‘) > d,. This ends the proof of Claim 3. We want to check that M X M” satisfies the condition of Case 1. By Claim 2 and the language definition of M X M”, {d,WY(w)

1weL(MxM”), amb MxM,f(w) = r’}

is the same as {d,(w)IwEL(M),

amb,(w)=r’, d,(w)

>d,j,

which is infinite since by assumption d,(w) I w E L(M), amb,(w) = r’} is infinite. Thus, the growth of the distance of M X M” must be linear. By Claim 2, the growth of the distance of M is also linear. 0

LETTERS

28 December

1992

4. Conclusion Our simple method seems to have a drawback that it does not provide a good upper bound on the growth rate of the distance in the lengths of accepted strings, as being provided in the proof of Weber [4]. It is also an open problem whether the algebraic method presented in [2] can be extended to prove the theorem.

Acknowledgment I thank Andreas Weber for his valuable discussions which motivated me to look for a simple proof of the result, and for his helpful comments on improving the presentation of this paper.

References 111J. Goldstine,

H. Leung and D. Wotschke, On the relation between ambiguity and nondeterminism in finite automata, Computer Science Tech. Rept. CS-89-19, The Pennsylvania State University; also: Inform.and Comput., to appear. 121H. Leung, On some decision problems in finite automata, in: J. Rhodes, ed., Monoids and Semigroups with Applications (World Scientific, Singapore, 1991) 509-526. complexity of a finite 131 I. Simon, The nondeterministic automaton, in: M. Lothaire, ed., Mofs - Milanges Offerts ci M.P. Schiitzenberger (Hermes, Paris, 1990) 384-400. 141A. Weber, Distance automata having large finite distance or finite ambiguity, in: Proc. MFCS 1990, Lecture Notes in Computer Science 452 (Springer, Berlin, 1990) 508-515; also: Math. Systems Theory, to appear. El A. Weber and H. Seidl, On finitely generated monoids of matrices with entries in No, RAIRO Inform. Thkor. Appl. 25 (1991) 19-38.

331