adplus-dvertising
frame-decoration

Question

Find a regular expression for a grammar which generates a language which states :
L contains a set of strings starting wth an a and ending with a b, with something in the middle.

a.

a(a*Ub*)b

b.

a*(aUb)b*

c.

a(a*b*)b

d.

None of the mentioned

Answer: (a).a(a*Ub*)b

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Find a regular expression for a grammar which generates a language which states : L contains a set of strings starting wth an a and ending with a b, with something in the...

Similar Questions

Discover Related MCQs

Q. Which of the following is the correct representation of grammar for the given regular expression?
a(aUb)*b

Q. A CFG consist of the following elements:

Q. A CFG for a program describing strings of letters with the word “main” somewhere in the string:

Q. CFGs are more powerful than:

Q. State true or false:
S-> 0S1|01

Statement: No regular expression exists for the given grammar.

Q. For the given set of code, the grammar representing real numbers in Pascal has error in one of the six lines. Fetch the error.
(1) ->

(2) -> | epsilon

(3) -> | epsilon

(4) -> ‘E’ | epsilon

(5) -> + | – | epsilon

(6) -> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

Q. Which among the following is incorrect with reference to a derivation tree?

Q. Let G=(V, T, P, S)
where a production can be written as:

S->aAS|a

A->SbA|ba|SS

Which of the following string is produced by the grammar?

Q. Statement 1: Ambiguity is the property of grammar but not the language.
Statement 2: Same language can have more than one grammar.

Which of the following options are correct with respect to the given statements?

Q. Which of the following are non essential while simplifying a grammar?

Q. Which of the following are context free language?

Q. The language L ={a^i2b^i|i>=0} is:

Q. L->rLt|tLr|t|r
The given grammar produces a language which is: