Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Quiz-1(Session 2023-24)

Total questions: 11

Worksheet time: 6mins

Name
Class
Date
1.

Which of the regular expressions given below represent the following DFA.

1.0*1(1+00*1)*

2. 0*1*1

3.(0+1)*1(0+1)*

a)

1  only

b)

2 only

c)

3 only

d)

1, 2 and 3

2.

Transition Function of DFA map as:

a)

Q × q0 → Q

b)

Q × input→ Q

c)

Q × output→ Q

d)

None of these

3.

Consider the NFA in the following figure.

What is the set of reachable states for the input string 0011?

A.{q0, q1, q2}

B.{q0, q1}

C. {q0,q1,q2, q3}

D.{q3}

a)

A

b)

B

c)

C

d)

D

4.

Let δ denote the transition function and δ^ denote the extended transition function of the ∈−NFA whose transition table is given below: Then δ^(q2,aba) is

ϕ

ϕ

{q2}

a)

Φ

b)

{q0, q1, q3}

c)

{q0, q1, q2}

d)

{q0, q2, q3}

5.

Which one of the following is FALSE?

a)

There is unique minimal DFA for every regular language

b)

Every NFA can be converted to an equivalent DFA.

c)

Complement of every regular language is regular.

d)

Difference of two regular language is not regular.

6.

How many substrings of different lengths (non-zero) can be formed from a character string of length n ?

a)

n

b)

n^2

c)

2^n

d)

n(n+1) / 2

7.

Let L={w ∈ (0 + 1)*|w has even number of 1s}, i.e. L is the set of all bit strings with even number of 1s. Which one of the regular expression below represents L?

a)

(0*10*1)*

b)

0*(10*10*)*

c)

0*(10*1*)*0*

d)

0*1(10*1)*10*

8.

The password to the admins account=” administrator”. The total number of states required to make a password-pass system using DFA would be __________

a)

14 states

b)

13 states

c)

c) 12 states

d)

d) A password pass system cannot be created using DFA

9.

The FSM (Finite State Machine) machine pictured in the figure below represents what language? 

a)

Find 2's complement

b)

Find 1's complement

c)

increment bit pattern by 1

d)

changes the sign bit

10.

Let w be any string of length n is {0,1}*. Let L be the set of all substrings of w. What is the minimum number of states in a non-deterministic finite automaton that accepts L?

a)

n

b)

n-1

c)

n+1

d)

2n-1

11.

the length of the given string x = 01ϵ01ϵ00ϵ is:

a)

5

b)

6

c)

8

d)

9