# Automata Theory | Set 8

These questions for practice purpose for GATE CS Exam.

**Ques-1:** Which one of the following language is Regular?

**(A)** {wxw^{R} | w,x ∈ (a+b)+}

**(B)** {wxw^{R} | w ∈ (a+b)*, x ∈ {a,b}}

**(C)** {ww^{R}x | w,x ∈ (a+b)+}

**(D)** {ww^{R} | w ∈ (a+b)*}

**Explanation:**

**(A)**It is correct, since this language can form regular expression which is {{ a(a + b)^{+}a } + {b(a + b)^{+}b}}, i.e., start and end with same symbol.**(B)**It is deterministic context free language since, string before and and after ‘x’ are same so, it is matched.**(C)**It cannot be regular since, ww^{R}is done at first which requires comparison which cannot be done via finite automata.**(D)**It is also not regular since, comparison is required.

Option (A) is true.

**Ques-2:** Let w be any string of length n in {a, b}*. Consider ‘L’ be the set of all strings ending with at least n a’s. What is the minimum number of states in non deterministic finite automata that accept ‘L’?

**(A)** (n+3)

**(B)** (n+1)

**(C)** n

**(D)** 2^{n}

**Explanation:**

It is correct since, the minimum number of states required for NFA for ending with at least 2 a’s is (2 + 1) i.e., regular expression will be (a + b)*aa

Hence, Number of states required for at least n a’s will be (n+1).

Option (B) is true.

**Ques-3:** What is the minimum number of states in deterministic finite automata (DFA) for string starting with ba^{2} and ending with ‘a’ over alphabet {a, b}?

**(A)** Ten

**(B)** Nine

**(C)** Eight

**(D)** Six

**Explanation:**

In the above DFA, minimum number of states required is six.

Option (D) is correct.

**Ques-4:** Consider the following statements:

S1 = {(a^{n})^{m}| n = 0} S2 = {a^{n}b^{n}| n>=1} U {a^{n}b^{m}| n>=1, m>=1}

Which one of the following is regular?

**(A)** only S1

**(B)** only S2

**(C)** both S1 and S2

**(D)** none

**Explanation:**

Both given languages are regular. Option (C) is correct.

**Ques-5:** What is the number of states in minimal NFA(non deterministic finite automata), which accepts set of all strings in which the third last symbol is ‘a’ over alphabet {a, b}?

**(A)** three

**(B)** four

**(C)** six

**(D)** five

**Explanation:**

In the above NFA, minimum number of states required is four.

Option (B) is true.

## Recommended Posts:

- Automata Theory | Set 9
- Automata Theory | Set 1
- Automata Theory | Set 4
- Automata Theory | Set 3
- Automata Theory | Set 2
- Automata Theory | Set 5
- Automata Theory | Set 10
- Automata Theory | Set 7
- Theory of Computation | Regular languages and finite automata | Question 2
- Difference between Pushdown Automata and Finite Automata
- Applications of various Automata
- Construct Pushdown automata for L = {a
^{(2*m)}c^{(4*n)}d^{n}b^{m}| m,n ≥ 0} - Construct Pushdown automata for L = {0
^{n}1^{m}2^{(n+m)}| m,n ≥ 0} - Compound Finite Automata (FA)
- Construct Pushdown automata for L = {0
^{n}1^{m}2^{m}3^{n}| m,n ≥ 0}

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.