Courses

# Test: Finite Automata And Regular Expressions

## 15 Questions MCQ Test Compiler Design | Test: Finite Automata And Regular Expressions

Description
This mock test of Test: Finite Automata And Regular Expressions for Computer Science Engineering (CSE) helps you for every Computer Science Engineering (CSE) entrance exam. This contains 15 Multiple Choice Questions for Computer Science Engineering (CSE) Test: Finite Automata And Regular Expressions (mcq) to study with solutions a complete question bank. The solved questions answers in this Test: Finite Automata And Regular Expressions quiz give you a good mix of easy questions and tough questions. Computer Science Engineering (CSE) students definitely take this Test: Finite Automata And Regular Expressions exercise for a better result in the exam. You can find other Test: Finite Automata And Regular Expressions extra questions, long questions & short questions for Computer Science Engineering (CSE) on EduRev as well by searching above.
QUESTION: 1

Solution:
QUESTION: 2

Solution:
QUESTION: 3

### Which of the following is right?

Solution:
QUESTION: 4

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

Solution:
QUESTION: 5

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

Solution:
QUESTION: 6

Which of the following pairs of regular expressions are equivalent?

Solution:

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+

QUESTION: 7

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

Solution:

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.

QUESTION: 8

Which of the following are not regular?

Solution:

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.

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

Solution:

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.

QUESTION: 10

Which one of the following statement is FALSE?

Solution:

Explanation: CFL is closed under Kleene closure, concatenation, and Union

QUESTION: 11

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

Solution:

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

QUESTION: 12

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

Solution:

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

QUESTION: 13

What is the Regular Expression Matching Zero or More Specific Characters

Solution:

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

QUESTION: 14

All __________ are automatically treated as regular expressions.

Solution:

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

QUESTION: 15

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

Solution:

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