Pumping Lemma for Regular Languages FOUR Examples and Proof Strategies!

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ส.ค. 2024

ความคิดเห็น • 72

  • @EasyTheory
    @EasyTheory  3 ปีที่แล้ว +6

    Thanks to my supporters Yuri, vinetor, Ali (TH-cam) and Bruno, Timmy, Micah (Patreon) for making this video possible! If you want to contribute, links are in the video description.
    Timestamps:
    0:00 - Introduction
    1:30 - General Proof Strategy
    7:05 - {0^n 1^n : n at least 0}
    17:22 - {0^i 1^j : i strictly larger than j}
    25:18 - {0^n : n is a perfect square}
    34:18 - {0^n : n is a prime number}
    44:56 - Conclusion

  • @hectorg362
    @hectorg362 3 ปีที่แล้ว +51

    The sad guitar into sums up my mood for the pumping lemma.

    • @EasyTheory
      @EasyTheory  3 ปีที่แล้ว +6

      It is very sad, but I hope you're not sad!

  • @shouryasharma1535
    @shouryasharma1535 3 ปีที่แล้ว +5

    I honestly wish my profs were as comprehensive as you. Thanks alot

    • @EasyTheory
      @EasyTheory  3 ปีที่แล้ว +1

      Thanks very much Shourya

  • @danielgitahi2847
    @danielgitahi2847 3 ปีที่แล้ว +4

    Lost me on the last one but i'd say this is the best explanation by far in the in the internet on the pumping lemma for R.L.

  • @0liver19
    @0liver19 2 ปีที่แล้ว

    I've looked in multiple books to get an intuition on pumping lemma proofs and kept scratching my head until I came upon this. by far the most clear. Thank you so much!

  • @soumyadeeproy6611
    @soumyadeeproy6611 2 ปีที่แล้ว +2

    Very beautiful and clear explanation, glad I found this channel !!!!!!!!!!!!!!!

  • @user-qy6db7yi2b
    @user-qy6db7yi2b 3 หลายเดือนก่อน +1

    Bro youre the best honestly. Thank you so much

  • @jakubman7470
    @jakubman7470 3 ปีที่แล้ว +3

    This is probably the best explanation I've seen. Thank you!

  • @beingnikhil155
    @beingnikhil155 3 ปีที่แล้ว +1

    Thumbnail op. I'm not gonna lie, you got u in the first half

  • @KartikayKaul
    @KartikayKaul ปีที่แล้ว

    This is like TH-cam 2008 or 2009 video lecture times and u know it is going to be so frickin good

  • @vinetor
    @vinetor 3 ปีที่แล้ว +4

    I never comment under youtube videos, but your lessons about Theory of Computation are pure gold and your explanation is always clear.
    Thank you kind sir

    • @EasyTheory
      @EasyTheory  3 ปีที่แล้ว +1

      Thanks very much!

  • @nicolehosh2659
    @nicolehosh2659 2 ปีที่แล้ว +1

    First I thought you were too cute for Computation theory. I still think you are but your videos are the best!! Thank you prof for helping me throughout this course :)

  • @galbalandroid
    @galbalandroid 3 ปีที่แล้ว

    You're explaining so much better than my professor my man! Thank you for your videos! Wish I've discovered them earlier.

  • @primalmachine7945
    @primalmachine7945 หลายเดือนก่อน

    L={a^(n) | n is a prime number}
    x=a^(m-1),y=a^1,z=a^(p-m+1-1). s= a^(m-1) a^1 a^(p-m+1-1)>=p =>s=a^(1)a(p-m) >=p. by the lemma rules the string s must be in the language therefor s must be in length of any prime number and therefor p could potentionally be of the length of that prime number. the lowest prime number is 2 so we can start by i=2 a^(2)a(p-m) =>[reminder: m>=1 because x=a^(m-1) and |x|>=0 so if m>=0 it means that could be x=a^(0-1) meaning |x|>=-1 and thats not possible so m must start from 1 therfore m>=1]=> a^(2)a(p-1)=>a^(p+1). since p could be a prime number as mentioned in the start, it could be that p=2 and then a^(p+1)=>a^(2+1)=>a^(3)=> 'a' is in the length of a prime number so the resulted string of i=2 is still in the language and that was not helping us because we look for a contradiction. i=7 s=a^(7)a(p-1) => a^(p+6)=>a^(2+6)=>a^(8)=>'a' in the length of 8 and 8 is not a prime number so we reached a contradiction and therefor L is irregular language.

  • @sarikasubramaniam3572
    @sarikasubramaniam3572 2 ปีที่แล้ว +4

    21:26 Wouldn’t i=0 effectively make |y| = 0, violating the condition length of y should be at least 1?

    • @nice_sprite5285
      @nice_sprite5285 5 หลายเดือนก่อน

      raising y to a power doesnt change the length of y itself, just like raising 10 to the power of 0 doesnt make 10 = 1, any string no matter how long it is picked 0 times is the null string

  • @BATMAN10N
    @BATMAN10N 2 ปีที่แล้ว +1

    *starts doing prime numbers
    *Me Googles what are prime numbers
    Phew that was a close one

  • @mrityunjoynath7673
    @mrityunjoynath7673 2 ปีที่แล้ว

    For the Language L = {0^n.1^n | 0

  • @XoIoRouge
    @XoIoRouge 2 ปีที่แล้ว

    I had the following question on my homework:
    Let L = {w memberof {a,b}* | every prefix of w contains at least as many a's as b's}
    Example: Every Prefix of aba is {e, a, ab, aba}; aba is a member of L because in all prefix cases, the number of a's surpass the number of b's. Every Prefix of abbaa is {e, a, ab, abb, abba, abbaa}; abbaa is not a member of L because prefix abb has more b's than a's.
    I was having so much difficulty with this problem until I found your videos. The only legal strings would remain legal as we increment the i value, no matter how we break down the string.
    But when I watched your 17:22 example [ 0^i 1^j : i strictly larger than j ] I realized this is essentially the same problem I'm doing. I can't believe I didn't consider assigning i to be 0.
    Furthermore, my next homework problem was {a^k | k is prime} so this video ended up being a lifesaver! My professor doesn't teach with examples, or when she does, she uses examples that are so easy.

  • @danielperloz
    @danielperloz 3 ปีที่แล้ว

    Thank you so much sir. Regards from the canary islands, Spain

  • @ashleylove6840
    @ashleylove6840 2 ปีที่แล้ว

    wow now I get it, thank you so much!! you are helping so many people.

  • @jorgevillavicencio3480
    @jorgevillavicencio3480 2 ปีที่แล้ว

    thank you so much, this was really helpful in understanding Pumping Lemma!

  • @agi-news
    @agi-news 3 ปีที่แล้ว

    great vid, 30 times better than my crazy college professor.

  • @lambdalearner7670
    @lambdalearner7670 3 ปีที่แล้ว

    For the perfect square if you chose i = 3 it works as well [i think] as we would have p^2 < p^2 + 2

    • @EasyTheory
      @EasyTheory  3 ปีที่แล้ว

      Yes i=3 works for that reason. Not sure if i=4 or more can be made to work, might be possible.

  • @tylko9361
    @tylko9361 3 ปีที่แล้ว +3

    Thank you very much for this explanation! The way you break down XY and Z into what they COULD be while remaining generalized is immensely helpful in understanding this. Can we also use the closure properties of regular languages to, instead of contradicting the language itself, contradict the assertion that its complement is regular?

    • @EasyTheory
      @EasyTheory  3 ปีที่แล้ว +1

      Yes. This is the same as saying that non-regular languages are closed under complement, which is true: suppose L not regular and L^c is regular. Closure under complement for regular langs says that (L^c)^c is regular. But this is L, a contradiction. So L^c must be not regular also.

    • @tylko9361
      @tylko9361 3 ปีที่แล้ว

      ​@@EasyTheory Wonderful! Thank you for the response! I just hope I got the right contradiction for the language, hahaha!

  • @naomialidinata4099
    @naomialidinata4099 2 ปีที่แล้ว

    thank you for your help! i love your explanation

  • @tamzidchowdhury472
    @tamzidchowdhury472 3 ปีที่แล้ว

    Really simple and well thought out explanation. Please make a video on the CFG pumping lemma.

    • @EasyTheory
      @EasyTheory  3 ปีที่แล้ว

      Video is coming out soon! Plus the livestream for CFLs will certainly cover this.

  • @samrichardson3185
    @samrichardson3185 3 ปีที่แล้ว

    Have a good day! Very helpful

  • @yunni7817
    @yunni7817 3 ปีที่แล้ว

    thank you prof, you made my day!!!!!

  • @adamhitchcock3712
    @adamhitchcock3712 2 ปีที่แล้ว +1

    You lost me on the last one at the end with the primes. If you replace (I * |Y|) with (1 + |Y|), then how can you assume I = |XZ| and still use it in the proof when the variable I has been swapped with (1 + |Y|) at that point?

  • @abutube5461
    @abutube5461 ปีที่แล้ว

    thank youuuuu!!!!!!!

  • @matthewwarren7402
    @matthewwarren7402 3 ปีที่แล้ว

    Thank you for this video helped me alot!

  • @jackiecagliosgostro2470
    @jackiecagliosgostro2470 3 ปีที่แล้ว +4

    Thank you for the detailed explanation!
    Timestamp: 10:48
    I'm confused on what you said why x and y has only 0's when you can decompose the string where x = 0*, y = 01, z=1*. So how did your decomposition cover such case? Maybe I'm missing something in understanding.

    • @EasyTheory
      @EasyTheory  3 ปีที่แล้ว +6

      Thanks - the main reason is that |xy|

    • @jackiecagliosgostro2470
      @jackiecagliosgostro2470 3 ปีที่แล้ว +4

      @@EasyTheory I get it now. Again thanks a lot, really appreciate the video. Keep up the good job 👍.

  • @meetkachhadiya2147
    @meetkachhadiya2147 5 หลายเดือนก่อน

    Hey Prof,
    Can we also take 2p instead of p+1 as it is also at the border of the not being in language as |xy| p in the second example?

  • @samoboii
    @samoboii 3 หลายเดือนก่อน

    for the second example can we have i = 0 because |y| >= 1. I mean like if we have i=0 y does not exist so the condition is not true?

  • @samares2804
    @samares2804 3 ปีที่แล้ว

    thanks, you're the best

  • @martin_skachkov6016
    @martin_skachkov6016 2 ปีที่แล้ว

    Thank you for this video. I still don't get it in the last example why we set r>=p+2 ( why we add 2)?

  • @JasonTN
    @JasonTN 3 ปีที่แล้ว +1

    here is the best one

    • @EasyTheory
      @EasyTheory  3 ปีที่แล้ว

      Thanks very much!

  • @SubbingForFree
    @SubbingForFree 3 ปีที่แล้ว

    hey I get it now, thanks prof

  • @hadiabouhassoun2894
    @hadiabouhassoun2894 3 ปีที่แล้ว

    wooow , you are the best thank you :)

  • @henriqueln7
    @henriqueln7 3 ปีที่แล้ว

    Thanks :)

  • @fsbf1
    @fsbf1 3 ปีที่แล้ว

    I have a question: why |Y|>=2? I don't understand.

  • @danielmasri7566
    @danielmasri7566 ปีที่แล้ว

    hi! great video ! but question, for problem 2, you say it doesnt make a difference but if it was greater or equal, beta could've been 1 and then it would be regular... am l missing something? thank you so much

    • @Charliemmag
      @Charliemmag ปีที่แล้ว +1

      that's exactly what bugged me

  • @ericmiller3673
    @ericmiller3673 3 ปีที่แล้ว

    Super helpful video! Why do you only have to consider one possible decomposition?

    • @EasyTheory
      @EasyTheory  3 ปีที่แล้ว

      We actually have to test all possible decompositions. What I do in the video is have one "case" that covers all decompositions (at least the ones that obey the rules |xy| = 1). The reasoning is that if I forget to address one decomposition, then it's theoretically possible for a DFA to have a loop at the exact point where the "y" in the decomposition is.

    • @ericmiller3673
      @ericmiller3673 3 ปีที่แล้ว

      Gotcha, thanks! Excellent video, my professor went over this super quickly so this really helped.

    • @EasyTheory
      @EasyTheory  3 ปีที่แล้ว

      @@ericmiller3673 You're welcome!

  • @babygracegarganera3963
    @babygracegarganera3963 3 ปีที่แล้ว

    is there a pumping lemma if L={w element of {a,b} | w contains an equal number of a's and b's}

    • @EasyTheory
      @EasyTheory  3 ปีที่แล้ว

      Technically, yes. Since L is regular, there must be a pumping length for it. (Can you see why L is regular? Note that the alphabet is {a, b}, and not something like {a, b, c}, where the answer is different.)

  • @baldcoder_
    @baldcoder_ 3 ปีที่แล้ว

    Any chance you'll tackle the pumping lemma for CFL? Please? XD

    • @EasyTheory
      @EasyTheory  3 ปีที่แล้ว +3

      The livestream on context-free languages in a few weeks certainly will hit it, and the video specifically on the PL for CFLs will appear on the channel...soon :)

  • @youssefmansour5756
    @youssefmansour5756 3 ปีที่แล้ว

    29:25 why y is at least 1 ?

    • @EasyTheory
      @EasyTheory  3 ปีที่แล้ว +1

      Length of y, and because the "loop" that occurs in the DFA (which we called the "y" part) must involve at least one transition, which means at least one character read.

    • @youssefmansour5756
      @youssefmansour5756 3 ปีที่แล้ว

      @@EasyTheory Thanks, i really appreciate your help and effort.

  • @taneliharkonen2463
    @taneliharkonen2463 2 ปีที่แล้ว

    wooosh.... That last ending went so high over... Why is there suddenly the (1 + |y|).. Not getting it even tho watched the part at least 10 times.. xD

    • @taneliharkonen2463
      @taneliharkonen2463 2 ปีที่แล้ว

      And you have to go on ur way to pick just that i (the |xz|)? If i can be anything we want and it still should be in the language if the language is regular, couldn't we just pick any natural number (at least two) to point out that the length is not a prime? So confused right now that I cant sleep xD

  • @tarikhacialiogullari4627
    @tarikhacialiogullari4627 2 ปีที่แล้ว +1

    Bro I like you a lot, but stop using women in thumbnails, this is Haram, they are not an object. It has nothing to do with Pumping Lemma.

    • @meetkachhadiya2147
      @meetkachhadiya2147 5 หลายเดือนก่อน

      Bro take it easy. Don't shit post on the internet. It's fine to design catchy thumbnails to increase traffic and then providing valuable content at the end.