Paper Tayyari

Lecture 3: Regular Expression

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

Start mock testMock test shuru karein
DoneHal kiye 0/5
– correctsahi
1.
★ Final term past paper

Does the empty string match the regular expression |y+a|?

  1. AYes
  2. BNo

y+a matches only the one-letter strings y and a.

2.
★ Midterm Spring 2010

If r1 = (aa + bb) and r2 = ( a + b) then the language (aa + bb)* will be generated by

  1. A(r1)(r2)
  2. B(r1 + r2)
  3. C(r2)*
  4. D(r1)*

(aa + bb)* is the Kleene star of r1.

3.
★ Midterm Fall 2010

RE for the language defined over Σ={a,b} having words starting with a is____

  1. Aa(a+b)*
  2. B(a+b)*a
  3. C(a+b)*
  4. DNone of these

The word must begin with a, followed by any string.

4.
★ Midterm Spring 2009

a (a + b)* is the RE of language defined over Σ = {a, b} having at least one a

  1. ATrue
  2. BFalse
  3. CSuch a language does not exist
  4. DNone of the given options

a(a+b)* only gives words starting with a; ba has an a but is missing.

5.
★ Midterm Spring 2009

(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

  1. ATrue
  2. BFalse
  3. CSuch a language does not exist
  4. DNone of the given options

This RE needs an a before a b, so words like ba are missing.