adplus-dvertising

Welcome to the Finite Automata and Regular Expression MCQs Page

Dive deep into the fascinating world of Finite Automata and Regular Expression with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Finite Automata and Regular Expression, a crucial aspect of Compiler Design. In this section, you will encounter a diverse range of MCQs that cover various aspects of Finite Automata and Regular Expression, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within Compiler Design.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Finite Automata and Regular Expression. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of Compiler Design.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Finite Automata and Regular Expression. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Finite Automata and Regular Expression MCQs | Page 4 of 6

Explore more Topics under Compiler Design

Q31.
Consider the languages L1 = and L2 = {a}. Which one of the following represents L1 L2* U L1*
Discuss
Answer: (a).โ‚ฌ
Q32.
Given the language L = {ab, aa, baa}, which of the following strings are in L*?
1) abaabaaabaa

2) aaaabaaaa

3) baaaaabaaaab

4) baaaaabaa
Discuss
Answer: (c).1, 2, 4
Q33.
Which of the following are regular sets?
I. { a^n b^2m | n>=0, m>=0}

II. {a^n b^m |n=2m}

III. {a^n b^m | n!= m}

IV {xcy |x,yโ‚ฌ{a,b)*}
Discuss
Answer: (a).I and IV
Q34.
Let L1 = {w โˆˆ {0,1}โˆ— | w has at least as many occurrences
of (110)โ€™s as (011)โ€™s}.
Let L2 = { โˆˆ {0,1}โˆ— | w has at least as many occurrences
of (000)โ€™s as (111)โ€™s}.
Which one of the following is TRUE?
Discuss
Answer: (a).L1 is regular but not L2
Q35.
The length of the shortest string NOT in the language (over ฮฃ = {a, b}) of the following regular expression is _____________
a*b*(ba)*a*

a.

2

b.

3

c.

4

d.

5

Discuss
Answer: (b).3
Q36.
How many minimum states are required to find whether a string has odd number of 0โ€™s or not

a.

1

b.

2

c.

3

d.

4

Discuss
Answer: (b).2
Q37.
Consider alphabet โˆ‘ = {0, 1}, the null/empty string ฮป and the sets of strings X0, X1 and X0.How are X1 and X2 are related ?
X0 = 1 X1

X1 = 0 X1 + 1 X2

X2 = 0 X1 + {ฮป}

Which one of the following represents the strings in X0?
Discuss
Answer: (c).10 (0* + (10)*)*1
Q38.
Which of the following languages is/are regular?
L1: {wxwR โŽช w, x โˆˆ {a, b}* and โŽชwโŽช, โŽชxโŽช >0} wR is the reverse of string w

L2: {anbm โŽชm โ‰  n and m, nโ‰ฅ0

L3: {apbqcr โŽช p, q, r โ‰ฅ 0}
Discuss
Answer: (a).L1 and L3 only
Q39.
The set of all strings over โˆ‘ = {a,b} in which strings consisting aโ€™s and bโ€™s and ending with in bb is
Discuss
Answer: (c).(a+b)* bb
Q40.
An individual token is called ________
Discuss
Answer: (a).Lexeme
Page 4 of 6

Suggested Topics

Are you eager to expand your knowledge beyond Compiler Design? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!