Matrix grammar

Matrix grammar

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 the 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.

Formal definition

A matrix grammar is an ordered quadruple

G = (VN,VT,X0,M).

where

  • VN is a finite set of non-terminals
  • VT is a finite set of terminals
  • X0 is a special element of VN, viz. the starting symbol
  • M is a finite set of non-empty sequences whose elements are ordered pairs
(P, Q), \quad P \in W(V) V_N W(V), \quad Q \in W(V), \quad V = V_N \cup V_T.

The pairs are called productions, written as P \to Q. The sequences are called matrices and can be written as

m = [P_1 \to Q_1, \ldots, P_r \to Q_r].

Let F be the set of all productions appearing in the matrices m of a matrix grammar G. Then the matrix grammar G is of type-i,i = 0,1,2,3, length-increasing, linear, λ-free, context-free or context-sensitive if and only if the grammar G1 = (VN,VT,X0,F) has the following property.

For a matrix grammar G, a binary relation \Rightarrow_G is defined; also represented as \Rightarrow. For any P, Q \in W(V), P \Rightarrow Q holds if and only if there exists an integer r \ge 1 such that the words

\alpha_1,, \ldots, \alpha_{r + 1}, \quad P_1, \ldots, P_r, \quad R_1, \ldots, R_r, \quad, R^1, \ldots, R^r

over V exist and

  • αi = P and αr + 1 = Q
  • m is one of the matrices of G
  • αi = RiPiRi and αi + 1 = RiQiRi.

If the above conditions are satisfied, it is also said that P \Rightarrow Q holds with (m,R1) as the specifications.

Let \Rightarrow^{*} be the reflexive transitive closure of the relation \Rightarrow. Then, the language generated by the matrix grammar G is given by

L(G) = \{P \in W(V_T) | X_0 \Rightarrow^{*} P\}.

Example

Consider the matrix grammar

G = ({S,X,Y},{a,b,c},S,M)

where M is a collection containing the following matrices:

[S \rightarrow XY], \quad [X \rightarrow aXb, Y \rightarrow cY], \quad [X \rightarrow ab, Y \rightarrow c]

These matrices, which contain only context-free rules generate the context-sensitive language

L = \{a^nb^nc^n|n \ge 1\}.

This example can be found on pages 8 and 9 of [1].

References

  • ^ Ábrahám, S. Some questions of language theory. International Conference on Computational Linguistic, 1965. pp 1-11. [2]

Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • matrix sentence — noun : the one of a pair of sentences joined by means of a transformation that keeps its essential external structure and syntactic status in “the book that I want is gone”, “the book is gone” is the matrix sentence * * * Ling. a sentence in… …   Useful english dictionary

  • Controlled grammar — Controlled grammars[1] are a class of grammars that extend, usually, the context free grammars with additional controls on the derivations of a sentence in the language. A number of different kinds of controlled grammars exist, the four main… …   Wikipedia

  • Head-driven Phrase Structure Grammar — Die Head driven Phrase Structure Grammar (HPSG) ist eine Grammatiktheorie, die in den 1980er Jahren auf der Basis der Wiederbelebung der kontextfreien Phrasenstrukturgrammatiken als Generative Grammatiktheorie aus der Familie der… …   Deutsch Wikipedia

  • Nominal group (functional grammar) — Those five beautiful shiny Jonathan apples sitting on the chair In systemic functional grammar (SFG), a nominal group is a group of words which expresses an entity. A nominal group is widely regarded as synonymous to noun phrase in other… …   Wikipedia

  • International Grammar School — Infobox Aust school private name = International Grammar School motto = Concordia Per Diversitatem (Latin: Unity Through Diversity ) …   Wikipedia

  • Miskito grammar — This article provides a grammar sketch of the Miskito language, the language of the Miskito people of the Atlantic coast of Nicaragua and Honduras, a member of the Misumalpan language family. There also exists a brief typological overview of the… …   Wikipedia

  • Attribut-Wert-Matrix — Eine Attribut Wert Matrix (AWM), auch Merkmal Wert Struktur, ist eine formale Struktur, die vor allem in der Linguistik, speziell im Bereich der Unifikationsgrammatiken und der Head driven Phrase Structure Grammar verwendet wird. Mit Attribut… …   Deutsch Wikipedia

  • Conjunctive grammar — Conjunctive grammars are a class of formal grammars studied in formal language theory. They extend the basic type of grammars, the context free grammars, with a conjunction operation. Besides explicit conjunction, conjunctive grammars allow… …   Wikipedia

  • Regulated rewriting — is a specific area of formal languages studying grammatical systems which are able to take some kind of control over the production applied in a derivation step. For this reason, the grammatical systems studied in Regulated Rewriting theory are… …   Wikipedia

  • List of mathematics articles (M) — NOTOC M M estimator M group M matrix M separation M set M. C. Escher s legacy M. Riesz extension theorem M/M/1 model Maass wave form Mac Lane s planarity criterion Macaulay brackets Macbeath surface MacCormack method Macdonald polynomial Machin… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”