Concept

Noncontracting grammar

In formal language theory, a grammar is noncontracting (or monotonic) if for all of its production rules, α → β (where α and β are strings of nonterminal and terminal symbols), it holds that |α| ≤ |β|, that is β has at least as many symbols as α. A grammar is essentially noncontracting if there may be one exception, namely, a rule S → ε where S is the start symbol and ε the empty string, and furthermore, S never occurs in the right-hand side of any rule. A context-sensitive grammar is a noncontracting grammar in which all rules are of the form αAβ → αγβ, where A is a nonterminal, and γ is a nonempty string of nonterminal and/or terminal symbols. However, some authors use the term context-sensitive grammar to refer to noncontracting grammars in general. A noncontracting grammar in which |α| < |β| for all rules is called a growing context-sensitive grammar. Chomsky (1959) introduced the Chomsky hierarchy, in which context-sensitive grammars occur as "type 1" grammars; general noncontracting grammars do not occur. Chomsky (1963) calls a noncontracting grammar a "type 1 grammar", and a context-sensitive grammar a "type 2 grammar", and by presenting a conversion from the former into the latter, proves the two weakly equivalent . Kuroda (1964) introduced Kuroda normal form, into which all noncontracting grammars can be converted. This grammar, with the start symbol S, generates the language { anbncn : n ≥ 1 } , which is not context-free due to the pumping lemma. A context-sensitive grammar for the same language is shown below. Every context-sensitive grammar is a noncontracting grammar. There are easy procedures for bringing any noncontracting grammar into Kuroda normal form, and converting any noncontracting grammar in Kuroda normal form into a context-sensitive grammar. Hence, these three types of grammar are equal in expressive power, all describing exactly the context-sensitive languages that do not include the empty string; the essentially noncontracting grammars describe exactly the set of context-sensitive languages.

About this result
This page is automatically generated and may contain information that is not correct, complete, up-to-date, or relevant to your search query. The same applies to every other page on this website. Please make sure to verify the information with EPFL's official sources.
Related lectures (4)
CYK Parsing Algorithm for General Grammars
Introduces the CYK parsing algorithm for context-free grammars, explaining its handling of ambiguity and importance in parsing general grammars.
CYK Algorithm for Parsing General Grammars
Explores parsing general grammars using the CYK algorithm and Chomsky Normal Form.
Show more
Related publications (2)

Grammar-based generation of bar networks in static equilibrium with bounded bar lengths

Corentin Jean Dominique Fivet, Ioannis Mirtsopoulos

This paper presents a generative approach for the conceptual design of structures, which aims at exploring alternative bar networks in static equilibrium by means of a grammar rule. Operating on incomplete networks of bars in interim static equilibrium, th ...
2021

Towards Automating Grammar Equivalence Checking

Viktor Kuncak, Mikaël Mayer, Ravichandhran Kandhadai Madhavan

We consider from practical perspective the (generally undecidable) problem of checking equivalence of context-free grammars. We present both techniques for proving equivalence, as well as techniques for finding counter-examples that establish non-equivalen ...
2015
Related concepts (1)
Context-sensitive grammar
A context-sensitive grammar (CSG) is a formal grammar in which the left-hand sides and right-hand sides of any production rules may be surrounded by a context of terminal and nonterminal symbols. Context-sensitive grammars are more general than context-free grammars, in the sense that there are languages that can be described by a CSG but not by a context-free grammar. Context-sensitive grammars are less general (in the same sense) than unrestricted grammars.

Graph Chatbot

Chat with Graph Search

Ask any question about EPFL courses, lectures, exercises, research, news, etc. or try the example questions below.

DISCLAIMER: The Graph Chatbot is not programmed to provide explicit or categorical answers to your questions. Rather, it transforms your questions into API requests that are distributed across the various IT services officially administered by EPFL. Its purpose is solely to collect and recommend relevant references to content that you can explore to help you answer your questions.