Loading…
Loading…
Loading…
Automata, regular/context-free grammars, Turing machines, lexical & syntax analysis, discrete math and AI.
Every question in this topic is labelled with one of these, so you can drill a single type.
These exams include Computer Science in their pattern. Check each official notification for its detailed topic syllabus.
Try solving these exam-pattern questions right here or challenge a friend.
Select the correct option.
In the Chomsky Hierarchy of formal languages, which abstract machine recognizes Context-Free Languages (Type-2)?
Correct Answer: (A) Pushdown Automaton (PDA)
Chomsky Hierarchy
Type 3 (Regular) → Finite Automaton; Type 2 (Context-Free) → PDA; Type 1 (Context-Sensitive) → LBA; Type 0 (Recursively Enumerable) → Turing Machine.
Select the correct option.
Which theorem proves that the language L = { aⁿ bⁿ | n ≥ 1 } is NOT regular?
Correct Answer: (A) Pumping Lemma for Regular Languages (and Myhill-Nerode Theorem)
Non-Regular Languages
Finite automata cannot count unbounded n to match equal a's and b's; L = {aⁿbⁿ} is Context-Free, not Regular.
Select the correct option.
What does the 'Halting Problem' proven undecidable by Alan Turing state?
Correct Answer: (A) No general algorithm can decide for every arbitrary Turing Machine M and input w whether M will eventually halt or loop forever
Decidability & Undecidability
The Halting Problem is Recursively Enumerable (semi-decidable) but NOT Recursive (decidable).
Select the correct option.
Under which set operations are Context-Free Languages (CFLs) NOT closed?
Correct Answer: (A) Intersection and Complementation
Closure Properties of CFL
CFLs are closed under Union, Concatenation, Kleene star, Reversal, and intersection with Regular languages—but NOT closed under Intersection of two CFLs or Complement.