☑ MCQ PRACTICE

Formal Languages and Automata Theory Unit 1

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

📚 Formal Languages and Automata Theory
📖 Unit 1
🎯 MCQs

Formal Languages and Automata Theory - Unit-1

1
What is the primary purpose of finite automata in computer science?
ATo recognize patterns
BTo perform arithmetic operations
CTo manage memory
DTo process data
Correct Answer To recognize patterns
2
Which of the following is a central concept in Automata theory?
AStrings
BMemory
CRegisters
DProcessing power
Correct Answer Strings
3
In Automata Theory, a string is defined as:
AA sequence of states
BA sequence of symbols
CA set of rules
DA single character
Correct Answer A sequence of symbols
4
What is an example of an application of Non-deterministic Finite Automata (NFA)?
AText Search
BSorting numbers
CArithmetic calculations
DData storage
Correct Answer Text Search
5
A Non-deterministic Finite Automaton (NFA) differs from a DFA by:
AHaving a single transition for every symbol
BHaving multiple transitions for the same input
CBeing deterministic
DUsing no transitions
Correct Answer Having multiple transitions for the same input
6
Which of the following is the main feature of Epsilon-Transitions in NFAs?
ATransitions with no input
BState-based transitions
CDirect transitions to other states
DInfinite loops
Correct Answer Transitions with no input
7
The formal definition of a DFA includes which of the following?
AA set of states, alphabet, transition function, start state, and accept state(s)
BOnly a set of states
CA set of transition rules
DA set of symbols and states
Correct Answer A set of states, alphabet, transition function, start state, and accept state(s)
8
How does a DFA process strings?
ABy following a unique path from start to an accepting state
BBy making random transitions
CBy using loops
DBy reading symbols and making no transitions
Correct Answer By following a unique path from start to an accepting state
9
Which of the following is true about a DFA's language?
AThe language consists of all possible strings
BThe language consists of strings that the DFA accepts
CThe language includes infinite symbols
DThe language includes only empty strings
Correct Answer The language consists of strings that the DFA accepts
10
Conversion of an NFA with ε-transitions to an NFA without ε-transitions is called:
ANFA minimization
Bε-NFA removal
CDFA conversion
DNFA to DFA
Correct Answer ε-NFA removal
11
A Moore machine is a type of finite automaton where:
AOutput depends on the current state only
BOutput depends on the state and input
COutput is always zero
DThere is no output
Correct Answer Output depends on the current state only
12
What does a Mealy machine use to determine output?
ACurrent state
BCurrent state and input symbol
CPrevious state
DRandom transitions
Correct Answer Current state and input symbol
13
The transition function in a DFA is:
AUndefined for some states
BDeterministic for each state
CNon-deterministic for each state
DBased on ε-transitions
Correct Answer Deterministic for each state
14
What does the term "alphabet" in Automata theory refer to?
AA set of characters or symbols
BThe set of states
CThe set of transitions
DA group of languages
Correct Answer A set of characters or symbols
15
Which of the following is true about an NFA?
AIt can have multiple transitions for the same input
BIt has only one transition for each symbol
CIt accepts no strings
DIt has no start state
Correct Answer It can have multiple transitions for the same input
16
What is the main advantage of Nondeterministic Finite Automata over DFAs?
ANFAs require fewer states
BNFAs are easier to implement
CNFAs can process strings faster
DNFAs can accept a wider variety of languages
Correct Answer NFAs require fewer states
17
Which of the following is a characteristic of deterministic finite automata (DFA)?
AA DFA has multiple paths for the same input
BA DFA has one path for each input symbol
CA DFA doesn't need a start state
DA DFA has non-deterministic transitions
Correct Answer A DFA has one path for each input symbol
18
In the process of converting an NFA to a DFA, what is created for each subset of NFA states?
AA unique DFA state
BA set of transitions
CAn accepting state
DAn epsilon-transition
Correct Answer A unique DFA state
19
What type of machine can recognize regular languages?
AFinite Automata
BTuring Machines
CPushdown Automata
DRecursive Machines
Correct Answer Finite Automata
20
Which of the following is a limitation of a DFA?
AIt can only accept regular languages
BIt can have multiple paths for the same input
CIt cannot handle epsilon transitions
DIt cannot be represented graphically
Correct Answer It can only accept regular languages
21
What is the role of the start state in a DFA?
AIt determines which state the automaton starts in
BIt accepts or rejects the input string
CIt has no function
DIt provides the output
Correct Answer It determines which state the automaton starts in
22
Which of the following is true about the transition diagram of a DFA?
AEach state has multiple transitions for each input symbol
BEach state has exactly one transition for each input symbol
CEach state has no transition for any symbol
DThere are no start or accepting states
Correct Answer Each state has exactly one transition for each input symbol
23
How many different states can a DFA have?
AIt can have an infinite number of states
BIt can have a finite number of states
CIt has only one state
DIt has at least two states
Correct Answer It can have a finite number of states
24
What does ε represent in an NFA with ε-transitions?
AAn empty string
BA transition without consuming an input symbol
CA special type of state
DA random transition
Correct Answer A transition without consuming an input symbol
25
What is the first step in the conversion of an NFA to a DFA?
AIdentify all possible subsets of NFA states
BFind the final states in the NFA
CRemove ε-transitions from the NFA
DDefine the alphabet
Correct Answer Identify all possible subsets of NFA states
26
What is the result when a DFA processes a string that it does not accept?
AIt reaches a dead state
BIt loops back to the start state
CIt outputs a symbol
DIt stops processing
Correct Answer It reaches a dead state
27
Which of the following is true for a DFA with n states?
AIt can only process strings of length n
BIt can process strings of any length
CIt can only process strings with n symbols
DIt requires exactly n symbols to transition
Correct Answer It can process strings of any length
28
Which machine is primarily used for text search applications?
ANon-deterministic Finite Automata (NFA)
BTuring Machine
CDeterministic Finite Automata (DFA)
DPushdown Automata
Correct Answer Non-deterministic Finite Automata (NFA)
29
A transition function in a DFA is represented as:
AA set of rules defining state transitions
BA list of possible input symbols
CA finite sequence of states
DA set of ε-transitions
Correct Answer A set of rules defining state transitions
30
What is the role of an accepting state in a DFA?
AIt accepts or rejects strings
BIt starts the string processing
CIt defines the alphabet
DIt determines the output
Correct Answer It accepts or rejects strings
31
Given the NFA transition table below, what is the transition for state q1 on input a?
Aq1
Bq2
Cq0
DNo transition
Correct Answer q2
32
Given the DFA transition table below, what is the final state for the input string "ab"?
Aq0
Bq1
Cq2
DNo final state
Correct Answer q2
33
Convert the following ε-NFA transition to an NFA without ε-transitions: δ(q0,ϵ)={q1}.
Aδ(q0,a)={q1}
Bδ(q0,ϵ)={q1}
Cδ(q0,a)={q0,q1}
Dδ(q0,a)={q0}
Correct Answer δ(q0,a)={q0,q1}
← Back to All MCQs