0% found this document useful (0 votes)
19 views10 pages

Practice MCQ

Uploaded by

Aastha Kamboj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views10 pages

Practice MCQ

Uploaded by

Aastha Kamboj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

The sum of minimum and maximum number of final states for a DFA having ‘n’

states is equal to:


a)n+1
b)n
c) n-2
d) n+2

The maximum number of transitions which can be performed over a state in a DFA
using Σ={a,b,c} ?
a)1
b)2
c)3
d) 4

Which among the following states would be notated as the final state/acceptance
state?

L= {xϵ∑= {a, b} | length of x is 2}

a. q1
b. q2
c. q1, q2
d. q3

Which of the following are the final states in the given DFA according to the
Language given ?
L= {xϵ∑= {a, b} |length of x is at most 2}

a. q0, q1
b. q0, q2
c.q1, q2
d. q0, q1, q2
NFA TO DFA
1. For the following NDFA, what would be the states in a corresponding DFA?

a. [q0]
b. [q0], [q1]
c. [q0], [q0, q1]
d. [q0], [q1], [q0, q1]

REGULAR EXPRESSIONS

Regular Expression of this automata is

a. b*aa*bb*
b. b*+b*aa*
c. b*+aa*+bb*
d. b*+b*aa*+b*aa*bb*
Regular Expression of This automata is

a. aa*
b. ba*
c. (a+b)*
d. aa*+ba*
Regular Expressions of Given Automata is

a. ab+ba
b. ba+ab*
c. (ab+ba)*
d. ab+a*b*a*

find the regular expression for


amb2nc3p where m,n,p >=1
a) aa*bb*cc*
b) aa*b*c*
c) aa*(bb)(bb)*ccc(ccc)*
d) none of these

REGULAR GRAMMAR

If Σ = {a,b} and given productions are


S→XaaX
X→aX| bX|Λ
Then the above grammar defines the language expressed by___________ regular expression
a. (a+b)*aa(a+b)*
b. (a+b)*a(a+b)*a
c. (a+b)*aa(a+b)*aa
d. (a+b)*aba+b)*

ARDEN’S THEORAM

Recognize the regular expression corresponding to the following Finite Automata using
Arden’s Method Considering q1 is initial state:
a. (0 + 1)*
b. (1101)*
c. (0 + 11 + 010)*
d. 0*1*

MEALY AND MOORE MACHINES

. In Moore Machine, suppose if Input=’101’, then the output would be of length:

a) |Input|+1
b) |Input|
c) |Input-1|
d) Cannot be predicted

Explanation:

Initial state, from which the operations begin is also initialized with a value.

5. What is the output for the given language?


Language: A set of strings over ∑= {a, b} is taken as input and it prints 1 as an output “for
every occurrence of b as its substring. (INPUT: abaaab)
a) 0010001
b) 0101010
c) 0111010
d) 0010000

6. Find output string for the input string 0111 from the following Moore Machine

Present State Next State Output


a=0 a=1
->q0 q3 q1 0
q1 q1 q2 1
q2 q2 q3 0
q3 q3 q0 0

a) 00010
b) 10110
c) 11111
d) 10101

FOLLOWING MEALY MACHINE REPRESENTS with Input Symbol {a,b} where output symbol is {N,A}

N represents not acceptance and A represents Acceptance

a. String Starts with aba


b. String Ends with aba
c. String contains aba
d. String stats with either a or b
a. String Starts with aba
b. String Ends with aba
c. String contains aba
d. String stats with either a or b

MINIMIZATION OF DFA

How many total number of states are left after minimization is done

a. 3
b. 4
c. 5
d. 6

How many total number of states are left after minimization is done

a. 3
b. 4
c. 5
d. 6

Which state is accepted String '110101'


a) q2 b) q3 c) q1 d) q4

You might also like