Pushdown Automaton to Context-Free Grammar Conversion Example

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

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

  • @bloodthirstybutcher8365
    @bloodthirstybutcher8365 2 года назад +25

    CFG to PDA: fine! But with this one you got me lost all over. Jesus, I just want to graduate 😭😭😭

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

    Great video. I thought the intro music was going to be Yeah by Usher on an acoustic for a moment. Same interval pattern!

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

    Nice haircut, I have my final exam on Monday!

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

    You are Great Tutor Bro.❤️❤️❤️❤️.By watching your video I had a crystal clear concept of way of conversion of CFG to PDA and Vice versa ❤️❤️❤️❤️🔥🔥🔥🔥🔥🔥🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼
    Sir Thank You very much.

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

    I will definitely rate this channel best for TOC 💯

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

    Is there any reason you didn't push the starting variable S onto the stack (after pushing $ onto the stack) when creating the PDA in the very beginning? I saw in the CFG to PDA video we typically do that along with making a transition to qloop. I think maybe because it's a different theorem + we're just given the PDA and only need to worry about converting it (not how it was made)?

  • @dr.safdarabbaskhan9194
    @dr.safdarabbaskhan9194 2 года назад

    At time 4:56 the auxiliary symbol to be used to make the e,e---> e move as push and pop move, is not suppose to be one of the terminals.
    It will later cause a problem resulting in error in the productions of the equivalent grammar.

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

    Do we need to go through those 3 types of rules to figure out what rules we need, or are they just different methods to go about it? Is the answer just what you came up with in those rules, or are there really 729 of them? How can we know we found all the necessary ones?

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

    if we are popping off all non-special characters on the red self loop on q7, why don't we have a rule that pops a 1, since 1 is part of the language and is a non-special character? so we would add E, 1->E

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

    For type 3, do we only consider the loops? In this example you worked with two type 3 rules. Is that all?

  • @FuzzyCuff2010
    @FuzzyCuff2010 3 года назад +7

    I sat through like an hours worth of videos about PDA to CFG and I think I understand less. It's not presented in such a way that's relatable to course material. Like, you spent 20 minutes describing a mountain? wtf, I don't care about a mountain, how do the PDA transitions relate to the CFG? Can we start there? Why is this like an hour long and doesn't end with showing a useable grammar?

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

    Why was it necessary to make all those changes to the PDA at the beginning?

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

      For the way the conversion is setup, it's necessary for the base and recursive cases. However, there may be some other method that works and that might not require these changes. Would love to know if one such method exists.

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

      @@EasyTheory Thanks!

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

      @@EasyTheory You mentioned that you'd want to know if other methods exists that convert PDA to CFG without the need of initial changes to PDA. Such algorithm exists, if PDA is of variation, which accepts by emptying the stack (it's same as PDA which accepts by final state, thus there are algorithms to convert between these 2 variations).
      These methods are explained in the book "J.E. Hopcroft, R. Motwani and J.D. Ullman, Introduction to Automata Theory, Languages and Computation, 3rd Edition" pages: 247-251

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

    tfw your homework requires you to translate a pda with 9 states into a cfg ;-;

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

      This is when you break out your computer program to do the work for you - you're a computer science major (I'm assuming) after all! :)

  • @mohammadal-hiari925
    @mohammadal-hiari925 3 года назад

    was the introduction of the state that pops off the $ needed? we already know that if we reach this state -the original accept state-, then the stack is definitely gonna be empty. Moreover, the introduction of the $ at first serves off the same purpose as the hashtag symbol. would love to hear your feedback asap

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

      Technically not needed, but I want this process to be algorithmic and always guarantee to work, regardless of the PDA (aka "I don't want to think too hard about it")

    • @mohammadal-hiari925
      @mohammadal-hiari925 3 года назад

      @@EasyTheory Thanks for the reply, awesome explanation btw :).

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

      @@mohammadal-hiari925 You're welcome!

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

    You are incredible! Thank you SO much

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

    Sir if possible then please make a series of videos on space and time complexity. I am getting confused very much. Please explain it from scratch and solve a good amount of questions.

  • @InternetExplorer-tq3md
    @InternetExplorer-tq3md 8 месяцев назад

    Thank u

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

    thanks

  • @swagatmalla6302
    @swagatmalla6302 9 месяцев назад

    Your videos are great, but I can barely hear anything.

  • @バナナお爺さん
    @バナナお爺さん 4 года назад

    This is gold :')

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

    Convert PDA's to CFG is my least favourite topic.