ArticleslgStudy

mathematics

Greibach's theorem

Greibach's theorem is a mathematics 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 Greibach's theorem rather than just read about it. In short: In theoretical computer science, in particular in formal language theory, Greibach's theorem states that certain properties of formal language classes are undecidable. It is named after the computer scientist Sheila Greibach, who first proved it in 1963.

Key takeaways

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

Reference excerpt

In theoretical computer science, in particular in formal language theory, Greibach's theorem states that certain properties of formal language classes are undecidable. It is named after the computer scientist Sheila Greibach, who first proved it in 1963.

Definitions Given a set Σ, often called "alphabet", the (infinite) set of all strings built from members of Σ is denoted by Σ*. A formal language is a subset of Σ*. If L1 and L2 are formal languages, their product L1L2 is defined as the set { w1w2 : w1 ∈ L1, w2 ∈ L2 } of all concatenations of a string w1 from L1 with a string w2 from L2. If L is a formal language and a is a symbol from Σ, their quotient L/a is defined as the set { w : wa ∈ L } of all strings that can be made members of L by appending an a. Various approaches are known from formal language theory to denote a formal language by a finite description, such as a formal grammar or a finite-state machine. For example, using an alphabet Σ = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, the set Σ* consists of all (decimal representations of) natural numbers, with leading zeroes allowed, and the empty string, denoted as ε. The set Ldiv3 of all naturals divisible by 3 is an infinite formal language over Σ; it can be finitely described by the following regular grammar with start symbol S0:

Examples for finite languages are {ε,1,2} and {0,2,4,6,8}; their product {ε,1,2}{0,2,4,6,8} yields the even numbers up to 28. The quotient of the set of prime numbers up to 100 by the symbol 7, 4, and 2 yields the language {ε,1,3,4,6,9}, {}, and {ε}, respectively.

Formal statement of the theorem Greibach's theorem is independent of a particular approach to describe a formal language. It just considers a set C of formal languages over an alphabet Σ∪{#} such that

each language in C has a finite description, each regular language over Σ∪{#} is in C, given descriptions of languages L1, L2 ∈ C and of a regular language R ∈ C, a description of the products L1R and RL1, and of the union L1∪L2 can be effectively computed, and it is undecidable for any member language L ∈ C with L ⊆ Σ* whether L = Σ*. Let P be any nontrivial subset of C that contains all regular sets over Σ∪{#} and is closed under quotient by each single symbol in Σ∪{#}. Then the question whether L ∈ P for a given description of a language L ∈ C is undecidable.

Proof Let M ⊆ Σ*, such that M ∈ C, but M ∉ P. For any L ∈ C with L ⊆ Σ*, define φ(L) = (M#Σ*) ∪ (Σ*#L). From a description of L, a description of φ(L) can be effectively computed. Then L = Σ* if and only if φ(L) ∈ P:

If L = Σ*, then φ(L) = Σ*#Σ* is a regular language, and hence in P. Else, some w ∈ Σ* \ L exists, and the quotient φ(L)/(#w) equals M. Therefore, by repeated application of the quotient-closure property, φ(L) ∈ P would imply M = φ(L)/(#w) ∈ P, contradicting the definition of M. Hence, if membership in P would be decidable for φ(L) from its description, so would be L’s equality to Σ* from its description, which contradicts the definition of C.

Applications Using Greibach's theorem, it can be shown that the following problems are undecidable:

Given a context-free grammar, does it describe a regular language? Proof: The class of context-free languages, and the set of regular languages, satisfies the above properties of C, and P, respectively. Given a context-free language, is it inherently ambiguous? Proof: The class of context-free languages, and the set of context-free languages that aren't inherently ambiguous, satisfies the above properties of C, and P, respectively. Given a context-sensitive grammar, does it describe a context-free language? See also Context-free grammar#Being in a lower or higher level of the Chomsky hierarchy.

Notes

References

Worked examples

Example 1 — a first encounter with Greibach's theorem

Start with the simplest possible case. Write down what Greibach's theorem claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, 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 Greibach's theorem 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 Greibach's theorem 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 Greibach's theorem

In research
Greibach's theorem appears in mathematics 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 Greibach's theorem 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
Greibach's theorem is common in secondary-school and first-year university syllabi. It links to neighbouring topics Formal languages, Mathematical theorems, so understanding it makes those chapters shorter.
In everyday life
Look for Greibach's theorem 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 “Greibach's theorem” →

How to study Greibach's theorem in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Greibach's theorem 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 Greibach's theorem out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Greibach's theorem in simple terms?

In theoretical computer science, in particular in formal language theory, Greibach's theorem states that certain properties of formal language classes are undecidable. It is named after the computer scientist Sheila Greibach, who first proved it in 1963.

Why does Greibach's theorem matter?

Because it connects several mathematics 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 Greibach's theorem?

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 Greibach's theorem.

Tags

  • Formal languages
  • Mathematical theorems

Keep exploring