Description

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

QUESTION: 1

Which of the following is false?

Solution:

For every NFA there exist an equivalent DFA and vice-versa. Power of both NFA and DFA for recognization of language is same.

QUESTION: 2

Let r_{1 }= ab*c*and r_{2 }= (a*b+c)*and r_{3 }= (a+b+c)*. Then which of the following is true

Solution:

ac ∈ L(r_{1}), since we can take b* as ∈ and c* as c. ac ∈ L (r_{3}), since (a + b + c ) * includes all combinations of a, b and c.

ac ∉ L(r_{2}) since whenever (a * b + c)* is taken to include a, “a is always followed by b".

a*b = b, ab, aab, .... & so on.

QUESTION: 3

Let ∑ = {a, b}, r_{1} = a(a + b)* and r_{2} = b(a + b)*. Which of the following is true?

Solution:

L(r_{1}) is the set of all string starting with ‘a’.

L(r_{2}) is the set of all starting with ‘b’.

Since any word belonging to ∑* either starts with “ a ” or starts with " b ” or is “∈ ” , therefore

QUESTION: 4

Which of the following statements are true?

(i) abcd ∈ L((b*a*)* (d*c*)*)

(ii) abcd ∈ L((d*c*b*a*)*)

(iii) abcd ∈ L((a*b*a*c*d*)*)

Solution:

Note that

gives all the combinations of a and b followed by all the combinations of c and d, for

will generate all strings with combination of a, b, c, b and d.

QUESTION: 5

Which of the following are regular languages?

(i) The language w has an odd number of b’s}.

(ii) The language w has an even number of b’s).

(iii) The language has an even number of b’s and odd number of a’s).

Solution:

As we can construct the DFA for the given languages, hence all of the given languages are regular.

QUESTION: 6

Which of the following regular expression corresponds to the language of all strings over the alphabet {a, b) that contains exactly two a’s

(i) aa

(ii) ab*a

(iii) b* ab*a

Solution:

(a+b)*abb is the Set of strings of a's and b's ending with the string abb. So L = {abb, aabb, babb, aaabb, ababb,}

QUESTION: 7

Which of the following regular expression corresponds to the language of all strings over the alphabet {a, b} that do not end with ab?

Solution:

Choice ‘a’ is incorrect since it does not include the string “a”, “b” and "∈” (all of which do not end with ab).

None of choices 'c' or ‘d ’ accept the string ‘a ’, So they can’t represent specified language.

QUESTION: 8

What is regular expression corresponding to the language of strings of even lengths over the alphabet of {a, b}?

Solution:

The regular expression corresponding to the language of strings of even lengths over the alphabet of {a, b} is ((a + b)^{2})* which is equivalent to (aa + bb + ba + ab)*. In choice (b) the string ‘ab’ is not present. In choice (c) the string ‘aa’ is not present. In choice (d) odd length strings are also acceptable.

QUESTION: 9

How many minimum number of states are required in the DFA (over the alphabet {a, b}) accepting all the strings with the number of a’s divisible by 4 and number of b’s divisible by 5?

Solution:

For DFA accepting all the strings with number of a’s divisible by 4; four states are required similarly for DFA accepting all the strings with number of b’s divisible by 5, five states are required and for their combination, states will be multiplied. So 5 x 4 = 20 states will be required.

QUESTION: 10

How many minimum number of states will be there in the DFA accepting all strings (over the alphabet {a,b}) that do not contain two consecutive a’s?

Solution:

First draw FSM for accepting all strings containing consecutive a’s, as shown above. Now change the final states to non final states and non final states to final states to get the required DFA shown below:

### Regular Expressions And Finite Automata

Doc | 20 Pages

### Finite Automata

Doc | 6 Pages

### Finite Automata

Video | 11:05 min

### Finite Automata

Doc | 1 Page

- Finite Automata: Regular Languages (Basic Level) - 1
Test | 10 questions | 30 min

- Finite Automata: Regular Languages (Advance Level) - 1
Test | 15 questions | 45 min

- Regular Expressions And Finite Automata MCQ Quiz - 1
Test | 20 questions | 60 min

- Test: Finite Automata And Regular Expressions
Test | 15 questions | 15 min

- Regular Expressions And Finite Automata MCQ Quiz - 2
Test | 20 questions | 60 min