Pumping Lemma for Regular Languages FOUR Examples and Proof Strategies!

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 74

  • @EasyTheory
    @EasyTheory  4 года назад +6

    Thanks to my supporters Yuri, vinetor, Ali (RUclips) 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 года назад +53

    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!

  • @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!

  • @danielgitahi2847
    @danielgitahi2847 4 года назад +6

    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.

  • @shouryasharma1535
    @shouryasharma1535 4 года назад +5

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

    • @EasyTheory
      @EasyTheory  4 года назад +1

      Thanks very much Shourya

  • @soumyadeeproy6611
    @soumyadeeproy6611 2 года назад +2

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

  • @jakubman7470
    @jakubman7470 4 года назад +3

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

  • @KartikayKaul
    @KartikayKaul Год назад

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

  • @user-qy6db7yi2b
    @user-qy6db7yi2b 6 месяцев назад +1

    Bro youre the best honestly. Thank you so much

  • @primalmachine7945
    @primalmachine7945 4 месяца назад

    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.

  • @mrityunjoynath7673
    @mrityunjoynath7673 2 года назад

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

  • @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

  • @danielperloz
    @danielperloz 3 года назад

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

  • @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.

  • @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.

  • @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 8 месяцев назад

      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

  • @beingnikhil155
    @beingnikhil155 3 года назад +1

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

  • @jorgevillavicencio3480
    @jorgevillavicencio3480 2 года назад

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

  • @ashleylove6840
    @ashleylove6840 3 года назад

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

  • @tylko9361
    @tylko9361 4 года назад +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  4 года назад +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 4 года назад

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

  • @lambdalearner7670
    @lambdalearner7670 4 года назад

    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  4 года назад

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

  • @jackiecagliosgostro2470
    @jackiecagliosgostro2470 4 года назад +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  4 года назад +6

      Thanks - the main reason is that |xy|

    • @jackiecagliosgostro2470
      @jackiecagliosgostro2470 4 года назад +4

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

  • @tamzidchowdhury472
    @tamzidchowdhury472 4 года назад

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

    • @EasyTheory
      @EasyTheory  4 года назад

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

  • @naomialidinata4099
    @naomialidinata4099 3 года назад

    thank you for your help! i love your explanation

  • @BATMAN10N
    @BATMAN10N 3 года назад +1

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

  • @meetkachhadiya2147
    @meetkachhadiya2147 8 месяцев назад

    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?

  • @nicolehosh2659
    @nicolehosh2659 3 года назад +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 :)

  • @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)?

  • @adamhitchcock3712
    @adamhitchcock3712 3 года назад +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?

  • @samrichardson3185
    @samrichardson3185 4 года назад

    Have a good day! Very helpful

  • @samoboii
    @samoboii 6 месяцев назад

    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?

  • @matthewwarren7402
    @matthewwarren7402 3 года назад

    Thank you for this video helped me alot!

  • @yunni7817
    @yunni7817 3 года назад

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

  • @agi-news
    @agi-news 3 года назад

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

  • @danielmasri7566
    @danielmasri7566 2 года назад

    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 2 года назад +1

      that's exactly what bugged me

  • @nothingatall6882
    @nothingatall6882 2 месяца назад

    for o^i1^j
    couldnt i set j = p and i = p+ 1 and say |xyz| /leq p so then xyz one case is that they're entirely contained in 1s and if i pump that it's not in L

  • @abutube5461
    @abutube5461 Год назад

    thank youuuuu!!!!!!!

  • @fsbf1
    @fsbf1 3 года назад

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

  • @samares2804
    @samares2804 3 года назад

    thanks, you're the best

  • @JasonTN
    @JasonTN 3 года назад +1

    here is the best one

  • @babygracegarganera3963
    @babygracegarganera3963 4 года назад

    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  4 года назад

      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.)

  • @SubbingForFree
    @SubbingForFree 4 года назад

    hey I get it now, thanks prof

  • @ericmiller3673
    @ericmiller3673 4 года назад

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

    • @EasyTheory
      @EasyTheory  4 года назад

      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 4 года назад

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

    • @EasyTheory
      @EasyTheory  4 года назад

      @@ericmiller3673 You're welcome!

  • @hadiabouhassoun2894
    @hadiabouhassoun2894 4 года назад

    wooow , you are the best thank you :)

  • @baldcoder_
    @baldcoder_ 4 года назад

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

    • @EasyTheory
      @EasyTheory  4 года назад +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 :)

  • @henriqueln7
    @henriqueln7 3 года назад

    Thanks :)

  • @taneliharkonen2463
    @taneliharkonen2463 3 года назад

    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 3 года назад

      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

  • @youssef_uchiha
    @youssef_uchiha 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.

    • @youssef_uchiha
      @youssef_uchiha 3 года назад

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

  • @tarikhacialiogullari4627
    @tarikhacialiogullari4627 3 года назад +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 8 месяцев назад

      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.

    • @ayyylmao3144
      @ayyylmao3144 Месяц назад

      chill bro not everyone is muslim if you dont want to look at do not.