Context Sensitive, but not Context Free Languages a^nb^nc^n complement language | 123

Опубликовано: 04 Октябрь 2024
на канале: Gate Instructors
9,976
16

Playlist for all videos on this topic:    • Theory of Computation or Automata The...  
L = { a^n b^m }, What will be the regular expression for the complement of L? theory of computation, Automata Theory, in hindi, lectures, gate, iit, tutorial, Context Sensitive Languages. Pumping Lemmas for Regular and Context Free languages. Linear Bounded Automata.

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 some languages that cannot be described by context-free grammars, but can be described by CSG. Context-sensitive grammars are however less general (in the same sense of the term) than unrestricted grammars, i.e. CSG occupy the intermediate position between context-free and unrestricted grammars in the Chomsky hierarchy.

context-sensitive, but not context-free languages is L = a^nb^nc^n the language of all strings consisting of n occurrences of the symbol "a", then n "b"'s, then n "c"'s (abc, aabbcc, aaabbbccc, etc.). A superset of this language, called the Bach language, is defined as the set of all strings where "a", "b" and "c" (or any other set of three symbols) occurs equally often (aabccb, baabcaccb, etc.) and is also context-sensitive.

Another example of a context-sensitive language that is not context-free is L = { a^p : p is a prime number }. L can be shown to be a context-sensitive language by constructing a linear bounded automaton which accepts L. The language can easily be shown to be neither regular nor context free by applying the respective pumping lemmas for each of the language classes to L.

An example of recursive language that is not context-sensitive is any recursive language whose decision is an EXPSPACE-hard problem, say, the set of pairs of equivalent regular expressions with exponentiation.

Properties of context-sensitive languages

The union, intersection, concatenation of two context-sensitive languages is context-sensitive; the Kleene plus of a context-sensitive language is context-sensitive.
The complement of a context-sensitive language is itself context-sensitive a result known as the Immerman–Szelepcsényi theorem.
Every context-free language not containing the empty string is context-sensitive.
Membership of a string in a language defined by an arbitrary context-sensitive grammar, or by an arbitrary deterministic context-sensitive grammar, is a PSPACE-complete problem.