Remarks on external contextual grammars with selection
Introduction
In 1969, contextual grammars and languages were introduced by Solomon Marcus in [17] in order to model natural languages. Since that time this type of grammars was studied intensively. The first book [19] on contextual grammars and languages appeared in 1982 and was written by Gheorghe Păun. Summaries of results can be found in the monograph [20] and the surveys [11] and [18] in the Handbook of Formal Languages ([22]).
The simplest type of contextual grammar is that with the external mode of derivation. It is given by a finite set of axioms and a finite set of pairs of words, called contexts; a derivation step is performed from a word x to the word uxv if is a context; the generated language consists of all words which can be obtained from the axioms by iterated wrappings of contexts.
It is very obvious that this simple model does not reflect enough features. Therefore Marcus defined selective contextual grammars where, with a word x, a set of contexts is associated and the context can only be wrapped around x, if . This is equivalent to requiring that a given context can only be wrapped around the words of the set which consists of all words x such that . Such sets are called selection languages. In [15], Istrail started the investigation of the special case, where the selection languages belong to some level of the Chomsky hierarchy.
Obviously, in order to know which contexts can be wrapped around a word x, one has to determine the selection languages which contain x. Thus it is natural to require that the membership problem for the sets is effectively solvable. If one restricts to regular languages in the approach by Istrail, one has a membership problem which is solvable in linear time.
In some practical cases, only some special regular languages reflect/describe the desired circumstances. Thus it is an interesting question how the generative power is decreased if one considers families of special regular languages. In [1] this problem was studied for the families of monoidal, combinational, definite, nilpotent, commutative regular, and suffix-closed regular languages; and it was continued in [6], [14], [3], and [4] for circular regular, ordered, union-free, special definite, strongly locally testable, and star-free languages, ideals, some codes, and languages which are obtained by restrictions to their descriptional complexity.
However, since each of the papers only considered some of the mentioned selection languages, it contains only hierarchies concerning these selection languages. In this paper, we continue the investigation and combine and complete some of the existing hierarchies.
We mention that the use of subregular language families is also studied for other types of language generating devices where the applicability of rules depends on some regular set as, e.g., for regularly controlled grammars, conditional grammars, tree controlled grammars, conditional Lindenmayer systems, and systems of evolutionary processors. For details we refer to the survey article [2] and the papers [3], [9], [8], [5], [10], and the references given in these papers.
Section snippets
Definitions
We assume that the reader is familiar with the basic concepts of the theory of formal languages. In this section we only recall some notations and some definitions such that a reader can understand the results and follow the argumentations. For more details, we refer to [22].
For an alphabet V, i.e., V is a finite non-empty set, the set of all words and all non-empty words over V are denoted by and , respectively. The empty word is denoted by λ. For a language L, let be the minimal
Some lemmas on special languages
In this section, we prove that certain languages belong to some family , but do not belong to some other family . These facts are then used to prove incomparabilities and strictness of inclusions of language families.
Lemma 3 Let V be an alphabet. Then , and . Proof i) The external contextual grammar generates . Since its selection language is in MON, we get . In order to prove we replace the selection language of G by
The hierarchy
We start with an inclusion.
Lemma 11 We have . Proof By [1], Lemma 4.3, for any language , , there are a natural number r, a set C of contexts, and a finite set such that the external contextual grammar generates L. Because , any can be generated by an external contextual grammar whose selection languages are right ideals. □
For lId, we have a little stronger result.
Lemma 12 We have . Proof Let . Then for some external
Unary languages
In the above proofs, the witnesses were given over alphabets with two or three letters. This is also true for the languages considered in the papers [1], [6], and [4]. Thus the hierarchy presented in Fig. 3 also holds for languages over an alphabet with at least three letters.
One of the unknown referees mentioned that Lemma 5, Lemma 6, Lemma 7, Lemma 9 also hold for binary languages. To see this, we replace each a by aba, each b by , and each c by . Furthermore, this encoding also
Conclusion
In this paper we have shown the set-theoretic relations between the families with . We have obtained a complete picture.
However, there are investigations of some further subregular families such as strictly locally testable, reverse definite, and ordered languages. There are some relations of these families with families , , but it remains to find the relations with families , where .
Besides the external derivation mode considered in this paper, there is also an
Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Acknowledgements
I thank the anonymous referees for their suggestions which led to an improvement of the paper.
References (24)
- et al.
On external contextual grammars with subregular selection languages
Theor. Comput. Sci.
(2012) - et al.
Multiple-entry finite automata
J. Comput. Syst. Sci.
(1974) Contextual grammars with subregular choice
Fundam. Inform.
(2005)Subregular restrictions for some language generating devices
Contextual languages strictly locally testable and star free selection languages
An. Univ. Bucur.
(2015)Grammars with control by ideals and codes
J. Autom. Lang. Comb.
(2018)Lindenmayer systems with control by ideals and codes
J. Autom. Lang. Comb.
(2020)- et al.
On subregular selection languages in internal contextual grammars
J. Autom. Lang. Comb.
(2012) - et al.
Conditional Lindenmayer systems with subregular conditions: the extended case
RAIRO Theor. Inform. Appl.
(2014) - et al.
Generative capacity of subregularly tree controlled grammars
Int. J. Found. Comput. Sci.
(2010)
Networks with evolutionary processors and ideals and codes as filters
Int. J. Found. Comput. Sci.
Cited by (5)
Merging two Hierarchies of Internal Contextual Grammars with Subregular Selection
2023, Electronic Proceedings in Theoretical Computer Science, EPTCSRelations of contextual grammars with strictly locally testable selection languages
2023, RAIRO - Theoretical Informatics and ApplicationsOn the Generative Capacity of Contextual Grammars with Strictly Locally Testable Selection Languages
2022, Electronic Proceedings in Theoretical Computer Science, EPTCS