Context-Free Grammars (CFGs): 5 Intermediate Examples

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

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

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

    Clear and concise explanation. You deserve more subscribers. Thank you so much!

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

    @EasyTheory I should be really thankful to you as you helped me ace the Theory of Computer Science exam.. your lesson videos helped me a lot

  • @dd1.d
    @dd1.d 2 ปีที่แล้ว +2

    thank you so much. Your videos are helping me a lot

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

    Great video, really informative. Any video you might suggest about DFAs and NFAs, on drawing them with examples?

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

      Edit: I have several examples that are really old on the channel about creating DFAs and NFAs - may want to check the "intro theory" playlist.

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

    dude my test was last friday if you had posted it earlier 😭😭😭

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

      Should have reminded me ;)

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

    I have a question, what if the case were that n >= 1? Is it still context free?

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

    If in the last example instead of i

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

      no it won't , then you would have to remember the S->Sc and X->Xb productions rest all will be same

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

    Could it be that example 3 is still missing X -> X1|X0 to be able to generate all possible strings with this X rule?

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

    In the first example s can also be lambda/epsilon

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

      S -> X where X is Lambda is taking care of that my friend

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

    thank you

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

    Thanks !

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

    How did you know that L = {0^n1^n2^n} wasn't a context free language?

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

    legend

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

    Hello, can someone let me know if my CFG for generating non palindromes is correct, thank you!
    S -> 1A0 | 0A1
    A -> ε | A0 | A1

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

    GOD

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

    PLease come to my college and show my professor how t ofreaking teach bruhhhh :'}
    Great video

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

    In that last example the explanation could have been better. It was confusing.

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

      Imagine:
      everytime you produce b, you produce ( a | epsilon )
      everytime you produce c, you produce ( a | epsilon )
      so for any word in this language, counting occurences by stacking the yielded terminals:
      '( a | epsilon )' and 'c'
      '( a | epsilon )' and 'c'
      .
      .
      .
      '( a | epsilon )' and 'c'
      '( a | epsilon )' and 'b'
      '( a | epsilon )' and 'b'
      .
      .
      .
      '( a | epsilon )' and 'b'
      +
      ______________________
      => total number of 'a'