A) It can generate regular languages.
B) It can generate context-sensitive languages.
C) It can generate context-free languages.
D) It can generate recursively enumerable languages.
View AnswerC
62. Which machine model is capable of recognizing context-sensitive languages?
A) DFA
B) NFA
C) Linear-bounded Automaton (LBA)
D) PDA
View AnswerC
63. Which of the following languages is regular?
A) {a^n b^n | n ≥ 0}
B) {a, b}*
C) {a^n b^n c^n | n ≥ 0}
D) {a^m b^n | m ≠ n}
View AnswerB
64. The language accepted by a PDA can be described by?
A) Regular grammar
B) Context-free grammar
C) Context-sensitive grammar
D) Type-0 grammar
View AnswerB
65. Which of the following languages can be recognized by a DFA?
A) Context-sensitive languages
B) Context-free languages
C) Regular languages
D) Recursively enumerable languages
View AnswerC
66. What is the time complexity of converting an NFA to a DFA in the worst case?
A) O(n)
B) O(n^2)
C) O(2^n)
D) O(log n)
View AnswerC
67. Which of the following is true for a Turing machine?
A) It cannot solve the halting problem.
B) It accepts only regular languages.
C) It has finite memory.
D) It is less powerful than a DFA.
View AnswerA
68. Which language is accepted by a deterministic pushdown automaton (DPDA)?
A) Context-free language
B) Regular language
C) Deterministic context-free language
D) Context-sensitive language
View AnswerC
69. What is the main difference between a PDA and a DFA?
A) PDA uses a stack, while DFA does not.
B) DFA can process context-free languages, PDA cannot.
C) PDA requires infinite memory, DFA requires finite memory.
D) PDA processes regular languages, DFA does not.
View AnswerA
70. Which of the following is the set of all languages that can be recognized by a linear-bounded automaton?
A) Regular languages
B) Context-free languages
C) Context-sensitive languages
D) Recursively enumerable languages
View AnswerC
71. In automata theory, what does ε represent?
A) The empty stack
B) The empty string
C) A regular expression
D) A transition with an input
View AnswerB
72. What is the language class recognized by a Turing machine that halts on all inputs?
A) Recursively enumerable languages
B) Regular languages
C) Recursive languages
D) Context-sensitive languages
View AnswerC
73. What is the language class recognized by an NFA with ε-transitions?
A) Regular languages
B) Context-free languages
C) Context-sensitive languages
D) Type-0 languages
View AnswerA
74. Which of the following operations is not closed in context-free languages?
A) Union
B) Intersection
C) Concatenation
D) Kleene star
View AnswerB
75. Which of the following describes a left-linear grammar?
A) It generates context-sensitive languages.
B) It generates regular languages.
C) It generates context-free languages.
D) It generates recursively enumerable languages.
View AnswerB
76. The language {a^n b^n c^n | n ≥ 0} is an example of which type of language?
A) Regular
B) Context-free
C) Context-sensitive
D) Recursively enumerable
View AnswerC
77. Which of the following statements is true for the union of two context-free languages?
A) It is always context-sensitive.
B) It is always context-free.
C) It is always recursively enumerable.
D) It may not be context-free.
View AnswerB
78. What does it mean if a language is not recursively enumerable?
A) It cannot be recognized by any automaton.
B) It cannot be recognized by a Turing machine.
C) It can only be recognized by a DFA.
D) It can be recognized by a PDA.
View AnswerB
79. What is the primary function of a Turing machine’s tape?
A) To store input symbols
B) To simulate finite automata
C) To act as a memory for computation
D) To track the states of a PDA
View AnswerC
80. Which of the following is undecidable for a Turing machine?
A) Whether the machine halts on a given input
B) Whether the machine accepts all inputs
C) Whether the machine accepts context-free languages
D) Whether the machine has a finite number of states
View AnswerA
81. What does it mean for a grammar to be ambiguous?
A) It can generate more than one parse tree for the same string.
B) It can generate only one parse tree for each string.
C) It cannot generate a parse tree.
D) It is equivalent to a regular grammar.
View AnswerA
82. Which of the following machines can recognize the language {a^n b^n c^n | n ≥ 0}?
A) DFA
B) NFA
C) PDA
D) Linear-bounded automaton
View AnswerD
83. Which of the following is true for context-sensitive languages?
A) They are a subset of recursively enumerable languages.
B) They can be accepted by a pushdown automaton.
C) They can be accepted by finite automata.
D) They are equivalent to regular languages.
View AnswerA
84. What is the function of a transition table in a finite automaton?
A) To define the set of input symbols
B) To specify state transitions for input symbols
C) To define the language recognized by the automaton
D) To specify final states
View AnswerB
85. What is a recursive language?
A) A language accepted by a Turing machine that halts on all inputs
B) A language accepted by a DFA
C) A language that can be generated by a regular grammar
D) A language that cannot be recognized by any automaton
View AnswerA
86. Which of the following operations is closed in the set of regular languages?
A) Intersection
B) Union
C) Complementation
D) All of the above
View AnswerD
87. What type of machine is required to recognize the language {a^n b^n c^n | n ≥ 0}?
A) DFA
B) NFA
C) PDA
D) Linear-bounded automaton
View AnswerD
88. What is the difference between a DFA and an NFA?
A) A DFA can have ε-transitions, whereas an NFA cannot.
B) A DFA has exactly one transition for each input symbol from each state, while an NFA can have multiple transitions.
C) A DFA is more powerful than an NFA.
D) A DFA accepts context-free languages, while an NFA accepts regular languages.
View AnswerB
89. Which of the following grammars generates context-sensitive languages?
A) Type-0 grammar
B) Type-1 grammar
C) Type-2 grammar
D) Type-3 grammar
View AnswerB
90. Which of the following is not a property of recursively enumerable languages?
A) They are accepted by Turing machines.
B) They are closed under union.
C) They are closed under complementation.
D) They include all decidable languages.
View AnswerC
91. What is the primary difference between a recursive and a recursively enumerable language?
A) Recursive languages are accepted by DFAs, while recursively enumerable languages are accepted by PDAs.
B) Recursive languages are accepted by Turing machines that halt on all inputs, while recursively enumerable languages may not halt.
C) Recursive languages are a subset of context-free languages, while recursively enumerable languages are not.
D) Recursive languages are closed under intersection, while recursively enumerable languages are not.
View AnswerB
92. Which of the following is an undecidable problem in automata theory?
A) Whether a DFA accepts a given string
B) Whether a context-free grammar is ambiguous
C) Whether a Turing machine halts on a given input
D) Whether a PDA accepts a given string
View AnswerC
93. Which of the following languages is not context-free?
A) {a^n b^n | n ≥ 0}
B) {a^n b^n c^n | n ≥ 0}
C) {a^m b^n | m ≠ n}
D) {ε}
View AnswerB
94. Which of the following regular expressions represents all strings over {a, b} with an odd number of a’s?
A) (aa)*
B) (a+ba)a
C) (ab*)*
D) (ab)*
View AnswerB
95. Which of the following is true for deterministic context-free languages (DCFL)?
A) They can be accepted by nondeterministic pushdown automata.
B) They can be accepted by deterministic pushdown automata.
C) They require a Turing machine for acceptance.
D) They are a superset of regular languages.
View AnswerB
96. Which of the following operations is not closed in the set of context-free languages?
A) Union
B) Concatenation
C) Intersection
D) Kleene star
View AnswerC
97. What is the main use of ε-transitions in a non-deterministic finite automaton (NFA)?
A) To allow the automaton to move between states without consuming input symbols
B) To allow multiple transitions for the same input symbol
C) To process context-sensitive languages
D) To remove ambiguities from the grammar
View AnswerA
98. Which of the following is not a regular expression?
A) (a+b)*
B) a^n b^n
C) ab
D) (ab)+
View AnswerB
99. Which of the following languages cannot be recognized by a deterministic finite automaton (DFA)?
A) {a^n b^n | n ≥ 0}
B) {a, b}*
C) {ab}
D) {ε}
View AnswerA
100. What does the term “decidable problem” mean in the context of Turing machines?
A) A problem that can be solved by a DFA
B) A problem that can be solved by a Turing machine that halts on all inputs
C) A problem that can be generated by a regular grammar
D) A problem that cannot be solved by any automaton
View AnswerB
101. Which of the following is a valid property of regular languages?