Pushdown Automaton (PDA) Example: {0^n 1^n}

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

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

  • @xii-j-01-alfonsoclementsut75
    @xii-j-01-alfonsoclementsut75 12 дней назад

    Even my Lecturer named Sir PSS won't and never explain this correctly ( he won't explain to us ). But thanks you did it. Just cover my confused on these things only in 11 minutes cap. Big thanks from Indonesia :)

  • @tonyjaimep
    @tonyjaimep 3 года назад +35

    Explains in 10 minutes what my professor took two hours to skim over, thank you!

    • @EasyTheory
      @EasyTheory  3 года назад +13

      I wouldn't discount another professor that easily, but thanks anyway!

    • @KarenWasherGrudzien
      @KarenWasherGrudzien 4 месяца назад +2

      @@EasyTheory HARRIS 2024

    • @Thh-k4x
      @Thh-k4x 2 месяца назад +3

      @@KarenWasherGrudzien TOC> politics

  • @jaskaransingh0304
    @jaskaransingh0304 7 дней назад

    This is gold content in such a niche field

  • @hamedpanjeh3947
    @hamedpanjeh3947 4 года назад +17

    Indeed, awesome explanation in a very short time is an art! recording date of this video tells me I am super lucky to have such rich resource on the exact time! Thank you Ryan!

  • @ftbhabook6637
    @ftbhabook6637 День назад

    finally something my brain could wrap around . bets explanation and easy way thank you .

  • @Kevin-bb7wk
    @Kevin-bb7wk 2 года назад +1

    Ryan your videos are saving my bacon in my Models of Computation class. You're the man!

  • @امینجمالی-خ9ص
    @امینجمالی-خ9ص Год назад

    that triple e transition was good point
    thank you.

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

    thank you so so much! I don't pay attention in class and just look for your video on the topic before the quiz and I've passed all of them

  • @AlexReyesInHD
    @AlexReyesInHD 3 года назад +22

    Thank you for these videos! They're really helpful for me to understand theory of computation. The amazing work you're doing it helping out many students!

  • @omar.alnounou
    @omar.alnounou 2 года назад

    i stopped mid-video just to say THANK YOU

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

    if the stack needs to be empty to be accepted, why the need for the $ symbol, even without the $ symbol if the input will only finish if there are as many (or more) 1's to 0's and the stack will only empty if there are as many (or more) 0's to 1's so the number of 0's and 1's will need to be the same and no $ should be needed?

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

      that way we would not know that the PDA's stack is empty. It's like putting a slab over void to ensure that we're standing on rock bottom 😛

  • @sravanikatasani6502
    @sravanikatasani6502 4 года назад +8

    Can you just put up a worksheet kinda thing ,that'll be great i feel

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

    Thank you so much. Very clear and exactly what I needed to understand this

  • @CornelliusTrivium-gl9lt
    @CornelliusTrivium-gl9lt 6 месяцев назад +2

    Incredible explanation

  • @vimalathithand917
    @vimalathithand917 11 месяцев назад +2

    thank you for such a simple and easy to understand video :D

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

    great video mate keep going. Much love!!!

  • @charlesroseman9466
    @charlesroseman9466 3 года назад +3

    Would q0 also be an accept state since 0^n1^n can be an empty string? I know that the empty string is able to go through every state, but I'm just curious if it's appropriate to also make q0 an accept state.

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

      It can, but no need, since there is a way for empty input to make its way through the machine as-is.

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

      @@EasyTheory Okay. Just making sure cuz my professor is a hardass and will probably take credit away for something like that lol. Thanks for the video! Very helpful.

    • @farwahbatool6247
      @farwahbatool6247 3 года назад +2

      @@charlesroseman9466 lol

    • @Xiaoxiaoxiaomao
      @Xiaoxiaoxiaomao 3 месяца назад +1

      ​@charlesroseman9466 hahaha bro you asked my question.
      And also my prof wants to write exactly what is taught haha 😂

    • @Xiaoxiaoxiaomao
      @Xiaoxiaoxiaomao 3 месяца назад +1

      ​@@EasyTheory Thanks for the explanation ❤️

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

    This is a great video. Thank you so much

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

    Thanks for the video!

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

    stupid question but here it goes: If we wanted could we pop off all the 1's at q2, but twice as fast? Meaning if I wanted to have 0^n and 1^2n, could i just have the same thing as your pda, but instead at q2, pop off (11,0) instead of (1,0)? Thank you so much for your tutorials! they are amazing.

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

      No such thing as a stupid question if you really want to know the answer :)
      Yes, but only if the language is {0^n 1^(2n) : n at least 0}. If you wanted to apply this to {0^n 1^n : n at least 0} (note the difference in the 1 exponent), then this won't work whenever the input string has n being odd. But if you instead insisted that n be even, then yes you could.
      The only "problem" is that the PDA definition only allows one character to be read/popped/whatever in one transition. You can augment the definition to an "extended" PDA, where more than one can occur at once. This is usually done on the stack, not the input though.
      And thanks for watching!

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

      @@EasyTheory Many thanks for your answer and even more thanks for putting out such great content!!

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

    Can you do both loops for 1 and 0 on the same state? Or do you have to have a seperate state to do each

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

    Hey, I keep following the automaton you drew to verify that it rejects "10". But it keeps landing on the accepting state q3. Am I doing something wrong?
    Stack: [], String: "10", State: q0
    Stack: [$], String: "10", State: q1
    Stack: [$], String: "10", State: q2
    Stack: [], String: "10", State: q3 (accepting)
    Or do you have to exhaust the entire input string for it to accept?

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

      yes he said that at the end, the entire input has to be read in order for it to be able to accept.

  • @lukesmith9289
    @lukesmith9289 2 года назад +1

    why do # of 0s and 1s need to be equal?

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

      That's the definition of the language we are working with. So that's kind of a given, and we're just designing a machine that recognizes that language

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

    9:02 why can't you take that transition? You have read the whole input and it is trying to read epsilon.

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

      You can't take that transition because look at what is required to pop off the stack in order to take it? You must be able to pop off the $ symbol from the stack but...the $ is not at the top of the stack! A 0 will be on the top of the stack after you have read all the 0s and all the 1s in the case of there being more 0s than 1s.
      So yes, epsilon can be read but you cannot pop something off the stack if it is not at the top of the stack.

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

    Excellent

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

    Thank you so much!

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

    Instead of that E-transition b/w q1 & q2 ,
    Can we make the initial state final & write that transition as *1,0->E* ?

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

      then you wouldn't be able to pop $ sign. Which is on stack.

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

      @@zahidgul5811 the $ isn't on the stack at q0. Its onlt on the stack after you go to q1.

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

      Yes. That is how the PDA for this language is shown in the textbook I am using.

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

    Thank you Ryan sir😊

  • @iuseyoutubealot
    @iuseyoutubealot 7 месяцев назад

    so how come no q loop here or thats for cfg

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

    2 stack pushdown automata?

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

    Thanks!

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

    very helpful, thank you :)

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

    thank you

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

    great video

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

    the other type of PDA would be a lot more fun than this

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

    helpful indeed

  • @rizzbod
    @rizzbod 11 месяцев назад

    Thanks a much!

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

    thank you for the video! it was really helpful.

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

    cheers mate

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

    bro can u solve 4 questions for me rn? I ll pay u