Context-Free Grammar to Pushdown Automaton Conversion (CFG to PDA)

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

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

  • @goobles3991
    @goobles3991 4 года назад +93

    You are the best Automata Theory youtube channel. It's a niche title, but you earned it.

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

      I'll accept my award and parade soon :) (thanks very much!)

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

      I agree

  • @sebastianllano1405
    @sebastianllano1405 2 месяца назад +9

    Youre a fantatic teacher. My professor cant teach this in a 2 hour lecture and yet you did it so clearly in 9 minutes and 14 seconds. Why do I go to class?

  • @prakhartiiwarii
    @prakhartiiwarii 3 года назад +55

    Finally, a short and to-the-point video clearing out the concepts! Thanks ✌🏻

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

      You're welcome!

    • @Shan-gn7mg
      @Shan-gn7mg Год назад

      @@EasyTheory yes please do more vids like this, it's more efficient and easy to understand.

    • @Shan-gn7mg
      @Shan-gn7mg Год назад

      @@EasyTheory is that possible to do a same version for pda to cfg?

  • @forthehomies7043
    @forthehomies7043 Месяц назад +1

    My professor did a similar example today in class as an introductory lesson to PDA, and I had no clue what she was talking about. I immediately understood this video. Thanks.

    • @KarenWasherGrudzien
      @KarenWasherGrudzien 19 дней назад

      @@forthehomies7043 Ur professor = Trump
      Easy Theory = Kamala

  • @konstantinsazhnev
    @konstantinsazhnev Год назад +1

    Great example and works for every CFG. The only thing I would add is if you have recursion in the same production like S --> abSb | epsilon then we have to make another loop to remove S from the stack within the loop state mentioned in the video.

  • @inarazahin5786
    @inarazahin5786 4 года назад +18

    This is the best explanation so far. It is concise and to the point. Thanks for this video.

  • @thatguy7802
    @thatguy7802 2 года назад +4

    I have an assignment due in an hour and you may have just saved me a letter grade. Thank you!

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

    The man, the myth, and the legend of theory of computation and teaching in general!

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

    You are THE MAN. Thanks for this awesome explanation!

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

      Alvi Habib thanks very much! Make sure to check out the lecture series I'm currently doing.

  • @TheWiimaster456
    @TheWiimaster456 4 года назад +11

    FINALLY an English Video thank you so much man this was great

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

    wow. thank you so much. I was watching other videos so confused by all the math. your video made it super simple, thank you.

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

    This is the best PDA explanation video that I've found, thank you!

  • @沼氨
    @沼氨 Год назад

    i luv the clear way u describe. THX for saving my final💪

  • @pk-le5bb
    @pk-le5bb 2 года назад

    clear, concise, and comprehensive.
    you are a godsend, thank you

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

    sir. you've saved my life

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

    you saved me, way better explanation than my professor

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

    You're the man I take refuge in 😢🙌🏻💖

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

    Amazing video Sir Alan

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

    Super helpful! I understand it so much better now.

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

    Thank you!!! This made so much more sense than the other explanations i found

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

    LMFAOOOOOOOOOOOOO thank you man this is literally what i needed

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

    Man, It was 6th video in my RUclips search "cfg to pda" which I understood.
    Thanks man.

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

      5 more spots to rise up! ;)

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

      @@EasyTheory Yeah, The volume was a bit slow, but headphones worked fine for me.

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

    Perfectly explained, bless you 🙏

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

    omg you are literally the best

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

    So what if instead of B -> epsilon as a production in our CFG, we had B -> a (or B-> b). Could we still use a self loop back to qloop. In other words can we use a self loop to qloop, anytime the RHS of the production has only one symbol?
    Excellent video btw!

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

      To answer your question a year later, yes you should be able to simply use a self loop back to qloop when the RHS of the production has one symbol.

  • @Patrick-S3
    @Patrick-S3 7 месяцев назад

    Fantastic video! This helped me so much!!!

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

    This was such a great video! Thank you so much!

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

    Thank you so much, you saved a lot of lives!!

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

    Good explanation! Much appreciated

  • @wengeance8962
    @wengeance8962 4 года назад +2

    So how do you represent S -> A, would this just be a self loop on qloop being (epsilon, S -> A)?

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

      Yes, correct! Or you can have two transitions that "go out of qloop and come back" but that's not necessary.

  • @FernandaRodriguez-xf3lr
    @FernandaRodriguez-xf3lr Год назад

    Thank you!! This is a great video

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

    Thank you so much now is easy to do my homework.

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

    Thank you thank you thank you so so so much!!!! I subscribed

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

    Thanks for this! Finally, i got it ✨

  • @rosenv.1953
    @rosenv.1953 3 года назад

    How would this look if we accept by final state rather than empty stack?

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

    Thank you so much, really helped!

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

    Another great vid 👌🏻

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

    What if the language has no terminals? Then what would go in qloop

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

    Thanks for neat explanation

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

    Hi there, could you remove the pop-ups at the end of the video that goes to another video because it blocks your writing and we could not see anything.

  • @csperi-peri2447
    @csperi-peri2447 3 года назад

    Great Video !

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

    Thank you so much man

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

    Shouldn't the transition from the second state to q-loop be (epsilon, $ -> S) .. since the input read is nothing, stack top is a dollar and to push is S?

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

      Why would you pop $ there? The whole purpose of putting the $ on the stack at the very start is to ensure we can't go to the final state unless the stack is "empty" (other than $).

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

      @@EasyTheory Thanks ... I thought the tuple was (input symbol, stack top symbol, push/pop)

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

      @@DiwashHCR2 This is where divergence in notation comes into play -- my notation (based on the Sipser book) is: (input_symbol, thing_to_pop (or not), thing_to_push (or not)). So the first transition here pushes a $, and then pushes an S (the start variable). So when we first enter q_loop, the stack contents are $S (top of stack on the right).

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

      There are some books that do force something to be popped on each transition; some others (maybe yours) does a "peek" at the top but doesn't pop; others can (maybe yours also) forces a push-only or pop-only transition.

  • @KhangNguyen-wj5jd
    @KhangNguyen-wj5jd 2 года назад

    What is the software you use for drawing? It is beautiful.

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

    Hi there, I was wondering if you have any videos where we can go backwards? Going from a PDA to a cfg

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

      Video coming out soon :) the CFL livestream happening in a few weeks will certainly cover this too

  • @dan-cj1rr
    @dan-cj1rr 4 года назад

    Thanks for the video, i have a question, i don't understand when you're in qloop why isn't it S, S ; c instead of epsilon, S ; c would make more sens for me if it was S,S ; c no ? Or does both work. Thanks

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

      Because S, S -> c means "read an S" but that is already a problem because the input is over the input alphabet Sigma, not the stack alphabet Gamma.

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

    Thank you sooooo sooooo much!!!!

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

    Thank you so much!

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

    i love you.

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

    what is the significance of the read only self loop?

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

      is that the case even if a terminal isnt in the S(start) rule?

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

    Thank you!!

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

    Loved It

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

    In Germany we say Ehrenmann

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

    Thanks a lot!!!!

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

    Thanks!

  • @MonroeHelen-z2d
    @MonroeHelen-z2d 2 месяца назад

    Rosenbaum Pass

  • @DonnaLee-d4n
    @DonnaLee-d4n 2 месяца назад

    Reuben Turnpike

  • @DarinTimas-e6u
    @DarinTimas-e6u 2 месяца назад

    Dickinson Mountains

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

    ❤️

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

    Great video, but why not accept with empty stack and simply use two states:
    (We have to assume that $ is already on the stack, though. Otherwise, this automaton would accept every input.)
    The first state pushes the start-non-terminal on the stack and the second state loops over itself, while using every single rule from the CFG and pops terminals from the stack, while pushing nothing on the stack. The moment the stack is empty again, simply go back to the first state and push nothing on the stack. Our automaton should accept now, because the stack is empty.

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

      Or, if we want to have an accepting state, we could add a third state and if we have an empty stack (even without $), then we go from the second state to the third one and accept.

  • @JoyceVera-k9v
    @JoyceVera-k9v 2 месяца назад

    Powlowski Vista

  • @EdwinBock-y9p
    @EdwinBock-y9p 2 месяца назад

    Eliezer Square

  • @WillianNine-q7d
    @WillianNine-q7d 2 месяца назад

    Isabell Lights

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

    646 Wilbert Stream

  • @darklord998
    @darklord998 2 года назад +10

    I used this tutorial for a quiz and my professor marked it completely wrong :(

  • @LucasCliff-r5o
    @LucasCliff-r5o Месяц назад

    10302 Hayes Avenue

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

    Why we can't take all these in single loop on qloop state ?

  • @HornbyHardy-b2i
    @HornbyHardy-b2i 2 месяца назад

    Osinski Path

  • @WilliamDurst-c3m
    @WilliamDurst-c3m 2 месяца назад

    Pouros Mountain

  • @MarkLeo-h5k
    @MarkLeo-h5k 2 месяца назад

    Armani Green

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

    what

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

    8:48