Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Test  >  Compiler Design  >  Test: Finite Automata & Regular Expressions - Computer Science Engineering (CSE) MCQ

Finite Automata & Regular Expressions - GATE CSE (CSE) Compiler Design


MCQ Practice Test & Solutions: Test: Finite Automata & Regular Expressions (15 Questions)

You can prepare effectively for Computer Science Engineering (CSE) Compiler Design with this dedicated MCQ Practice Test (available with solutions) on the important topic of "Test: Finite Automata & Regular Expressions". These 15 questions have been designed by the experts with the latest curriculum of Computer Science Engineering (CSE) 2026, to help you master the concept.

Test Highlights:

  • - Format: Multiple Choice Questions (MCQ)
  • - Duration: 15 minutes
  • - Number of Questions: 15

Sign up on EduRev for free to attempt this test and track your preparation progress.

Test: Finite Automata & Regular Expressions - Question 1

Number of states of FSM required to simulate behaviour of a computer with a memory capable of storing “m” words, each of length ‘n’

Test: Finite Automata & Regular Expressions - Question 2

An FSM with

Test: Finite Automata & Regular Expressions - Question 3

 Which of the following is right?

Test: Finite Automata & Regular Expressions - Question 4

Given a NFA with N states, the maximum number of states in an equivalent minimized DFA is at least.

Test: Finite Automata & Regular Expressions - Question 5

Let L denotes the language generated by the grammar S – OSO/00. Which of the following is true?

Detailed Solution: Question 5

Test: Finite Automata & Regular Expressions - Question 6

 Which of the following pairs of regular expressions are equivalent?

Detailed Solution: Question 6

Explanation:
Rule (pq)*p=p (qp)*
Therefore–(xx*) (x*x**)
(xx*)(x*x*) [Using x**=x] (xx*)(x*) [Using x*x*=x*] (xx*) [Using x*xx*=x*)
x+

Test: Finite Automata & Regular Expressions - Question 7

Let L denotes the language generated by the grammar S ->0S0/00. Which of the following is true?

Detailed Solution: Question 7

Explanation: The grammar itself is not regular but language L is regular as L can be represented using a regular grammar, for example S -> S00/00.

Test: Finite Automata & Regular Expressions - Question 8

Which of the following are not regular?

Detailed Solution: Question 8

Explanation: Strings of odd number of zeroes can be generated by the regular expression (00) *0.Pumping lemma can be used to prove the non-regularity of the other options.

Test: Finite Automata & Regular Expressions - Question 9

If ∑ = {a, b, c, d, e, f} then number of strings in ∑ of length 4 such that no symbol is used more than once in a string is

Detailed Solution: Question 9

Explanation: Here string length is 4 so we create string of length 4 by 6 values firstly we arrange any value by 6 methods. Then Remaining numbers are 5 so we can arrange them by 5 methods then remaining numbers are 4 so we arrange them by 4 methods and then 3.Thus 6*5*4*3=360.

Test: Finite Automata & Regular Expressions - Question 10

Which one of the following statement is FALSE?

Detailed Solution: Question 10

he FALSE statement is:

3. Context-free languages are closed under intersection.

Explanation:

  • Context-free languages (CFLs) are closed under:
    • Union: If L1L_1L1​ and L2L_2L2​ are CFLs, L1∪L2L_1 \cup L_2L1​∪L2​ is also a CFL.
    • Concatenation: If L1L_1L1​ and L2L_2L2​ are CFLs, L1⋅L2L_1 \cdot L_2L1​⋅L2​ (concatenation) is also a CFL.
    • Kleene closure: If LLL is a CFL, the Kleene closure (repetition) of LLL, denoted as L∗L^*L∗, is also a CFL.

However, CFLs are not closed under intersection. The intersection of two context-free languages is not necessarily a context-free language. In fact, the intersection of two CFLs may result in a language that is not context-free.

Test: Finite Automata & Regular Expressions - Question 11

Which of the following strings is not generated by the following grammar?S → SaSbS|ε

Detailed Solution: Question 11

Explanation:
S->aSbS putting S-> € and then S->SaSbS
S->aSaSaSbSbSbS putting S->SaSbS
S->aaabbb putting S->€.

Test: Finite Automata & Regular Expressions - Question 12

Regular expressions can be used for values of type string and number.

Detailed Solution: Question 12

Explanation: RE is used for all types of string and numbers.

Test: Finite Automata & Regular Expressions - Question 13

What is the Regular Expression Matching Zero or More Specific Characters

Detailed Solution: Question 13

Explanation: Zero or Specific Expression matching can be done only by a single character that is*

Test: Finite Automata & Regular Expressions - Question 14

All __________ are automatically treated as regular expressions.

Detailed Solution: Question 14

Explanation: It is seen that programmatic description are treated as regular expression.

Test: Finite Automata & Regular Expressions - Question 15

The production Grammar is {S->aSbb,S->abb} is

Detailed Solution: Question 15

Explanation: As per the definition of type-2 grammar.

26 videos|92 docs|30 tests
Information about Test: Finite Automata & Regular Expressions Page
In this test you can find the Exam questions for Test: Finite Automata & Regular Expressions solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Finite Automata & Regular Expressions, EduRev gives you an ample number of Online tests for practice
26 videos|92 docs|30 tests
Download as PDF