Theory of Computation questions

Q7

GATE CS 2020 CSRegular LanguagesMCQ1 mark−1/3 if wrong
Which one of the following regular expressions represents the set of all binary strings with an odd number of 1’s?
Show answer without attempting

Answer: Marks to all

Q8

GATE CS 2020 CSRegular LanguagesMCQ1 mark−1/3 if wrong
Consider the following statements.

I. If L1∪L2L_1 \cup L_2 is regular, then both L1L_1 and L2L_2 must be regular.
II. The class of regular languages is closed under infinite union.

Which of the above statements is/are TRUE?
Show answer without attempting

Answer: D

Q10

GATE CS 2020 CSContext Free LanguagesMCQ1 mark−1/3 if wrong
Consider the language L={an∣n≥0}∪{anbn∣n≥0}L = \{a^n \mid n \ge 0\} \cup \{a^n b^n \mid n \ge 0\} and the following statements.

I. LL is deterministic context-free.
II. LL is context-free but not deterministic context-free.
III. LL is not LL(kk) for any kk.

Which of the above statements is/are TRUE?
Show answer without attempting

Answer: C

Q26

GATE CS 2020 CSComputabilityMCQ2 marks−2/3 if wrong
Which of the following languages are undecidable? Note that ⟨M⟩\langle M \rangle indicates encoding of the Turing machine M.

L1={⟨M⟩∣L(M)=∅}L_1 = \{\langle M \rangle \mid L(M) = \emptyset\}
L2={⟨M,w,q⟩∣M on input w reaches state q in exactly 100 steps}L_2 = \{\langle M, w, q \rangle \mid M \text{ on input } w \text{ reaches state } q \text{ in exactly 100 steps}\}
L3={⟨M⟩∣L(M) is not recursive}L_3 = \{\langle M \rangle \mid L(M) \text{ is not recursive}\}
L4={⟨M⟩∣L(M) contains at least 21 members}L_4 = \{\langle M \rangle \mid L(M) \text{ contains at least 21 members}\}
Show answer without attempting

Answer: A

Q32

GATE CS 2020 CSRegular LanguagesMCQ2 marks−2/3 if wrong
Consider the following languages.

L1={wxyx∣w,x,y∈(0+1)+}L_1 = \{wxyx \mid w, x, y \in (0+1)^+\}
L2={xy∣x,y∈(a+b)∗,∣x∣=∣y∣,x≠y}L_2 = \{xy \mid x, y \in (a+b)^*, |x| = |y|, x \ne y\}

Which one of the following is TRUE?
Show answer without attempting

Answer: A

Q51

GATE CS 2020 CSRegular LanguagesNAT2 marks
Consider the following language.

L={x∈{a,b}∗∣number of a’s in x is divisible by 2 but not divisible by 3}L = \{x \in \{a, b\}^* \mid \text{number of } a\text{'s in } x \text{ is divisible by 2 but not divisible by 3}\}

The minimum number of states in a DFA that accepts LL is __________.
Show answer without attempting

Answer: 6

0/60 correct0 marks

Related topics in GATE CS