Conversion of CFG to Chomsky Normal Form

Поделиться
HTML-код
  • Опубликовано: 1 окт 2024
  • TOC: Conversion of CFG to Chomsky Normal Form
    This Lecture shows how to convert a Context Free Grammar to Chomsky Normal Form.
    Contribute: www.nesoacademy...
    Website ► www.nesoacademy...
    Facebook ► goo.gl/Nt0PmB
    Twitter ► / nesoacademy
    Pinterest ► / nesoacademy
    Music:
    Axol x Alex Skrindo - You [NCS Release]
    • Axol x Alex Skrindo - ...

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

  • @eclipseilff
    @eclipseilff 7 лет назад +591

    I just wanna say that I've spent my afternoon with your videos and I think I learned more in these couple of hours than I did for the whole semester... The way you teach is simply amazing. Thank you and greetings from Germany!

    • @tangdaniel3434
      @tangdaniel3434 7 лет назад +23

      Same here as well from Malaysia!

    • @ДенисМарянчук
      @ДенисМарянчук 6 лет назад +31

      Exactly! In one night I have learned and understood all the things that I couldn't understand during the semester. And I have passed the exam :)

    • @NeerajKumar-tb3ek
      @NeerajKumar-tb3ek 6 лет назад +10

      same here, from India

    • @Farahat1234
      @Farahat1234 4 года назад +7

      You are from germany?

    • @rauapayl4223
      @rauapayl4223 4 года назад +10

      Same Bangladesh

  • @apoorvagowda13
    @apoorvagowda13 2 года назад +55

    This Academy is litrelly saving lives of many students 😭...
    All I wanna do is Thank You🙏

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

    Thank you, is not enough :)
    Well appreciated

  • @marxman1010
    @marxman1010 3 года назад +12

    At 1:27, the first step S'->S doesn't conform to chomsky normal form, since S is not in T. But disappear in step 3.

  • @salounik.2894
    @salounik.2894 7 лет назад +52

    I have been following this channel past two years. All I want to say is thank you so much for guiding me through various subjects. I have scored really well in whatever subjects you've taught me!!!

  • @princetomar2247
    @princetomar2247 7 лет назад +73

    yours lecture really helps me to understand theory of automation
    plz upload all remaining videos which is about PDA and turing machine
    plz upload alls
    BCOZ MY paper coming soon
    please understand problem
    thanks for giving me a such lecture to understand CNF

    • @shashanksharma8229
      @shashanksharma8229 7 лет назад +1

      yes sir I agree Prince

    • @whitehatmelons4597
      @whitehatmelons4597 7 лет назад +2

      yes true....we are waiting for those of turing Machine
      actually we can't wait

    • @souradeepdatta8569
      @souradeepdatta8569 7 лет назад +2

      ya plz my xams are coming plz upload them fast and thanx for teaching in such a great way....

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

      Please treat teacher as Sir, sir. I dont understand problem

  • @TheKseth
    @TheKseth 7 лет назад +14

    Please upload the rest of the videos asap.You are doing a huge service to mankind by making these videos.

  • @smurfx6922
    @smurfx6922 3 года назад +14

    i have no words for the way you explain a topic .... its like learning from the topic itself... great respect whoever you are

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

    What Should we do if there is no S on RHS?????

  • @evanlecarde281
    @evanlecarde281 5 лет назад +23

    Very helpful, these lectures are getting me through my theory of computation class.

  • @techpiano7010
    @techpiano7010 5 месяцев назад +2

    I found the same question which is in my exam thank you!
    😂

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

    I jus came from a video of sonmeone who had no clue what they were saying

  • @govindparulekar862
    @govindparulekar862 4 года назад +13

    Thank you so much for this great explanation , understood fully.

  • @021_anuskapaul2
    @021_anuskapaul2 2 года назад +1

    Sir I have a question. In the second step there is we have to remove the null production..but in the grammar there is only B tens to epsilon..there is no A tending to epsilon..from where you got that grammar ..I couldn't get that part

    • @14kadarshraj3
      @14kadarshraj3 2 года назад +1

      because he remove B from A so there remain null.

  • @ShubhamKumar-hv3gu
    @ShubhamKumar-hv3gu 6 лет назад +10

    I have seen almost every lecture of toc Its very helpful for learning and getting understand to toc topics this is the best channel of RUclips for studying toc I explore many channel and waste the time but you neso academy you are the best

  • @k.abhijeet
    @k.abhijeet 3 года назад +4

    Null production removal method in previous video is different from this one. Please tell which one is correct and should be followed.

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

      Both are same, in this lecture the concepts of removal were directly put into action.

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

    Sir in this question A not belongs to € still you wrote A give to €

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

      if you look closely you'll notice that in P: S -> ASA | aB , A -> B | S , B -> b | €
      its A -> B and B -> €
      now here it can be understood as A -> B -> €
      or in other words A -> € and B -> €

  • @KandhaMaaran-10
    @KandhaMaaran-10 Год назад

    In final step 4 and Step 5, We add "X" instead of "SA" and "Y" instead of "a" rite...., Then why not we write the production rule like this- S-AX / YB / X / AS / Y.... ?

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

    sir,(S->AX/aB/a/AS/SA) why the last SA is not replced by X ?

  • @KavyaShree-s1l
    @KavyaShree-s1l 2 месяца назад +1

    There are no words describe a devotional thank fullness for your work🥺🙇‍♀️🫶

  • @blink6280
    @blink6280 5 лет назад +2

    but you didn't even put the link of the previous video.... bruhh

  • @sudiptapaul7243
    @sudiptapaul7243 6 лет назад +4

    In step 4,can we replace the most right sided SA with X????

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

      No, then you'll have only one Non terminal symbol, which is not in CNF.
      I know this comment is kinda late )

  • @tolubrand5330
    @tolubrand5330 7 лет назад +5

    Sir plz provide the lectures on PDA and TURING MACHINES🙏

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

    how A-> epsilon is there?

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

      Yes exactly what I was talking about!!

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

      epsilon is hidden there, so there should also be one S' and S as well, im not sure why those haven't been mentioned either

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

    You are born to teach.

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

    Right, now i can sleep peacefully

  • @abhishekbalyan7189
    @abhishekbalyan7189 7 лет назад +11

    Sir please upload remaining lectures. I'm totally dependant on your lectures. My exams starts from 12 May. Because of you I was able to pass DLD in last semester. All the students are waiting for your lectures. Please it's a sincere request upload it ASAP!

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

      Bhai job lag gayi kya?

    • @abhishekbalyan7189
      @abhishekbalyan7189 2 года назад +8

      @@Arham__Qasim haan ji bhai, job lag gyi hai

    • @ashu3128
      @ashu3128 2 года назад +5

      @@abhishekbalyan7189 congrats🥳

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

    2022.. and students still follow these videos .

  • @snehalmachan
    @snehalmachan 7 лет назад +59

    Sir,In the removing unit production of S'->S at 7:17
    You've replaced S' by the value of S but in the lecture of removing unit productions you have stated that you have to replace A->B by A->x whenever B->x in the Grammer and x belongs to terminals, but Here in S'->S ,S contains both terminals and non terminals

    • @JP-qp9ht
      @JP-qp9ht 6 лет назад +3

      ya i think it should be S'->a because on replacing S'->S , S->a so S'->a . am I correct or not ??

    • @shubhamsaxena1681
      @shubhamsaxena1681 6 лет назад +3

      Same confusion!!!! if anybody can explain please do so!

    • @ankulsinghrajput8452
      @ankulsinghrajput8452 6 лет назад +3

      @JAY prakash sorry to say but u are wrong, think if S' wants to go to another option or a non terminal Symbol like AS but in your case you are restricting S' to go only to a terminal symbol a.

    • @ankulsinghrajput8452
      @ankulsinghrajput8452 6 лет назад +5

      @snehal machan Go step by step , first add S'->S (coz S is on the right hand side) then it becomes a case of unit production and after that remove the unit production and also remove more than 2 non terminals.

    • @JP-qp9ht
      @JP-qp9ht 6 лет назад

      ya exactly i was wrong . now i have understood .thanx

  • @nikeshdahal4117
    @nikeshdahal4117 5 лет назад +4

    wow it was great to extract the concept from your videos . hope to see yuh in the upcomming days with new more conceptual videos . thanking you from NEPAL............

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

    Why a is a null production?

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

    Hi! I wanted to ask what should you do if you have:
    A--> SbS ?? how can you transform it to CNF?
    Thanks in advance :)

  • @vyommishra7101
    @vyommishra7101 7 лет назад +19

    Bhai video to daal do aage ki.. Yahaan exams shuru hone wale hai mere. Fail karaoge kya. Bachche ki ijaat bacha lo.

    • @sampratickroy2055
      @sampratickroy2055 7 лет назад +1

      you have to pay for further videos otherwise wait .................

    • @RakeshYadav-rj7be
      @RakeshYadav-rj7be 7 лет назад +2

      hahahahahaha really iam even ready for that atleast it is very much better than my college my college teacher knows nothing about automata

    • @Jaqen_Hghar
      @Jaqen_Hghar 6 лет назад +4

      Vyom Mishra
      How was the exam bro ?

  • @ayushsrivastava1864
    @ayushsrivastava1864 6 лет назад +1

    I am not able to understand what is the use of introducing new S ' . In the solution its looking redundant.

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

    at 10:45 - why let X -> SA and not say X-> AS ?

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

    When we convert a given CFG to CNF. The following simplification order must be followed strictly:
    1. Elimination of Null Productions (Epsilon Productions)
    2. Elimination of Unit Productions
    3. Elimination of useless Symbols (useless Productions)
    Then the remaining process will be very Easier.

  • @shwetapancholi1022
    @shwetapancholi1022 5 лет назад +3

    Thank you so much for this video❤️❤️it's very helpful for mah MSc exams😘😘

  • @shashanksharma8229
    @shashanksharma8229 7 лет назад +2

    Sir canyou plz upload video on PDA , PDA to CFG conversion ,CFG to PDA conversion and TURING Machine

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

    Please assist:
    Convert the following CFG to Chomsky Normal Form (CNF):
    S → bXbZ | aXaY
    X → baY | abZ | Λ
    Y → aaX
    Z → bbX | Λ

  • @pulkitlamba6283
    @pulkitlamba6283 6 лет назад +3

    at 10:46 we took x->SA not x->AS as AS was also common of the three. Any specific reason?

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

      just a matter of preference nothing else.

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

    But S` is an useless production. Can't we just eliminate that?

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

    🥺❤️

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

    If S=aAD , A=aB/bAB , B=b , D=d
    Then step 5 will give
    S=XAD, A=XB /YAB ,D=d,X=a,Y=b
    Which is not CNF
    Please anyone clear this

  • @mohamadtabbakh9887
    @mohamadtabbakh9887 4 месяца назад

    I don't understand why we removed the S->S rule. I know it's useless but I can't seem get to the solution that removes this production rule and I'm afraid that I'm going to miss the omission of an important rule in the future.

  • @The_name_is_s
    @The_name_is_s 7 месяцев назад +1

    403 am thanx

  • @siddharth.chandani
    @siddharth.chandani Год назад +1

    The level of questions this Channel uses is absolutely great..
    I have seen many videos of this topic but the question they take were very basic.. which obviously didn't clear whole concept..

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

    I swear to God.......indians have carried the whole computer science field on their backs

  • @sampratickroy2055
    @sampratickroy2055 7 лет назад +2

    sir we are glad enoughfor this fav effort u done for us .............
    we are eagerly waiting for ur further lectures

  • @MuhammadUmair-nk4tt
    @MuhammadUmair-nk4tt Год назад

    11.29 if you replace a with y then y don't replace single a with y

  • @GotHobby
    @GotHobby 7 лет назад +3

    Easily the best video on this method, thanks

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

    I think starting symbol 'S' should not be appear on the right-hand side of any production ?

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

    What do we make S' for? It is not accessible at any point if we start from S, thus it's a useless production

  • @rukmanisharma5092
    @rukmanisharma5092 7 лет назад +1

    pls upload the videos of PDA and turing machine and thanks for such an excellent videos
    it will definitely help me in exams.....

  • @pavansatyakrishna7490
    @pavansatyakrishna7490 7 лет назад +9

    Hi sir, please upload remaining lectures about PDA and Turing machines. the way you explaining is in simple manner understandable. waiting for your next videos

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

    neso bhai saare subjects ke videos daalo. mai vit mai hu humare college mai sare bacche neso se hi padhte hai. please aur bhi subjects daalo. vit mai pata karo aur konse subjects hai unki bhi video daalo.

  • @madhur_taneja
    @madhur_taneja 6 лет назад +1

    Has anyone noticed this? At the end of the conversion, the last term for S, S` and A is SA which was equated to X in a previous step. So shouldn't we simply write X there too? Can anyone answer that?

    • @prasanth5283
      @prasanth5283 6 лет назад +2

      The definition of Chomsky Normal form says that the right side can have either a single terminal or two non-terminals.Since X is a single non-terminal it cant be put in the place of SA.

    • @madhur_taneja
      @madhur_taneja 6 лет назад

      prasanth thanks for explanation. I understand it now.

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

    Unit production removal is still not done completely na as A still contain ASA|aB etc

  • @vipinpanwar6763
    @vipinpanwar6763 7 лет назад +1

    sir please add push down automata lectures also it will be really helpful and appreciable .........great work..

  • @mradulgupta9626
    @mradulgupta9626 7 лет назад +1

    sir please upload the remaining videos as soon as possible..please
    🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏

  • @GeorgeJames-e3d
    @GeorgeJames-e3d 27 дней назад

    Johnson Cynthia Jones George Williams George

  • @AnilKumar-wq2fv
    @AnilKumar-wq2fv 5 лет назад +1

    At the last step can we replace the S -> aB with S -> SB ??
    we have a production of S -> a...so we can replace that a with S...right?

  • @saishmhatrearts
    @saishmhatrearts 5 лет назад +1

    thank u so much for this videos

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

    Thank you for teaching with wonderful dedication 🇮🇳

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

    Cristal clear explanation sir💀.. thank you soo much.. ur vedios r our all time saviours.

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

    Well that was really helpful , I really appreciate your work Sir. Greetings from Pakistan🇵🇰🇵🇰

  • @AmirAli-gv7kn
    @AmirAli-gv7kn 6 лет назад +3

    Why we have introduced S' -> S
    Isn't it more of a useless production. What's the logic behind introducing such production?

    • @vishalrohila1211
      @vishalrohila1211 5 лет назад

      Exactly! Even if we add it, why didn't he remove it at the end. Its common math, if you add any variable yourself, in the end you need to remove it.

    • @jahnavibhardwaj3320
      @jahnavibhardwaj3320 5 лет назад

      In CNF, there's one more production rule(P): The start state doesn't appear on the right side of P. So, we changed the start state to S' so that it won't appear on right.

    • @jahnavibhardwaj3320
      @jahnavibhardwaj3320 5 лет назад

      @@chahatjindal9455 😂

    • @Shivaaayy
      @Shivaaayy 5 лет назад

      @@jahnavibhardwaj3320 why chomsky made this ( s' - > s) wast production

  • @kajolyadav5825
    @kajolyadav5825 7 лет назад +2

    Thank you for these videos sir.
    plz upload rest of the topic videos which are turing machine, push down automata etc soon. It'll be really helpful for us.
    Thank you so much for this great help.

  • @GeorgeJames-e3d
    @GeorgeJames-e3d 27 дней назад

    Brown Sharon White Jeffrey Jones Jessica

  • @ChildArvin-x8s
    @ChildArvin-x8s 18 дней назад

    Lee Margaret Clark Betty Taylor Joseph

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

    Sir what is the need of first step if we do not take it then what will happen

  • @kanishkrawat277
    @kanishkrawat277 7 лет назад +1

    sir when will u upload all the remaining videos exams are coming near.. pls upload soon. .. I will be very thankful to u sir

  • @prafulrane9037
    @prafulrane9037 5 лет назад +1

    Why did AA didn't come

  • @freshlearnerstamil296
    @freshlearnerstamil296 5 лет назад +1

    Thanks buddy for this its helpful for my internals

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

    Sir please make the videos on Computer organizations and architecture 🤗🤗

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

      ruclips.net/p/PLBlnK6fEyqRgLLlzdgiTUKULKJPYc0A4q

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

      @@nesoacademy sir but this is not in detailed as per our college syllabus can you please refer that 🙏🙏🙏.

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

    Thank you that's all i can say 🙌🏻❤️

  • @allsorted9976
    @allsorted9976 5 месяцев назад

    at 7:37, S'->a (only this should have happened) because S->a; here 'a' is the only terminal and only the terminals and null are replaced in unit productions as told *in video 76 at 1:18*.
    Also change on removing A->S
    So, the result on removing all unit productions should be :-
    S' -> a, S -> ASA | aB | a | AS | SA, A -> b | a, B -> b

  • @RahulJaiswal-fe1st
    @RahulJaiswal-fe1st 7 лет назад +1

    sir pls upload more and more videos on this subject as early as possible
    I am completely dependent on your videos
    my syllabus for this paper is upto turing
    machine
    pls help me

  • @AhamedKabeer-wn1jb
    @AhamedKabeer-wn1jb 4 года назад +1

    Very well explained..Thank you Sir..

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

    I think somewhat wrong in that sir..bec u only told that Greibach normalform is in the form of A->a,A->aC1C2C3......but in above video last ans is not in GNF form

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

    sir in the last as the S and S' are same so can we combine them

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

    In this step useless production is eliminated or not

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

    But in your answer S is present on RHS side is it correct?

  • @madaninaats987
    @madaninaats987 7 лет назад +1

    sir pls upload all remaining videos.......its very helpful for us.

  • @PreetiSingh-ko7dm
    @PreetiSingh-ko7dm 6 лет назад +2

    here in step 2 there is no null production in A so why u put ebsilon nd then why u remove it?

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

    I just want to know why are we doing this? Why are we converting it to Chomsky Normal Form? Does it offer any benefits compared to CFG?

  • @payalsagar1808
    @payalsagar1808 5 лет назад +1

    again superb work thankyou! (India)

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

    s is a start symbol but can i say it is a variable also?

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

    anyone who can direct me to grammars and parsing

  • @amriteshpratap2222
    @amriteshpratap2222 7 лет назад +1

    ur lectures are outstanding..plz upload cnf to gnf conversion quickly
    if it possible plz upload pushdown automata.

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

    If there are two terminals on right side like S->AX/YB/ac..then how consider for those terminals
    We need consider like Y->a and Z->c
    Then production will be S->AX/YB/YZ is it correct?

  • @worldwanderer4029
    @worldwanderer4029 5 лет назад +1

    Awesome lecture sir ..... Thank you

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

    In 11:52, you said that Y=a, then you have to change all 'a' production into 'Y'... But if u r doing so.. Then each production you have a add 'Y' individual(S'=Y, S=Y & A=Y) . Which can't possible...

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

    Thank You So Much 💖

  • @lalitbansal6473
    @lalitbansal6473 5 лет назад +1

    Sir in removing A->S at 8:25
    You replace S with it's sting but after that A again start refer to B (A->B) but you does not replace B with b(smal b(terminal)) in end why? Please answer

    • @fabiosilva9917
      @fabiosilva9917 5 лет назад

      Where do you have A->B? You have A->b, A->ASA, A->aB, A->a, A->AS, A->SA but never A refering B alone, you have to replace when you are refering to a single non terminal simbol, like in S'->S and A->B and A->S

  • @Himanshu-ed3mf
    @Himanshu-ed3mf 5 лет назад

    why S->e is not a null production?
    since A->e and S->ASA.......so S->e will occur though after infinite replacement of S on the RHS by SAS...
    please clarify someone.

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

    Thank you Sir ❤

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

    Sir how you removed B->b/€ directly to get B->b there is no capital B on the right side how you removed it?

  • @bikramized
    @bikramized 7 лет назад

    Please ,please🙏🙏
    please complete the Theory of Computation course.Please upload videos of rest of the topics and their examples i.e., PDA and Turing machine
    I have semester exams from 2nd week of next month.
    Please upload.
    NESO ACADEMY has helped me a lot in getting good marks in my previous semester.
    Please help.

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

    Isn't this the same example from the book "Introduction to the theory of computation" by Michael Sipser?

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

    Great explanations in a simple way. Thanks