Context-Free Grammars (CFGs): 5 Easy Examples

Поделиться
HTML-код
  • Опубликовано: 20 ноя 2024

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

  • @flamediamond8668
    @flamediamond8668 8 месяцев назад +7

    Never thought I'd see a video on such a niche topic, thanks to his video I'm able to do my CS Theory assignments

  • @julien8097
    @julien8097 Год назад +16

    if i ever manage to pass my computer theory class, it'll be thanks to you !
    thanks for the video man !

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

    very helpfull thank you very much, help in developing skills to think about CFG!

  • @CLG111
    @CLG111 Год назад +20

    I have a fighting chance now to pass my midterm because of these videos. Salute to you for making this series.

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

    man i am litterally crying that i couldnt somehow find your channel and videos before, i had an exam last friday and luckily i passed it but... with the least amount of points to pass it, i didnt learn the lecture from any videos or so i only used the resources and lecture videos of the prof and script, as i found a video of you a couple days prior i watched it bc i had nothing to do after the exam month and the lecture seems right now pretty interesting and cool, i think its frankly unimaginable, i have always thought that this lecture is a phase i have to learn it and i will just forget it and dont ever find it interesting or important to even give a bit of time to, thank you for making me like the lecture and making me have a bit of interest, after all you are doing an amazing job with the whole lecture videos and the way you are explaining things are great!!!

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

    This video was the best at helping me understand basic language theory! I have a test soon and I feel confident I'll do well.

  • @HNMCK
    @HNMCK 2 года назад +9

    These videos are so helpful! Thank you for taking the time to make them.

  • @hansolo4626
    @hansolo4626 9 месяцев назад +1

    This guy is so goated, best explanations on youtube

  • @vimalathithand917
    @vimalathithand917 11 месяцев назад +1

    Just wonderful ,u r an awsome teacher ! Thanks a lott!!

  • @unexpectedfox
    @unexpectedfox Год назад

    Thanks for your explanation. It helps me a lot

  • @rishabhjain7119
    @rishabhjain7119 2 месяца назад

    You are a really good teacher :D

  • @akshitjain2906
    @akshitjain2906 8 месяцев назад +1

    legend

  • @colonelh.s.l.3834
    @colonelh.s.l.3834 Год назад +4

    Nice video! For your example 2, would it be fine to say S--> 0S | 1S | E?

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

    Thank you very much for making these videos! You have helped me so soooo much!

  • @elisabettapassmore781
    @elisabettapassmore781 Год назад

    so clean and clear

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

    thank you for this video!

  • @abhijatchauhan956
    @abhijatchauhan956 Год назад

    In the last problem, for the scenario of having i > j, shouldn't the "a"s be first? The grammar given for that will have some "a"s after b, thereby putting them out of order. What about A_i>j -> aA_i>j | aX, then have X -> aXb | epsilon

  • @Ayesha-uw4dt
    @Ayesha-uw4dt 7 месяцев назад

    literally the best 10/10

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

      hi where are you from?

    • @Ayesha-uw4dt
      @Ayesha-uw4dt 4 месяца назад

      @@n0ne0ne why do you want to know

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

      @@Ayesha-uw4dt I don't know brother I am just looking for some computer scientist friends

  • @QuynhNhu-gu5ql
    @QuynhNhu-gu5ql Месяц назад

    my love from HCM

  • @30benasabu65
    @30benasabu65 Год назад +5

    Sir i think for 0*1*, the production rule must be S->0S | epsilon | P , P-> 1P, E. as a string of zero is possible and belongs to the language and cannot be produced by the rule you had written at 6:05

    • @serdarkacka
      @serdarkacka Год назад +3

      You are right; S->ε is necessary for the grammar to produce ε.

    • @gloverelaxis
      @gloverelaxis Год назад

      Just so you know, the Latin/English character "e" is a totally different character to the Greek character "epsilon" (ε) even though they are historically linked and look visually similar. In math notation, it's essential to always use the correct letter case - two variables that use the same letter in both upper- and lower-case are considered separate variables. By writing "ε" as its upper-case equivalent, "Ε", you made that symbol look exactly like the upper-case Latin/English character "E". Because we have already established a convention whereby upper-case Latin characters are only used to name *variables*, and not special characters like the empty string, this "Ε" you used appears to denote a variable that you didn't define anywhere. Your comment confused me for a long while, especially since you wrote the full name "epsilon" earlier!

    • @Kerreber
      @Kerreber Год назад +6

      You can still derive the empty string from S. S=> P => epsilon

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

    you forgot to account for the case when a is zero or when b is zero as such the cfg can not produce a string like : bc or even ac , so your cfg can produce only in L{a^ib^jc^k i!=j, i and j >0}

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

      you can generate "bc" with following the rules:
      S->A(ibBC->bεC->bC->bcC->bcε->bc
      and for "ac" is similar:
      S->A(i>j)C->aXC->aεC->aC->acC->acε->ac

  • @o3o814
    @o3o814 10 дней назад

    Спасибо братан

  • @RohanShrirame-m3z
    @RohanShrirame-m3z 2 месяца назад

    So nice vdeo❤

  • @excorific7514
    @excorific7514 12 дней назад

    For example 2, could we just do S->AC, A-> 0A | e, C-> 1C | e?

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

    Thank you sir

  • @dakotahkurtz5011
    @dakotahkurtz5011 Год назад

    awesome. thank you

  • @nahomaseged3324
    @nahomaseged3324 Год назад

    thanks teacher , but in the last example what if we add more condition which is i!=j or j !=k ?

  • @jamescommon478
    @jamescommon478 11 месяцев назад

    For the last question. I think the languages which are: either i or j is equal to 0 are cannot be written by your grammar. Am I right?

  • @tiananmentank-pj7sf
    @tiananmentank-pj7sf 7 месяцев назад

    shouldnt the first one be a regular?

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

      all regular languages are context free

  • @RohanShrirame-m3z
    @RohanShrirame-m3z 2 месяца назад

    Can u have a mic plz

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

    easy

  • @QuynhNhu-gu5ql
    @QuynhNhu-gu5ql Месяц назад

    dcu gioi vc

  • @שניליטוב
    @שניליטוב 3 месяца назад

    Thank you!