A matrix grammar is a formal grammar in which instead of single productions, productions are grouped together into finite sequences. A production cannot be applied separately, it must be applied in sequence. In the application of such a sequence of productions, the rewriting is done in accordance to each production in sequence, the first one, second one etc. till the last production has been used for rewriting. The sequences are referred to as matrices. Matrix grammar is an extension of context-free grammar, and one instance of a controlled grammar.
is a finite set of non-empty sequences whose elements are ordered pairs where
The pairs are called productions, written as. The sequences are called matrices and can be written as Let be the set of all productions appearing in the matrices of a matrix grammar. Then the matrix grammar is of type-, length-increasing, linear, -free, context-free or context-sensitiveif and only if the grammar has the following property. For a matrix grammar, a binary relation is defined; also represented as. For any, holds if and only if there exists an integer such that the words over V exist and
Consider the matrix grammar where is a collection containing the following matrices: These matrices, which contain only context-free rules, generate the context-sensitive language The associate word of is and This example can be found on pages 8 and 9 of in the following form: Consider the matrix grammar where is a collection containing the following matrices: These matrices, which contain only context-regular rules, generate the context-sensitive language The associate word of is and
Properties
Let MAT^\lambda be the class of languages produced by matrix grammars, and the class of languages produced by -free matrix grammars.
Each language produced by a matrix grammar with only one terminal symbol is regular.
Open problems
It is not known whether there exist languages in MAT^\lambda which are not in, and it is neither known whether MAT^\lambda contains languages which are not context-sensitive.
Footnotes
Ábrahám, S. Some questions of language theory. International Conference on Computational Linguistic, 1965. pp 1–11.