Some Results on Topcontextfree

Tree Languages

 

Dieter Hofbauer Maria Hub er Gregory Kucherov

Technische Universitt Berlin Franklinstrae FR

D Berlin Germany email dietercstuberlinde



CRIN INRIALorraine rue du Jardin Botanique

VillerslsNancyFrance email huberkucherovloriafr

Abstract Topcontextfree tree languages called corgulier by Arnold

and Dauchet constitute a natural sub class of contextfree tree

languages In this pap er wegive further evidence for the imp ortance

of this class by exhibiting certain closure prop erties We systematically

treat closure under the op erations replacement and substitution as well as

under the corresp onding iteration op erations Several other wellknown

language classes are considered as well Furthermore various characteri

zations of the regular topcontextfree languages are given among others

by means of restricted regular expressions

Intro duction

This pap er is motivated by our previous work on tree languages related to term

rewriting systems It is wellknown that for a leftlinear termrewriting

Red R of ground terms reducible by R is a regular tree lan system Rtheset

guage ConverselyifRed R is regular then R can eectively b e linearized

ie a nite language can b e substituted for its nonlinear variables without

changing the of reducible ground terms However little is known

ab out conditions on which Red R is contextfree Here again nonlinear vari

ables play a crucial role

This motivation led us to study the class of topcontextfree languages which

turned out to b e of sp ecial imp ortance Topcontextfree tree languages are lan

guages generated bycontextfree tree grammars in which righthand sides of

pro duction rules contain nonterminal symb ols if at all only at the top p osi

tion This class has b een studied by Arnold and Dauchet who proved in

particular the following result

Theorem The language L ff t t j t L g is contextfreeiL is top

contextfre eiL itself is topcontextfree

The theorem remains true if contextfree and topcontextfree are re

placed by regular and nite resp ectivelyWe conjecture that this analogy

Partially supp orted by a p ostdo c grant of the MEN

Supp orted by the MESR

can also b e drawn for the language Red R mentioned ab ove It is contextfree i

a topcontextfree language can b e substituted for the nonlinear variables in R

without changing the set of reducible ground terms This pap er is devoted to the

study of some related topics that could serve as a basis for further investigations

The class of topcontextfree languages is in a sense orthogonal to that of

regular languages Though these two classes intersect there are very simple lan

guages that are topcontextfree but not regular and vice versa For example the

i i

language ff g ag a j i g is topcontextfree but not regular Conversely

Arnold and Dauchet showed that the language of all terms over a signature of

one binary and one constant symb ol is not topcontextfree In order to obtain a

criterion that a language is not topcontextfree we more generallyprovethat

every topcontextfree language is slim a simple syntactic prop erty

We further study the class of languages that are b oth topcontextfree and

regular We prop ose a numberofequivalentcharacterizations of this class in

terms of grammars linear topcontextfree nonbranching regular linear reg

ular expressions and more syntactic prop erties slim passable p olynomially

sizeb ounded

Closure prop erties play an imp ortantroleinallbranches of

theory A detailed analysis of closure prop erties for the class of regular tree lan

guages can b e found in In this pap er wecontinue this topic analyzing closure

of dierent classes under the op erations replacement substitution and their it

erations Replacement and substitution considered also in are two p ossible

extentions of the string pro duct to the tree case In contrast to replacement sub

stitution replaces equal symb ols by equal terms Wemake an exhaustivestudy

of closure prop erties under these op erations for six classes of tree languages

nite regular linear topcontextfree topcontextfree linear contextfree and

contextfree

Notations

We assume the reader to b e familiar with basic denitions in term rewriting

and formal language theory A signature is a nite set of function symb ols

of xed arity for n denotes the set of symb ols in of arity n T X

n

is the set of nite terms over and a set of variables X The set of ground

terms ie terms without variables over is denoted by T For t T X

t is the set of p ositions in t dened in the usual way as sequences of natural P os

numbers Wewrite p q if p is a prex of q The subterm of t at p osition p

is tj For p Post tj is a principal subterm of t if jpj and it is a

p p

prop er subterm of t if jpj Here jpj denotes the length of p The depth of

t is jtj maxfjpjjp Post g its size is size tjP ost jIf t is a subterm

of tthen t can b e written as ct where c is a context A context is called

context in case it contains only symb ols from

Avariable x is said to b e linear in t if there is only one p osition p Post

suchthattj x and is said to b e nonlinear in t otherwise A term is linear if

p

all its variables are linear and is nonlinear otherwise

If unambiguous we sometimes prefer vector notation to three dots nota

tion For example f t abbreviates f t t n and t will b e clear from

n i

the context and f x stands for f x x For f and L L T

n n n

let f L L ff t t j t L t L g The cardinalityofa

n n n n

nite multiset S is denoted by jS j

Contextfree languages Replacement and Substitution

G N P S consists of disjoint Denition A contextfree tree grammar

signatures N nonterminals and terminalsa niterewrite system P over

N and a distinct constant symbol S N initial symbolallrulesin P



are of the form

Ax x t

n

where A N n x x arepairwise dierent variables and t

n n

T fx x g

N n

G is said to be regular if N contains only constant symbols

G is said to be topcontextfree if al l proper subterms of righthand sides of

rules areinT fx x g

n

G is said to be linear if al l righthand sides of rules in P are linear

The language generated by a grammar G N P S is

LGft T j S tg

P

A language L T is called linear contextfree regular if there is a

linear contextfree regular grammar generating LFor A N wealso

n

use the more general notation

LG Ax x ft T X j Ax x tg

n n

P

G S Thus LG L

Fin Reg LinTopCf TopCf LinCf Cf will denote the class of nite

regular linear topcontextfree topcontextfree linear contextfree context

free languages By denition wehave the inclusions Fin Reg LinCf Cf

Fin LinTopCf TopCf Cf and LinTopCf LinCf All inclusions are

prop er and b oth LinTopCf and TopCf are incomparable with Reg

Topcontextfree languages were studied by Arnold and Dauchet under

the name of langages corguliersIn they showed that TopCf coincides with

the class of languages obtained by deterministic topdown tree transformations

on monadic regular languages It can even b e shown that it is sucient to con

sider a single monadic language eg T where and are symb ols of arity

fg

and is a constantsymb ol

Regular tree languages have b een extensively studied eg in For context

free tree languages see eg Several normal forms have b een dened for

regular and contextfree grammars In this pap er we will use the fact that for

each grammar there is a reduced grammar of the same typ e generating the same

language A grammar is said to b e reduced if all nonterminals A in N n

n are

reachable ie S cAt t for some term cAt t T

n n N

P

and

productive ie LG Ax x

n

It is wellknown that such a normal form always exists For topcontext free

grammars we will use another normal form Wecallacontextfree grammar

slow if all righthand sides of its rules contain exactly one symb ol Thus slow

topcontextfree grammars contain only rules of the form

Ax x f y y

n m

fy y z Ax x B z

m k n

where B N k f m fy y z z g fx x g

k m m k n

Whereas not all contextfree languages can b e generated byslow grammars for

an example see exercise for each linear topcontextfree language there

isaslow reduced linear topcontextfree grammar generating this language A

pro of can b e found in

The op erations creplacement and csubstitution constitute two dierentways

of replacing a constant c in all terms of a language L by terms of a language

L The csubstitution op eration substitutes all o ccurrences of c in a term of L

by the same term of L When applying the creplacement op eration all cs in

L Thus the terms of L are replaced indep endently by p ossibly dierent terms of

csubstitution corresp onds to the usual substitution if c is treated as a variable

The creplacement corresp onds to a substitution where all cs are considered as

dierent linear variables In creplacementandcsubstitution are called OI

and IOsubstitution resp ectively

Denition For languages L L and a constant symbol c the creplacement

S

of L into L is L L t L where t L is denedbyforn

c c c

tL

L if f c

f t t L

n c

f t L t L otherwise

c n c

S S

ft t gwhere t t is The csubstitution of L into L is L L

c c c

tL t L

dened by for n

t if f c

f t t t

n c

f t t t t otherwise

c n c

When c is clear from the context or arbitrarywe will not mention it Given

C and C C is said to b e closed under replacement substi classes of languages

tution by C ifL L C L L C resp ectively holds for all L C L C

c c

and all constantsymbols cWe will also write CC C CC C C is said

to b e closed under replacement substitution if it is closed under replacement

substitution by C cf Gcseg and Steinby I I I and I I

The replacement and the substitution op erations for tree languages give rise

to twotyp es of star op erations the replacement iteration and the substitution

iteration For a language L and a constant cthe creplacement iteration is de

S

c

ned by L L where

n

n

L fcg and L L L fcg

 n n c

S

c nc

The csubstitution iteration is dened by L L where

n

L fcg and L L L

 n n c

The creplacement iteration called citeration in generalizes the star op er

ation for word languages to trees Given a class C of languages C is said to b e

c c

C L C closed under replacement iteration substitution iteration if L

resp ectively holds for all L C and all constant symbols cWe will also write

C C C C

Topcontextfree Languages Are Slim

In this section we give a a criterion for showing that certain languages are not

topcontextfree It can b e seen as a generalization of a pro of metho d used by

Arnold and Dauchet in Weprove that every topcontextfree language is

slimIntuitively a term is slim if it can b e decomp osed in a topdown way

suchthatateachintermediate step only a b ounded numb er of dierent subterms

o ccur If there is such a b ound uniform for all terms in the language then the

language is said to b e slim Formally

Denition slim A decomp osition of t T is a nite sequence D D

 m

thereis of subsets of T where D ftg D andforalli i m

 m

some term f t t D n such that

n i

D D nff t t g ft t g

i i n n

t is k slim for k IN if t has a decomposition D D where jD jk for

 m i

al l i i m A language is k slimifitcontains only k slim terms it is said

to be slim if it is k slim for some k

Example All terms f a f afa a are slim The same is true

i i i

 m

more generally for all terms f g afg afg aa i IN

j

Example Dene t a t f t t The sequence ft g ft gft g

 i i i i i 

is a decomp osition of t therefore t is slim

i i

Note that every subterm of a k slim term is also k slim Note also that all

languages over a signature containing only symb ols of arity at most one are

slim Hence there are slim languages which are not topcon textfree not even

recursively enumerable

Lemma Topcontextfree languages are slim

Proof Let G N P S b e a slow topcontextfree grammar and let k be

the maximal arity of symb ols in N We will show that LG is k slim

Consider a derivation S t t t of a term t T Dene sets

 P P m

D i mby D ft g D fs j s a principal subterm of t gand

i m m m m

for im

y y gnff z z g fz z g D f

p q q i

if f z z D D

q i i

D else

i

where t l and t r for a rule

i i

l Ax x B y fz z y r

n q p

from P Ifnow in the sequence D D rep etitions of sets are eliminated we

m 

obtain a decomp osition of t Clearly jD j k thus t is k slim

i

The next somewhat technical lemma gives sucient conditions for a

term to b e not k slim Dene B P ost t from example and b fp

k k k k

B jjpj k g An injective function h B D is a homeomorphic embedding

k k

from B into a tree domain D if dierent edges in B seen as a directed

k k

graph map to disjointpathsinD Note that hB is uniquely determined by

k

hb D

k

j tj Lemma Let t T and h B Post be an embedding Suppose t

q q k

for al l p p hb and al l q q with q p q p q q Then t is not k slim

k

We conclude this section with some immediate corollaries to lemma Let us

mention however the limitations of this simple criterion The term

hha b chb c ahc a b eg is not slim but this is not provable us

ing lemma

Example The language T of all ground terms over signature is not slim

if and only if for some n and Clearly terms built up

n 

using only unary symb ols and constants are slim also the empty set is slim

Converselygiven a symbol h n and a for each k there are

n 

terms whicharenotk slim Dene terms ti j inductively by

t haa

tj ha tj

ti j hti j ti j

where is lled with as Now tk is not k slim by lemma using an embed

k

ding where h b f g

k

Corollary T is topcontextfreei contains only symbols of arity at most

oneornoconstant symbol

This is obvious from example and the fact that in case has only symbols

of arity at most one T is generated by the topcontextfree grammar

S Ac for all constant symbols c

Ax Af x for all unary symbols f

Ax x

By a simple generalization of example we can prove the following lemma

which will b e used in the next section

Denition branching Aregular grammar G N P S is said to be

branching if A cA A for some A N and some term cA A T

N

P

G is nonbranching containing A at more than one occurrence Otherwise

Lemma If G isabranching reducedregular grammar then LG is not slim

hence not topcontextfree

Regular Topcontextfree Languages

In this section we study the class of languages that are b oth regular and top

contextfree

Linear Topcontextfree Languages

For strings a right rules of the form A wB canalways b e

transformed into an equivalent leftregular one rules of the form A Bw and

vice versa When regarding string grammars as tree grammars map letters to

unary function symb ols this means transforming a regular tree grammar into

an equivalent topcontextfree tree grammar and vice versa This is not p ossible

in general The following lemma however allows to go from regular grammars

to linear topcontextfree ones and vice versa under additional assumptions

Lemma For a language L the fol lowing statements areequivalent

L is generatedbyaregular grammar where no righthand side of a rule

contains more than one nonterminal

ontextfreegrammar whereeach nonterminal L is generated by a linear topc

has arity at most one

L is generated by a topcontextfreegrammar where the righthand side of

every rule contains at most one variable position

Using lemma we provenow the converse to lemma

Lemma A language generated by a nonbranching regular grammar is linear

topcontextfree

Proof Let G N P S b e a nonbranching regular grammar that wesup

p ose to b e reduced We will showthat LG is linear topcontextfree by induc

tion on jN j Clearly for N fS g LG is linear topcontextfree by lemma

For jN j wedene

N fA N j A cS for some context cg

P

N P S N N n N P P fA t j A N gand G N

First observethatLG is linear topcontextfree by lemma Indeed sup

pose A cB B is a rule in P where B B N o ccur at dierent p ositions

in the term cB B Thenby denition of N and since G is reduced wehave

S aA acB B acbS b S

P

P P

for some contexts a b b contradicting the assumption that G is non

branc hing

For A N dene G N P A where N fB N j A cB

A A A A

P

for some context cg and P P fB t j B N g Note that N N and

A A A

wegetjN jjN j jN j that G is reduced and nonbranching From S N

A A

thus by induction hyp othesis LG is linear topcontextfree

A

A A g As is easily seen LG LG A for i n Let N f

n A i

i

and

LG LG LG LG

A A A A

n n

Since LG as well as LG LG are linear topcontextfree LG is

A A

n

linear topcontextfree to o by lemma

We conclude this section with a criterion allowing to prove that certain lan

guages are not linear topcontextfree In close analogy to the result that every

topcontextfree language is slim we will show that every linear topcontext

assable a notion dened byKSalomaa The denition free language is p

of k passable is just the denition of k slim if sets are treated as multisets

Salomaa also showed that passability of a language implies a uniform p olynomial

sizeb ound ie the size of terms in the language is p olynomially b ounded by

their depth

Denition passable A multidecomp osition of t T is a nite sequence

D D of multisets over T where D ftg D andforalli

 m  m

imthere is some term f t t D n such that

n i

D D nff t t g ft t g

i i n n

where al l sets and operations areinterpr eted as multisets and multiset operations

t is k passable for k N ift has a multidecomposition D D where

 m

jD jk for al l i i m A language is k passable if it contains only

i

k passable terms it is said to be passable if it is k passable for some k

Salomaa denes k passability in a slightly dierentway using tree

automata which however is easily seen to b e equivalent to the denition

given ab ove Note that only the empty set is passable

Let us call a language L polynomial ly sizebounded if there is a p olynomial p

over IN with one argument suchthatsize t pjtj for all t L Lemma in

k

states that size t k jtj for all t L provided that L is k passable

Together with the following result this can b e used to prove that a language is

not linear topcontextfree

Lemma Linear topcontextfree languages arepassable

y Proof Let G bealineartopcontextfree grammar where nonterminals havearit

at most k without loss of generalitywe assume that G is slow A straightforward

induction on the length of a derivation then shows that LG is maxfkg

passable

Example The topcontextfree language L ft j k g from example is

k

not linear topcontextfree since it is not p olynomially sizeb ounded

Linear Regular Expressions

The class Reg of regular languages is closed under replacement and replacement

iteration Moreover according to Kleenes theorem for tree languages Reg is

the smallest class containing all nite sets and closed under union replacement

and replacement iteration cf In other words every can

b e represented bya constructed from nite sets by using

union replacement and replacement iteration On the other hand Reg is not

closed under substitution and substitution iteration cf section The situation

is inverse for topcontextfree languages Wewillshowinsectionthatthisclass

is closed under substitution and substitution iteration and is not closed under

replacement and replacement iteration

Nevertheless the sub class of topcontextfree languages which are also regular

can b e represented by regular expressions with restricted use of replacement and

replacement iteration

Denition L et beanewconstant symbol We inductively dene a

set of linear regular expressions E an auxiliary set of contextual linear regular

expressions CE and the language Le T Le T resp represented

fg

by e E e CE resp as fol lows

for every a a E Lafag CE L fg



for every f if e e E then f e e E

n n n

and i n then f e e e e e CE if e CE

i i n

in either case Lf e e f Le Le

n n

if e e Ethen e e Eife e CE then e e CE

   

in either case Le e Le Le

 

if e e CEthene e CE and e CE

 

Le e Le Le Le Le

 

if e CEeE then e e E Le eLe Le

e is a regular language since e is a Obviously for every e ECE L

regular expression For e CE it is easy to see by induction that o ccurs

Le exactly once in each term of Le Therefore if e CE then Le

and Le L Le L for every L T

Prop osition Alanguagerepresented byalinear regular expression is top

contextfree

Proof According to the remark ab ove every replacement replacement iteration

resp in e can b e interpreted as a substitution substitution iteration resp with

out changing Le TopCf is closed under union substitution and substitution

iteration see section Closure under substitution implies that f L L

n

is topcontextfree if L L are topcontextfree Thus every op eration in

n

linear regular expressions preserves topcontextfreeness

The pro of of the following lemma see uses a standard technique for

constructing regular expressions from automata or grammar representations

It is somewhat a mixture of that for words cf and that for trees cf

Lemma A language generated by a nonbranching regular grammar can be

represented by a linear regular expression

Characterizations of Regular Topcontextfree Languages

Collecting together all results on regular topcontextfree languages obtained so

far we can state the following

Theorem Foraregular language L the fol lowing statements areequivalent

L is linear topcontextfree

L is topcontextfree

L is slim

L can be generated by a nonbranching regular grammar Moreover every

reducedregular grammar generating L is nonbranching

L can berepresentedbyalinear regular expression

L is passable

L is polynomial ly sizebounded

Proof Trivially and by lemma is lemma and

by lemma by lemma and by prop osition

by lemma and by lemma in Finally is

easy to show Indeed if L is generated by a reduced branching regular grammar

a sequence of terms of L can b e constructed in an obvious waysuch that their

size grows exp onentially with resp ect to their depth

Conditions and can b e seen as syntactic characterizations of Reg

TopCf Reg LinTopCf

Closure Prop erties

In this chapter we study some closure prop erties of classes of tree languages

First wejustmention a few wellknown prop erties then concentrate on study

ing closure of the classes Fin Reg LinTopCf TopCf LinCf Cf under

replacement substitution and their iterations We summarize p ositive and neg

ative results in tables

We dene linear homomorphismson T as linear tree homomorphisms in

the usual way

Lemma Fin Reg LinTopCf TopCf LinCfandCf are closed under

union under intersection with regular languages and under linear homomor

phisms

TopCf is even closed under arbitrary homomorphisms and a pro of of its

closure prop erties can b e found in

Lemma Closure under Replacement Fin Reg LinTopCf

TopCf LinCf and Cf areclosed under replacement by Fin

TopCf TopCf LinTopCf LinTopCf LinTopCf and LinTopCf

Reg LinCfandCf are closed under replacement

TopCf LinTopCf TopCf

Proof Let G N P S be a contextfree grammarandlet L over be

nite Then the grammar NfAx t j Ax t P t t L gS

c

generates LG L This grammar is of the same typ e as G

c

N P S be Let G N P S b e linear topcontextfree and G

topcontextfree Without loss of generalitylet G b e slow this is crucial for the

pro of since it guarantees that if t T X is the righthand side of a rule in

N

aslow linear grammar and y is a variable not o ccuring in tthen t y is linear

c

A topcontextfree grammar G generating LG LG is constructed as fol

c

lows The set of nonterminals in G is N N fdoneg where done is a new

unary nonterminal if A has arity n and A has arity m then A A has arity

n m The initial symbol of G is S S and G contains the following rules

A A x y A B x t if A y B t is in P A N

A A x y A donex t if A y t is in P t T A N

A donex y B donet y if Ax B t is in P t do es not contain c

A donex y B S t fy g if Ax B t is in P t contains c

c

A donex y t fy g if Ax t is in P t T

c

In order to pro of that G generates LG LG use the fact that A S t

c



G

A donet t implies t LG Moreover as G is linear there are no copies of

subterms which could cause cs at dierent p ositions to b e always instantiated

by the same terms Note also that G is linear if G is linear

Let G N P S and G N P S be contextfree grammars

with N N Then the contextfree grammar

N N fAx t fS gjAx t P gP S

c

generates LG LG It is regular linear if b oth G and G are regular linear

c

Af x xAx xg Let Let L b e generated by fS AcAx

i

L fg a j i g b e generated by fS AcAx Ag xAx xg

Then L L is not slim thus not topcontextfree as is easily shown using results

c

of section

Lemma Closure under Substitution Fin Reg LinTopCf

TopCf LinCf and Cf areclosed under substitution by Fin

TopCf TopCf TopCf and Cf TopCf Cf

Fin LinTopCf LinTopCf

Fin Reg Cf

LinTopCf LinTopCf LinTopCf

Reg LinTopCf LinCf and Reg LinTopCf TopCf

Proof First observe that for a ground term t ftg is a linear homomor

c

phism Hence by lemma L C implies L ftgCNow follows from

c

S

L L L ftg and from the closure under union lemma

c c

tL

Fromacontextfree grammar G and a topcontextfree grammar G with

LG disjoint sets of nonterminals a contextfree grammar G generating LG

c

can b e constructed as follows Nonterminals in G are the nonterminals of G

together with a nonterminal A of arity n for each nonterminal A in G of

arity n hence S is unary for S the initial symbol of G The initial symbol of G

is S the initial symbol of G The rules of G are

A x t if A x t is a rule in G tcontains a nonterminal

A x S t if A x t is a rule in G tcontains no nonterminal

A xy ht y if Ax t isaruleinG

c

where h is the linear homomorphism dened by

hAt t Aht ht c for all nonterminals A and

n n

hf t t f ht ht for all terminals f

n n

In the sp ecial case where G is topcontextfree this yields

Ax y B t y y if Ax B t is a rule in G

c

Ax y t y if Ax t is a rule in G t contains no nonterminal

c

Thus G is topcontextfree in case G is topcontextfree

Let G b e a linear topcontextfree grammar and s a term Since LinTopCf

is closed under union it is sucienttoshowthats LG is generated bya c

linear topcontextfree grammar G G is constructed as follows Let s contain m

o ccurrences of the symbol cFor each nonterminal A in G of arity n wehave

a nonterminal A of arity m n in GIfx is x x then let be

n m

variable renamings suchthatallvariables x are pairwise distinct Let x

i j i

denote x x fort similarly

i n i

Now if Ax B t is a rule in Gthen Ax x B t t

m m

isaruleinG

If Ax t is a rule in G where t contains no nonterminal then

Ax x s is a rule in G where s is obtained from s by replac

m

ing the m symb ols c successively by t t

m

Consider T This language is not topcontextfree by corollary hence

ffag

by theorem the language ff c cg T is not contextfree

c

ffag

b e generated by fS AcAx Af c xAx xg Let Let L

i

L fg a j i g b e generated by fS AcAx Ag xAx xg

Then L L is not linear topcontextfree Toshow this an appropriate pumping

c

lemma for linear topcontextfree languages can b e used see

i

Consider T fg a j i g It is neither linear contextfree by a pump

c

ffcg

ing lemma for linear contextfree languages given in nor topcontextfree

using results from section

Lemma Closure under Replacement Iteration Reg LinCf

and Cf are closed under replacement iteration

Fin TopCf

Proof Let G be a contextfree grammar A contextfree grammar G gener

c

ating LG is constructed as follows G has the same nonterminals and the

same initial symbol S as G and the rules of G are

Ax t fS g if Ax t isaruleinG

c

S c

If G is regular or linear then G is so

c

g T it is not topcontextfree by corollary Consider ff c c

fcf g

Lemma Closure under Substitution Iteration TopCf is closed

under substitution iteration

Reg Cf

Fin LinTopCf

Proof Given a topcontextfree grammar G N P S in order to get

c

a topcontextfree grammar G generating LG we can use a construction

analogous to that given in the pro of of lemma Just the following rules

havetobeaddedIfAx t isaruleinG t T X wehavein G not only

the rule Ax y t y but also the rule

c

Ax y S t y

c

Consider the regular language L ff c cgT over fa hgwhere

c c

c

a is a constant and h is binaryWehave L g T ff c cg ff c c

c

c

Thus L ff t t j t t T g ff t t j t T gwhich is not contextfree by

theorem and corollary As ff t t j t t T g is regular and Cf is closed

c

under intersection with regular languages L is not contextfree

c

is the set of complete binary trees over fc f gThus For L ff c cg L

c

LinTopCf by example L

Closure by Replacement CC

C

C Fin Reg LinTopCf TopCf LinCf Cf

Fin Fin Reg LinTopCf TopCf LinCf Cf

Reg Reg Reg LinCf Cf LinCf Cf

LinTopCf LinTopCf LinCf LinTopCf TopCf LinCf Cf

TopCf TopCf Cf Cf Cf Cf Cf

LinCf LinCf LinCf LinCf Cf LinCf Cf

Cf Cf Cf Cf Cf Cf Cf

Closure by Substitution CC

C

C Fin Reg LinTopCf TopCf LinCf Cf

Fin Fin Cf LinTopCf TopCf Cf Cf

Reg Reg Cf Cf Cf Cf Cf

LinTopCf LinTopCf Cf TopCf TopCf Cf Cf

TopCf TopCf Cf TopCf TopCf Cf Cf

LinCf LinCf Cf Cf Cf Cf Cf

Cf Cf Cf Cf Cf Cf Cf

Closure by

C Replacement Iteration C Substitution Iteration C

Fin Reg TopCf

Reg Reg Cf

LinTopCf LinCf TopCf

TopCf Cf TopCf

LinCf LinCf Cf

Cf Cf Cf

References

A Arnold and M Dauchet Transductions de Forts Reconnaissabl es Monadiques

Forts Corgulires RAIRO Informatique Thorique et applications

A Arnold and M Dauchet Un Thorme de Duplication p our les Forts Al

gbriques JCSS

M Dauchet and S Tison Structural Complexity of Classes of Tree Languages In

TreeAutomata and Languages pp Elsevier NorthHolland

N Dershowitz and JP Jouannaud Rewrite Systems In Handbook of Theoretical

Computer Sciencevol B pp Elsevier

J Engelfriet and E Schmidt IO and OI I JCSS

F Gcseg and M Steinby Tree automataAkadmiai Kiad Budap est

D Hofbauer and M Hub er Computing linearizati ons using test sets In rdIn

ternational Workshop on Conditional Term Rewriting Systems LNCS pp

SpringerVerlag

D Hofbauer M Hub er and G Kucherov Some Results on Topcontextfree Tree

Languages Centre de Recherche en Informatique de NancyTechnical Rep ort to

app ear

J Hop croft and J Ullman Introduction to Languages and

Computation AddisonWesley

G Kucherov and M Ta jine Decidabili ty of regularity and related prop erties of

ground normal form languages In rd International Workshop on Conditional

LNCS pp SpringerVerlag Term Rewriting Systems

G A Kucherov On relationship b etween term rewriting systems and regular tree

languages In th ConferenceonRewriting Techniques and ApplicationsLNCS

pp SpringerVerlag

T S E Maibaum Pumping lemmas for term languages JCSS

K Salomaa Deterministic Tree Pushdown Automata and Monadic Tree Rewrit

ing Systems JCSS

S Vgvlgyi and R Gilleron For a rewriting system it is decidable whether the set

of irreducible ground terms is recognizable Bul letin of the European Association

for Theoretical Computer Science

A

This article was pro cessed using the L T X macro package with LLNCS style E