☑ MCQ PRACTICE

Formal Languages and Automata Theory Unit 4

Practice objective questions for quick revision and examination preparation. Try answering each question before revealing the answer.

📚 Formal Languages and Automata Theory
📖 Unit 4
🎯 MCQs

Formal Languages and Automata Theory - Unit-4

1
The process of removing symbols that are never reachable from the start symbol is called:
AEliminating ε-productions
BEliminating useless symbols
CChomsky normalization
DGreibach conversion
Correct Answer Eliminating useless symbols
2
A production rule of the form A → ε is called a(n):
AUseless production
BUnit production
Cε-production
DTerminal production
Correct Answer ε-production
3
In Chomsky Normal Form (CNF), every production rule must be of the form:
AA → BC or A → a
BA → B or A → ε
CA → aB
DA → α (where |α| ≤ 2)
Correct Answer A → BC or A → a
4
Which of the production rule can be accepted by Chomsky grammar?
AA->BC
BA->a
CS->e
DAll of the mentioned
Correct Answer All of the mentioned
5
Which of the following grammars are in Chomsky Normal Form:
AS->AB|BC|CD, A->0, B->1, C->2, D->3
BS->AB, S->BCA|0|1|2|3
CS->ABa, A->aab, B->Ac
DAll of the mentioned
Correct Answer S->AB|BC|CD, A->0, B->1, C->2, D->3
6
Greibach Normal Form (GNF) requires all productions to be of the form:
AA → aB₁B₂...Bₙ
BA → BC
CA → ε
DA → a
Correct Answer A → aB₁B₂...Bₙ
7
Given a grammar in GNF and a derivable string in the grammar with the length n, any ___________will halt at depth n.
Atop-down parser
Bbottom-up parser
Cmultitape turing machine
Dnone of the mentioned
Correct Answer top-down parser
8
Which step is not part of converting a CFG to CNF?
AEliminate ε-productions
BEliminate unit productions
CEnsure all productions are binary or terminal
DIntroduce left recursion
Correct Answer Introduce left recursion
9
The Pumping Lemma for CFLs states that for any CFL L, there exists a constant p such that:
AAll strings in L can be divided into uvwxy
B|vwx| ≤ p and |vx| ≥ 1
Cuvⁿwxⁿy ∈ L for all n ≥ 0
DAll of the above
Correct Answer All of the above
10
The Pumping Lemma is primarily used to:
AProve a language is context-free
BProve a language is not context-free
CConvert CFGs to PDAs
DEliminate useless symbols
Correct Answer Prove a language is not context-free
11
For the language L = {aⁿbⁿcⁿ | n ≥ 0}, the Pumping Lemma shows that:
AL is regular
BL is context-free
CL is not context-free
DL is decidable
Correct Answer L is not context-free
12
In uvwxy partitioning, the condition |vx| ≥ 1 ensures that:
AThe string is non-empty
BAt least one symbol is pumped
CThe string is infinite
DThe grammar is in CNF
Correct Answer At least one symbol is pumped
13
If a language fails the Pumping Lemma for CFLs, it is:
ARegular
BContext-free
CNot context-free
DRecursively enumerable
Correct Answer Not context-free
14
CFLs are closed under:
AUnion
BConcatenation
CKleene star
DAll of the above
Correct Answer All of the above
15
CFLs are not closed under:
AIntersection
BComplement
CBoth A and B
DHomomorphism
Correct Answer Both A and B
16
The intersection of a CFL and a regular language is always:
ARegular
BContext-free
CContext-sensitive
DUndecidable
Correct Answer Context-free
17
Which operation preserves CFLs?
AIntersection with another CFL
BComplementation
CSubstitution
DNone of the above
Correct Answer Substitution
18
The emptiness problem for CFLs is:
AUndecidable
BDecidable
CNP-complete
DOnly decidable for DCFLs
Correct Answer Decidable
19
A Turing Machine (TM) differs from a PDA because it has:
AAn infinite tape
BA stack
CFinite states
Dε-transitions
Correct Answer An infinite tape
20
The formal definition of a TM includes all except:
AA finite set of states
BAn input alphabet
CA stack alphabet
DA transition function
Correct Answer A stack alphabet
21
An Instantaneous Description (ID) of a TM includes:
ACurrent state, tape symbols, and head position
BOnly the tape contents
CThe transition function
DThe set of final states
Correct Answer Current state, tape symbols, and head position
22
The language accepted by a TM is called:
ARegular
BContext-free
CRecursively enumerable
DAll of the above
Correct Answer Recursively enumerable
23
A turing machine with several tapes in known as:
AMulti-tape turing machine
BPoly-tape turing maching
CUniversal turing machine
DAll of the mentioned
Correct Answer Multi-tape turing machine
← Back to All MCQs