Save this video free

CS181 Lecture 17 -- Fall 2026, UCLA

Eli Jaffe · 1:48:41 · Watch on YouTube

Part of University of California, Los Angeles COM SCI 181. See all 16 lectures and search them

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

Eli Jaffe completes CS181’s context-free grammar unit by finishing a pumping-lemma proof that the duplicate-string language is not context-free, then shows that CFG nonemptiness is computable while fullness and grammar equivalence are not. He connects CFGs to syntax checking through Chomsky normal form and uses the remaining lecture for a practice exam covering grammar construction and pumping-lemma proofs.

Key takeaways

Chapters

0:00 Final-Lecture Plan and Exam 3 Logistics
5:30 Pumping-Lemma Setup for the Duplicate-String Language
11:40 Completing the Middle-Boundary Pumping Case
18:10 What CFGs Can and Cannot Do
21:00 Defining Semantic Properties of Grammars
24:10 CFG Nonemptiness and an Empty-Grammar Example
29:10 Computing CFG Nonemptiness by Backward Marking
40:00 CFG Fullness and Equivalence Are Uncomputable
46:00 Expressiveness Versus Verification in Language Design
49:00 Chomsky Normal Form Enables CFG Syntax Recognition
52:30 Course Wrap-Up Before the Practice Exam
59:00 Practice Exam Format and True-or-False Questions
1:01:00 Practice Exam: Constructing Grammars for Three Languages
1:03:00 Practice Exam: Pumping-Lemma Non-CFL Problems
1:06:10 Working Independently and Calibrating Proof Detail
1:11:00 Practice Exam Work Period and Instructor Feedback
1:23:00 Selecting the Two Practice Problems for Review
1:28:36 Building a CFG for the 2i + j Count Condition
1:35:30 Setting Up the Perfect-Square Pumping Proof
1:40:00 Why Pumping Breaks the Perfect-Square Length
1:45:00 Final Thanks and Exam Reminder

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:02 Yeah, he was like, "I can't come to the last lectures." But I think it would be really funny, because you write "last class" and then "like today" every time. But like, since it's the last class, if he wrote "last class" and then "the last class," I was like, "Yeah, that's pretty funny." So credit to Beyond. I'll I'll immortalize him here. Let's see. Oh gosh, that's not how that works. Beyond. All right, so today [clears throat] we are going to be finishing up like I said last class we saw more examples of creating context free grammars. We looked at some closure properties or lack thereof as we saw in some cases,

0:49 context free grammars. Unions are good, concatenations are good, intersections are bad, not so bad. And we also saw how to prove that languages are not context free by using our new and improved version of the pumping lemma for context free grammars. And we began a we saw one proof of that in full and we began but did not get the chance to finish our proof that double was not context free. So we're going to finish that up today and then we are going to talk a little bit about semantic properties of context free grammars since that was a big motivation for us. Can we actually compute semantic properties of context free grammars? I'm clear.

1:36 And another big motivation that we saw was I talked about how context free grammars exist in the programming languages and programming languages use them to check if your syntax is valid. And one sort of hole we've left open is well can we actually do that? Like can we take a particular input and check whether it is generatable from a context of particular context-free grammar.

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, Eli Jaffe.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.