COL1NG 82, ,I. Horeclcj, (ed./ 
North-Holland Pab~hing Company 
Composition of Translation Schemes with D-Trees 
Nartin Pl~tek 
Charles University, ~aculty of Mathematics and Physics 
Mal~ransk6 m~m.25 
118 UO Prague 
Czechoslovakia 
Generative systems (GS) are defined in this paper as a 
composition of simple translation schemes with depen - 
dency trees. The following issues are discussed: 
(a) explicative power of GS, (b) the time complexity 
for the analysis and synthesis for GS. 
INTRODUCTION 
A generative system for Czech was presented in Sgall \[~ . 
The concept of a generative system was studied by Pl~tek \[4\] and 
Pl~tek and Sgall \[~ . In this paper we use a similar approach as 
that presented by Haji~ov~, Pl~tek and Sgall in ~3~ • 
We define generative systems as a fundamental device for construc- 
tion of grammars of natural languages. We give here some mathema - 
tical results to illustrate the usefulness of the new concept. 
We try first to formulate the necessary requirements on a grammar 
G of a natural language L. The grammar G must determine: 
a) The set of all correct sentences of the language L. 
The set will be denoted by LC. 
b. ~he set of the correct structural descriptions (SD) of the 
anguage L. SD represents all meanings of all sentences of LC. 
c) The relation SH between LC and SD. The relation SH describes 
the ambiguity and the s~11ony~ of L. 
By a structural description we understand a dependency tree (D-tree). 
The concept of a simple translation scheme from \[I\] is a generalisa - 
tion of context-tree grammar. We introduce here a similar concept 
of a translation scheme, in this case as a generalisation of 
dependency grammar (see \[2\] , \[5~}. 
A generative system (GS) is defined as a sequence of translation 
schemes with a special as~etric property. 
We show that the explicative power of GS increases with the length 
of GS. We present results concerning on algorithm for the analysis 
and synthesis of GS and show that its time complexity is independent 
on the length of GS. 
Moreover for a given GS we can construct a similar GS, for which a 
fast algorithm for synthesis exists. 
Definitions. 
Notation. The vocabulary, sets of nodes, edges and rules are here 
nonemDtyand finite sets. 
313 
314 M. PLATEK 
Let R be a relation. We denote 
Oom(R) = {a, =a,bJ ~ R} an~ 
Range (R) = ~b ! \[a,b\] a R} 
By f : U-* V we denote a total mapping from U into V. 
Def. A ~ over a vocabulary V is a triple S=(U,LR,o), where 
U i~-~ set of nodes, LR a linear ordering of U, o:U--*V. Let 
o(u)=A. We say that A is the value of node u. Let S=(U,LR, o), 
Sl=(U1,LRl,ol), S2=(U2,LR2,o2) be the str'.~ and u ~ U. We say 
that $2 is ~ from S by replacin~ u by S1, when the string 
SI is place~n the predecesor and the succesor o~ nods u 
and otherwise $2 does not differ from S. We denote as V the set 
of all nonempty strings over V. 
Def. Let S1 = (U1,LRl,ol), 62 = (U2,LR2,o2) be strings. 
Let U1 = ~Ull,...,Uln~ and U2 = {u21,°..,U2n~ and ul l, .... ,ul n 
be in the ordering LR1, and u21,... ,u2 n in the ordering LR2 and 
ol(uli)= o2(u2 i) for all i between 1 and n. Then we say 
that S1 and $2 are equivalent. 
We shall not distinguish between equivalent strings. 
Def. A quintuple SR=(U,LR,B,r,o) is called a D-tree over V,when 
S(SK~(U,LR, o) is a string and o:U--eV, B(SR)=(U,B.r) is a tree 
with the root r and when the following condition holds: The nodes 
of every path in B(SR), which begins with a leaf, are nodes of a 
substrlng of S(SR). We say that S(SR) is a projection of SR. 
Def. Let SRl=(UI,LR1,Bl,rl,ol) and SR2=(U2,LR2,B2,r2,o2) be 
D-t~'~s. Let strings S(SR1) and S(SR2) be equivalent. Let f be 
a one-to-one mapping from UI on U2, which preserves the ordering 
LRI to the ordering LR2. Let f(rl)--r2 and let it hold that 
o 
\[u,v\] a B1 iff \[f(u), f(v)3 @ B2. Then we say that SR1 and SR2 
are equivalent. We shall not distinquish between equivalent D-trees. 
Def. Let D=(U, LR.B,r,o), Dl=(U1,LR1,Bl,rl,ol) and 
D2=~O~,LR2,B2,r2,o2) be D-trees and u ~ U. We say, that D2 is 
produced from D by replacin~ u by D1, when S(D2) is produced from 
S(D) by replacing u by S(D1) and the neighbours of rl in B(D2) 
are the same as neighbours of u in B(D). Otherwise D2 does not 
differ from D. 
Def. A translation scheme of type string- D-trees (TS IS,D3 ) 
is ~-~uadruple T=(VN,VT,S,P), where VN is a the vocabulary of 
nontermlnals, VT the vocabulary of terminals, VN ~ VT=~, S e VN and 
P is a set of rules of the following type: LS-~-A--~RS, where 
A ~ VN (the middle of the rule) LS (the lefthand side) is a string 
over VN u VT, RS(the righthand side) is a D-tree over VN ~ VT and 
the following condition holds: When all nodes with terminals are 
erased from S(RS) and LS, then we get two equal strings. 
Let p=LS~--A---~RS. We write \[ LSI,RSI~ p--~LLS2,RS2~ , when 
(i):the leftmost nonterm/nal node of LS1 is some u with the value 
A, (ii):the leftmost nonterminal node of RS1 is some v with the 
value A and (iii):LS2 is produced from LS1 by replacing u by LS 
and RS2 is produced from RS1 by replacing v by RS. 
~2 p--~ is denoted as ~ and~ is the transitive closure of_~. 
PEP 
We denote as TR(T)= i\[\[LS,RS\] ; /S,S\]~\[LS,RS\] , LS,S (RS)£ VT +} . 
COMPOSITION OF TRANSLATION SCHEMES WITH D-TREES 315 
Remark. Analogically as a translation scheme of the type string - ~-~ree was defined, also definitions of the type string- string 
(TS \[S,SI ) or of the type D-tree - D-tree (TS \[D,D3 ) can be given. 
By TS \[S, Sj the lefthand side and righthand side of a rule is always 
a string. By TS \[D,D\] both sides of a rule are always D-trees. 
As TS we denote the set of all translation schemes of all the three 
types. 
Def. Let TI,... ,Tn be a sequence of TS. We denote as 
TR(T~,...,Tn)=TR(TI).TR(T2)...TR(Tn). The main definition of this 
paper is the following: 
Def. A generative system (GS) is a sequence TI,... ,Tn of TS, 
whe~'~-TR(Tl,... ,Tn) is a relation between strings and D-trees and 
for every \[dl,d2~ ~ TR(Tn) there exists a. sl,so,such tha_% 
sl,d2 \]~ TR (TI,...Tn). The set AN (Tl,...,Tn;v)= ~v,dJ ~ TR(TI.. 
,..:..oITn)~ is called the anslysis of v. The set ST(TI,..o,Tn;d)- 
= \[Es,dJ ~ TR(TI,...,Tn) 3 is called the full synthesis of D-tree a. 
Remark. Let GSI=TI,...,T n be a GS. Then 
Range(TR(Tl)) D Dora (TR(T2))~...Range(TR(Tn_I))D Dom(TR(Tn)). 
We call this property of GSI an asynetric property of GS. 
Def. Let GSI be a GS. We say that the function MS is a function 
of ~ minimal synthesis of GSI, if the following conditions are 
fulfiled: 
a) ~-l C TR(GSI) 
b) Dom(MS)=Range(TR(GSI) ). 
Def. D-grammar (DG) is a T & TS \[S,D~, where T=(VN,VT,S,P) and 
forgery p £ p,p=LS~--A-~RS there holds, that LS=S(RS). 
De__ff. We denote DRo= ~ TR(T);T 6 DG\]and DRj= ~TR(TI,...sT~) I 
TI,...,Tj 6 GSS for j 6 N. Por ~ ~ N ~/ ~0} we write 
IDRj= IF6 DRj; F is a function } . 
Note. We need also one more concept. It is %he concept of an 
B'~phic generative system for another one. 
Def. Let ~I,V2 be two alphabets and h:Vl--,V2. Let 
SI=~qTI,LRI,ol), S2=(U2,LR2,o2) be two strings, where oI:UI---~VI, 
o2:U2-@ V2. We say that a tuple (f,h) is an h-morphia,, from SI to $2, 
when f:UI-->U2 is a one-to-one mapping which preserves the ordering 
on nodes and for every u ~ UI there holds that h(ol(u))=c2(f(u)). 
We say that SI is h-morphic for $2, if there exists an h-morphism 
from SI to $2. 
Def. Let DI=(UI,LRI,BI,rl,ol) and D2=(U2,LR2,B2,r2,o2) be D-trees. 
Let-T~,h) be an h-morphism S(DI) to S(D2). Let there hold that 
\[u,vl £ BI iff It(u), t(v)3 ~ B2 and t(rl)=r2. 
We say that (t,h) is a h-morphi~ from DI %o D2. 
We say that DI is h-morphic to D2, when there exists an h-morphism 
from DI for D2. 
Def. Let TI=(VNI,VTI,SI,PI) and T2=(VN2,VT2,S2,P2) be TS. 
Let~..V~ A2 VTI---~VN2 t/ VT2, where h(VNI)=VN2, h(VTI)=VT2. 
Let there exist a one-to-one mapping MP from PI on P2 such, that 
if p=LSI ~--- AI---> RSI 
and M~P(p)=LS24---A2---~ RS2, then LSI is h-morphic to LS2, RSI is 
h-morphie to RS2 and h(AI)=A2. 
We then say, that TI is h-m~rphic for T2. 
316 M. PI~TEK 
Def. Let GSI=TII,... ,T~ and GS2=T21,... ,T2 n both be GS. 
Let T11 be hl-morphic to T2 l, T12 h2-morphic to T22,... and so on 
to n! we say then, that GS1 is h-morphic for GS2, where h=(hl,... ,~). 
Examples 
Example i. 
Let us have an ex~ple of a translation scheme. 
Let T3=( {S,Sl, S2,S3~ , ~a,b,c~ S, P3) and 
P3: a SI~-- S ~-~ 
a SI ~ SI~ ~ ~ 
c $2 *-~ SI--~ 
a 
S3a (-~ S ~ 
S3a ~-- $3---~ 
$2c (--- $3 ~ 
c <-- $2--~ 
It holds that: 
-c-c-o. 
We can sea that Dom(TR(T3))= 
. a n, n,j~ ~, a n c " j,n ~N~ 
and that TR(T3) is a function. 
Example 2. 
We present in this example some interesting set of translation 
scheme s • 
G4-- ( ~S,A~ , {a,c~ , S, P4)where 
P4: caAac ~ S ~ caAac 
aAa ¢----- A--.~ aAa 
C *-- A---* C 
Then TR(G4)= ~c a ~ c a n c, c a n c a n cJ , n ~ N 
TS=(~ S,A} , {a, cl , S, PS) 
P5: cA 4---- S --TcAc 
cA ~-- A---~cAc 
aA ~--- A---~aAa 
c ~ A---~ c 
COMPOSITION OF TRANSLATION SCHEMES WITH D-TREES 317 
and 
cA+- -- S 
aA~ 
e4--- 
a 
and let 
R4 (k)='I~( G4, T~51, 
k-t~mes 
then R4(k)-- ~ \[o ~n c ~n o, (c ~n)2k~ ;n ~ ~ 
and if TR(G4,TS,o . . ,T5,T6)= I T(k) 
(k-l) times 
then ~4(k)= \[ \[a,b\] ; ~a,c\] e ~(k) and b=S(c) 
Results. 
Assertion 1. For j ~ 0 it holds that DRj ~ DRj+ I and 
1DRj ~ 1DR j+ 1 . 
Notation. I sJ denotes the length of the string s, which is the 
where U is the set of nodes of s. 
Assertion 2. Let"GS1 be a generative system, 
a--~Then there exist an algorithm that computes for every string v 
the set AN(GSI,v) ~(analysis) with the time complexity bound by 
a function K1. Ivl~o max ~card (AN (T~,...,Ti;v) j ~-I , where 
El depends only on GSI. - ~ ~-- 
b) Then there exists an algorithm that computes for every D~tree d 
the set ST(GSI,d) (full synthesis) with the time complexity 
bound by function K2. I S(d)l ~ . card (ST(GSI)), where I~2 depends 
only on GSI. 
Assertion ~. Let GS1 be a GS. Then there exists an h-morphic gene- 
rative system GS2 for GS1 and an algorithm that for every D-tree 
d com~utes ST(GS2,d) with m time complexity bound by function 
K . J S(d) J o card (ST(GSI,d)) where K depends only on GS2 and 
Dom(TR(GSI) )=Dom(Tr(GS2)) 
Assertion 4. Let GSI be a GS. Then there exists an h-morphic gene - 
r~tive sys%'em GS2 for GSI and an algorithm such that for every 
D-tree d computes MS(d) with a time complexity bound by function 
K . ~ S(d) I , where MS is the function of minimal syntesis of GS2, 
Dom(TR(GS1))=Dom(TR(GS2)) and K depends only on GS2. 
Remarks. 
Remark to Assertion I. 
We sketch here a proo'~ of Ass. i. We see that DR o ~ DR I an~ 
IDR o d IDR I. DLkovskij an~ Medina have shown in \[ 2~ , that TR (T3) 
from Example I cannot be in DRo~ We see that T3 is a TS. Thus 
DR O~DR I. Since ~R(T3) is a function , we see that IDR o ~ IDR I. 
318 M. PLATEK 
In the Example 2 we have shown that IT(k) ~ IDR~. Prom the results 
on composition of pushdown transducers (PST) in ~ "4~ and from the 
equivalence theorem between TS's and PST's from _i it follows, 
that IT(k+l) ~ DRk . Thus DRj ~ DRj+ 1 and IDRj - 1DRj+ 1. 
Remark to Assertion 2. 
The algorithm for analysis and synthesis for a GS is based on the 
idea of Cocke-You~ger-Kasami algorithm. Por a seguence of simple 
translation schemes of the type string-string the algorithm is 
presented in Suchomel E7J . The difference between the upper 
boundary of the time complexity of the full synthesis and analysis 
is given by the asymmetric property of a GS. 
Remark t 9 Assertion 3. 
The basic idea of the proof is a construction of a new GS to GSI. 
The new GS, denoted GS2, has full information in the alphabets for 
a straightforward algorithm for a full synthesis. 
Remark to Assertion 4. 
The idea of the proof is a~alogous to that of Assertion 3. When we 
have a partition of Dom(TR(GSI)) in the clases of synonymous sen- 
tences, the function of minimal synthesis chooses always only one 
representant of his class. Therefore the algorithm can be so fast. 
Conclusion remarks. 
When formulating a grammar for natural language, we can use with 
advantage the modularity of GS. We have shown that the time comple- 
xity of the analysis and synthesis for DRj, j >_ 2 is independent on 
~. Otherwise the explicative power of DR.. is increasing with j. We 
have also shown, that to any generative ~system there can be con - 
structed an h-morphic generative system with the full information 
for a fast algorithm of the minimal synthesis. 

References

Aho A.V.-UIIms~I J.D. : The Theory of Parsin~ Translation and 
Compillng, Vol. I: Parsing (Prentice-Hall, Englewood Cliffs, 1972 ) 

Dikovskij A.J.-Modina L.S. : 0 trech ty~ach odnozna~nosti kon - 
" t~kstnosvobodnych ~azykov, in Hatematiceskaja llngvistika i 
teoria algoritmov. Kalinin 1978. 

Ha~i~ov~ E.- Pl~tek M.-Sgall P. : Komunikace _s po~Ita~em Y 
~e§tin~ \[ Nm~-machine communication in CzechJ in SOPS~ (WS 
Bratislava 1980) 

Pl~tek M. : On serial and parallel compositions of, PST'S Thesis 
Faculty of mathematics and physics, Charles University, Prague 
(December 1979) 

Pl~tek M.-Sgall P. : A scale of context sensitive languages: 
Aplication to natural language, Information and Control,vo138 
N. i. (1978) 

Sgall P. : Generativn/ popis jazyka a ~esk~ deklinace (Academia 
Prague 1967) 

Suchomel K. : Generativn/ syst~my a rozpozn~v~m/ jazyk~ ~ Genera- 
tive systems and language recognitions Diploma work, Paculty af 
mathematics and physics, Charles University, Prague (April 1981) 
