Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Which of the following CFG generates a langua... Start Learning for Free
Which of the following CFG generates a language where the language is CFL but not regular?
  • a)
     S → AB
    A → aA | bA | ε
    B → aBb ∣ ε
  • b)
     S → AaB
    A → aA | bA | ε
    B → aB | bB | ε 
  • c)

    S → AB
    A → aA ∣ ε
    B → aBb | ε
  • d)
    None of these
Correct answer is option 'C'. Can you explain this answer?
Most Upvoted Answer
Which of the following CFG generates a language where the language is ...
A) S -> aSb | ε

This CFG generates a language where the language is CFL but not regular. The language generated by this CFG is "anbn" where n is the number of "a"s and "b"s are equal. This language is not regular because it cannot be recognized by a finite automaton.
Free Test
Community Answer
Which of the following CFG generates a language where the language is ...
In option (A) we have,
S → AB
A → aA | bA | ε
B → aBb ∣ ε
Here, L = (a + b) × a′bn = (a + b) is regular.
In option (B) we have,
S → AaB
A → aA | bA | ε
B → aB | bB | ε
Here, L= set of all strings which contain a as substring.
In option (C) we have,
S → AB
A → aA ∣ ε
B → aBb ∣ ε
Here, L= {ambn ∣ m > = n} is non regular but CFL.
Hence, the correct option is (C).
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Which of the following CFG generates a language where the language is CFL but not regular?a)S → ABA → aA | bA | εB → aBb εb)S → AaBA → aA | bA | εB → aB | bB | εc)S → ABA → aA εB → aBb | εd)None of theseCorrect answer is option 'C'. Can you explain this answer?
Question Description
Which of the following CFG generates a language where the language is CFL but not regular?a)S → ABA → aA | bA | εB → aBb εb)S → AaBA → aA | bA | εB → aB | bB | εc)S → ABA → aA εB → aBb | εd)None of theseCorrect answer is option 'C'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about Which of the following CFG generates a language where the language is CFL but not regular?a)S → ABA → aA | bA | εB → aBb εb)S → AaBA → aA | bA | εB → aB | bB | εc)S → ABA → aA εB → aBb | εd)None of theseCorrect answer is option 'C'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Which of the following CFG generates a language where the language is CFL but not regular?a)S → ABA → aA | bA | εB → aBb εb)S → AaBA → aA | bA | εB → aB | bB | εc)S → ABA → aA εB → aBb | εd)None of theseCorrect answer is option 'C'. Can you explain this answer?.
Solutions for Which of the following CFG generates a language where the language is CFL but not regular?a)S → ABA → aA | bA | εB → aBb εb)S → AaBA → aA | bA | εB → aB | bB | εc)S → ABA → aA εB → aBb | εd)None of theseCorrect answer is option 'C'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of Which of the following CFG generates a language where the language is CFL but not regular?a)S → ABA → aA | bA | εB → aBb εb)S → AaBA → aA | bA | εB → aB | bB | εc)S → ABA → aA εB → aBb | εd)None of theseCorrect answer is option 'C'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Which of the following CFG generates a language where the language is CFL but not regular?a)S → ABA → aA | bA | εB → aBb εb)S → AaBA → aA | bA | εB → aB | bB | εc)S → ABA → aA εB → aBb | εd)None of theseCorrect answer is option 'C'. Can you explain this answer?, a detailed solution for Which of the following CFG generates a language where the language is CFL but not regular?a)S → ABA → aA | bA | εB → aBb εb)S → AaBA → aA | bA | εB → aB | bB | εc)S → ABA → aA εB → aBb | εd)None of theseCorrect answer is option 'C'. Can you explain this answer? has been provided alongside types of Which of the following CFG generates a language where the language is CFL but not regular?a)S → ABA → aA | bA | εB → aBb εb)S → AaBA → aA | bA | εB → aB | bB | εc)S → ABA → aA εB → aBb | εd)None of theseCorrect answer is option 'C'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Which of the following CFG generates a language where the language is CFL but not regular?a)S → ABA → aA | bA | εB → aBb εb)S → AaBA → aA | bA | εB → aB | bB | εc)S → ABA → aA εB → aBb | εd)None of theseCorrect answer is option 'C'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev