Examples of CFGs, Reg subset of CFL

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

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

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

    is it incorrect to write S->(S)S | e for L3 with the intuition of L2

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

      what you have written is equivalent to what the professor has written. It is after one step of substitution.
      SS --- set S = (S) for 1st S ---> (S)S

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

    why do we need to add two times S in example 2 time when we can do this using single s as well . Suppose 0S1 where S Should contain equal number of zeroes and ones . approximately 20:00 Please reply .

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

      Whatever you are suggesting is going to generate the language 0^n 1^n. In Example 2: we are only bothering about no of 0s and no of 1s order doesn't matter say for example string: 0100101101 or 10100011 is valid for above said condition.

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

      yes @@mehulkhatiwala is correct. To be consise there are strings which match the question definition but cannot be produced by your rule @rajendrakujur2078