Pumping Lemma for Context-Free Languages, Statement and FULL PROOF

  Рет қаралды 27,699

Easy Theory

Easy Theory

Күн бұрын

Here we prove (and state) the pumping lemma for context-free languages (CFL), by observing a parse tree of a CFG in Chomsky Normal Form (CNF). The properties of the parse tree allow us to show that if the string generated is big enough, the longest root-to-leaf path in the parse tree must repeat a variable. We utilize this fact to generate more parse trees (i.e., more strings the CFG makes), and look at the properties of parts of this string.
If you like this content, please consider subscribing to my channel: / @easytheory
▶ABOUT ME◀
I am a professor of Computer Science, and am passionate about CS theory. I have taught many courses at several different universities, including several sections of undergraduate and graduate theory-level classes.

Пікірлер: 39
@mystic3549
@mystic3549 5 ай бұрын
you have the most professional and intuitive pedagogical style ive ever seen among all profs and teachers teaching theory of computation :) these videos are so interesting ...literally gems ...tysm
@aerialeye7744
@aerialeye7744 2 жыл бұрын
I swear you're tailoring these perfectly to my ASU professor's lectures lol. Saving my grade!!!!!!!
@EasyTheory
@EasyTheory 2 жыл бұрын
Guess where I taught before ;)
@aerialeye7744
@aerialeye7744 2 жыл бұрын
@@EasyTheory that would make a lot of sense
@abigarcia9588
@abigarcia9588 4 ай бұрын
tonight i'm binging on your videos till sunrise bc i have automata theory exam tomorrow, tysm for your vids, best explanations out there! greetings from mexico :)
@imiriath2411
@imiriath2411 3 ай бұрын
howd the exam go? im in the same position...
@BryanOnofre
@BryanOnofre 3 жыл бұрын
Thank you for this awesome video! very timely because I'm currently taking theory of computation and we are on this subject! Will there be any videos soon on actually using the pumping lemma on a few examples??
@EasyTheory
@EasyTheory 3 жыл бұрын
Guess what's coming out on monday ;)
@hamedpanjeh3947
@hamedpanjeh3947 3 жыл бұрын
Isn't CNF awesome? absolutely yes, Only with your awesome explanation!
@EasyTheory
@EasyTheory 3 жыл бұрын
It's so good!
@instagramlol
@instagramlol 3 жыл бұрын
Very clear derivation of pumping lemma thank you
@korhankemalkaya5231
@korhankemalkaya5231 6 ай бұрын
Great explanation! Thanks.
@AyushGupta-mh6vq
@AyushGupta-mh6vq 2 жыл бұрын
ThNk MadhR jaini
@heileychan4910
@heileychan4910 4 ай бұрын
thank you so much!!
@isaacchuah7543
@isaacchuah7543 3 жыл бұрын
Awesome video. Just wanted to point out that there might be an error at the start when you were talking about the length of the word w. I think (i think anyways) that it should be less than or equal to, not more than or equal to 2^#variables. Ignore me if I'm wrong haha.
@EasyTheory
@EasyTheory 3 жыл бұрын
No, it should be greater than, because we want the tree to be super tall, so that a variable repeats. And we can't guarantee that unless we make the string (that we are trying to generate via the parse tree) super long.
@ngamcode2485
@ngamcode2485 7 ай бұрын
Thank you a lot.I have a question, what's happening if the parse tree are not fully connected. Does the prove work ?
@wsverdlik
@wsverdlik 3 жыл бұрын
Very nice lecture. But a question: in your proof that |vy|>=1 you spoke about productions like A->AB and A->BA and then showed that at least one of v and y could not be empty. But suppose there is a production like A->AA? CNF permits this production, but in fact wouldn't v and y be empty? Thanks.
@EasyTheory
@EasyTheory 3 жыл бұрын
Yes that's true. However, note that we looked at a *single* path from the top to the bottom, and so when we reach the "top" A, the path has to pick one of the two variables underneath it, with the other child variable being the "other side".
@wsverdlik
@wsverdlik 3 жыл бұрын
@@EasyTheory Ah yes, I see it now. Thank you, very good presentation.
@gourangpathak4443
@gourangpathak4443 Жыл бұрын
you're a great teacher
@MoA-fy8bk
@MoA-fy8bk 8 ай бұрын
Why do we need to add +1 at the end of 2^(#vars +1) +1?
@wsverdlik
@wsverdlik 3 жыл бұрын
Suppose we consider the language (a^n)(b*)(c^n) ; clearly this is context free and the decomposition of vxy would be v=a and y=c. So x is zero or more b's. We know |vxy|
@razvanefros411
@razvanefros411 Жыл бұрын
i hope this reply is useful 2 years later, but to clarify, the value of p is never settled to be something concrete. It is a number that the pumping lemma guarantees to exist if the language is context-free. You can of course think about it and find p for your specific example, but that is redundant, since you already know its Context Free (You can easily create the CFG for this language). Also, be mindful that the Pumping Lemma CANNOT be used to prove a language is Context Free - All CFL are Pumpable, but not all Pumpable Languages are Context Free!! You only really use the number p when trying to prove a language is not context free, in which case you would: I) Assume the language is a CFL (and thus pumpable) II) pick a word from the language with respect to p, making sure its longer than p III) prove that for any way of splitting the picked word into uvxyz it is impossible to pump it, thus achieving contradiction
@cleopinoli
@cleopinoli 3 жыл бұрын
Bless you
@EasyTheory
@EasyTheory 3 жыл бұрын
No, bless YOU!
@mustafadogan7958
@mustafadogan7958 Жыл бұрын
Which Programm are u using? Thank you!
@anastasiamadrevska1668
@anastasiamadrevska1668 2 жыл бұрын
Thank you!
@berkant8074
@berkant8074 3 жыл бұрын
amazing! thanks from turkey
@somesome1315
@somesome1315 3 жыл бұрын
Nice lecture. thank you. I have one question. it says |vxy|
@somesome1315
@somesome1315 3 жыл бұрын
Well I thought about it, and is this the reason why existence of pumping lemma doesn't guarantee that it is CNF But all CNF has pumping lemma which means p(it is CNF) -> q(has pumping lemma) but not q -> p
@drewkavi6327
@drewkavi6327 4 ай бұрын
goated video
@nevilholmes5900
@nevilholmes5900 2 жыл бұрын
thanks
@tejaspandit2551
@tejaspandit2551 3 жыл бұрын
Does parse tree come under pumping lemma for cfl
@enochxu9289
@enochxu9289 2 жыл бұрын
🔥
@yunni7817
@yunni7817 3 жыл бұрын
thank you so much! now I know how it works LOL
@yoavg2281
@yoavg2281 3 жыл бұрын
You are the best!😊😊
@EasyTheory
@EasyTheory 3 жыл бұрын
Thanks!
Pumping Lemma for Context-Free Languages: Four Examples
48:49
Easy Theory
Рет қаралды 51 М.
Fake watermelon by Secret Vlog
00:16
Secret Vlog
Рет қаралды 16 МЛН
Новый уровень твоей сосиски
00:33
Кушать Хочу
Рет қаралды 4 МЛН
Как подписать? 😂 #shorts
00:10
Денис Кукояка
Рет қаралды 5 МЛН
POV: Your kids ask to play the claw machine
00:20
Hungry FAM
Рет қаралды 16 МЛН
Pumping Lemma (For Regular Languages)
8:08
Neso Academy
Рет қаралды 1,3 МЛН
Nonregular languages: How to use the Pumping Lemma
4:56
5. CF Pumping Lemma, Turing Machines
1:13:59
MIT OpenCourseWare
Рет қаралды 54 М.
Lecture 19/65:  The Pumping Lemma for CFLs
41:32
hhp3
Рет қаралды 34 М.
What is the Pumping Lemma
5:11
lydia
Рет қаралды 115 М.
4. Pushdown Automata, Conversion of CFG to PDA and Reverse Conversion
1:09:23
MIT OpenCourseWare
Рет қаралды 66 М.
Turing Machines - what are they? + Formal Definition
18:30
Easy Theory
Рет қаралды 33 М.
Pumping Lemma (For Context Free Languages)
8:06
Neso Academy
Рет қаралды 661 М.
Fake watermelon by Secret Vlog
00:16
Secret Vlog
Рет қаралды 16 МЛН