2

What are the common ways to check if a given language is regular, context free, or context sensitive?

Any surveys or notes would also be helpful. There's no need to describe your suggestions. eg. it is sufficient to say a language is regular if it can be recognized by a DFA.

2 Answers2

5

Regular languages

Elementary methods

  1. Finite automata (possibly nondeterministic, with empty transitions).
  2. Regular expressions.
  3. Right (or Left, but not both) linear equations, like $X = KX + L$ where $K$ and $L$ are regular.
  4. Operations preserving regular languages (Boolean operations, product, star, shuffle, morphisms, inverses of morphisms, reversal, etc.)
  5. Pumping lemmas (mostly used to prove non regularity).

Logical methods (often used in formal verification)

  1. Monadic second order logic (Büchi's theorem).
  2. Linear temporal logic (Kamp's theorem).
  3. Rabin's tree theorem (Monadic second order logic with two successors). Very powerful.

Advanced methods

  1. Well quasi orders. See W. Bucher, A. Ehrenfeucht, D. Haussler, On total regulators generated by derivation relations, Theor. Comput. Sci. 40 (1985) 131–148, and M. Kunz, Regular Solutions of Language Inequalities and Well Quasi-orders.
  2. Algebraic methods based on Transductions.

Context-free languages

  1. Pushdown automata.
  2. Context-free grammars.
  3. Operations preserving context-free languages (morphisms, inverses of morphisms, union, product, star, reversal, intersection with a regular language).
  4. Pumping lemmas (mostly used to prove that a language is not context-free).
  5. Rational transductions (they preserve context-free languages). Very powerful.

Context-sensitive languages

  1. Context-sensitive grammar.
  2. Operations preserving context-sensitive languages (Boolean operations, product, star, etc.).
J.-E. Pin
  • 6,219
  • 21
  • 39
1

For a language that is regular but not CF or CS,

  1. construct a DFA/NFA that accepts it
  2. convert it to a regular expression
  3. show that it can be represented as an union, intersection or concatenation of two or more regular languages.

For Context Free language that is not CS,

  1. construct push down automaton that accepts it.
  2. show that some other language that contains (is a superset of) the language Context Free.

(there might be more ways though)

Subhayan
  • 1,696
  • 10
  • 19