Regular Expressions

Regular Expressions

Assessment

Quiz

Computers

University

Hard

Created by

ALDO STALIN J L

Used 34+ times

FREE Resource

Student preview

quiz-placeholder

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which language is accepted by the regular expression 0*(10*1)*0*10*

{w | w has even number of 1’s}

{w | w has odd number of 1’s}

{w | w has even number of 0’s}

{w | w has odd number of 0’s}

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the regular expression for the language {w | w starts and ends with the same alphabet}?

0*(0 + 1)*0* + 1*(0 + 1)*1* + ϵ

01*0 + 10*1 + ϵ

0(0 + 1)*0 + 1(0 + 1)*1 + ϵ

0*1*0* + 1*0*1* + ϵ

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The set of all strings over ∑ = {a,b} in which all strings having bbbb as substring is

(a+b)* bbbb (a+b)*

(a+b)* bb (a+b)*bb

bbbb (a+b)

bb (a+b)*

4.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

Write a Regular expression where the language contains set of strings containing even number of a's followed by odd number of b's.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following regular expressions denotes a language comprising of all possible strings over S = {a, b} of length n where n is a multiple of 3.

(aaa + bbb)*

((a + b)(a + b)(a + b))*

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

For the alphabet S = {a, b}, give regular expression for the language of all strings that START OR END with ab.

ab(a + b)*(a + b)*ab

ab(a + b)* + (a + b)*ab

(a + b)*ab(a + b)*

ab(a + b)*ab

7.

MULTIPLE SELECT QUESTION

1 min • 1 pt

For the alphabet S = {a, b}, give regular expression for the language of all strings that CONTAIN the substring ab OR ba.

(a + b)*ab(a + b)*

(a + b)*ba(a + b)*

(a + b)*(ab + ba)(a + b)*

ab(a + b)*ba

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?