CSCD 420 Oct 09 2026
Overview
Chris Cain reviews how to write pumping lemma proofs that show a language is not regular, including how to choose a single string, use the DFA state bound, and handle every possible loop decomposition. He also explains common proof errors, outlines the upcoming exam and assignment logistics, and introduces context-free grammars as a way to describe languages such as even-length palindromes that regular grammars cannot generate.
Key takeaways
- A pumping lemma contradiction must choose a specific string in the language whose length reaches the DFA state bound, then show that every permitted loop decomposition fails after pumping.
- For w = a^m b^(m+1), the first m symbols are all a's, so a DFA with m states must repeat a state within that prefix; pumping the resulting a-only cycle adds at least one a.
- Case analysis can be shortened when multiple possible forms of the loop produce the same violation, such as creating forbidden consecutive symbols.
- The pumping lemma is a tool for proving non-regularity, not regularity; regularity is more directly established by constructing a DFA, NFA, regular expression, or regular grammar.
- A unary prime-length pumping argument must select a prime exponent k at least as large as m; choosing an arbitrary exponent such as m may start with a string outside the language.
- Context-free grammars can generate even-length palindromes by recursively wrapping a generated string in matching symbols, a dependency regular grammars cannot handle for unbounded lengths.
Chapters
- Chris Cain says a study guide and the online submission repository should be posted in Canvas by about 1:30.
- The upcoming exam covers material through regular grammars and excludes the pumping lemma.
- An assignment due Wednesday includes pumping lemma material; students can drop by Cain's office around 1 or 2 for help.
- Cain expects homework 1 and 2 feedback before the exam, despite the grader being ill.
- Cain revisits a pumping lemma example where removing the loop, by setting i = 0, breaks membership.
- A string chosen near the n > k boundary can become invalid after deleting even one relevant block.
- The proof checks possible loop boundaries and shows each one either disrupts the required a/b structure or violates the inequality.
- The contradiction proof assumes the language is regular, so a DFA with m states exists.
- Cain chooses w = a^m b^(m+1); the first m a's force a repeated state and an a-only cycle.
- Pumping the cycle twice adds at least one a, leaving at least as many a's as b's and producing a string outside the language.
- A complete write-up should state the decomposition w = xyz, the cycle conditions, and why the selected pumping value violates membership.
- To find possible loop forms, inspect the first m characters, where the pumping lemma guarantees the relevant cycle occurs.
- When the prefix contains both a's and b's, possible starts and ends of y can create several cases; cases with the same consequence can be grouped.
- Cain plans one exam review period for prepared practice problems and another for student questions.
- Exam problems are expected to be medium difficulty, testing whether students can apply concepts quickly rather than solve unusually long design problems.
- The pumping lemma can show that a language is not regular, but failure to find a counterexample does not prove regularity; use a DFA, NFA, regular expression, or regular grammar instead.
- A pumping proof must start with a string in the language, not merely a string that satisfies a convenient length condition.
- For the unary prime-length language, a chosen string a^k must have prime k greater than or equal to the DFA state count m.
- Assuming k is odd or assuming a particular loop length is invalid unless the proof establishes those properties; also, 2 is an even prime.
- The grader split a formerly larger set of roughly 20 to 26 questions into smaller weekly assignments.
- Pumping lemma work is part of the homework but is excluded from the upcoming exam; Cain plans to review the assignment's supporting slides.
- The exam was pushed back to allow time for homework feedback, while retaining roughly the scope of an earlier week-three exam.
- Students may bring one front-and-back notes sheet, but the exam uses short-answer and problem-solving tasks rather than multiple choice or true/false.
- Finite-state machines have finite memory, so they cannot track arbitrarily deep nesting in programming-language syntax.
- Matching opening and closing curly braces illustrates a dependency that grows with an arbitrarily long method or control structure.
- The language a^n b^n models a limited form of nested braces, though it does not capture sequential nested structures such as adjacent inner loops.
- Cain introduces context-free grammars as the grammar class associated with context-free languages.
- Regular grammars restrict the nonterminal to a consistent far-left or far-right position in productions; context-free grammars lift that restriction.
- Every regular language is context-free, but context-free languages can express patterns that regular languages cannot.
- The class identifies strings such as ABA, ABBA, and BABAB as examples from the even-length palindrome language.
- Recursion in the middle of a production lets a grammar add matching symbols around a recursively generated center.
- A regular grammar cannot generate arbitrary even-length palindromes because it cannot remember an unbounded prefix and match it in reverse.
- Cain poses the language a^n b^m where n is not equal to m as a context-free grammar design challenge.
- The class notes that context-free productions can recurse in the middle, offering more flexibility than regular grammar productions.
- Students are asked to work on the construction over the weekend, with the solution scheduled for Monday.
Transcript excerpt
0:06 Time to get started. We'll start with some quick announcements. I am going back to my office after this class and releasing a study guide. So, there will be a study guide to you at some point over the next at least few hours. If I get swamped, it may have to be after my second class, but at some point today, you'll get a study guide. If you don't see that up in the modules section of Canvas by early this afternoon, somebody please send me a very angry email saying I promised this to you and it is not there. What the hell? Exactly like that. Word exactly like that. [laughter] >> I don't mind. >> I would say by 1:30. By 1:30 there's a study guide posted. Somebody send me a very
0:56 So that means there's an exam a week from tomorrow that will cover material up through regular grammarss but not anything past regular grammarss. So no pumping lema, nothing that we've been going over for the last couple of days will be on that exam. Yeah. >> Yeah. Did I say something else? >> I can't force you to come in on Saturday and take an exam. >> I mean it's not on the syllabus probably. [laughter] just do a remote thing. >> Yeah. No, we from today. For some reason, I'm thinking today and saying tomorrow. Like for somehow today is today is Thursday. I must get my wife's provision. >> She didn't get a weekend, so I don't get a weekend, which means you don't get a weekend. >> Man, I work I work tomorrow. I can't go
1:43 for this. >> Fair. So, there's that. There is an assignment that is due on Wednesday. I expect that considering this will contain I believe
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.