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

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ม.ค. 2025

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

  • @rookiecookie8258
    @rookiecookie8258 ปีที่แล้ว +32

    This monstrosity of a PDA is the most beautiful thing I've ever seen. Thanks so much

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

      PDA = Kamala Harris

    • @forthehomies7043
      @forthehomies7043 2 หลายเดือนก่อน +1

      @@KarenWasherGrudzien How dare you disrespect PDA like that

  • @farzin818
    @farzin818 2 หลายเดือนก่อน +4

    Hey, you explain complicated concepts in an easy to follow manner and make things quite intuitive. Please continue to post these types of videos, they are absolutely carrying me :)

  • @missflecha6084
    @missflecha6084 ปีที่แล้ว +22

    you made PDAs seem so simple here, thanks so much

  • @CS-gj9gc
    @CS-gj9gc 2 ปีที่แล้ว +9

    Thanks for taking your time helping us. Best video's on this topic imo.

  • @chasemarangu
    @chasemarangu 2 หลายเดือนก่อน +1

    At 20:00 when he zooms out and I'm like: “yes! I finally understand it!” Then I look at the diagram and think to myself, “what is this madness, anyways..”

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

    Thanks to you I’m ahead in class, you sir sure know how to teach!!

  • @he-harshedits361
    @he-harshedits361 9 หลายเดือนก่อน

    19:04 Completing the example head to toe clears the concept ❤

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

    Yo thanks so much I've been struggling to understand this and now it finally makes sense!

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

    Amazing how you managed to turn the most simple PDA's out there that GFA are into this 12 state automata abominatio.

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

    This is great. it's very useful. thx for the great tips and tricks in this video.

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

    you are a life saver I swear, thank you so much

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

    woah... this is super intuitive, thank you!

  • @MRHero-ni9bm
    @MRHero-ni9bm ปีที่แล้ว +3

    هذا الرجل خارق 😂🔥

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

    Awesome explanation brotha. I'd like to add that I think the entire PDA could've been encapsulated using just two states with multiple self-loops

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

    if S is in the stack doesn't it mean we read S and then we pop it (at around 14:40) like in case of terminals when we encounter a in the stack we read it and pop it

  • @mnaresh3382
    @mnaresh3382 10 หลายเดือนก่อน +5

    very good lecture, But I initially couldn't understand the concept of reading and handling the terminal symbols so I did some research and found this out, I just wished he could have explained better instead of saying reading-off which makes, no sense, Anyway what he actually means, consider we are given a CFG and we are also given a string, and we are asked to check if we the given CFG, accepts the string or not by using PDA, (which is equivalent to the given CFG), so basically we want to see if we get to the final state when we try to compute/ process the given string by feeding it to our equivalent PDA.
    so now we are going to follow the said rules, we are initially going to push the Starting symbol, which generally is Non-Terminal, since it is a CFG, then we are going to follow through the rules, or we can say we are going to traverse through all possible choices/ derivations, of the grammar, when we find ourself in the state where the top of the stack is equal to our string we are going to move the pointer of our string to +1 and continue through the stack, at some point if there really exists some derivation which gives us the required string then we will definitely read through all the characters of the string and at the same time we will have no content in our stack, except the dollar symbol, and if the are in this situation, we can say that the PDA built off of the CFG accepts the given string.

  • @BitPiBit
    @BitPiBit 16 วันที่ผ่านมา +3

    بارك الله فيك

    • @ziadmohsen4129
      @ziadmohsen4129 16 วันที่ผ่านมา +1

      حبيبي

    • @BitPiBit
      @BitPiBit 16 วันที่ผ่านมา +1

      @@ziadmohsen4129 شرح جميل اتمنى تستمر

    • @ziadmohsen4129
      @ziadmohsen4129 16 วันที่ผ่านมา

      @@BitPiBit حبيبي

    • @BitPiBit
      @BitPiBit 16 วันที่ผ่านมา +1

      @@ziadmohsen4129 استأذنك تعملنا ورق نذاكر منه وشكرا جزيلا

    • @ModyElafify
      @ModyElafify 16 วันที่ผ่านมา

      حبيبه​@@BitPiBit

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

    3:49 why "without loss of generality"??

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

    Thank you sir.very very helpful.

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

    Thanks for the video!

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

    Thanks for the great video! just wondering, why do you wear your apple watch upside down? Never seen someone do that before!

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

    you are the best bro!!!

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

    One of the issues I cant figure out is why there are no inputs (or all inputs are empty) in this PDA. If we're reading in a string to confirm its correctness, wouldn't we need some inputs to direct our PDA in the right direction?

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

      when u say "input" i assume it's those "a" and "b" u talking abt? and u said "reading a string to confirm its correctness" i assume u want to test word like "ab" on the PDA? if so then i can tell u that it's done at "qloop" for example if u wanna test "ab" then u can follow the line and go through the loops at the bottom and then get a stack like "aPb$" and then when u pop the "a" from the "aPb$" u will read "a" cuz "a,a ->e" means "reading a, pops a and push nothing to the stack". unless he wrote e,a ->e then u only pops "a" without reading it. and then after u follow the lines and go through the stack u should result with "ab". (i can't explain in more detail without drawing out the path so...yh u gotta just imagine what im saying...)

  • @SarthakGupta-xm2kw
    @SarthakGupta-xm2kw 10 หลายเดือนก่อน

    Thank you so much.

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

    Why you only push one element at the stack? I read that it is possible to push multiple. Your drawings would be much simpler to undestand, and have the same meaning.

  • @raqsoli
    @raqsoli 25 วันที่ผ่านมา

    omg, you're an angel

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

    The ending justification why the PDA and the CFG are equivalent was a bit handwavy. I understand the video isn't dedicated to "hard-proving" it mathematically, but a list of resources in the description would've been nice.

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

    Thanks so much! This is the best video, explains everything so well! Please marry me I love you!

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

      btw I was the 781st like, thought that you should know

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

    take it to the 1.75x, ma duud explains it like he's on crack

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

    thanks broo

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

    legend, saved my ass🙂

  • @LindaTaylor-e7u
    @LindaTaylor-e7u 3 หลายเดือนก่อน

    Jones Christopher Anderson Steven Young Anthony

  • @RichardGonzalez-v6y
    @RichardGonzalez-v6y 3 หลายเดือนก่อน

    Davis Shirley Miller Donna Anderson Kevin

  • @CLG111
    @CLG111 ปีที่แล้ว +17

    There's no F'n way you would get that from reading the book. This is ridiculous, this class is being taught so horribly.