Regular Languages questions

Q22

GATE CS 2017 CS-1Regular LanguagesNAT1 mark
Consider the language LL given by the regular expression (a+b)∗b(a+b)(a+b)^*b(a+b) over the alphabet {a,b}\{a, b\}. The smallest number of states needed in a deterministic finite-state automaton (DFA) accepting LL is ____________.
Show answer without attempting

Answer: 4.0

Q25

GATE CS 2017 CS-2Regular LanguagesNAT1 mark
The minimum possible number of states of a deterministic finite automaton that accepts the regular language L={w1aw2∣w1,w2∈{a,b}∗,∣w1∣=2,∣w2∣≥3}L = \{w_1 a w_2 \mid w_1, w_2 \in \{a, b\}^*, \lvert w_1 \rvert = 2, \lvert w_2 \rvert \ge 3\} is ____________.
Show answer without attempting

Answer: 8.0

Q39

GATE CS 2017 CS-2Regular LanguagesMCQ2 marks−2/3 if wrong
Let δ\delta denote the transition function and δ^\widehat{\delta} denote the extended transition function of the ϵ\epsilon-NFA whose transition table is given below:
δ\deltaϵ\epsilonaabb
→q0\rightarrow q_0{q2}\{q_2\}{q1}\{q_1\}{q0}\{q_0\}
q1q_1{q2}\{q_2\}{q2}\{q_2\}{q3}\{q_3\}
q2q_2{q0}\{q_0\}∅\emptyset∅\emptyset
q3q_3∅\emptyset∅\emptyset{q2}\{q_2\}
Then δ^(q2,aba)\widehat{\delta}(q_2, aba) is
Show answer without attempting

Answer: C

Q40

GATE CS 2017 CS-2Regular LanguagesMCQ2 marks−2/3 if wrong
Consider the following languages.

L1={ap∣p is a prime number}L_1 = \{a^p \mid p \text{ is a prime number}\}
L2={anbmc2m∣n≥0,m≥0}L_2 = \{a^n b^m c^{2m} \mid n \ge 0, m \ge 0\}
L3={anbnc2n∣n≥0}L_3 = \{a^n b^n c^{2n} \mid n \ge 0\}
L4={anbn∣n≥1}L_4 = \{a^n b^n \mid n \ge 1\}

Which of the following are CORRECT?

I. L1L_1 is context-free but not regular.
II. L2L_2 is not context-free.
III. L3L_3 is not context-free but recursive.
IV. L4L_4 is deterministic context-free.
Show answer without attempting

Answer: D

0/40 correct0 marks

Related topics in Theory of Computation