42. construction of context sensitive grammars

Поділитися
Вставка
  • Опубліковано 21 гру 2024

КОМЕНТАРІ • 34

  • @saqlainabbasali
    @saqlainabbasali 2 роки тому +4

    You have make most difficult concept of TOC easy as cake .
    Thank you so much Sir 💕

  • @yachanasahu2534
    @yachanasahu2534 3 роки тому +7

    Sir please C& DS ka video banaiye jab poset khatam ho jaye kyu ki C& DS Weightage Jayda h baki subject

  • @vidhayakjpsingh2795
    @vidhayakjpsingh2795 3 роки тому +8

    production 3 and 5 are same 22:12

  • @harshilshah8983
    @harshilshah8983 Рік тому +1

    @20:00, productions 3 & 5 are same so one of them can be removed.

  • @vidhayakjpsingh2795
    @vidhayakjpsingh2795 3 роки тому +3

    insane work ethics guruji

  • @anshumansharma1069
    @anshumansharma1069 2 роки тому +3

    So Easily Explainedd 😍

  • @abhinavchatterjee7520
    @abhinavchatterjee7520 6 місяців тому

    @19:50
    For a^nb^nc^nd^n
    S->aSAd l epsilon
    dA-> Ad
    A-> Bc
    cB->Bc
    aB-> ab
    bB->bb
    Is this grammer correct?

  • @ECSumit
    @ECSumit Рік тому +5

    at 19:52 I have obtained the grammar by 8 production rule. Is this correct?
    S -> aSBCd/ null
    dBC -> BCd
    CB -> BC
    aB -> ab
    bB -> bb
    bC -> bc
    cC -> cc

    • @sanyasingh333
      @sanyasingh333 Рік тому

      Yes I also made same grammar

    • @khem1652
      @khem1652 6 місяців тому

      so is this one correct?

  • @suhaskubasad9141
    @suhaskubasad9141 10 місяців тому

    A CSG is a CFG without null productions, so please can u explain me why did you use S->epsilon

  • @_strangelet__
    @_strangelet__ Рік тому +4

    The first production for a^n.b^n.c^n was S -> aSBc / E
    But doesn't this mean the same thing as
    S -> E
    S -> aSBc
    But didn't sir told that S can not appear on right once it has been given a null production?

    • @harshilshah8983
      @harshilshah8983 Рік тому +1

      The only exception in type-1 grammar was that if S-->∈ is present then no other production like "cB-->aSc" should have S on the RHS. So basically null production was needed to make an exit from sentential form. So "S--> " vali productions mein hi RHS mein 'S' can come tabhi toh exit kar payege na sentential form mein se.
      I hope you understood.
      Thanks for raising this doubt. It helped me analyze type 1 grammar more clearly. B/c in exam if such que would have come than my first thought would definitely be that "type grammar can't have S on the RHS in any other production rule if S-->∈ production is present". Even though sir has taught this through I would have made this mistake. B/c at first your doubt seemed to be correct.

    • @_strangelet__
      @_strangelet__ Рік тому

      @@harshilshah8983 so you mean to say that only those productions which have just S on lhs can have S somewhere in rhs?

    • @harshilshah8983
      @harshilshah8983 Рік тому

      @@_strangelet__ Yes. B/c null can only be accessed via S. And S production contains loop and to get out of loop we need null.

  • @_strangelet__
    @_strangelet__ Рік тому +1

    Can someone explain why the context sensitive grammar for generating a^n.b^n.c^n can't be simply written as-
    S -> aAbBcC / E / abc
    aAbBcC -> aaAbbBccC
    A -> a
    B -> b
    C -> c
    It satisfies both the criterion needed to be type 1. Every production has atleast 1 non-terminal in LHS, and |LHS|

    • @harshilshah8983
      @harshilshah8983 Рік тому +2

      Can this grammar generate string: a^5b^5c^5 ? Can your grammar generate for all n>=0 strings? No it can't. What you have written can only generate strings {∈, abc, aabbcc, aaabbbccc}. So no this is absolutely incorrect grammar. What sir has written is correct.
      And second thing, we want a grammar that can generate infinite number of strings. So such grammar must have loop in it to make that happen. And your grammar does not have any loops.

    • @_strangelet__
      @_strangelet__ Рік тому +1

      @@harshilshah8983 oh yes you're right! My bad

  • @TUSHARVERMA-xv6du
    @TUSHARVERMA-xv6du 3 роки тому +2

    Sir is it possible to provide lecture of each and every subject by October 2022 from ur side ??🙏🙏

  • @qwertyacid2284
    @qwertyacid2284 Рік тому

    @30:00 mann I got goosebumps literally

  • @pawanpt2682
    @pawanpt2682 7 місяців тому

    Sir what is one sided context sensitive grammar? Please give example also.......

  • @SumitKumar-ru7kb
    @SumitKumar-ru7kb 3 роки тому +3

    respect.

  • @atharvadankhade8660
    @atharvadankhade8660 11 місяців тому

    What will be the grammar for n >=1.

  • @pawanchoure1289
    @pawanchoure1289 Рік тому +1

    great👍👍😊

  • @dom47
    @dom47 Рік тому

    suggestion: sir it would be better if u keep the video related to the topic mentioned.

  • @TheEsotericScholar
    @TheEsotericScholar Рік тому

    Sir is epsilon is allowed in csl

    • @sathishsuperior8042
      @sathishsuperior8042 Рік тому

      For CSL, Epsilon is allowed only in starting production rule.... Except that Epsilon is not used in any other production rules

  • @Thakur_Abhays
    @Thakur_Abhays 2 роки тому +3

    19:50 sir i have written grammar before you in just 8 production what's wrong here ?????
    S---->aSBCd/NULL
    CdB---->BCd
    dC----->Cd
    aB---->ab
    bB----->bb
    bC----->bc
    cC----->cc
    and sir in your solution production 3 and 5 are same so it is grammar of 9 production.

  • @dikshadiksha1334
    @dikshadiksha1334 3 роки тому

    🙏🙏🙏🙏🙏

  • @sunilpatidar8609
    @sunilpatidar8609 3 роки тому

    🙏🙏🙏🙏🙏🙏