Following questions have been asked in GATE CS 2011 exam.

**1) Let P be a regular language and Q be context-free language such that Q ⊆ P. (For example, let P be the language represented by the regular expression p*q* and Q be {p ^{n}q^{n}|n ∈ N}). Then which of the following is ALWAYS regular?**

(A) P ∩ Q

(B) P – Q

(C) ∑* – P

(D) ∑* – Q

Answer (C)

The expression ∑* – P represents complement of P which is a regular language. Complement of Regular languages is also regular. Then a DFA that accepts the complement of L, i.e. ∑* – L, can be obtained by swapping its accepting states with its non-accepting states.

**2) Consider the language L1,L2,L3 as given below.**

**L1={0 ^{p}1^{q} | p,q ∈ N}**

L2={0^{p}1^{q}| p,q ∈ N and p=q}

L3={0^{p}1^{q}0^{r} | p,q,r ∈N and p=q=r}

Which of the following statements is NOT TRUE?

(A) Push Down Automata (PDA) can be used to recognize L1 and L2

(B) L1 is a regular language

(C) All the three languages are context free

(D) Turing machine can be used to recognize all the three languages

Answer (C)

The language L3 is not context free. Refer this for more details.

**3)Definition of a language L with alphabet {a} is given as following. L= { a ^{nk} | k > 0, and n is a positive integer constant} What is the minimum number of states needed in a DFA to recognize L? **

(A) k+1

(B) n+1

(C) 2

^{n+1}

(D) 2

^{k+1}

Answer (B)

Note that n is a constant and k is any positive integer. For example, if n is given as 3, then the DFA must be able to accept 3a, 6a, 9a, 12a, .. To build such a DFA, we need 4 states.

Please see GATE Corner for all previous year paper/solutions/explanations, syllabus, important dates, notes, etc.

Please write comments if you find any of the answers/explanations incorrect, or you want to share more information about the topics discussed above.

## Recommended Posts:

- Automata Theory | Set 1
- Automata Theory | Set 5
- Automata Theory | Set 6
- Automata Theory | Set 3
- Automata Theory | Set 2
- Theory of Computation | Applications of various Automata
- Theory of Computation | Generating regular expression from finite automata
- Construct Pushdown automata for L = {0
^{n}1^{m}2^{m}3^{n}| m,n ≥ 0} - 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} - TOC | Designing Deterministic Finite Automata (Set 2)
- Detailed Study of PushDown Automata
- TOC | Designing Deterministic Finite Automata (Set 1)
- Practice problems on finite automata | Set 2
- Practice problems on finite automata