Does the empty string match the regular expression |y+a|?
- AYes
- BNo
y+a matches only the one-letter strings y and a.
MCQs, short and long questions from lecture 3.Lecture 3 ki MCQs, short aur long sawal.
5 MCQs · 2 short · 1 long question · 5 MCQs from past papers5 MCQs · 2 short · 1 long sawal · 5 MCQs past papers se
Does the empty string match the regular expression |y+a|?
y+a matches only the one-letter strings y and a.
If r1 = (aa + bb) and r2 = ( a + b) then the language (aa + bb)* will be generated by
(aa + bb)* is the Kleene star of r1.
RE for the language defined over Σ={a,b} having words starting with a is____
The word must begin with a, followed by any string.
a (a + b)* is the RE of language defined over Σ = {a, b} having at least one a
a(a+b)* only gives words starting with a; ba has an a but is missing.
(a+b)*a(a+b)*b(a+b)* is the RE of language defined over Σ={a,b} having at least one a and one b
This RE needs an a before a b, so words like ba are missing.
No MCQs match this filter.Is filter mein koi MCQ nahi.
Make a RE for a language that does not have triple b (bbb) at any place.
(Λ + b + bb)(a + ab + abb)*. Every run of b's has length at most two: at most two b's at the start, and after each a at most two b's.
Give the regular expression for EVEN-EVEN language?
(aa + bb + (ab + ba)(aa + bb)*(ab + ba))*
Construct a regular expression defining the following language over the alphabet Σ = {a,b}: All words that contain at least one of the strings s1, s2, s3 or s4
(a + b)*(s1 + s2 + s3 + s4)(a + b)*