some decidability results about regular and pushdown translations

4
Volume 8, number 1 INFORMATION PROCESSING LETTERS January 1979 SOME DECIDABILITY RESULTS ABOUT REGULAR AND PUSHDOWN TRANSLATIONS * K. CULIK II Department of Computer Science, University of Wu terloo, Ontario, Canada Received 21 March 1978, revised version received 30 June 1978 Regular and pushdown translations, decidability, functional translations, homomorphism equivalence 0. Introduction We will show a number of problems about finite transducers and pushdown transducers to be decid- able. Our main tool is a result established in [3], namely that for a given context-free language and two homomorphisms hr, hz, it is decidable whether hl and h2 are string by string equal on L, i.e. whether hi(w) = hz(w) for all w E L (homomorphism equiva- lence). We show some generalizations of this result but mainly we are concerned with decision problems about translations. The equivalence problem for (arbitrary) finite transducers, even for nondeterministic generalized sequential machines, is known to be undecidable; the same problem for deterministic GSMs is known to be decidable. We show that it is decidable whether a given (arbitrary) finite transducer defines a func- tional translation and that the equivalence problem for such transducers is decidable. This remains so even when we restric; the comparison to the inputs from a given context-free language. We show that the equivalence between an unambiguous pushdown transducer and a functional finite transducer is de- * This research was supported by the National Research Council of Canada Grant No. A7403. cidable. Another of the problems shown to be de- cidable is the identity problem for (arbitraiy) finite transducers, i.e. the problem of deciding whether a given regular translation is an identity on its domain. 1. Preliminaries We assume that the reader is familiar with the fundamental theory of formal languages, specifically with the notions of finite and pushdown transducers as defined in [l] . We will use the notation of [ l] unless stated otherwise. The translation defined by transducer M is denoted by tM. The translations de- fmed by finite and pushdown transducers are called regular (rational) and pushdown translations, respec- tively. The families of these translations are denoted by RT and PDT, respectively. For translations tl _C ZZ* X r* and t2 C I’* X A*, the composition of tl and t2 is denoted by tl 0 t2 and defined as t1 0 t2 = {(x, 2) : (x, y) E tl and (y, z) E t2 for some +I?“). A translation t C AT X A$ is said to be homo- morphically characterized by a language L if there are two homomorphisms hi : C* + AT, i = 1,2, so

Upload: k-culik-ii

Post on 28-Aug-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Some decidability results about regular and pushdown translations

Volume 8, number 1 INFORMATION PROCESSING LETTERS January 1979

SOME DECIDABILITY RESULTS ABOUT REGULAR AND PUSHDOWN TRANSLATIONS *

K. CULIK II Department of Computer Science, University of Wu terloo, Ontario, Canada

Received 21 March 1978, revised version received 30 June 1978

Regular and pushdown translations, decidability, functional translations, homomorphism equivalence

0. Introduction

We will show a number of problems about finite transducers and pushdown transducers to be decid- able. Our main tool is a result established in [3], namely that for a given context-free language and two homomorphisms hr, hz, it is decidable whether hl and h2 are string by string equal on L, i.e. whether hi(w) = hz(w) for all w E L (homomorphism equiva- lence). We show some generalizations of this result but mainly we are concerned with decision problems about translations.

The equivalence problem for (arbitrary) finite transducers, even for nondeterministic generalized sequential machines, is known to be undecidable; the same problem for deterministic GSMs is known to be decidable. We show that it is decidable whether a given (arbitrary) finite transducer defines a func- tional translation and that the equivalence problem for such transducers is decidable. This remains so even when we restric; the comparison to the inputs from a given context-free language. We show that the equivalence between an unambiguous pushdown transducer and a functional finite transducer is de-

* This research was supported by the National Research Council of Canada Grant No. A7403.

cidable. Another of the problems shown to be de- cidable is the identity problem for (arbitraiy) finite transducers, i.e. the problem of deciding whether a given regular translation is an identity on its domain.

1. Preliminaries

We assume that the reader is familiar with the fundamental theory of formal languages, specifically with the notions of finite and pushdown transducers as defined in [l] . We will use the notation of [ l] unless stated otherwise. The translation defined by transducer M is denoted by tM. The translations de- fmed by finite and pushdown transducers are called regular (rational) and pushdown translations, respec- tively. The families of these translations are denoted by RT and PDT, respectively. For translations tl _C ZZ* X r* and t2 C I’* X A*, the composition of tl and t2 is denoted by tl 0 t2 and defined as

t1 0 t2 = {(x, 2) : (x, y) E tl and (y, z) E t2 for some

+I?“).

A translation t C AT X A$ is said to be homo- morphically characterized by a language L if there are two homomorphisms hi : C* + AT, i = 1,2, so

Page 2: Some decidability results about regular and pushdown translations

VC lunw 8. Number 1 INFORMATION PROCESSING LETTERS January 1979

that t = i (h ,(w), h2(w)) : w E L). The family of translationshomomorphically characterized by lan-

s from the family 2 is denoted by H(P). The families of regular and context-free languages are denoted by REG and CFL, respectively. The follow- mg two results are well,known, c.f. [ 13.

sorem I. RT = H(REG).

Theorem 2. PDT = H(CFL).

finitiool. A translationfC C’ X A* is said to be functicmal it (x, ~9) E f and (x, z) E f implies y = z. Then we writev = f(x).

In 13 J the notions of equivalence and ultimate Theorem 4. Let A? be a family of languages. The equivalence of homomorphisms and GSM mappings (ultimate) identity problem for the family of trans- on a language were introduced. We will consider arbi- lations H(2) is decidable iff the problem of homo- trary functional translations. morphism (ultimate) equivalence for 2 is decidable.

finition. Let L be ZI language over alphabet Z and jr. fz he functional translations from Z* to A*. We say that

( i! _! ! and G are equivalent on L iff f,(w) = f*(w) for all w in E. .

(ii)jl and fi are ultimately equivalent on L if there IS f)nly a finite number of w in L such that t 1 cw I# f*(w).

For a family of effectively specified languages J? and a family of effectively specified functional trans- lations 9we have two decision problems. We speak about the problem of 9 (ultimate) equivalence for p. An instance of such a problem is given by two translations fi, fi in 9 and a language L in 2, and asks the question: are f’r and fi (ultimately) equiva- lent on L?

2. Results

The problem of h\jmomorphism equivalence for regular languages was shown to be decidable in [2], and in [3j the following stronger result was obtained:

Theorem 3. The problem of homomorphism (ulti- mate) equivaknce for CFL is decidable.

We will show that the problem of homomorphism (ultimate) equivalence for 2 is equivalent to the iden- tity problem for the family of translations I!?(.@).

Definition. We say that a translation t C, Z’ X C* is a restriction of the identity translation iff there is a language L C_ X* so that t = ((w, w) : w E L ).

For a family of effectively specified translations we have a decision problem, namely whether a given translation is a restriction of the identity. We speak about the ultimate identity problem if we check whether a given translation is a restriction of the identity up to a finite number of expectations.

Proof. Given t in H(e) we can find L in 2 and homo- morphisms hl, hz so that t = ((h,(w), hz(w) : w EL). Translation t is (ultimately) a restriction of the iden- tity iff hl and hz are (ultimately) equivalent on L.

Corollary 1. The (ultimate) identity problem for families R T and PDT is decidable.

Proof. By Theorems 1,2 and 4.

We wiIl consider decision problems about func- tional regular translations. First, we show that the property of functionality for finite transducers is decidable.

Theorem 5. Given a finite transducer M and CFG G it is decidable whether tM is functional on L(G).

hoof. ht tG = ((W, W) : W EL(G)), tG fs PDT. con-

sider translation t = t$ o tG 0 tM. Since PDT is effec- tively closed under composition with RT (see [l]), we have i.E PDT. Clearly, 11 is a restriction of the identity iff tM is functional\ on L(G), so we can check the functionality of tM by Corollary 1.

Note that from the undecidability of the empti- ness of intersection of two context-free languages (see [4]) it follows that the functionality for PDT (even on I: *) Is undecidabl(e.

6

Page 3: Some decidability results about regular and pushdown translations

Volume 8, Number 1 INFORMATION PROCESSING LZ’TERS January 1973

Corollary 2. Give)1 a ,finite transducer M and CFG G it is decidable whether tM is one-to-one on L(G).

Theorem 7. Given an unambiguous pusJ~down trans- ducer P and a fbnctional finite transducer .Al ir is decidable whether tp = tM.

Proof. By Theorem 5 and the well known facts that range oft is in CFL and PDT is closed under inversion.

Lemma 1. Assume that E is a family of languages with the foOowing properties:

(i) .@ is effectivel’y closed under functional regular translations,

(ii) the emptiness problem for 2 is decidable, (iii) the problem of homomorphism (ultimate)

equivalence for A? is decidable. l?jen the problem of finctional regular translations (ultimate) equivalence for 2 is decidable.

bOf. We first check whether dom tp = dom tM. This is decidable by [S, Theorem IV 5.5 ] since dom tp is an unambiguous CFL and dom tM a regular set (both effectively given). If the domains match we continue a~ follows. We consider the translation t = t; _ 0 BP. Since the inverse of a regular translation is aga .- A.. RT [l] , and since the family PDT is closed unclcr composition (from either side) with regular transla- tion, we have t E PDT (effectively). Clearly, t&v) = tp(w> for each w in the common domain iff t is a restriction of identity. Hence, tk.e proof is completed by Corollary 1.

Proof. In the proof of Theorem 3.4 in [3] only the functionality of deterministic GSM mappings was used. Hence, the same proof works for our lemma. The modification for ultimate equivalence is obvious.

Note that we can modify the proof of Theorem 7 to show that the “ultimate equivalence problem” (agreement up to a finite number of exceptions) be- tween an unambiguous pushdown transducer and a functional finite transducer is decidable.

Theorem 6. The problem of finctional regular trans- Now, we generalize the notion of the (ultimate) lations (ultimate) equivalence for CFL is decidable. equivalence of functional translations on a language.

Proof. By Theorem 3 and Lemma 1.

Corollary 3. The equivalence problem for functional regular translations is decidable.

Definition. A pushdown transducer is said to be un- ambiguous if for each input string there is at most one computation. A pushdown translation is unam- biguous if it is defined by a unambiguous pushdown transducer.

Definition. We say that tw’b functional translations

h : C* + r‘* and t2 : A* + r’ are equivalent module the relation (translation) R C z1* X A*, written tl z t2 mod R, iff t&) = tz(y), for all (x, y) E R. For two families of translations 71 and 92 we have the problem of ‘?I (ultimate) equivalence for 72.

Note, that tl and t2 are equivalent on L iff ti 5 t2 mod ((MI, ~1) : w E L).

Note, that a pushdown transducer is unambiguous iff its underlying pushdown automaton (obtained by ignoring outputs) is unambiguous [4] and t is seman- tically unambiguous in the terminology of [ 11. Func- tionality for pushdown transducers is not an effective property since unambiguity for pushdown automate (context-free grammars) is undecidable [4]. However, each deterministic pushdown transducer is unambigu- ous, so our results also hold for this effective subclass of PDT. Note that determini& PDT are properly included in unambig;ous PDT which in turn are properly included in functional PDT.

Lemma 2. Let 9 be a family of jknctional translaticxs effectively closed under composition ifvom the left) with homomorp?hisms, and 2 be a family of languages. The problem oj’ 7 (ultimate) equivalence for H(E) is decidable iff the problem of ? (ultimate) equiv- alence for f? is decidable.

Proof. (1) Consider tl, t2 in 9 and L E 2. Clearly, tl and

t2 are (ultimately) equivalent on L iff tl z t2 mod ((w, w) : w E L’}.

(2) Consider E 1, t2 in 9 and R E H(p). by the defini- :io~ of H(P), there is L E .!Z’ and homomorphisms

7

Page 4: Some decidability results about regular and pushdown translations

Volume 8, Number 1 INFORMATION PROCESSING LETTERS January 1979

hl, hz so that R = (@l(w), h*(w)) : wEL). Let t; = hi 0 tl for i = 1,2. By our assumptions t; and t; are in 9 (effectively). Clearly, tl z t2 mod R iff t; and r; are equivalent on L.

Theorem 8.17re problem of functional regular trans- lations @ultimate) equivrllence for PDT is decidable.

Proof. By Lemma 2 and Theorem 6.

Since homomorphism is a special case of a func- tional regular translation we have:

References

[l] A.V. Aho and J.D. Ullman, The Theory of Parsing, Translation, and Compiling, Vol. I: Parsing (Prentice- Hall, 1972).

[ 21 K. Culik II and I. Fris, The decidability of the equiva- lence problem for DOL-systems, Information and Con- trol 35 (1977) 20-39.

[ 31 K. Culik and A. Salomaa, On the decidability of homo- morphism equivalence for languages, J. Comput. System Sci., to appear.

(41 J.E. Hopcroft and J.D. Ullman, Fxmal Languages and Their Relations to Automata <Addison-Wesley, 1969).

[S] 4. Salomaa and M. Soit+&, Automata-Theoretic Aspects of Formal Power Series (Springer-Verlag, 1978).

Corollary 4. The problem of homomorphism (ulti- mate) equivalence for PDT is decidable.

8