Lesson 12 proves languages regular without building anything. It covers the subsequence order and how it differs from the substring order, upward and downward closed languages, and well-quasi-orderings with their equivalent characterization as having no descending chain and no antichain. It then proves Dickson's lemma on tuples by extraction and explains why finitely many coordinates is essential, sketches Higman's theorem by the minimal-bad-sequence argument and the role of the finite alphabet, and gives the finite-basis property and the consequence that every subsequence-closed language is regular. It ends on the cost: the argument is non-constructive and yields no machine.
Subject: Theory of Computation · 114 slides · symbolic lesson
Open the interactive version of this deck · Homework for this lesson
Title
Theory of Computation · Lesson 12
Some languages are regular for reasons that have nothing to do with building a machine. Higman, Dickson, and the surprising power of a well-behaved ordering.
Objectives
Lessons 10 and 11 showed how to prove languages irregular. This lesson shows a way to prove languages regular without exhibiting anything. By the end you can:
Warm-up
Discussion prompt
Before we open Advanced Regular Properties: without looking back, what was the main idea of Applications of the Pumping Lemma, and what could you do by the end of it that you could not do before?
Hint: One sentence for the idea, one for the skill. If the second one is blank, that is the part to revisit.
Answer:
Lesson 11 is a worked catalogue of non-regularity proofs. It gives the canonical matched-counts proof and the trap of choosing your own split, then counting languages and the line between bounded and unbounded quantities, and shape languages such as palindromes and repeated blocks, handled with the marker trick. It works arithmetic languages that need gap and factorization arguments, for the perfect squares and for the primes, and shows closure arguments as the shorter alternative. It ends with a language that pumps yet is not regular, together with the distinguishable-prefix fallback, and a diagnostic table for repairing failed attempts.
Section
Section 1
Concept
Two different notions of 'part of a string' are easy to confuse, and this lesson depends entirely on the less familiar one.
subsequence — A string obtained from another by deleting any number of symbols, from any positions, keeping the rest in order.
| Relation | From abcde you can get | Contiguous? |
|---|---|---|
| substring | bcd, cde, abc | yes |
| subsequence | bcd, ace, ad, abcde | no |
Every substring is a subsequence, but not conversely. The subsequence relation is much looser, and that looseness is exactly what makes the theorems below work.
Comparison
Comparison matrix
From Subsequences, not substrings: refill the From abcde you can get column from what you know. The rest of the table is as it appeared.
| Relation | From abcde you can get | Contiguous? |
|---|---|---|
| substring | bcd, cde, abc | yes |
| subsequence | bcd, ace, ad, abcde | no |
Concept
Write that one string embeds in another when the first is a subsequence of the second. This is a relation on the set of all strings.
\[ u \preceq v \quad \overset{\text{def}}{\iff} \quad u \text{ is a subsequence of } v \]
It is reflexive, since every string is a subsequence of itself, and transitive, since deleting from a deletion is a deletion. So it is a quasi-order in the sense of Lesson 1.
It is also antisymmetric on strings, since two strings that embed in each other must have equal length and hence be equal. So it is in fact a partial order — but the theorems only need the quasi-order structure.
\[ u \preceq v \text{ and } v \preceq u \;\Rightarrow\; u = v \]
Counterexample
Discussion prompt
Write that one string embeds in another when the first is a subsequence of the second. This is a relation on the set of all strings.
That is stated as though it always holds. Do one of two things: produce a case where it fails, or say precisely what rules such a case out. "It just does" is not on the menu.
Hint: Hunt at the extremes first — zero, one, negative, empty, equal. If every extreme survives, the reason they survive is the proof.
Ranking
Put in order
Put the moves of Check the order on concrete strings into the order they have to happen.
Why: These are the moves of the worked example in the order it makes them, and each one is set up by the one before it. Delete the first and last symbols of abcde to leave bcd.
Worked example
Get the relation into your fingers before using it, since the looseness is easy to underestimate.
Check an obvious case
Why: Delete the first and last symbols of abcde to leave bcd. Every symbol kept stayed in its original order, so the relation holds.
\[ bcd \preceq abcde \]
Check a non-contiguous case
Why: Keep the first, third and fifth symbols. They remain in order, so this also embeds — even though the result is not a substring.
\[ ace \preceq abcde \]
Check a case that fails
Why: The string ba cannot embed, because b appears after a in the target and the relation must preserve order.
\[ ba \not\preceq abcde \]
Note the empty string
Why: Deleting everything leaves the empty string, so it embeds in every string at all. It is the least element of the order.
\[ \varepsilon \preceq v \quad \text{for every } v \]
Verify the count of subsequences on a short string
Why: The string abc has one subsequence per subset of its positions, and the three positions give eight subsets. Listing them gives the empty string, a, b, c, ab, ac, bc and abc — eight, matching the count, and every one is genuinely order-preserving.
\[ 2^{3} = 8 \text{ subsequences of } abc \ \checkmark \]
Picture it
Animation
Shows: Each line of the worked example "Check the order on concrete strings", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Delete the first and last symbols of abcde to leave bcd. Every symbol kept stayed in its original order, so the relation holds.
Concept
Two kinds of language interact especially well with an order, and both come up constantly.
\[ \text{down: } v \in L, u \preceq v \Rightarrow u \in L \qquad \text{up: } u \in L, u \preceq v \Rightarrow v \in L \]
The two notions are complementary: a language is downward closed exactly when its complement is upward closed. So a theorem about one gives a theorem about the other for free.
Analogy
Discussion prompt
Explain Closed languages by analogy to something with no Theory of Computation in it at all — a queue, a recipe, a map, a bank balance, whatever fits. Then say where your analogy breaks.
Hint: An analogy that never breaks is not an analogy, it is the same idea wearing a hat. Find the seam — that is the part that is actually new.
Answer:
Two kinds of language interact especially well with an order, and both come up constantly.
Step zero
Discussion prompt
Recognize closed languages — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.
Hint: It starts with: Take the strings containing at least one a
Answer:
Worked example
Classify a few languages, since spotting closure is what makes the theorems applicable.
Take the strings containing at least one a
Why: Adding symbols to such a string keeps the a present, so it is upward closed. Deleting could remove the only a, so it is not downward closed.
Take the strings containing at most three a's
Why: Deleting symbols cannot increase the count, so every subsequence still qualifies. This is downward closed, and not upward closed.
Take the strings containing the block ab as a subsequence
Why: Adding symbols preserves the embedding, so it is upward closed. This is exactly the strings with an a somewhere before a b.
\[ L = \{\, w : ab \preceq w \,\} \]
Take a language that is neither
Why: The strings of even length are neither: deleting one symbol leaves odd length, and adding one does too.
Verify the complementation relationship on one pair
Why: The strings with at most three a's and the strings with at least four a's are complements. The first is downward closed and the second is upward closed, exactly as the general statement predicts.
\[ L \text{ down-closed} \iff \overline{L} \text{ up-closed} \ \checkmark \]
Picture it
Animation
Shows: Each line of the worked example "Recognize closed languages", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: The strings with at most three a's and the strings with at least four a's are complements. The first is downward closed and the second is upward closed, exactly as the general statement predicts.
Intuition
Downward and upward closed languages are highly constrained, and it pays to feel why before the theorems arrive.
An upward closed language is determined entirely by its minimal members: once you know those, everything above them is in, and nothing else is. So the whole language is described by a possibly small set of witnesses.
The theorems below say that set is always finite — which immediately makes the language a finite union of simple pieces, and hence regular. The entire lesson is that one implication, made precise.
\[ \text{finitely many minimal elements} \;\Rightarrow\; \text{regular} \]
Explain it
Discussion prompt
Explain Why closure should feel like a strong condition to a student a year behind you. No notation, no jargon they have not met — and it still has to be true.
Hint: If your explanation needs a symbol they have never seen, you are describing the notation rather than the idea.
Answer:
Downward and upward closed languages are highly constrained, and it pays to feel why before the theorems arrive.
Ranking
Put in order
These are the steps of How to use an order to prove regularity, scrambled. Put them back in order before the next slide shows you.
Why: This is the order the recipe itself gives. Recalling the sequence without the slide in front of you is the difference between recognising the method and being able to run it — most of what goes wrong in practice is a step done out of turn.
Pattern
The strategy, before the machinery. It is worth having the shape in mind while the definitions arrive.
Step three is where all the mathematics lives. Steps four and five are routine once it is available.
Elimination
Eliminate the wrong options
Which of these strings is NOT a subsequence of the string banana?
3 of these 4 are wrong. Strike them one at a time, and say what rules each one out before you strike the next. The survivor is the answer.
Survives elimination: A
Why: Reading banana left to right, an n never appears before an a that is followed by a b — the only b is the very first symbol. So the pattern n, then a, then b cannot be embedded in order.
Check
Remember that subsequences need not be contiguous.
Check your understanding
Which of these strings is NOT a subsequence of the string banana?
Answer: A
Why: Reading banana left to right, an n never appears before an a that is followed by a b — the only b is the very first symbol. So the pattern n, then a, then b cannot be embedded in order.
Section
Section 2
Concept
The property that makes everything work has a name, and the definition is deceptively short.
well-quasi-ordering — A reflexive, transitive relation in which every infinite sequence of elements contains some earlier element that is below some later one.
\[ \forall x_1, x_2, x_3, \dots \;\; \exists i < j \; : \; x_i \preceq x_j \]
Read that carefully. It does not say the sequence is increasing, or that it has an increasing subsequence starting at the front. It says that somewhere in any infinite list, a later element sits above an earlier one.
Concept
Four related notions get used interchangeably in casual speech, and this lesson needs them kept apart.
| Notion | Requires | Example |
|---|---|---|
| quasi-order | reflexive and transitive | any preorder |
| partial order | also antisymmetric | subsequence order |
| total order | also every pair comparable | the natural numbers |
| well-order | total, and every subset has a least element | the natural numbers |
A well-quasi-ordering sits alongside these rather than inside them: it demands nothing about comparability of individual pairs, only about infinite sequences. The subsequence order is a partial order that is not total, yet is a well-quasi-ordering.
Discrimination
Sort into buckets
Sort these by Example, from memory, without looking back at Quasi-order, partial order, well-order. Telling them apart on the spot is the skill; the table is only where the answer happens to be written down.
Estimation
Predict first
Practise the definitions on a finite example, where everything can be checked exhaustively.
Commit before you compute: what does Check the three conditions on a small order come out to? A rough magnitude and the right form is enough — the point is to have something concrete to be wrong about.
Correct: Verify why a finite order is automatically a well-quasi-ordering
Why: A prediction you can defend turns the computation into a check rather than a leap of faith — and an answer that contradicts it is caught on the spot. Any infinite sequence drawn from a finite set must repeat some element, and a repeat gives an earlier element embedding in a later one by reflexivity.
Worked example
Practise the definitions on a finite example, where everything can be checked exhaustively.
Take the strings of length at most two over one symbol
Why: Three strings: the empty string, a single a, and two a's. Order them by the subsequence relation.
\[ \varepsilon \preceq a \preceq aa \]
Check reflexivity and transitivity
Why: Each string is a subsequence of itself, and the chain composes, so the relation is a quasi-order.
Check antisymmetry
Why: No two distinct strings embed in each other, since embedding cannot increase length. So it is a partial order too.
Check for antichains and descending chains
Why: The order is a chain, so there are no incomparable pairs at all, and it is finite so there is no infinite descent.
Verify why a finite order is automatically a well-quasi-ordering
Why: Any infinite sequence drawn from a finite set must repeat some element, and a repeat gives an earlier element embedding in a later one by reflexivity. So every finite quasi-order is a well-quasi-ordering, and the content of the theorems lies entirely in the infinite case.
\[ \text{finite set} \;\Rightarrow\; \text{some } x_i = x_j, \; i<j \;\Rightarrow\; x_i \preceq x_j \ \checkmark \]
Picture it
Animation
Shows: Each line of the worked example "Check the three conditions on a small order", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Each string is a subsequence of itself, and the chain composes, so the relation is a quasi-order.
Concept
The definition is easier to use in its negative form, which forbids two kinds of bad infinite structure.
Remarkably, forbidding both is not merely necessary but sufficient. That equivalence is the standard working characterization.
\[ \text{wqo} \iff \text{well-founded} \;\text{and}\; \text{no infinite antichain} \]
Intuition
Well-foundedness is usually easy — most natural orders on finite objects have no infinite descending chain, because size decreases and sizes are natural numbers.
The subsequence order is like that: a proper subsequence is strictly shorter, so a descending chain must terminate. Well-foundedness comes free.
\[ u \prec v \;\Rightarrow\; |u| < |v| \]
The real content is the absence of infinite antichains — no infinite family of strings, none of which embeds in any other. That is what Higman's theorem asserts, and it is genuinely surprising.
Missing information
Discussion prompt
See the property fail, so that its success later means something.
What do you need to know — or decide — before the first line can be written? List everything the problem has to hand you.
Hint: Anything you would have to invent to get started is a thing the problem must supply.
Answer:
Say one string is below another when it appears as a contiguous block inside it.
Worked example
See the property fail, so that its success later means something.
Take the substring order instead of the subsequence order
Why: Say one string is below another when it appears as a contiguous block inside it.
Build a candidate antichain
Why: Consider the strings consisting of an a, then some number of b's, then an a — one for each count.
\[ w_n = a\,b^{n}\,a, \qquad n = 1, 2, 3, \dots \]
Check they are pairwise incomparable
Why: A shorter one cannot sit contiguously inside a longer one, because the longer one's interior is all b's, and any block containing both a's must be the whole string.
Conclude the substring order is not well behaved
Why: An infinite antichain exists, so the substring order is not a well-quasi-ordering. Every theorem in this lesson is therefore specific to the subsequence order.
Verify the same family is not an antichain under subsequences
Why: Under the subsequence order the shorter strings do embed in the longer ones: take the two a's and as many b's as needed. So the family that broke the substring order is harmless here — which is the first hint that the looser order is better behaved.
\[ a\,b^{2}\,a \preceq a\,b^{5}\,a \quad \text{but} \quad a\,b^{2}\,a \text{ is not a substring of } a\,b^{5}\,a \ \checkmark \]
Picture it
Animation
Shows: Each line of the worked example "Find an infinite antichain in an order that is not well behaved", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: A shorter one cannot sit contiguously inside a longer one, because the longer one's interior is all b's, and any block containing both a's must be the whole string.
Concept
The reason well-quasi-orderings matter is a single corollary, and it is worth deriving rather than quoting.
Take any upward closed set. Its minimal elements — those with nothing strictly below them inside the set — form an antichain, since two minimal elements cannot be comparable.
If the order is a well-quasi-ordering, that antichain must be finite. And well-foundedness guarantees every member of the set sits above at least one minimal element.
\[ U \text{ up-closed} \;\Rightarrow\; U = \{\, v : \exists i \le k, \; b_i \preceq v \,\} \]
So the whole set is described by finitely many witnesses. That is the finite-basis property, and it is what turns an abstract order into a regularity theorem.
Step zero
Discussion prompt
Prove the finite-basis property — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.
Hint: It starts with: Take an upward closed set and its minimal elements
Answer:
Worked example
The derivation in full, since it is short and it shows exactly where each half of the definition is used.
Take an upward closed set and its minimal elements
Why: Let the set be given, and collect those members with nothing strictly smaller inside it.
Show the minimal elements form an antichain
Why: If one minimal element were strictly below another, the second would not be minimal. So no two are comparable, which is what antichain means.
Apply the no-infinite-antichain half
Why: A well-quasi-ordering admits no infinite antichain, so the set of minimal elements is finite.
\[ \{b_1, \dots, b_k\} \text{ finite} \]
Apply the well-foundedness half
Why: Every member of the set has some minimal element below it — otherwise an infinite strictly descending chain inside the set could be built, which well-foundedness forbids.
Verify both directions of the resulting description
Why: Every member sits above some witness, by the previous step; and every string above a witness is a member, since the set is upward closed. So the set is exactly the union of the finitely many upward cones, and the description is exact rather than approximate.
\[ U = \bigcup_{i=1}^{k} \{\, v : b_i \preceq v \,\} \ \checkmark \]
Picture it
Animation
Shows: Each line of the worked example "Prove the finite-basis property", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Every member sits above some witness, by the previous step; and every string above a witness is a member, since the set is upward closed. So the set is exactly the union of the finitely many upward cones, and the description is exact rather than approximate.
Prediction
Predict first
Which pair of conditions is equivalent to being a well-quasi-ordering?
Answer it in your own words, now, with nothing to choose from. The options are on the next slide — and picking the right one off a list is an easier skill than producing it.
Correct: No infinite strictly descending chain, and no infinite antichain
Why: An infinite descending chain and an infinite antichain are exactly the two ways an infinite sequence can avoid having a later element above an earlier one. Forbidding both is therefore equivalent to the definition.
Check
Recall which two structures the definition forbids.
Check your understanding
Which pair of conditions is equivalent to being a well-quasi-ordering?
Answer: A
Why: An infinite descending chain and an infinite antichain are exactly the two ways an infinite sequence can avoid having a later element above an earlier one. Forbidding both is therefore equivalent to the definition.
Section
Section 3
Concept
The simplest well-quasi-ordering, and the one every other proof in this lesson leans on.
Order tuples of natural numbers componentwise: one tuple is below another when every one of its entries is at most the corresponding entry.
\[ (a_1,\dots,a_k) \preceq (b_1,\dots,b_k) \quad\iff\quad a_i \le b_i \text{ for all } i \]
Dickson's lemma — For every fixed k, the componentwise order on k-tuples of natural numbers is a well-quasi-ordering.
For one component this is just the fact that the natural numbers have no infinite descending sequence. The content is that it survives taking finite products.
Hypothesis
Predict first
Prove Dickson's lemma is about to be worked. State your hypothesis first: which rule or definition decides this one, and what is the first move it forces? Then watch whether the example agrees with you.
Correct: Take an infinite sequence of tuples
Why: Suppose the lemma fails: there is an infinite sequence with no earlier tuple below any later one.
A hypothesis you wrote down is falsifiable; a vague sense of how it will go is not. If the example opens somewhere else, that gap is the thing worth chasing.
Worked example
The proof is a repeated extraction of monotone subsequences, and it is worth doing once because Higman's proof imitates it.
Take an infinite sequence of tuples
Why: Suppose the lemma fails: there is an infinite sequence with no earlier tuple below any later one.
Extract on the first coordinate
Why: The first coordinates form an infinite sequence of natural numbers. Every such sequence has an infinite non-decreasing subsequence, since it cannot decrease forever.
\[ \text{pass to a subsequence with } a^{(1)}_{i} \le a^{(1)}_{j} \text{ for } i < j \]
Repeat on each remaining coordinate
Why: Within that subsequence, extract again on the second coordinate, then the third, and so on. There are k coordinates, so the process stops after k extractions.
Read off the contradiction
Why: In the final subsequence every coordinate is non-decreasing, so any earlier tuple is componentwise below any later one — contradicting the assumption.
Verify that finiteness of k was essential
Why: The argument performs one extraction per coordinate, so it terminates only because k is finite. With infinitely many coordinates the lemma genuinely fails, and an infinite antichain can be built from tuples that are each smallest in a different coordinate.
\[ k \text{ finite} \;\Rightarrow\; \text{finitely many extractions} \ \checkmark \]
Picture it
Animation
Shows: Each line of the worked example "Prove Dickson's lemma", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: The argument performs one extraction per coordinate, so it terminates only because k is finite. With infinitely many coordinates the lemma genuinely fails, and an infinite antichain can be built from tuples that are each smallest in a different coordinate.
Concept
Dickson's lemma is the special case of a general principle worth stating on its own, because it is what makes the machinery composable.
If two orders are each well-quasi-orderings, so is their product ordered componentwise. The proof is the two-step extraction from the previous slide, done once per factor.
\[ (A, \preceq_A) \text{ wqo}, \; (B, \preceq_B) \text{ wqo} \;\Rightarrow\; (A \times B) \text{ wqo} \]
Iterating gives any finite product. Dickson's lemma is then just the statement for finitely many copies of the natural numbers, which is a well-quasi-ordering because it has no infinite descending sequence and is totally ordered.
The same closure does not extend to infinite products, which is why the coordinate count must be fixed — the extraction would never terminate.
Sorting
Sort into buckets
These are the pieces of Advanced Regular Properties, out of order. Put each one back under the part of the lesson it belongs to.
Worked example
One more basis computation, this time where the answer is less obvious.
Take an upward closed set with a mixed condition
Why: Consider the pairs where either the first entry is at least three, or the second entry is at least two.
\[ U = \{\, (a,b) : a \ge 3 \text{ or } b \ge 2 \,\} \]
Check upward closure
Why: Increasing either entry preserves whichever disjunct already held, so the set is upward closed.
Find the minimal elements of each disjunct
Why: For the first, the minimum is three in the first entry and nothing required in the second. For the second, it is two in the second entry with nothing required in the first.
\[ (3,0) \quad \text{and} \quad (0,2) \]
Check they are incomparable and that nothing else is minimal
Why: Neither is componentwise below the other. Any other member sits above one of them, since it satisfies one of the two disjuncts.
Verify the union description covers the set exactly
Why: The pair with entries four and zero sits above the first witness and satisfies the first disjunct. The pair with entries zero and five sits above the second. The pair with entries two and one sits above neither and satisfies neither disjunct, so it is correctly excluded.
\[ (4,0), (0,5) \in U \qquad (2,1) \notin U \ \checkmark \]
Picture it
Animation
Shows: Each line of the worked example "Show a set of tuples has a finite basis by hand", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Increasing either entry preserves whichever disjunct already held, so the set is upward closed.
Intuition
Stated concretely, the lemma is a statement about monomials, or about resource vectors, and it is used constantly outside this course.
| Setting | Tuples represent | The lemma says |
|---|---|---|
| polynomial algebra | monomial exponents | every monomial ideal is finitely generated |
| Petri nets | token counts | coverability sets are finite |
| program analysis | counter values | certain fixpoint computations terminate |
Each application is the finite-basis property applied to an upward closed set of tuples. Recognizing that shape is most of the skill.
Trade off
Comparison matrix
From What Dickson's lemma says in practice: every row here is a choice with a cost. Fill the The lemma says column, then say which row you would actually pick and what you give up for it.
| Setting | Tuples represent | The lemma says |
|---|---|---|
| polynomial algebra | monomial exponents | every monomial ideal is finitely generated |
| Petri nets | token counts | coverability sets are finite |
| program analysis | counter values | certain fixpoint computations terminate |
Ranking
Put in order
Put the moves of Apply Dickson's lemma to a set of tuples into the order they have to happen.
Why: These are the moves of the worked example in the order it makes them, and each one is set up by the one before it. Consider the pairs of natural numbers whose sum is at least four.
Worked example
Use the finite-basis property on a concrete upward closed set.
Take an upward closed set of pairs
Why: Consider the pairs of natural numbers whose sum is at least four. Increasing either entry keeps the sum at least four, so the set is upward closed.
\[ U = \{\, (a,b) : a + b \ge 4 \,\} \]
Find the minimal elements
Why: A pair is minimal when decreasing either entry leaves the set. Those are the pairs summing to exactly four.
\[ (0,4), \; (1,3), \; (2,2), \; (3,1), \; (4,0) \]
Check the count is finite
Why: Five minimal pairs, as Dickson's lemma guarantees. They are pairwise incomparable, since each has a strictly larger first entry and a strictly smaller second than the next.
Write the set as a finite union of cones
Why: Every member sits above one of the five, and everything above one of the five is a member.
\[ U = \bigcup_{i=0}^{4} \{\, (a,b) : a \ge i, \; b \ge 4-i \,\} \]
Verify the description on a member and a non-member
Why: The pair with entries three and three sums to six and sits above the minimal pair with entries two and two, so it is in the union. The pair with entries one and two sums to three and sits above none of the five, so it is outside — matching the original condition exactly.
\[ (3,3) \in U, \qquad (1,2) \notin U \ \checkmark \]
Picture it
Animation
Shows: Each line of the worked example "Apply Dickson's lemma to a set of tuples", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Five minimal pairs, as Dickson's lemma guarantees. They are pairwise incomparable, since each has a strictly larger first entry and a strictly smaller second than the next.
Check
Think about what the proof does once per coordinate.
Check your understanding
Why does Dickson's lemma require the number of coordinates to be fixed and finite?
Answer: A
Why: Each extraction fixes one coordinate to be non-decreasing while preserving infiniteness. With finitely many coordinates the process ends and every coordinate is non-decreasing at once; with infinitely many it never finishes, and the lemma is actually false.
Section
Section 4
Concept
The central result of the lesson, and one of the more surprising theorems in elementary formal language theory.
Higman's theorem — For any finite alphabet, the subsequence order on the set of all strings over that alphabet is a well-quasi-ordering.
\[ \Sigma \text{ finite} \;\Longrightarrow\; (\Sigma^{*}, \preceq) \text{ is a wqo} \]
Concretely: given any infinite list of strings over a fixed finite alphabet, some earlier string in the list embeds as a subsequence in some later one. You cannot avoid it, however cleverly you choose.
Matching
Match the pairs
Match each term to the definition this lesson gave it — not the one you would guess from the word.
Why: These are the working definitions of subsequence, well-quasi-ordering, Dickson's lemma, Higman's theorem as Advanced Regular Properties uses them. Pairing them correctly is the test of whether you could state each one with the slide switched off.
Intuition
It is worth trying to violate it for a minute, because failing to is what makes the statement land.
The obvious attempt is the family used earlier against the substring order: an a, then a growing block of b's, then an a. Under subsequences the shorter ones embed in the longer ones immediately, so that fails.
Every other natural attempt fails the same way. Making strings longer gives later strings more room to contain earlier ones, and making them structurally different runs out of room because the alphabet is finite.
\[ \text{finite alphabet} \;+\; \text{unbounded length} \;=\; \text{unavoidable embedding} \]
Estimation
Predict first
Three attempts, each defeated, which is the fastest route to believing the theorem.
Commit before you compute: what does Try and fail to build an infinite antichain come out to? A rough magnitude and the right form is enough — the point is to have something concrete to be wrong about.
Correct: Verify the finite-alphabet hypothesis is doing the work
Why: A prediction you can defend turns the computation into a check rather than a leap of faith — and an answer that contradicts it is caught on the spot. Over an infinite alphabet the theorem fails immediately: the one-symbol strings, one per letter, are pairwise incomparable and form an infinite antichain.
Worked example
Three attempts, each defeated, which is the fastest route to believing the theorem.
Attempt one: increasing blocks
Why: Take an a, then n b's, then an a. Any earlier member embeds in a later one by keeping both a's and enough b's. Not an antichain.
\[ a\,b^{2}\,a \preceq a\,b^{5}\,a \]
Attempt two: alternate the pattern
Why: Take strings alternating a and b, of increasing length. A shorter alternating string embeds in a longer one by taking a prefix. Not an antichain.
Attempt three: make each string avoid the previous
Why: Choose each new string to omit some symbol pattern the previous one had. With a finite alphabet there are only finitely many patterns of each length, so this cannot be sustained indefinitely.
Recognize the obstruction
Why: Every attempt founders on the same point: strings must grow, and a growing string over a finite alphabet has ever more room to contain the short strings already listed.
Verify the finite-alphabet hypothesis is doing the work
Why: Over an infinite alphabet the theorem fails immediately: the one-symbol strings, one per letter, are pairwise incomparable and form an infinite antichain. So finiteness is not a technical convenience but the essential hypothesis.
\[ |\Sigma| = \infty \;\Rightarrow\; \{a_1, a_2, a_3, \dots\} \text{ is an infinite antichain} \ \checkmark \]
Picture it
Animation
Shows: Each line of the worked example "Try and fail to build an infinite antichain", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Over an infinite alphabet the theorem fails immediately: the one-symbol strings, one per letter, are pairwise incomparable and form an infinite antichain. So finiteness is not a technical convenience but the essential hypothesis.
Concept
Before the general proof, the single-symbol alphabet is worth checking, because it makes the statement concrete.
Over one symbol, a string is determined by its length, and one string embeds in another exactly when it is no longer. So the subsequence order is just the order on the natural numbers.
\[ a^{m} \preceq a^{n} \iff m \le n \]
The natural numbers have no infinite descending sequence and no two are incomparable, so the order is a well-quasi-ordering. Higman's theorem for one symbol is therefore immediate.
The difficulty appears only from two symbols upward, where incomparable strings exist — ab and ba, for instance — and the question of infinite antichains becomes real.
Step zero
Discussion prompt
Find the basis of a downward closed language — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.
Hint: It starts with: Take a downward closed language
Answer:
Worked example
Downward closed languages are described by their forbidden patterns rather than their required ones, and the basis lives in the complement.
Take a downward closed language
Why: The strings over the alphabet of a and b containing at most two a's. Deleting symbols cannot raise the count, so it is downward closed.
Describe it by what it forbids
Why: A string is excluded exactly when it contains three a's, which as a subsequence is the string of three a's.
\[ w \in L \iff aaa \not\preceq w \]
Read off the basis of the complement
Why: The complement is upward closed and its unique minimal member is the three-a string. So the forbidden set has exactly one element.
Build the machine from the basis
Why: The cone above the three-a string has a four-state machine counting a's up to three. Complementing swaps its accepting set, giving a machine for the original language.
\[ |Q| = 4 \]
Verify the machine against the description
Why: Strings with zero, one or two a's are accepted and strings with three or more are rejected, matching the at-most-two condition exactly. Here the basis was findable by inspection, which is why an explicit machine could be produced — the general theorem offers no such luck.
\[ aab \in L, \qquad aaab \notin L \ \checkmark \]
Picture it
Animation
Shows: Each line of the worked example "Find the basis of a downward closed language", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Strings with zero, one or two a's are accepted and strings with three or more are rejected, matching the at-most-two condition exactly. Here the basis was findable by inspection, which is why an explicit machine could be produced — the general theorem offers no such luck.
Intuition
Downward closed languages are almost always specified negatively, and the specification is exactly a set of forbidden subsequences.
| Language | Forbidden subsequence |
|---|---|
| at most two a's | three a's |
| no b after an a | the string ab |
| no a and b in either order | ab and ba |
| symbols appear in alphabetical order | every descending pair |
Higman's theorem says the forbidden set can always be taken finite — even when the natural description lists infinitely many patterns, as in the last row, where all the descending pairs reduce to finitely many minimal ones.
Concept
The standard proof is by a minimal-counterexample argument, and the shape is worth knowing even without the details.
The technique is called the minimal bad sequence argument, and it recurs throughout the theory of well-quasi-orderings, including in the proof of the graph minor theorem.
Intuition
One step of the sketch uses the hypothesis, and identifying it explains why the theorem is sharp.
Stripping the first symbol from each string in an infinite family produces infinitely many stripped strings, each tagged with the symbol removed. With finitely many possible tags, some tag is used infinitely often — a pigeonhole step.
\[ \text{infinitely many strings} \;+\; \text{finitely many first symbols} \;\Rightarrow\; \text{an infinite same-symbol subfamily} \]
With an infinite alphabet every string could be stripped of a different symbol and no infinite subfamily would appear. That is exactly the case where the theorem fails.
Commit first
Predict first
Higman's theorem fails for infinite alphabets. What is the simplest counterexample?
Commit to an answer, then rate it — certain, fairly sure, or guessing — and write the rating down before you turn the page.
Correct: The one-symbol strings, one for each letter of the alphabet
Why: Two distinct single-symbol strings are incomparable, since neither can be obtained from the other by deletion. With infinitely many letters that gives an infinite antichain immediately, so the order is not a well-quasi-ordering.
The rating matters as much as the answer: confident-and-wrong is the combination that survives revision, because nothing about it feels like it needs revisiting.
Check
Recall which hypothesis the counterexample violates.
Check your understanding
Higman's theorem fails for infinite alphabets. What is the simplest counterexample?
Answer: A
Why: Two distinct single-symbol strings are incomparable, since neither can be obtained from the other by deletion. With infinitely many letters that gives an infinite antichain immediately, so the order is not a well-quasi-ordering.
Section
Section 5
Concept
Now the payoff. Combine Higman's theorem with the finite-basis property and the closure results of Lesson 7.
Let the language be upward closed under the subsequence order. By Higman's theorem the order is a well-quasi-ordering, so the set of minimal members is finite.
\[ L = \bigcup_{i=1}^{k} \{\, v : b_i \preceq v \,\} \]
Each cone — the strings containing a fixed string as a subsequence — is regular, with an easy machine. And a finite union of regular languages is regular by Lesson 7.
So the language is regular, and the proof never looked at what the language actually contains.
Missing information
Discussion prompt
The one construction the argument needs: a machine for the strings containing a fixed string as a subsequence.
What do you need to know — or decide — before the first line can be written? List everything the problem has to hand you.
Hint: Anything you would have to invent to get started is a thing the problem must supply.
Answer:
How much of the pattern has been matched so far. That is a number between zero and the pattern's length, so there are finitely many answers.
Worked example
The one construction the argument needs: a machine for the strings containing a fixed string as a subsequence.
\[ C_b = \{\, v : b \preceq v \,\}, \qquad b = b_1b_2\cdots b_m \]
Choose what to remember
Why: How much of the pattern has been matched so far. That is a number between zero and the pattern's length, so there are finitely many answers.
\[ \text{states} = \{0, 1, \dots, m\} \]
Wire the arrows
Why: From state i, reading the next needed symbol advances to state i plus one. Reading anything else stays in state i, since a non-matching symbol is simply skipped.
Choose the accepting state
Why: The final state, meaning the whole pattern has been matched, and it absorbs: once matched, adding symbols cannot unmatch.
\[ F = \{m\}, \qquad \delta(m, a) = m \]
Note the greedy behaviour is correct
Why: Matching the earliest possible occurrence of each symbol never loses: if some embedding exists, the greedy one succeeds too. So the deterministic machine is right without needing nondeterminism.
Verify on a member and a non-member
Why: For the pattern ab, the string ba is rejected because no a precedes a b, while the string bab is accepted — the machine skips the first b, matches a, then matches the final b. Both verdicts match the subsequence relation.
\[ ab \preceq bab, \qquad ab \not\preceq ba \ \checkmark \]
Picture it
Animation
Shows: Each line of the worked example "Build the machine for a single cone", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: For the pattern ab, the string ba is rejected because no a precedes a b, while the string bab is accepted — the machine skips the first b, matches a, then matches the final b. Both verdicts match the subsequence relation.
Concept
The complementary statement follows immediately, with no extra work.
A language is downward closed exactly when its complement is upward closed. The complement is regular by the previous result, and the regular languages are closed under complement by Lesson 7.
\[ L \text{ down-closed} \;\Rightarrow\; \overline{L} \text{ up-closed} \;\Rightarrow\; \overline{L} \text{ regular} \;\Rightarrow\; L \text{ regular} \]
So both kinds of closed language are regular, for the same underlying reason. Notice how much of Lesson 7 is being used: complement, finite union, and the fact that these are theorems rather than definitions.
Estimation
Predict first
Use the result on a language where building a machine directly would be genuinely awkward.
Commit before you compute: what does Apply the theorem to a language with no obvious machine come out to? A rough magnitude and the right form is enough — the point is to have something concrete to be wrong about.
Correct: Verify the surprise is real by testing an infinite defining set
Why: A prediction you can defend turns the computation into a check rather than a leap of faith — and an answer that contradicts it is caught on the spot. Take the defining set to be every string of the form a, then some b's, then a.
Worked example
Use the result on a language where building a machine directly would be genuinely awkward.
State the language
Why: Fix any set of strings, however complicated, and take all strings containing at least one member of that set as a subsequence.
Check upward closure
Why: Adding symbols to a string preserves every subsequence it already had, so a string above a member is still a member. The language is upward closed.
Invoke the theorem
Why: By Higman's theorem and the finite-basis property, only finitely many minimal members matter — even though the defining set may have been infinite.
Conclude regularity
Why: The language is a finite union of cones, each regular, so it is regular.
Verify the surprise is real by testing an infinite defining set
Why: Take the defining set to be every string of the form a, then some b's, then a. It is infinite, yet all its members contain the minimal member a-b-a as a subsequence, so the whole language is the single cone above that string — one machine, four states. The finite basis collapsed an infinite specification.
\[ \{a\,b^{n}\,a : n \ge 1\} \;\rightsquigarrow\; \text{basis } \{aba\} \ \checkmark \]
Picture it
Animation
Shows: Each line of the worked example "Apply the theorem to a language with no obvious machine", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Adding symbols to a string preserves every subsequence it already had, so a string above a member is still a member. The language is upward closed.
Anomaly
Predict first
A student writes this, and it looks reasonable:
A language is shown regular by Higman's theorem. Where is its machine?
It is wrong. Say what breaks — and say it before you turn the page.
Correct: The argument produced a finite basis and a union of cones, and each cone has an explicit machine.
A language is shown regular by Higman's theorem. Where is its machine?
Why: The argument produced a finite basis and a union of cones, and each cone has an explicit machine. So take the union of those machines.
Trap
A language is shown regular by Higman's theorem. Where is its machine?
Assume the proof is constructive
Why: The argument produced a finite basis and a union of cones, and each cone has an explicit machine. So take the union of those machines.
\[ L = \bigcup_{i=1}^{k} C_{b_i} \;\Rightarrow\; \text{build } k \text{ machines} \]
Try to carry it out
Why: To build the machines you must know the basis. Ask the proof for the basis strings, and it has none to give.
A language is shown regular by Higman's theorem. Where is its machine?
Notice what the theorem actually asserts
Why: It says the basis is finite. It does not say which strings are in it, how many there are, or how to find them. The finite-basis argument is a pure existence proof.
\[ \exists k, \exists b_1,\dots,b_k \quad \text{— with no way to compute them} \]
Accept the conclusion without the construction
Why: The language is regular: some machine exists. But the proof supplies no algorithm to produce it, and in general no algorithm exists.
\[ L \text{ regular} \quad \text{but no machine is exhibited} \ \checkmark \]
Recognize this as a genuinely different kind of proof
Why: Every earlier regularity proof in this course was constructive: it built something. This one is not, and that distinction matters for the decidability questions of Lesson 24.
Notation
Annotate
From Trap: expecting the proof to hand you a machine — read this one piece at a time. What is each part doing?
On: \( L = \bigcup_{i=1}^{k} C_{b_i} \;\Rightarrow\; \text{build } k \text{ machines} \)
Intuition
This is probably the first non-constructive argument in the course, and it is worth pausing on what has been given up.
| Proof style | Gives you | Example |
|---|---|---|
| constructive | an object you can run | the subset construction |
| non-constructive | only the knowledge that one exists | the finite-basis argument |
Knowing a machine exists is enough for many purposes — it settles the classification question, and it licenses every closure theorem. But it does not let you decide membership, because you cannot run a machine you cannot write down.
Comparison
Comparison matrix
From Non-constructive proofs and what they cost: refill the Gives you column from what you know. The rest of the table is as it appeared.
| Proof style | Gives you | Example |
|---|---|---|
| constructive | an object you can run | the subset construction |
| non-constructive | only the knowledge that one exists | the finite-basis argument |
Check
Think about what the finite-basis property does and does not provide.
Check your understanding
Higman's theorem shows a certain upward closed language is regular. What can you do with that fact?
Answer: A
Why: The argument establishes that the set of minimal members is finite, which forces the language to be a finite union of cones and hence regular. It gives no way to identify those minimal members, so no machine is produced.
Section
Section 6
Concept
If somebody hands you the basis, everything becomes constructive again, and the resulting algorithm is simple.
So the difficulty is never in using the basis. It is entirely in obtaining one, which the theorem declines to help with.
\[ \text{basis known} \;\Rightarrow\; O(k \cdot |w|) \text{ membership test} \]
Explain it
Discussion prompt
Explain Deciding membership once the basis is known to a student a year behind you. No notation, no jargon they have not met — and it still has to be true.
Hint: If your explanation needs a symbol they have never seen, you are describing the notation rather than the idea.
Answer:
If somebody hands you the basis, everything becomes constructive again, and the resulting algorithm is simple.
Step zero
Discussion prompt
Run the greedy embedding test — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.
Hint: It starts with: Set up two pointers
Answer:
Worked example
The linear scan that decides whether one string is a subsequence of another.
Set up two pointers
Why: One walks the pattern and one walks the input. Start both at the beginning.
Scan
Why: Advance the input pointer one symbol at a time. Whenever the current input symbol equals the current pattern symbol, advance the pattern pointer too.
Decide
Why: The pattern embeds exactly when its pointer reaches the end before the input is exhausted.
\[ ab \preceq bab \;: \; b \text{ skipped}, \; a \text{ matched}, \; b \text{ matched} \]
See why greedy is correct
Why: Matching each pattern symbol at its earliest opportunity leaves the most room for the rest. So if any embedding exists, the greedy one succeeds — no backtracking is needed.
Verify on a positive and a negative case
Why: For the pattern ab and input bab the scan matches both symbols and reports yes. For the same pattern and input ba the scan matches the a at position two and then finds no b afterwards, reporting no — matching the subsequence relation in both cases.
\[ ab \preceq bab, \qquad ab \not\preceq ba \ \checkmark \]
Picture it
Animation
Shows: Each line of the worked example "Run the greedy embedding test", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: For the pattern ab and input bab the scan matches both symbols and reports yes. For the same pattern and input ba the scan matches the a at position two and then finds no b afterwards, reporting no — matching the subsequence relation in both cases.
Prediction
Predict first
A downward closed language has forbidden set consisting of the single string aa. Which strings does it contain?
Answer it in your own words, now, with nothing to choose from. The options are on the next slide — and picking the right one off a list is an easier skill than producing it.
Correct: Exactly the strings with at most one a
Why: A string is excluded exactly when it contains the forbidden pattern as a subsequence, and containing two a's anywhere — adjacent or not — embeds the pattern. So the language holds the strings with zero or one a, and any number of other symbols.
Check
Think about which direction the closure runs.
Check your understanding
A downward closed language has forbidden set consisting of the single string aa. Which strings does it contain?
Answer: A
Why: A string is excluded exactly when it contains the forbidden pattern as a subsequence, and containing two a's anywhere — adjacent or not — embeds the pattern. So the language holds the strings with zero or one a, and any number of other symbols.
Ranking
Put in order
These are the steps of Recognizing when this machinery applies, scrambled. Put them back in order before the next slide shows you.
Why: This is the order the recipe itself gives. Recalling the sequence without the slide in front of you is the difference between recognising the method and being able to run it — most of what goes wrong in practice is a step done out of turn.
Pattern
The theorems are powerful but narrow. These are the signals that they are the right tool.
If you need to run something, this is the wrong tool no matter how elegant. Go back and find the basis by hand, or find a different characterization of the language.
Edge cases
Discussion prompt
Recognizing when this machinery applies works on the cases you have just seen. Push it to the edge: what is the most degenerate input it still handles — empty, zero, one item, everything equal — and what is the first case where it stops being true? Name the case, not just "it breaks".
Hint: Try the smallest legal input, then the largest, then the one where two things collide. Methods are specified at their edges; the middle takes care of itself.
Answer:
The theorems are powerful but narrow. These are the signals that they are the right tool.
Concept
Well-quasi-orderings are not a curiosity of formal language theory. The same finite-basis argument runs in several other subjects.
| Order | Objects | Finite-basis statement |
|---|---|---|
| componentwise on tuples | vectors of counts | Dickson's lemma |
| subsequence on strings | words | Higman's theorem |
| minor on graphs | finite graphs | the graph minor theorem |
| divisibility on monomials | monomials | monomial ideals are finitely generated |
The third row is the deepest: every family of graphs closed under taking minors is characterized by finitely many forbidden minors. Planarity is the famous instance, with exactly two.
Trade off
Comparison matrix
From Where else these ideas appear: every row here is a choice with a cost. Fill the Objects column, then say which row you would actually pick and what you give up for it.
| Order | Objects | Finite-basis statement |
|---|---|---|
| componentwise on tuples | vectors of counts | Dickson's lemma |
| subsequence on strings | words | Higman's theorem |
| minor on graphs | finite graphs | the graph minor theorem |
| divisibility on monomials | monomials | monomial ideals are finitely generated |
Intuition
Each of those results says: a class closed under a natural weakening operation is determined by a finite set of obstructions.
And each comes with the same limitation. The obstruction set is guaranteed finite and is usually unknown, so the theorem classifies without deciding.
For graph minors the situation is stark: membership is decidable in principle once the obstructions are known, and for most interesting classes they are not known. Exactly the trade-off this lesson's trap illustrates.
\[ \text{finite obstruction set} \;\not\Rightarrow\; \text{known obstruction set} \]
Analogy
Discussion prompt
Explain The same shape of theorem, three times by analogy to something with no Theory of Computation in it at all — a queue, a recipe, a map, a bank balance, whatever fits. Then say where your analogy breaks.
Hint: An analogy that never breaks is not an analogy, it is the same idea wearing a hat. Find the seam — that is the part that is actually new.
Answer:
Each of those results says: a class closed under a natural weakening operation is determined by a finite set of obstructions.
Ranking
Put in order
Put the moves of Use Dickson's lemma on a language question into the order they have to happen.
Why: These are the moves of the worked example in the order it makes them, and each one is set up by the one before it. Fix an alphabet of three symbols and consider the strings whose symbol counts, as a triple, lie in some upward closed set of triples.
Worked example
A final application, tying the tuple version back to strings.
Take a language defined by counts
Why: Fix an alphabet of three symbols and consider the strings whose symbol counts, as a triple, lie in some upward closed set of triples.
Apply Dickson's lemma to the triples
Why: The componentwise order on triples is a well-quasi-ordering, so the upward closed set of triples has a finite basis.
\[ T = \bigcup_{i=1}^{k} \{\, (a,b,c) : (a,b,c) \succeq t_i \,\} \]
Translate each basis triple into a language condition
Why: A triple condition says: at least so many of each symbol. That is a conjunction of three capped-count conditions, each recognized by a small machine.
Assemble
Why: Each basis triple gives a regular language by intersection of three capped counters, and the whole language is the finite union of those. So it is regular.
Verify the counting condition really is capped
Why: Each condition asks for at least a fixed number of one symbol, so the counter may stop at that number — a bounded quantity, unlike the unbounded differences of Lesson 11. That is precisely why these languages are regular while the matched-counts language is not.
\[ \text{at least } n \text{ copies} \;\Rightarrow\; n+1 \text{ states} \ \checkmark \]
Picture it
Animation
Shows: Each line of the worked example "Use Dickson's lemma on a language question", appearing one at a time.
The same working the example does, in the order a tutor would write it.
Takeaway: Each condition asks for at least a fixed number of one symbol, so the counter may stop at that number — a bounded quantity, unlike the unbounded differences of Lesson 11. That is precisely why these languages are regular while the matched-counts language is not.
Concept
The theorem gives a sufficient condition, not a necessary one, and it is worth seeing how far short of the full class it falls.
| Language | Closed under subsequences? | Regular? |
|---|---|---|
| at most three a's | downward | yes, by this lesson |
| contains ab as a subsequence | upward | yes, by this lesson |
| even length | neither | yes, but not by this lesson |
| ends in 01 | neither | yes, but not by this lesson |
So the closed languages are a small and special corner of the regular class. When the tool applies it is powerful; when it does not, nothing has been learned and an ordinary construction is needed.
Discrimination
Sort into buckets
Sort these by Closed under subsequences?, from memory, without looking back at Not every regular language is closed. Telling them apart on the spot is the skill; the table is only where the answer happens to be written down.
Intuition
The last two rows of that table fail closure for the same reason, and it explains the tool's narrowness.
Both conditions care about the positions of symbols — the last two symbols, or the length parity. Deleting a symbol changes every later position, so positional conditions almost never survive the subsequence order.
Conditions that do survive are about presence and counts: which symbols appear, and how many. Those are the languages this lesson reaches, and they are exactly the ones where order-theoretic arguments are natural.
\[ \text{positional} \;\Rightarrow\; \text{not closed} \qquad \text{presence or count} \;\Rightarrow\; \text{often closed} \]
Counterexample
Discussion prompt
The last two rows of that table fail closure for the same reason, and it explains the tool's narrowness.
That is stated as though it always holds. Do one of two things: produce a case where it fails, or say precisely what rules such a case out. "It just does" is not on the menu.
Hint: Hunt at the extremes first — zero, one, negative, empty, equal. If every extreme survives, the reason they survive is the proof.
Elimination
Eliminate the wrong options
Why can Higman's theorem not be used to prove that the strings ending in 01 form a regular language?
3 of these 4 are wrong. Strike them one at a time, and say what rules each one out before you strike the next. The survivor is the answer.
Survives elimination: A
Why: Deleting the final 1 from a member leaves a string not ending in 01, so it is not downward closed; and appending a 0 to a member also leaves the language, so it is not upward closed. With neither closure available the theorem simply does not apply.
Check
Recall what closure requires.
Check your understanding
Why can Higman's theorem not be used to prove that the strings ending in 01 form a regular language?
Answer: A
Why: Deleting the final 1 from a member leaves a string not ending in 01, so it is not downward closed; and appending a 0 to a member also leaves the language, so it is not upward closed. With neither closure available the theorem simply does not apply.
Concept
Three lessons, three relationships between a language and the regular class, and it is worth seeing them together.
| Lesson | Question | Method |
|---|---|---|
| 4 to 9 | is it regular? | build a machine or an expression |
| 10 and 11 | is it not regular? | pumping, closure, distinguishable prefixes |
| 12 | is it regular, without building? | closure under a well-quasi-ordering |
The third row is the odd one out because it answers the positive question with no witness. That is unusual in this course, and it will not happen again until the counting arguments of Lesson 25.
Comparison
Comparison matrix
From How this sits beside Lessons 10 and 11: refill the Method column from what you know. The rest of the table is as it appeared.
| Lesson | Question | Method |
|---|---|---|
| 4 to 9 | is it regular? | build a machine or an expression |
| 10 and 11 | is it not regular? | pumping, closure, distinguishable prefixes |
| 12 | is it regular, without building? | closure under a well-quasi-ordering |
Connect it up
Draw it
One page, no notation unless you need it: draw how these connect — The Subsequence Order · Well-Quasi-Orderings · Dickson's Lemma · Higman's Theorem · The Regularity Consequence · Perspective. Put an arrow wherever one of them is what makes another possible, and label the arrow with why.
Recap
You can prove a language regular by an argument that never mentions states, and you know exactly what such a proof does and does not deliver.
| Situation | Move |
|---|---|
| language defined by forbidden subsequences | downward closed — regular by Higman |
| language defined by required subsequences | upward closed — regular by Higman |
| condition on tuples of counts | Dickson's lemma, then finite union of counters |
| you need an actual machine | this lesson will not help — find the basis by hand |
| condition on contiguous blocks | the substring order is not a wqo — go back to Lesson 4 |
Lesson 13 leaves finite automata behind and introduces grammars, which generate languages rather than recognize them — and reach well beyond the regular class.
Want this taught 1-on-1? Alexander tutors Theory of Computation — $55/session, free consultation.