ArticleslgStudy

biology

Chomsky hierarchy

Chomsky hierarchy is a biology topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Chomsky hierarchy rather than just read about it. In short: The Chomsky hierarchy in the fields of formal language theory, computer science, and linguistics, is a containment hierarchy of classes of formal grammars. A formal grammar describes how to form strings from a formal language's alphabet that are valid according to the language's syntax.

Chomsky hierarchy — main illustration
Chomsky hierarchy — illustration

Key takeaways

  • Chomsky hierarchy belongs to biology; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Chomsky hierarchy to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Chomsky hierarchy from memory before moving on to harder problems.

Reference excerpt

The Chomsky hierarchy in the fields of formal language theory, computer science, and linguistics, is a containment hierarchy of classes of formal grammars. A formal grammar describes how to form strings from a formal language's alphabet that are valid according to the language's syntax. The linguist Noam Chomsky theorized that four different classes of formal grammars existed that could generate increasingly complex languages. Each class can also completely generate the language of all inferior classes (set inclusive).

History The general idea of a hierarchy of grammars was first described by Noam Chomsky in "Three models for the description of language" during the formalization of transformational-generative grammar (TGG). Marcel-Paul Schützenberger also played a role in the development of the theory of formal languages; the paper "The algebraic theory of context free languages" describes the modern hierarchy, including context-free grammars. Independently, alongside linguists, mathematicians were developing models of computation (via automata). Parsing a sentence in a language is similar to computation, and the grammars described by Chomsky proved to both resemble and be equivalent in computational power to various machine models.

The hierarchy The following table summarizes each of Chomsky's four types of grammars, the class of language it generates, the type of automaton that recognizes it, and the form its rules must have. The classes are defined by the constraints on the productions rules.

Note that the set of grammars corresponding to recursive languages is not a member of this hierarchy; these would be properly between Type-0 and Type-1. Every regular language is context-free, every context-free language is context-sensitive, every context-sensitive language is recursive and every recursive language is recursively enumerable. These are all proper inclusions, meaning that there exist recursively enumerable languages that are not context-sensitive, context-sensitive languages that are not context-free and context-free languages that are not regular.

Regular (Type-3) grammars

Type-3 grammars generate the regular languages. Such a grammar restricts its rules to a single nonterminal on the left-hand side and a right-hand side consisting of a single terminal, possibly followed by a single nonterminal, in which case the grammar is right regular. Alternatively, all the rules can have their right-hand sides consist of a single terminal, possibly preceded by a single nonterminal (left regular). These generate the same languages. However, if left-regular rules and right-regular rules are combined, the language need no longer be regular. The rule S→ε is also allowed here if S does not appear on the right side of any rule. These languages are exactly all languages that can be decided by a finite-state automaton. Additionally, this family of formal languages can be obtained by regular expressions. Regular languages are commonly used to define search patterns and the lexical structure of programming languages. For example, the regular language L={an∣n>0} is generated by the Type-3 grammar G=({S},{a},P,S) with the productions P being the following.

S → aS S → a In linguistics, a language that is not regular is called supra-regular.

Context-free (Type-2) grammars

Type-2 grammars generate the context-free languages. These are defined by rules of the form A→α with A being a nonterminal and α being a string of terminals and/or nonterminals. These languages are exactly all languages that can be recognized by a non-deterministic pushdown automaton. Context-free languages—or rather its subset of deterministic context-free languages—are the theoretical basis for the phrase structure of most programming languages, though their semantic analysis includes context-sensitive name resolution due to declarations and scope. Often a subset of grammars is used to make parsing easier, such as by an LL parser. For example, the context-free language L={anbn∣n>0} is generated by the Type-2 grammar G=({S},{a,b},P,S) with the productions P being the following.

S → aSb S → ab The language is context-free but not regular (by the pumping lemma for regular languages). Every context-free language can be generated by a grammar in Chomsky normal form.

Context-sensitive (Type-1) grammars

Type-1 grammars generate context-sensitive languages. These grammars have rules of the form αAβ→αγβ with A a nonterminal and α, β and γ strings of terminals and/or nonterminals. The strings α and β may be empty, but γ must be nonempty. The rule S→ϵ is allowed if S does not appear on the right side of any rule. The languages described by these grammars are exactly all languages that can be recognized by a linear bounded automaton (a nondeterministic Turing machine whose tape is bounded by a constant times the length of the input.) For example, the context-sensitive language L={anbncn∣n>0} is generated by the Type-1 grammar G=({S,A,B,C,W,Z},{a,b,c},P,S) with the productions P being the following.

S → aBC S → aSBC CB → CZ CZ → WZ WZ → WC WC → BC aB → ab bB → bb bC → bc cC → cc The language is context-sensitive but not context-free (by the pumping lemma for context-free languages). A proof that this grammar generates L={anbncn∣n>0} is sketched in the article on Context-sensitive grammars.

Recursively enumerable (Type-0) grammars

Type-0 grammars include all formal grammars. There are no constraints on the productions rules. They generate exactly all languages that can be recognized by a Turing machine, thus any language that is possible to be generated can be generated by a Type-0 grammar. These languages are also known as the recursively enumerable or Turing-recognizable languages. Note that this is different from the recursive languages, which can be decided by an always-halting Turing machine.

Natural languages When researching the position of natural language in the Chomsky hierarchy, it has been shown in the 1950s that natural language is not regular. For instance, English contains center embedding constructions, which means that it cannot be regular. To be more exact, the argument is that the language L={anbmcmdn∣n,m>0} is not regular, which can be shown using the pumping lemma for context-free languages. In subsequent decades, it was shown that natural language is also not context-free, using the example of cross-serial dependencies in Swiss German. In this case, the argument is that the language L={anbmcndm∣n,m>0} is not context-free.

… excerpt ends here. Continue reading the full article.

Illustrations

Chomsky hierarchy: Set inclusions described by the Chomsky hierarchy
Set inclusions described by the Chomsky hierarchy

Worked examples

Example 1 — a first encounter with Chomsky hierarchy

Start with the simplest possible case. Write down what Chomsky hierarchy claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In biology, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Chomsky hierarchy before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Chomsky hierarchy ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Chomsky hierarchy

In research
Chomsky hierarchy appears in biology research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Chomsky hierarchy in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Chomsky hierarchy is common in secondary-school and first-year university syllabi. It links to neighbouring topics 1956 in computing, Formal languages, Generative linguistics, so understanding it makes those chapters shorter.
In everyday life
Look for Chomsky hierarchy outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Chomsky hierarchy” →

How to study Chomsky hierarchy in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Chomsky hierarchy means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Chomsky hierarchy out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Chomsky hierarchy in simple terms?

The Chomsky hierarchy in the fields of formal language theory, computer science, and linguistics, is a containment hierarchy of classes of formal grammars. A formal grammar describes how to form strings from a formal language's alphabet that are valid according to the language's syntax.

Why does Chomsky hierarchy matter?

Because it connects several biology ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Chomsky hierarchy?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Chomsky hierarchy.

Tags

  • 1956 in computing
  • Formal languages
  • Generative linguistics
  • Noam Chomsky

Keep exploring