Equivalence of CFG and PDA (Part 1)

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ส.ค. 2024

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

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

    I usually have no problems understanding your videos, but this one had me yawning all over. Jesus, I just want to graduate

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

      Tell ur jeSUS to teach from cross😂

  • @aakashparmar560
    @aakashparmar560 3 ปีที่แล้ว +391

    Only god knows where I will be applying this logic.

  • @minchuncho1710
    @minchuncho1710 3 ปีที่แล้ว +47

    I've read the textbook for a couple of times, and I got to say that the concepts were rather complicated and abstract for me to comprehend. But thanks to the video which you made, it's very clear and now I know how it works and successfully linked most of the concepts on the textbook. Really appreciate it!

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

    generally find Neso Academy videos quite useful because of the provision of practical examples to back up the theory... but like others this video left me scratching my head, and no better able to convert CFGs to PDAs than before i watched. a shame, especially as the video was 22 minutes long!

    • @user-kt3mb8ug8r
      @user-kt3mb8ug8r 2 ปีที่แล้ว +5

      I understood completely on the other hand.

    • @user-qk5es4mh3s
      @user-qk5es4mh3s 9 หลายเดือนก่อน +1

      f**k you dont make others feel dumb@@user-kt3mb8ug8r

  • @vatsaldhoundiyal643
    @vatsaldhoundiyal643 3 ปีที่แล้ว +19

    for the first time i was disappointed at the end of the video for this channel

  • @ayanmandal8257
    @ayanmandal8257 4 ปีที่แล้ว +9

    Sir please give an example. Of this type of questions we understand the method but doesn't know how to apply

  • @kaiiiser7
    @kaiiiser7 6 ปีที่แล้ว +26

    2210A?

  • @fardadhajirostami7104
    @fardadhajirostami7104 6 ปีที่แล้ว +170

    Literally no video on youtube starts with an example and finishes the same example. Just show and finish ONE example please for the love of jesus

    • @siegfredch.960
      @siegfredch.960 6 ปีที่แล้ว +6

      All teacher are stupid

    • @vaibhavbiradar9451
      @vaibhavbiradar9451 5 ปีที่แล้ว +30

      be grateful for what you are getting.

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

      @Vaibhav Biradar fuck you

    • @blakefeucht960
      @blakefeucht960 5 ปีที่แล้ว +35

      @@vaibhavbiradar9451 Seriously... These videos are free and incredible helpful and people complain because they have to watch 2 of them... Entitled and ungrateful people.

    • @vaibhavbiradar9451
      @vaibhavbiradar9451 5 ปีที่แล้ว +15

      @@griffin3706 Nah, I’m good..your sister already did.

  • @yingma6770
    @yingma6770 7 ปีที่แล้ว +15

    From lecture 80, we know that upper case sigma represents a finite set of input symbols and uppercase gamma represents a finite stack alphabet. They are two different sets. Can we say that uppercase sigma is the set of terminal symbols and uppercase gamma is the set of both terminal and non-terminal symbols?

    • @ridwannana-yawamoako2939
      @ridwannana-yawamoako2939 7 ปีที่แล้ว +6

      Upper case gamma is the set of stack symbols/alphabets. As we know stack symbols can either be terminal or non terminal. However upper case sigma is set of input symbols only which are always terminals. So your statement is right but you need to indicate that sigma is for input symbols while gamma is for stack symbols. This is my understanding. Open to corrections.

    • @yingma6770
      @yingma6770 7 ปีที่แล้ว

      Thanks a lot for your response.

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

      Thanks you bro for clarifying ​@@yingma6770

  • @amberchawla7930
    @amberchawla7930 3 ปีที่แล้ว +4

    one of the things i don't understand is that what if the production is of type B -> ACD | EF; which one to push , we need to apply recursion using stack . please further make a video explaiing how to perform recursion using stack.

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

      It's a non-deterministic algorithm, so it will have multiple runs trying out different rules. It simply tests for if one of the runs evaluates to the given input.

  • @mohdshariquealam1296
    @mohdshariquealam1296 5 ปีที่แล้ว +33

    in first example why did he used A-->epsilon instead of A-->0A...isnt that the leftmost derivation??

    • @technicalharshit2516
      @technicalharshit2516 4 ปีที่แล้ว +9

      left most derivation means that we have to take left most variable and change it, not take the left most value of the left most variable in the derivation. Hope it helps!

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

      @@technicalharshit2516 s->BS
      s->2S
      s->2A (A->epsilon)
      S->2
      WHYYYY THIS IS NOT POSSIBLE??????

    • @10_yogeshchandrapandey90
      @10_yogeshchandrapandey90 4 ปีที่แล้ว +2

      @@anushkagarhawal6918 to find a corresponding PDA, for a given grammar we must have to consider all possible cases.
      In other words, all possible strings obtained by productions rules must be accepted by PDA.
      So to obtain each possible combination of strings that must be accepted, we are first using those production which involves more no. Of non-terminals symbols and then using production that involves terminal symbols.
      Hope, you got that...!

    • @10_yogeshchandrapandey90
      @10_yogeshchandrapandey90 4 ปีที่แล้ว +1

      @Mohd Sharique Alam, please refer to my comment above.
      Then coming to your question, as you have seen in that video, that whenever we have a terminal symbol in the top-most stack we just advance the Input symbol, till a non-terminal symbol.
      Since 'A' can have two productions, either string "0A" or ''epsilon". Now consider the case A->0A, so A is replaced by 0A in the top-most stack. Now we have '0' in the top-most stack which is a terminal symbol, so we will advance the string and (0, epsilon-->epsilon), and now the top-most symbol is again ''A", so using this production rule( A->0A ), we didn't get anything fruitful even we have make this PDA construction more complex.
      I hope, I got there...!

    • @shanmukhsreerangam1595
      @shanmukhsreerangam1595 3 ปีที่แล้ว

      @Vasu Sharma it all depends upon the grammer here just he took an example so according to that example he explained

  • @hassaanrz
    @hassaanrz 6 ปีที่แล้ว +51

    Sir, Why had you used production A->€ instead of A->0A ?
    Please explain it.

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

      I dont understand that part either, answer would be good!

    • @Menthosful
      @Menthosful 6 ปีที่แล้ว +27

      Because that production gives you two options, A->€ and A->0A. In that example, he wanted to look the most left derivation for the string 221. If you want to get the most left derivation for the string 2210, in that step you have to choose that option (A->0A) and then transform the non-terminal A to €.

    • @thewiz04
      @thewiz04 5 ปีที่แล้ว +5

      I didn't understand either.. did you understand?

    • @tankman7347
      @tankman7347 4 ปีที่แล้ว

      @@Menthosful ?

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

      @@Menthosful ??? why did he take 221 and not any other possible string and if choosing only leftmost then shouldn't the string be 2210

  • @frostbite585
    @frostbite585 6 ปีที่แล้ว +26

    Hi, I have a question I really urgently (like within a few a hours!) need an answer to: can you please explain why at 5:48 it doesn't become 2210A, then 2210? Am I missing something? I know some other people also wanted to know this answer. Thanks

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

      bcoz it has taken production A-> ε over there.

    • @themachinist2350
      @themachinist2350 6 ปีที่แล้ว +5

      Because the desired string is 221 we don't want anything else.

    • @hammerguy123
      @hammerguy123 6 ปีที่แล้ว

      replacing A with epsilon

    • @Matt-of1xh
      @Matt-of1xh 2 ปีที่แล้ว +8

      Is this question really answered with the below responses? I still don't see why it was 221 and not 2210A then 2210

    • @RA-gv3ys
      @RA-gv3ys ปีที่แล้ว +1

      I think it's upto us to take any one production from the 2 given (as was done in earlier examples too). So here he took A->€, rather than A->0A here.

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

    got it, now ill be able to construct PDA for any CFG
    ❤❤

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

      kya job lagti hai isse?

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

      @@parthsarthisingh4549 hai ek job bhai jo isse lagti hai

  • @NitinSingh-hk3vy
    @NitinSingh-hk3vy ปีที่แล้ว +1

    I m having a doubt, what if our production going like this
    A --> Aa | Yb
    When PDA find non terminal A on top of stack then it would always took Aa not Yb.
    How we can solve it ?

  • @QT-yt4db
    @QT-yt4db ปีที่แล้ว +4

    19:14, the 0102 on input matches the 0102 on stack, but what would happen if 0103 is on input and 0102 is on stack? Seems this branch of logic is not explained... any help?

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

      Hey did you find out what to do in that case
      Same question popped up in my head so I'm looking through comments but can't find any answer

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

    All the different rules are different examples he has taken to show the working of the method, I got confused if they were relating to the grammar in the start of the video

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

    Don't panic to see the comments that some students can't understand it , actually this topic is little bit complex, so you have to see the video twice or thrice for proper understanding 👍

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

    Thank you sooo much sir your lecturer is very impressive i understood very clearly.........

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

    This video was confusing, hard to track what is going on when

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

    Good explanation. Thank you

  • @sanjayakoirala4410
    @sanjayakoirala4410 6 ปีที่แล้ว +5

    is the general form mentioned in the video same for all such conversion problems?

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

      could someone answer this question I have the same doubt

  • @ShivamGupta-gn8cn
    @ShivamGupta-gn8cn 3 ปีที่แล้ว +5

    How did you get that general form??

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

      It was not an exact general form. It is an example representative of the general form (not some special case)

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

    Thankyou sir

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

    kaihna kaya chatae ho aap ;-/

  • @vaasereshma3204
    @vaasereshma3204 3 ปีที่แล้ว +7

    you took one example and didn't continue with that

  • @ROHAN-xs7om
    @ROHAN-xs7om 4 หลายเดือนก่อน

    Sir the example we had was different and you solved the different one 😅

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

    Sir, where did we get A-->BCD rule from? It's not present in the grammer.

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

    Hi, will this general form for all grammars we will try to find equivalent pda?

  • @iqrach2858
    @iqrach2858 4 ปีที่แล้ว +3

    Thank you so much sir really helpful lectures u r delivering.

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

    U didn't continue with the starting examplee

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

    Great video

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

    what if input symbol and the top element on stack does not match?

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

    will the result of left most derivation not be 2210 ?

  • @mrinmoykumar2579
    @mrinmoykumar2579 5 ปีที่แล้ว +28

    What are you explaining. Just jumping from one example to another. Atleast complete an example. Did you had cheap weed

  • @Amal-ds3nw
    @Amal-ds3nw ปีที่แล้ว

    If I have more than one rule with the same start variable what rule should be applied ?

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

    kuch samjh ni aya 🥺🥺

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

    bhai ye general form kaha se aaya?

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

    Is there more than one PDA corresponding to the same CFG. For example, in lecture 81, You give an PDA for strings 0^n1^n, we know the CFG for these strings is X->0X1. If we use this CFG to derive the PDA, it is different from the one in lecture 81. How can we prove that these two PDA are the same? Or how can we simplify the derived PDA to the one introduced in lecture 81?

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

    Sir please upload remaining videos soon, thanks

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

    Thanks sir❤

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

    21:55 for which context free grammar?

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

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

    Is this topic important for gate purpose??

  • @mohammedamaan7351
    @mohammedamaan7351 5 ปีที่แล้ว

    Is the given rule same for all questions ?? plz reply thanks

  • @caesarshi9114
    @caesarshi9114 3 ปีที่แล้ว

    SO good

  • @jkssbjobtutorial.5061
    @jkssbjobtutorial.5061 5 ปีที่แล้ว

    Super teaching sir.

  • @mukeshbhangale7040
    @mukeshbhangale7040 4 ปีที่แล้ว

    How you make the videos? By this viewers can capture more. Sir, during this lockdown we have to deliver lecture.

  • @AkshayKumar-bw9mk
    @AkshayKumar-bw9mk 5 ปีที่แล้ว

    Thanks a lot

  • @Name-pn5rf
    @Name-pn5rf 5 ปีที่แล้ว

    Do number of states matter in pda?

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

    amazing video but you just left the first example you did. You broke it down but did not convert it

  • @technicalgajesh1742
    @technicalgajesh1742 5 ปีที่แล้ว +3

    Damm bro 😎 if you are master in data structure or in Stack you can do it easily...

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

    Zindagi chune engineering nahi.

  • @swarup765
    @swarup765 7 ปีที่แล้ว +3

    PLEASE RESPOND.
    How long do you need to finish the playlist?
    Please finish in a month or two. Will be very helpful for our upcoming exams.

  • @xinhaizou9240
    @xinhaizou9240 3 ปีที่แล้ว

    I don't understand why epsilon, epsilon -> S, should it be "epsilon, S -> A"?

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

      same thing i thought

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

      @@itxbo I think mine is correct! Trust me! I got a 14/20 on this course finally! XD

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

    at least give an example

  • @anushkagarhawal6918
    @anushkagarhawal6918 4 ปีที่แล้ว

    why you are not writing B as 2
    s->BS
    s->2S
    s->2A (A->E)
    S->2
    ??????

    • @gouravm4986
      @gouravm4986 4 ปีที่แล้ว

      He said you can get many forms... So yours is not wrong too

  • @vishalnavin2269
    @vishalnavin2269 4 ปีที่แล้ว

    My friend said you should use a better font

  • @48_subhambanerjee22
    @48_subhambanerjee22 ปีที่แล้ว

    Got it 👍

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

    What is the meaning of advance the input string ??

    • @ibrahim47
      @ibrahim47 5 ปีที่แล้ว

      read the next symbol

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

    Bit confusing

  • @smritikerketta2218
    @smritikerketta2218 3 ปีที่แล้ว

    Sir a also gives oa A ->OA

    • @ayushkwal
      @ayushkwal 3 ปีที่แล้ว

      Have you got your answer?

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

      Yup, so 221 isn't the general form. You can have many forms accepted by the PDA.

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

    First video with damm bad explanations.

  • @DevanshNarwariya__BCS
    @DevanshNarwariya__BCS 3 ปีที่แล้ว

    Why can't it be like:
    --> S
    --> A
    --> 0A
    --> 0 .

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

    Transition of PDA ?
    Can u tell me?

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

    How can you get Left most derivation sir i mean without using inPut string?

  • @seguhemateja7751
    @seguhemateja7751 3 ปีที่แล้ว

    Sir,please explain only by taking one grammar

  • @priyanshuchaudhary837
    @priyanshuchaudhary837 3 ปีที่แล้ว

    the grammar and final PDA do not match

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

    Little bit confusing

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

    this is worst , u have not explained the example

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

    So, So complicated. hard to understanding

  • @pranavanilkumar8592
    @pranavanilkumar8592 6 ปีที่แล้ว

    pleasa add NPDA with this lecture set....urgent.....

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

    I'm here cause Ganesh doesn't make any sense.

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

      don't you just love paying for a class where you have to teach yourself all the material? :) this midterm's gonna suuuuuuuck

    • @scoobynicker
      @scoobynicker 4 ปีที่แล้ว

      @@DamnLyons Hey, I'm shooting for at least 65% That's about all you can hope for in this class.

  • @iswaryapandugayala594
    @iswaryapandugayala594 6 ปีที่แล้ว

    We can not see picture clarity

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

    ama kya padha rhe ho bhai...kuch smjhao to

  • @kurasalalakshmivenkatakuma7893
    @kurasalalakshmivenkatakuma7893 6 ปีที่แล้ว

    Sir,Is this enough for gate 2019?

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

      not enough for more click mushermusicvevo where i explain

    • @gladyouseen8160
      @gladyouseen8160 4 ปีที่แล้ว

      Not required for gate actually these type of one's

  • @bimmiverma1246
    @bimmiverma1246 4 ปีที่แล้ว

    Very bad do one example only

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

    Heyy

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

      @@jj050 whi

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

      @@jj050 waited...but u didn't come

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

      @@jj050 tu soch

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

      @@jj050 they are personal

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

      @@jj050 yar meko pta hota to yhan kyun krti