Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Regular Expressions

Total questions: 20

Worksheet time: 7mins

Name
Class
Date
1.

Which of the following symbols represents the Kleene star operation in regular expressions?

a)

+

b)

*

c)

?

d)

|

2.

What does the regular expression 0*1 accept?

a)

All strings with only 1’s

b)

All strings with only 0’s

c)

Any number of 0’s followed by a single 1

d)

One or more 1’s followed by 0’s

3.

A regular language over an alphabet a is one that can be obtained from

a)

union

b)

concatenation

c)

kleene

d)

All of the mentioned

4.

A regular language over an alphabet a is one that can be obtained from

a)

union

b)

concatenation

c)

kleene

d)

All of the mentioned

5.

Regular expression {0,1} is equivalent to

a)

0 U 1

b)

0 / 1

c)

0 + 1

d)

All of the mentioned

6.

Precedence of regular expression in decreasing order is

a)

* , . , +

b)

. , * , +

c)

. , + , *

d)

+ , a , *

7.

Regular expression Φ* is equivalent to

a)

ϵ

b)

Φ

c)

0

d)

1

8.

a? is equivalent to

a)

a

b)

a+Φ

c)

a+ϵ

d)

wrong expression

9.

ϵL is equivalent to

a)

ϵ

b)

Φ

c)

L

d)

Lϵ

10.

(a+b)* is equivalent to

a)

b*a*

b)

(a*b*)*

c)

a*b*

d)

none of the mentioned

11.

ΦL is equivalent to

a)

LΦ

b)

Φ

c)

L

d)

ϵ

e)

a,b

12.

Which of the following pair of regular expression are not equivalent?

a)

1(01)* and (10)*1

b)

x(xx)* and (xx)*x

c)

(ab)* and a*b*

d)

x+ and x*x+

13.

Consider following regular expression

i) (a/b)* ii) (a*/b*)* iii) ((ϵ/a)b*)*

Which of the following statements is correct

a)

i,ii are equal and ii,iii are not

b)

i,ii are equal and i,iii are not

c)

ii,iii are equal and i,ii are not

d)

all are equal

14.

Operation that denote union of two RE

a)

QP

b)

Q*P*

c)

Q+P

d)

All

15.

Algebriac identities used in RE

a)

Union

b)

Concatenation

c)

Closure

d)

All the Above

16.

Two RE P and Q are ______________ if both P and Q denote same set of strings

a)

Complement

b)

Equivalent

c)

Connective

d)

None

17.

Theorem used to construct FA from RE

a)

Arden Theorem

b)

Kleene's Theorem

c)

Euclid Theorem

d)

Subset Method

18.

T(M) U T(N) =

a)

L(P)*.L(Q)*

b)

L(PQ)

c)

L(P+Q)

d)

L(Q*)

19.
What is the defined set of strings in the regular expression 100|101?
a)
{101}
b)
{100}
c)
{100, 101}
d)
{100, 101, 102}
20.
How is a regular expression interpreted?
a)
From right to left
b)
It depends on the metacharacters used
c)
In any order
d)
From left to right