CSCD 420 Nov 16 2026
Overview
Chris Cain connects grammar classes to computational power, showing that unrestricted grammars generate exactly the recursively enumerable languages, while context-sensitive grammars capture a narrower class that includes a^n b^n c^n. He then defines computability and decidability, proves that no algorithm can solve the general halting problem, and uses a Veritasium segment to connect undecidability with Conway’s Game of Life, Cantor’s diagonalization, Russell’s paradox, and Wang tiles.
Key takeaways
- Unrestricted grammars and Turing machines characterize the same language class: recursively enumerable languages, whose members can be generated even when nonmembers cannot be conclusively rejected.
- Context-sensitive grammars restrict productions so that they never shorten a sentential form; this added power includes aⁿbⁿcⁿ, which context-free grammars cannot generate.
- Decidability requires a guaranteed yes-or-no answer in finite time for every valid input, so running a program for a long time cannot certify that it will never halt.
- A hypothetical halting decider can be contradicted by constructing a program that behaves opposite to the decider’s prediction when run on its own encoding.
- Cantor’s diagonalization proves that real numbers between zero and one are uncountable, because any proposed complete list can be used to construct a real number missing from it.
- Undecidability extends beyond conventional programs: the fate of Conway’s Game of Life patterns and the infinite tiling question for Wang tiles are also undecidable.
Chapters
- Cain plans to provide a study guide by the following Monday and expects assignment feedback before the exam.
- The context-free pumping lemma will appear on the exam, although it has not been discussed recently.
- Unrestricted grammars remove the context-free restriction that a production’s left-hand side must be one nonterminal, while still requiring at least one symbol on the left.
- Enumerating derivations by increasing number of production steps finds every string in the grammar’s language without getting stuck on derivations that continue forever.
- Unrestricted grammars have the same expressive power as Turing machines: they generate exactly the recursively enumerable languages, not just the recursive languages.
- Context-sensitive productions may use strings of terminals and nonterminals on both sides, with the left side no longer than the right side.
- The length-preserving or length-increasing restriction prevents derivations from shrinking, unlike unrestricted grammars.
- A context-sensitive grammar can generate aⁿbⁿcⁿ, which is not context-free; its productions use surrounding symbols as context while moving nonterminals through the string.
- Cain lays out the inclusions regular ⊂ deterministic context-free ⊂ context-free ⊂ context-sensitive ⊂ recursive ⊂ recursively enumerable.
- Some recursively enumerable languages are not recursive, and languages that are not recursively enumerable lie outside the hierarchy.
- Linear languages add another class between regular and context-free languages; context-sensitive languages correspond to linear bounded automata.
- A function is computable if a Turing machine produces its value for every input in its domain.
- A problem is decidable if a Turing machine always returns a yes-or-no answer in finite time for every valid instance.
- The halting problem asks whether an arbitrary program or Turing machine halts on a specified input, and simulating it cannot confirm that a non-halting run will continue forever.
- Cain assumes a halting decider H exists, then constructs H_loop to loop when H predicts that its input machine halts and halt when H predicts it will not.
- The proof feeds H_loop its own encoded description as both machine and input, creating a self-referential case.
- If H_loop halts on its own description, its construction makes it loop; if it loops, its construction makes it halt, a contradiction that rules out H.
- The Veritasium segment introduces Conway’s Game of Life, created by John Conway in 1970, with cells updated by two neighbor-count rules.
- Patterns can stabilize, oscillate, travel as gliders, or grow indefinitely; no algorithm can always determine the ultimate fate of an arbitrary pattern.
- The segment frames undecidability as a problem found in many systems, including tile matching and Magic: The Gathering.
- Georg Cantor’s diagonal argument shows that real numbers between zero and one cannot be completely matched one-to-one with the natural numbers.
- Changing the nth decimal digit of the nth listed real constructs a number absent from every position in the proposed list.
- The argument distinguishes countable infinity from the larger, uncountable infinity of real numbers.
- David Hilbert and formalists hoped set theory could put mathematics on secure logical foundations, while intuitionists challenged the legitimacy of abstract infinities.
- Bertrand Russell’s set of all sets that do not contain themselves leads to a contradiction: it contains itself if and only if it does not.
- Russell’s barber analogy expresses the same self-reference paradox, and set-theory restrictions such as those associated with Zermelo avoid the problematic collection.
- The Wang tile problem asks whether a given set of colored-edge square tiles can cover the infinite plane without gaps, matching colors along touching edges.
- Whether an arbitrary tile set can tile the plane is undecidable and is connected to the same underlying problem as predicting patterns in the Game of Life.
- Cain ends the class before the Veritasium segment is complete, planning to resume it the next day.
Transcript excerpt
0:01 that would get you feedback on every assignment before you took the exam because I think our grader is planning to grade over ensuing break by that Friday. So you would we'd have feedback on the last assignment. So we'll we'll move forward with that. So that means I owe you a study guide by next Monday. There will be a little bit of ways out though, but the downside of that is that it's been a hot minute since we talked about the context free pumping lemma. And that will be on the exam. >> Kind of helped me figure out the pumping >> All right. So we have a little bit of
0:52 stuff to get through today and I'm going to see if I can get through it with enough time to spare. I have about 10 to 15 minutes before I need to start if I'm going to show something in class that I would like to show. So we're going to get started and see if we can get there reasonably quickly. So the first order of business is to talk about unrestricted grammars. We were talking last time about all of the different languages and how they map to the different kinds of of language classes that exist at the Turing machine level or above. So we're talking about the concept of recursive and recursively enumerable languages. We talked about how to show that everything that we can do on a Turing machine is maps to this
1:40 concept of a recursively enumerable language. But the universal language was not recursive. So we did that through the diagonalization language, but moving on to unrestricted grammars, we want to take this idea that we've been talking about and map it onto grammars because we've always this link between what language class we're
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Chris Cain.