CS402 – Theory of Automata: Midterm Important MCQs (246 Solved Questions)
Computer Science • Read every solved MCQ with its verified answer key directly on this page. Free, no login required.
All 664 Midterm Packs · CS402 Course Page · CS402 Subjective Pack (63 Q&As)
-
Let Σ = {a, Aa, Abb} be an alphabet. The length of the string aAaAbbAa is:
Topic: Alphabets, Strings & Languages
- One
- Two
- Three
- Four ✓ Correct answer
-
If an alphabet has n letters, then the number of words of length m is:
Topic: Alphabets, Strings & Languages
- n^m ✓ Correct answer
- m^n
- n + m
- n / m
-
The length of the null string Λ is:
Topic: Alphabets, Strings & Languages
- 0
- Always equal to 0 ✓ Correct answer
- Always equal to 1
- Sometimes 0 and sometimes 1
-
Alphabet S = {a, bc, cc} has ______ number of letters.
Topic: Alphabets, Strings & Languages
- One
- Two
- Three ✓ Correct answer
- Four
-
Let S = {aa, bb} be a set of strings. Then S* will have the string:
Topic: Alphabets, Strings & Languages
- Λ ✓ Correct answer
- abba
- aabbbaa
- bbaab
-
If S = {aa, bb}, then S* will NOT contain:
Topic: Alphabets, Strings & Languages
- aabbaa
- bbaabbbb
- aaabbb ✓ Correct answer
- aabbbb
-
If S = {ab, bb}, then S* will NOT contain:
Topic: Alphabets, Strings & Languages
- abbbab
- bbba ✓ Correct answer
- bbbbab
- ababbb
-
If S = {baa, ab}, then S* will NOT contain:
Topic: Alphabets, Strings & Languages
- abbaab ✓ Correct answer
- abab
- baabaa
- abbaa
-
If S = {x}, then S* will be:
Topic: Alphabets, Strings & Languages
- {x, xxx, xxxx, xxxxx, …}
- {Λ, x, xx, xxx, xxxx, …} ✓ Correct answer
- {Λ, xxx, xxxxx, xxxxxxx, …}
- {xx, xxxx, xxxxxx, xxxxxxxx, …}
-
The length of the string 'AbBAbcd' defined over Σ = {Ab, B, c, d} is:
Topic: Alphabets, Strings & Languages
- Three
- Four
- Five ✓ Correct answer
- Six
-
Let L = {ab, aa, baa}. Which of the following strings are in L*? (1) abaabaaabaa (2) aaaabaaaa (3) baaaaabaaaab (4) baaaaabaa
Topic: Alphabets, Strings & Languages
- 1, 2 and 3
- 2, 3 and 4
- 1, 2 and 4 ✓ Correct answer
- 1, 3 and 4
-
Languages generated by Kleene star are always:
Topic: Alphabets, Strings & Languages
- Finite
- Infinite ✓ Correct answer
- Sometimes finite and sometimes infinite
- None of the given
-
The length of the strings generated by an infinite language is:
Topic: Alphabets, Strings & Languages
- Finite ✓ Correct answer
- Infinite
- Sometimes finite and sometimes infinite
- None of the given
-
Which of the following statements is true?
Topic: Alphabets, Strings & Languages
- All strings are words
- All words are strings ✓ Correct answer
- Sometimes strings are words and sometimes words are strings
- None of the given
-
The language of words for which Rev(s) = s (each word is the reverse of itself) is called:
Topic: Alphabets, Strings & Languages
- FACTORIAL
- EQUAL
- PALINDROME ✓ Correct answer
- DOUBLE
-
Which of the following is NOT a word of the language EQUAL (words with equal number of a's and b's)?
Topic: Alphabets, Strings & Languages
- aaabbb
- abbbabaa
- bbbaaa
- abababa ✓ Correct answer
-
EVEN-EVEN language is also named as:
Topic: Alphabets, Strings & Languages
- EVEN-EVEN ✓ Correct answer
- DOUBLE
- PALINDROME
- FACTORIAL
-
The length of the words of the EVEN-EVEN language is:
Topic: Alphabets, Strings & Languages
- Even ✓ Correct answer
- Odd
- Both even and odd
- None of the given
-
The recursive method (recursive definition) for defining a language has ______ steps.
Topic: Alphabets, Strings & Languages
- One
- Two
- Three ✓ Correct answer
- Four
-
Decomposing a string into its valid units is referred as:
Topic: Alphabets, Strings & Languages
- Decomposing
- Dividing
- Tokenizing ✓ Correct answer
- Splitting
-
What does 'automata' mean?
Topic: Alphabets, Strings & Languages
- Something that works automatically ✓ Correct answer
- Something that can work on certain conditions
- Something that works for a finite time
- None of the given
-
'Automata' is the plural of:
Topic: Alphabets, Strings & Languages
- Automate
- Automaton ✓ Correct answer
- Automation
- Automatic
-
According to the theory of automata, there are ______ types of languages.
Topic: Alphabets, Strings & Languages
- One
- Two ✓ Correct answer
- Three
- Four
-
Let r1 = (aa + bb) and r2 = (a + b) be two regular expressions. The language (aa + bb)* is generated by:
Topic: Regular Expressions
- (r1)* ✓ Correct answer
- (r2)*
- (r1 + r2)*
- (r1 + r2)
-
Let r1 = (aa + bb) and r2 = (a + b) be two regular expressions. The language (aa + bb)(a + b) is generated by:
Topic: Regular Expressions
- (r1)*
- (r2)(r1)
- (r1)(r2) ✓ Correct answer
- (r2)*
-
The expression a*b* = (ab)* is:
Topic: Regular Expressions
- True
- False ✓ Correct answer
- Can't be assumed
- None of the given
-
One language can be expressed by more than one regular expression.
Topic: Regular Expressions
- True ✓ Correct answer
- False
- Sometimes true and sometimes false
- None of the given
-
If a language can be expressed by a regular expression, then it can also be expressed through a TG.
Topic: Regular Expressions
- True ✓ Correct answer
- False
- Sometimes true and sometimes false
- None of the given
-
If a language can be expressed by a TG, then there exists a regular expression for it.
Topic: Regular Expressions
- True ✓ Correct answer
- False
- Sometimes true and sometimes false
- None of the given
-
(a + b)*b is a regular expression for the set of words that do not end in a.
Topic: Regular Expressions
- True ✓ Correct answer
- False
- Sometimes true and sometimes false
- None of the given
-
a(a + b)*a + b(a + b)*b is a regular expression for the set of words that begin and end with the same letter.
Topic: Regular Expressions
- True ✓ Correct answer
- False
- Sometimes true and sometimes false
- None of the given
-
(a + b)*a(a + b)*b(a + b)* is a regular expression for the language having at least one a and at least one b.
Topic: Regular Expressions
- True ✓ Correct answer
- False
- Sometimes true and sometimes false
- None of the given
-
a(a + b)* is a regular expression for the language having at least one a.
Topic: Regular Expressions
- True
- False ✓ Correct answer
- Sometimes true and sometimes false
- None of the given
-
(a + b)*a is a regular expression for the set of words that do not end in b.
Topic: Regular Expressions
- True ✓ Correct answer
- False
- Sometimes true and sometimes false
- None of the given
-
The regular expression for the language of words starting with the letter a is:
Topic: Regular Expressions
- (a + b)*a
- a(a + b)* ✓ Correct answer
- (a + b)*
- a(a + b)
-
The regular expression [(a + b)(a + b)]* can generate the string:
Topic: Regular Expressions
- aaabbbbccc
- bbbbbb ✓ Correct answer
- aabbcc
- aaabcbbcbacc
-
The regular expression [(a + b)(a + b)]* can NOT generate the string:
Topic: Regular Expressions
- abbaabab
- abbbaa
- bbbbbb
- abbbaaaaa ✓ Correct answer
-
Consider the regular expression a(a + b)b*. All of the following words are accepted EXCEPT:
Topic: Regular Expressions
- aab
- abb
- aa
- aba ✓ Correct answer
-
Let r1 and r2 be regular expressions. Which of the following is NOT a regular expression?
Topic: Regular Expressions
- r1 = r2
- r1r2
- r1*
- r1 – r2 ✓ Correct answer
-
If r1 and r2 are regular expressions, then (r1 * r2) is ______.
Topic: Regular Expressions
- FA
- GTG
- RE ✓ Correct answer
- TG
-
If two regular expressions generate the same language, then these REs are called:
Topic: Regular Expressions
- Same RE
- Equal RE
- Similar RE
- Equivalent RE ✓ Correct answer
-
PALINDROME can be defined by more than one regular language.
Topic: Regular Expressions
- True
- False ✓ Correct answer
- Sometimes true and sometimes false
- None of the given
-
The language of strings that do not end with 'a' actually ends with:
Topic: Regular Expressions
- a
- b
- Λ
- b and Λ ✓ Correct answer
-
Which of the following is FALSE about the PALINDROME language?
Topic: Regular Expressions
- Every word is the reverse of itself
- It is an infinite language
- An FA can be built for it ✓ Correct answer
- None of the given
-
A finite automaton (FA) is a collection of:
Topic: Finite Automata
- Finite states, finite transitions and finite input letters ✓ Correct answer
- Finite states only
- Finite transitions only
- Finite input letters only
-
FA is also called:
Topic: Finite Automata
- TG
- GTG
- NFA
- DFA ✓ Correct answer
-
Every FA should be:
Topic: Finite Automata
- Simple
- Accurate
- Non-deterministic
- Deterministic ✓ Correct answer
-
In ______, there must be transitions for all the alphabets over which a language is defined.
Topic: Finite Automata
- FA ✓ Correct answer
- GTG
- TG
- NFA
-
There is no compulsion that each state must have an outgoing transition for every input letter in:
Topic: Finite Automata
- FA
- TG ✓ Correct answer
- Both FA and TG
- Transition table
-
Which of the following diagrams is very rigid to express any language?
Topic: Finite Automata
- FA ✓ Correct answer
- NFA
- TG
- GTG
-
Which of the following diagrams expresses languages more simply?
Topic: Finite Automata
- FA
- NFA
- TG
- GTG ✓ Correct answer
-
An FA has 3 states and an alphabet of 2 letters. The total number of transitions in this FA is:
Topic: Finite Automata
- Two
- Four
- Six ✓ Correct answer
- Eight
-
An FA has n states and m letters. The total number of transitions in this FA is:
Topic: Finite Automata
- (n) + (m)
- (m)(n) ✓ Correct answer
- (m) – (n)
- (n) – (m)
-
In an FA, a final state is represented by the ______ sign.
Topic: Finite Automata
- + ✓ Correct answer
- –
- =
- *
-
While drawing an FA using the tree structure (incidence table method), a final state is represented by:
Topic: Finite Automata
- Star (*)
- Minus sign (–)
- Plus sign (+)
- Double circle ✓ Correct answer
-
The state from which there is no way to leave after entry is called:
Topic: Finite Automata
- Dead state
- Waste basket
- Davey John locker
- All of the given ✓ Correct answer
-
The closure (FA*) of an FA always accepts the ______ string.
Topic: Finite Automata
- Null (Λ) ✓ Correct answer
- Odd length
- Even length
- Every
-
If FA1 corresponds to r* (closure of an FA), then FA1 must accept the ______ string.
Topic: Finite Automata
- Every
- Null (Λ) ✓ Correct answer
- Odd length
- Even length
-
If FA1 corresponds to (a + b)*, then FA1 must accept ______ strings.
Topic: Finite Automata
- No
- Odd length
- Every ✓ Correct answer
- Even length
-
An FA for the EVEN language shows that the null string is accepted when:
Topic: Finite Automata
- The initial state is final as well ✓ Correct answer
- The initial state is not final
- There is no final state
- None of the given
-
In an FA, when there is no path starting from the initial state and ending in a final state, then that FA:
Topic: Finite Automata
- Accepts the null string
- Accepts all strings
- Accepts all non-empty strings
- Does not accept any string ✓ Correct answer
-
The minimum number of states in an FA accepting the language of all strings over any alphabet is:
Topic: Finite Automata
- 1 ✓ Correct answer
- 2
- 3
- 4
-
An FA for the regular expression (a + b)* can be built with a minimum of ______ states.
Topic: Finite Automata
- 1 ✓ Correct answer
- 2
- 3
- 4
-
When the ODD language is expressed by an FA, it will have a minimum of ______ states.
Topic: Finite Automata
- One
- Two ✓ Correct answer
- Three
- Four
-
A finite language is accepted by an FA having n states. The maximum number of letters in each word accepted by this FA is:
Topic: Finite Automata
- n
- n – 1 ✓ Correct answer
- n + 1
- 2n
-
There can be more than ______ FA for a particular language, but for a ______ FA there is only one language.
Topic: Finite Automata
- One, one ✓ Correct answer
- One, two
- Two, three
- Two, one
-
Two FAs are said to be equivalent if they:
Topic: Finite Automata
- Accept the null string
- Accept the same language ✓ Correct answer
- Accept different languages
- None of the given
-
Every ______ is a ______ as well, but the converse may not be true.
Topic: Transition Graphs & Generalized TG
- TG, FA
- FA, TG ✓ Correct answer
- TG, GTG
- FA, GTG
-
Every language that can be expressed by an FA can also be expressed by a TG.
Topic: Transition Graphs & Generalized TG
- True ✓ Correct answer
- False
- Sometimes true and sometimes false
- None of the given
-
In a TG, there may be more than one path for a certain string.
Topic: Transition Graphs & Generalized TG
- True ✓ Correct answer
- False
- Sometimes true and sometimes false
- None of the given
-
In a TG, there may be no path for a certain string.
Topic: Transition Graphs & Generalized TG
- True ✓ Correct answer
- False
- Sometimes true and sometimes false
- None of the given
-
A TG can have more than one initial state.
Topic: Transition Graphs & Generalized TG
- True ✓ Correct answer
- False
- Sometimes true and sometimes false
- None of the given
-
A TG may have a transition for the null string.
Topic: Transition Graphs & Generalized TG
- True ✓ Correct answer
- False
- Sometimes true and sometimes false
- None of the given
-
A TG is always deterministic.
Topic: Transition Graphs & Generalized TG
- True
- False ✓ Correct answer
- Sometimes true and sometimes false
- None of the given
-
A GTG can have ______ final state(s).
Topic: Transition Graphs & Generalized TG
- Zero
- One
- More than one
- All of the given ✓ Correct answer
-
While finding the RE corresponding to a GTG, the incoming transitions at a state are reduced (combined) using the ______ sign.
Topic: Transition Graphs & Generalized TG
- + ✓ Correct answer
- –
- ×
- ÷
-
A GTG can have ______ initial state(s).
Topic: Transition Graphs & Generalized TG
- Zero
- One
- More than one
- One or more than one ✓ Correct answer
-
In a GTG, there may be no path for a certain string.
Topic: Transition Graphs & Generalized TG
- True ✓ Correct answer
- False
- Sometimes true and sometimes false
- None of the given
-
Which of the following statements is true about a GTG?
Topic: Transition Graphs & Generalized TG
- Transitions are based on input letters
- Transitions are based on specified substrings
- Transitions are based on regular expressions ✓ Correct answer
- Transitions are based on the alphabet set
-
Null strings can be specified on the edges in:
Topic: Transition Graphs & Generalized TG
- FA
- NFA
- Mealy machine
- TG ✓ Correct answer
-
While finding the RE corresponding to a TG, we connect the new start state with the old start state by a ______ transition.
Topic: Transition Graphs & Generalized TG
- Different
- Null (Λ) ✓ Correct answer
- Combination
- None of the given
-
While finding the RE corresponding to a TG, if the TG has more than one start state, then we:
Topic: Transition Graphs & Generalized TG
- Introduce a new start state ✓ Correct answer
- Remove all start states
- Make all states final
- None of the given
-
Kleene's Theorem Part I expresses the relationship between:
Topic: Kleene's Theorem & FA Equivalence
- FA and TG ✓ Correct answer
- TG and RE
- RE and FA
- FA and RE
-
Kleene's Theorem Part II expresses the relationship between:
Topic: Kleene's Theorem & FA Equivalence
- FA and TG
- TG and RE ✓ Correct answer
- RE and FA
- FA and RE
-
Kleene's Theorem Part III expresses the relationship between:
Topic: Kleene's Theorem & FA Equivalence
- FA and TG
- TG and RE
- RE and FA ✓ Correct answer
- FA and RE
-
In proving Kleene's Theorem Part II, introducing a new start state (in case of multiple start states) is:
Topic: Kleene's Theorem & FA Equivalence
- Step 1 ✓ Correct answer
- Step 2
- Step 3
- Step 4
-
In proving Kleene's Theorem Part II, the step that replaces multiple incoming transition edges with a single one is:
Topic: Kleene's Theorem & FA Equivalence
- Step 1
- Step 2 ✓ Correct answer
- Step 3
- Step 4
-
In proving Kleene's Theorem Part II, the bypass and state elimination step is:
Topic: Kleene's Theorem & FA Equivalence
- Step 1
- Step 2
- Step 3 ✓ Correct answer
- Step 4
-
______ can also help in proving Kleene's Theorem Part III.
Topic: Kleene's Theorem & FA Equivalence
- NFA ✓ Correct answer
- PDA
- Moore machine
- Mealy machine
-
According to Kleene's Theorem Part III, a language that can be expressed by a regular expression can be accepted by:
Topic: Kleene's Theorem & FA Equivalence
- TG
- FA
- TG and FA ✓ Correct answer
- None of the given
-
Let FA3 = FA1 + FA2 (union). While drawing FA3, a state will be declared final if:
Topic: Kleene's Theorem & FA Equivalence
- The states of both FAs are final
- At least one of the corresponding states is final ✓ Correct answer
- No corresponding state is final
- None of the given
-
Let FA3 = FA1 + FA2 (union). FA3 accepts exactly those strings that are:
Topic: Kleene's Theorem & FA Equivalence
- Accepted by FA1 only
- Accepted by FA2 only
- Accepted by FA1 and/or FA2 ✓ Correct answer
- None of the given
-
Let FA3 be an FA corresponding to FA1FA2 (concatenation). The initial state of FA3 must correspond to the initial state of:
Topic: Kleene's Theorem & FA Equivalence
- FA1 only ✓ Correct answer
- FA2 only
- FA1 or FA2
- FA1 and FA2
-
Let FA3 correspond to FA1FA2. 'At least one final state of FA3 consists of a final state of FA1 and the initial state of FA2.' This statement is:
Topic: Kleene's Theorem & FA Equivalence
- True
- False ✓ Correct answer
- Can't be decided
- None of the given
-
FA1 accepts many strings and FA2 accepts none. Then FA1 + FA2 will be equivalent to:
Topic: Kleene's Theorem & FA Equivalence
- FA1 ✓ Correct answer
- FA2
- FA2 – FA1
- (FA2)*
-
FA1 accepts no string and FA2 accepts many strings. Then FA1 + FA2 will be equivalent to:
Topic: Kleene's Theorem & FA Equivalence
- FA1
- FA2 ✓ Correct answer
- May be FA1 or FA2
- None of the given
-
Let L1 be accepted by an FA with 2 states and L2 by an FA with 2 states. The FA accepting L1 ∩ L2 will have ______ states.
Topic: Kleene's Theorem & FA Equivalence
- 2
- 3
- 4 ✓ Correct answer
- 6
-
Considering FA1 and FA2 having 2 states each, FA1 + FA2 can have a maximum of ______ number of states.
Topic: Kleene's Theorem & FA Equivalence
- 2
- 3
- More than 3 ✓ Correct answer
- None of the given options
-
Let L1 and L2 be languages with regular expressions r1 and r2 respectively. The language corresponding to r1 + r2 is:
Topic: Kleene's Theorem & FA Equivalence
- Regular ✓ Correct answer
- Non-regular
- Can't be decided
- None of the given
-
Two machines are said to be equivalent if they print the same output for different input strings.
Topic: Kleene's Theorem & FA Equivalence
- True
- False ✓ Correct answer
- Can't be decided
- None of the given
-
One language can be expressed by more than one NFA.
Topic: NFA & NFA-Λ
- True ✓ Correct answer
- False
- Sometimes true and sometimes false
- None of the given
-
An NFA may have more than one transition for a certain letter at a state, or no transition at all.
Topic: NFA & NFA-Λ
- True ✓ Correct answer
- False
- Sometimes true and sometimes false
- None of the given
-
There may be more than one transition for a certain letter on a state in:
Topic: NFA & NFA-Λ
- Finite Automata
- Non-Deterministic Finite Automata ✓ Correct answer
- Transition Table
- Moore Machine
-
In an NFA having no transition at a certain state, an FA can be built by introducing:
Topic: NFA & NFA-Λ
- Empty state ✓ Correct answer
- Combination of states
- Initial state
- Final state
-
An FA corresponding to an NFA can be built by introducing an empty state for a letter having:
Topic: NFA & NFA-Λ
- No transition at a certain state ✓ Correct answer
- One transition at a certain state
- Two transitions at a certain state
- More than two transitions at a certain state
-
An FA corresponding to an NFA can be built by introducing a combination state for a letter having:
Topic: NFA & NFA-Λ
- More than one transition at a certain state ✓ Correct answer
- No transition at a certain state
- Exactly one transition at a certain state
- None of the given
-
A string is accepted by an NFA if there exists ______ successful path for it.
Topic: NFA & NFA-Λ
- At least one ✓ Correct answer
- At most one
- At least two
- None of the given
-
An NFA corresponding to the union of two FAs is built by introducing a new start state and connecting it to:
Topic: NFA & NFA-Λ
- The initial states of both FAs ✓ Correct answer
- The initial state of FA2 only
- The final state of FA2 only
- The final states of both FAs
-
An NFA corresponding to the union of FAs is built by introducing a new start state and connecting it to the states originally connected to the old start state with the ______ transitions as the old start state.
Topic: NFA & NFA-Λ
- Concatenated
- Same ✓ Correct answer
- Different
- Union of
-
Which of the following states is introduced while developing an NFA for the closure of an FA?
Topic: NFA & NFA-Λ
- An initial state which should be final as well ✓ Correct answer
- Simply an initial state
- A final state
- An initial state with a loop
-
An NFA with null string (NFA-Λ) has ______ initial state(s).
Topic: NFA & NFA-Λ
- One ✓ Correct answer
- Two
- Many
- One or many
-
If in an NFA, Λ (null string) is allowed to be a label of an edge, then that NFA is called:
Topic: NFA & NFA-Λ
- Will not remain NFA
- NFA-Λ
- NFA with null string ✓ Correct answer
- Either 'NFA with null string' or 'NFA-Λ'
-
Which of the following is true about an NFA with null string?
Topic: NFA & NFA-Λ
- Transition of null string is allowed at any stage ✓ Correct answer
- Transition of null string is never allowed
- It has no initial state
- None of the given
-
______ can be considered to be an intermediate structure between a Finite Automaton and a Transition Graph.
Topic: NFA & NFA-Λ
- RE
- GTG
- NFA ✓ Correct answer
- None of the given
-
Every NFA can be considered to be a ______ as well.
Topic: NFA & NFA-Λ
- TG ✓ Correct answer
- FA
- RE
- GTG
-
FA and ______ are the same except that ______ has a unique symbol (transition) for each letter at each state.
Topic: NFA & NFA-Λ
- FA, TG
- NFA, TG
- GTG, NFA
- NFA, FA ✓ Correct answer
-
Which of the following is free of non-determinism?
Topic: NFA & NFA-Λ
- FA ✓ Correct answer
- NFA
- TG
- GTG
-
We cannot construct an NFA for the language of ______ defined over the alphabet {a, b}.
Topic: NFA & NFA-Λ
- Even even
- Odd
- Palindromes ✓ Correct answer
- Integers
-
A Moore machine is an application of:
Topic: Moore & Mealy Machines
- None of the mentioned
- Finite automata without input
- Non-finite automata with output
- Finite automata with output ✓ Correct answer
-
There is no question of accepting any language in:
Topic: Moore & Mealy Machines
- FA
- Moore machine ✓ Correct answer
- Mealy machine
- Both Moore and Mealy machine
-
A Moore machine can have ______ final states.
Topic: Moore & Mealy Machines
- One
- More than one but finite
- More than one but infinite
- Zero ✓ Correct answer
-
A Mealy machine can have ______ final states.
Topic: Moore & Mealy Machines
- One
- More than one but finite
- More than one but infinite
- Zero ✓ Correct answer
-
Which machine has only one initial state and no final state?
Topic: Moore & Mealy Machines
- Moore machine ✓ Correct answer
- Finite state machine
- Deterministic finite state machine
- Non-deterministic finite state machine
-
In a Mealy machine, the output depends on:
Topic: Moore & Mealy Machines
- Only present state
- Present state and present input ✓ Correct answer
- Nothing
- Type of input
-
In a Moore machine, the output is produced over the change of:
Topic: Moore & Mealy Machines
- Transition
- Transition and states
- States ✓ Correct answer
- None of the given
-
Which machine is represented as a pictorial representation with states and directed edges labeled by an input letter along with an output character?
Topic: Moore & Mealy Machines
- Moore machine
- Mealy machine ✓ Correct answer
- Finite state machine
- Deterministic finite state machine
-
In a Moore machine, if the length of the input string is 9, then the length of the output string will be:
Topic: Moore & Mealy Machines
- 7
- 8
- 9
- 10 ✓ Correct answer
-
For a given Moore machine, the input string is '101010'. The output string would be of length:
Topic: Moore & Mealy Machines
- |Input|
- |Input| – 1
- Cannot be predicted
- Length of input string + 1 ✓ Correct answer
-
The ______ machine helps in building a machine that can perform the addition of binary numbers.
Topic: Moore & Mealy Machines
- Incrementing ✓ Correct answer
- Complementing
- Both incrementing and complementing
- None of the given
-
A Mealy machine used to increase the output string in magnitude by 1 is called:
Topic: Moore & Mealy Machines
- Converting machine
- Incrementing machine ✓ Correct answer
- Complementing machine
- Decrementing machine
-
Subtraction of binary numbers is possible through the:
Topic: Moore & Mealy Machines
- Both complementing and incrementing machines
- Incrementing machine
- Complementing machine ✓ Correct answer
- Converting machine
-
Regular languages are closed under:
Topic: Regular Languages & Closure Properties
- Union, Intersection and Complementation
- Union, Concatenation and Closure ✓ Correct answer
- Concatenation and Complementation only
- None of the given
-
If L1' and L2' are regular languages, then L1 and L2 will be:
Topic: Regular Languages & Closure Properties
- Regular ✓ Correct answer
- Non-regular
- May be regular
- None of the given
-
If L1 and L2 are regular languages, then L1 ∩ (L2 ∪ L1) will be:
Topic: Regular Languages & Closure Properties
- Regular ✓ Correct answer
- Non-regular
- May be regular
- None of the given
-
If L1 and L2' are regular languages, then L1 ∩ (L2' ∪ L1')' will be:
Topic: Regular Languages & Closure Properties
- Non regular
- None of the mentioned
- May be regular
- Regular ✓ Correct answer
-
If A and B are regular languages, then !(A ∪ B) is:
Topic: Regular Languages & Closure Properties
- Regular ✓ Correct answer
- Non-regular
- May be regular
- None of the given
-
If A and B are regular languages, then !(A' ∪ B') is:
Topic: Regular Languages & Closure Properties
- Regular ✓ Correct answer
- Non-regular
- May be regular
- None of the mentioned
-
For every three regular expressions R, S and T, the languages denoted by R(S ∪ T) and (RS) ∪ (RT) are ______.
Topic: Regular Languages & Closure Properties
- Same ✓ Correct answer
- Different
- R(S ∪ T) is greater
- None of the given options
-
Let R1 = {xx + yy} and R2 = {x + y} be two regular expressions. The regular expression for the union of their languages is:
Topic: Regular Languages & Closure Properties
- (xx + yy)(x + y)
- (xx) + (yy + x + y)
- (xx + yy) + (x + y) ✓ Correct answer
- (x + y)(xx + yy)
-
Every finite language can be expressed by an FA.
Topic: Regular Languages & Closure Properties
- True ✓ Correct answer
- False
- Sometimes true and sometimes false
- None of the given
-
'Every infinite language is regular.' This statement is:
Topic: Regular Languages & Closure Properties
- True
- False ✓ Correct answer
- Sometimes true and sometimes false
- None of the given
-
The language {a, ab, aba, bab} is:
Topic: Regular Languages & Closure Properties
- Irregular
- Normal
- Regular ✓ Correct answer
- All of the given
-
A regular language can be:
Topic: Regular Languages & Closure Properties
- Irregular
- Infinite ✓ Correct answer
- Non-deterministic
- None of the given
-
The language of all strings over {x, y} ending with the same letter will have the maximum length of:
Topic: Regular Languages & Closure Properties
- Finite
- None
- Infinite ✓ Correct answer
- Equal
-
The minimum length of a string (except the null string) of the language of strings that start and end with the same letter is:
Topic: Regular Languages & Closure Properties
- 1 ✓ Correct answer
- 2
- 3
- All of the given
-
The minimum length of a string (except the null string) of the language of strings that start and end with a different letter is:
Topic: Regular Languages & Closure Properties
- 1
- 2 ✓ Correct answer
- 3
- 4
-
If an alphabet has "2" number of letters, then total number of strings of length "3" will be ________
Topic: Alphabets, Strings & Languages
- 5
- 9
- 8 ✓ Correct answer
- 6
-
Reverse of string "YxwzYz" defined over Σ ={w,x,Y,z} is __________
Topic: Alphabets, Strings & Languages
- zYzwxY ✓ Correct answer
- zYzxwY
- zYwzxY
- zYzwYx
-
The formal language is also known as _______.
Topic: Alphabets, Strings & Languages
- Syntactic language ✓ Correct answer
- Semantic language
- informal language
- none of these
-
All possible combinations of strings of a language including null string is referred as:
Topic: Alphabets, Strings & Languages
- Concatenation of a language with itself
- Kleene star closure of a language ✓ Correct answer
- Multiplication of language with itself
- Addition of a language with itself
-
If S = {a}, then S+ will be ___________
Topic: Alphabets, Strings & Languages
- {a, aaa, aaaa, aaaaa,…}
- {a, aa, aaa, aaaa,…} ✓ Correct answer
- {a, aaa, aaaaa, aaaaaaa,…}
- {aa, aaaa, aaaaaa, aaaaaaaa,…}
-
Given S, Kleene star closure is denoted by
Topic: Alphabets, Strings & Languages
- S* ✓ Correct answer
- S+
- S-
- None of these
-
Which of the following is NOT true about the term alphabet?
Topic: Alphabets, Strings & Languages
- It is usually denoted by Greek letter sigma
- It can be an empty set ✓ Correct answer
- Strings are generated by concatenating its elements
- It is a finite set of symbols
-
Auto Meta mean
Topic: Alphabets, Strings & Languages
- Manual work
- Automatic work ✓ Correct answer
- Both
- None of these
-
Which of the following does not contribute while finding out the length of strings?
Topic: Alphabets, Strings & Languages
- Λ ✓ Correct answer
- a
- b
- a+b
-
What statement is true?
Topic: Alphabets, Strings & Languages
- A letter is always a combination of symbols
- A letter may consist of one symbol ✓ Correct answer
- There is no difference between symbol and letter
- Letters and symbols are the same thing
-
Which statement is true?
Topic: Alphabets, Strings & Languages
- All words are strings ✓ Correct answer
- All strings are words
- Both are always same
- None of these
-
Length of a null string is supposed to be 1.
Topic: Alphabets, Strings & Languages
- True
- False ✓ Correct answer
-
There is no difference between Word and String.
Topic: Alphabets, Strings & Languages
- True
- False ✓ Correct answer
-
If Σ = {aA, b}, then length(aAbaAaAb) = 5.
Topic: Alphabets, Strings & Languages
- True ✓ Correct answer
- False
-
Statement if ∑ is finite then ∑* is finite is ____
Topic: Alphabets, Strings & Languages
- True
- False ✓ Correct answer
- ∑ and ∑* has no relationship
- None of the above
-
The reverse of the string sbfsbb over {sb, f, b }
Topic: Alphabets, Strings & Languages
- bsfbsb
- bsbfsb ✓ Correct answer
- bbsfbs
- sbbfsb
-
The grammatical rules which involve meaning of words are called
Topic: Alphabets, Strings & Languages
- alphabets
- strings
- syntactics
- semantics ✓ Correct answer
-
Keeping in view the discussion by Martin, how many states are required to recognize the language of all strings of length 2 or more, defined over Σ = {a, b}, with 'b' being the second letter from the right?
Topic: Finite Automata
- 6
- 7 ✓ Correct answer
- 8
- 9
-
Finite Automaton (FA) has:
Topic: Finite Automata
- Zero or more final states ✓ Correct answer
- Exactly one final state
- Not more than two final states
- Exactly two final states
-
FA of EVEN-EVEN language shows that it accepts the null string by declaring the _________ as a __________as well
Topic: Finite Automata
- Initial state, final state ✓ Correct answer
- Initial sate, null state
- Final state, initial state
- Final state, null state
-
If Σ= {a, b, c, d}. How many transitions will be there on each state of a finite automaton for any language defined over Σ?
Topic: Finite Automata
- 2
- 4 ✓ Correct answer
- 1
- 3
-
How many states of a finite automaton will be final for accepting L = {Λ, b, bb, bbb}?
Topic: Finite Automata
- 3
- 1
- 4 ✓ Correct answer
- 2
-
One FA has 3 states and 2 letters in the alphabet. Then FA will have number of transitions in the diagram
Topic: Finite Automata
- 4
- 5
- 7
- 6 ✓ Correct answer
-
Let FA1 has x number of states and FA2 has y number of states. Now FA1+FA2 can have maximum _______________ number of states
Topic: Finite Automata
- x+y
- x-y
- x/y
- None ✓ Correct answer
-
If we have a finite language and the number of states in the FA is n then the maximum number of letters in the each word of the language that will be accepted by the given FA will be:
Topic: Finite Automata
- N
- n-1 ✓ Correct answer
- n+1
- 1
-
How many states of a finite automaton will be final for accepting the only string 'abb', if Σ= {a, b}?
Topic: Finite Automata
- 1 ✓ Correct answer
- 2
- 3
- 4
-
Keep in view the language of all strings ending with 'a' defined over Σ = {a, b, c, d}. For which input letter, we will take a loop on the final state of its transition diagram?
Topic: Finite Automata
- a ✓ Correct answer
- b
- c
- d
-
Finite Automaton (FA) must have number of states while a language has words
Topic: Finite Automata
- Infinite, finite
- Finite, finite
- Finite, infinite ✓ Correct answer
- Infinite, infinite
-
In FA, initial state can be represented by:
Topic: Finite Automata
- Drawing an arrow head before that state ✓ Correct answer
- Drawing a circle in that state
- leave the state empty
- Drawing '+' sign in that state
-
In case of finite automaton there ________ be a transition on each _______ for every letter of the alphabet set
Topic: Finite Automata
- Must, state ✓ Correct answer
- May be, state
- Often, edge
- Must, edge
-
Consider FA1 and FA2 are two finite automata representing two different languages. Now FA3 which is the sum of FA1 and FA2 will accept all strings accepted by:
Topic: Finite Automata
- FA1 and FA2
- FA1 or FA2 ✓ Correct answer
- FA1 but not FA2
- FA2 but not FA1
-
If there is no final state in two FAs, then their ______ will also have no ______ state.
Topic: Finite Automata
- union, final ✓ Correct answer
- final, union
- union, initial
- initial, union
-
Which of the following string belongs to the language of the regular expression (aa*b)*?
Topic: Regular Expressions
- baabab
- aabaab ✓ Correct answer
- aaaaaa
- abbbaa
-
Let's we have two regular expressions R1 = (xx + yy) and R2 = (x + y). Which one of the following is the correct regular expression for the union of R1 and R2?
Topic: Regular Expressions
- (xx + yy)(x + y)
- (xx + yy) + (x + y)*
- (xx + yy) + (x + y) ✓ Correct answer
- ((xx + yy) + (x + y))*
-
Choose the correct word produced by RE (a + b)* ab
Topic: Regular Expressions
- abb
- abab ✓ Correct answer
- bbbb
- aaaa
-
Choose the correct word produced by RE (a + b)* (aa+bb)
Topic: Regular Expressions
- abab
- babab
- aaaa ✓ Correct answer
- ab
-
In regular expressions, the operator '*' stands for
Topic: Regular Expressions
- Concatenation
- Iteration ✓ Correct answer
- Selection
- Addition
-
[(a + b)(a + b)]*, given RE cannot generate the string ____
Topic: Regular Expressions
- abbaabab
- abbbaa
- bbbbbb
- abbbaaaaa ✓ Correct answer
-
The aa(a+b)*bb is the RE of the language defined over Σ={a,b}.The language must ____________
Topic: Regular Expressions
- have at least two ab
- have at least one aa and one bb ✓ Correct answer
- have at least one abbb
- have at least one ba
-
If r1 is a regular expression then (r1)* is
Topic: Regular Expressions
- A generalized transition graph
- A non-deterministic finite automaton
- A finite automaton
- Also, a regular expression ✓ Correct answer
-
Which one of the following is the RE for the language defined over Σ= {a, b} having all the words starting with a?
Topic: Regular Expressions
- (a + b)*
- aa(a + b)+
- a(a + b)* ✓ Correct answer
- a*(a + b)
-
If S = {a, b} then which of the following RE will generate all possible strings?
Topic: Regular Expressions
- a* + b*
- (ab)*
- (a + b)* ✓ Correct answer
- (ab + ba)*
-
Which of the following form correctly expressed the regular expression RR*?
Topic: Regular Expressions
- R+ ✓ Correct answer
- R-
- R*
- R+R-
-
a*b* = (ab)* this expression is __________
Topic: Regular Expressions
- True
- False ✓ Correct answer
- Can't be assumed
- None of these
-
a(a+b)*a+b(a+b)*b is RE for the language defined over S={a,b} having words beginning and ending with same letters
Topic: Regular Expressions
- True ✓ Correct answer
- False
- Such a language is not regular
- None of these
-
a (a + b)* is the RE of language defined over S = {a, b} having at least one a
Topic: Regular Expressions
- True
- False ✓ Correct answer
- Such a language does not exist
- None of the given options
-
Which one of the following word is not accepted by the given regular expression? (a+b)*(aaa+bbb)(a+b)*
Topic: Regular Expressions
- ababaaaab
- bababbbba
- baabaabba ✓ Correct answer
- abbaaabba
-
Which of the following word is not accepted by the regular expressions (a + b)*(aa)(a+b)*?
Topic: Regular Expressions
- aaaa
- baaa
- aa
- bab ✓ Correct answer
-
Which of the following steps replaces multiple incoming transition edges with a single one proving Kleene's theorem part II?
Topic: Kleene's Theorem & FA Equivalence
- Step 1
- Step 2
- Step 3 ✓ Correct answer
- Step 4
-
Which of the following is the bypass and state elimination step in the context of Kleene's theorem part II proof?
Topic: Kleene's Theorem & FA Equivalence
- 1
- 2
- 3
- 4 ✓ Correct answer
-
In proving Kleene Theorem II, if a state has two incoming transition edges labelled by RE from the same state, then replace all the edges with a single transition edge labelled by ------- of corresponding RE
Topic: Kleene's Theorem & FA Equivalence
- Sum ✓ Correct answer
- Edge
- FA
- RE
-
Kleene Theorem III states that if the language can be expressed by RE then there exist -------- accepting the language
Topic: Kleene's Theorem & FA Equivalence
- FA ✓ Correct answer
- DFA
- NFA
- None
-
Introducing new start state in case of multiple start states is the step no. of proving Kleene's theorem part ||
Topic: Kleene's Theorem & FA Equivalence
- 1 ✓ Correct answer
- 2
- 3
- 4
-
In proving Kleene Theorem II, if three states are connected then middle state is removed by connecting first and third state and writing corresponding RE in:
Topic: Kleene's Theorem & FA Equivalence
- Sum
- Concatenation ✓ Correct answer
- Difference
- Asterisk
-
If a language is expressed through TG, then that language will have its RE
Topic: Kleene's Theorem & FA Equivalence
- True ✓ Correct answer
- False
- Depends on language
- None of these
-
There ____ a language for which only FA can be built but not the RE
Topic: Kleene's Theorem & FA Equivalence
- Is
- Cannot be ✓ Correct answer
- May be
- May not be
-
A transition graph is converted into a(n) _____ in order to obtain regular expression
Topic: Kleene's Theorem & FA Equivalence
- FA
- GTG ✓ Correct answer
- NFA
- NFA-Λ
-
Kleene's theorem states that
Topic: Kleene's Theorem & FA Equivalence
- All representations of a regular language are equivalent ✓ Correct answer
- All representations of a context free language are equivalent
- All representations of a recursive language are equivalent
- Finite automate are less powerful than pushdown automata
-
In the context of making an NFA for the concatenation of FA1 and FA2 (FA1 accepting the null string), the final states of the resulting NFA will be:
Topic: NFA & NFA-Λ
- initial states in both FAs
- FA2 having initial state only
- FA2 having final state only
- Final states in both FAs ✓ Correct answer
-
In order to make an NFA for the union of FA1 and FA2, the new initial state should be linked to:
Topic: NFA & NFA-Λ
- initial state of FA1 only
- initial and final states of FA1 and FA2 respectively
- final and initial states of FA1 and FA2 respectively
- Initial states of both FAs ✓ Correct answer
-
Every NFA can be considered to be a____ as well, but the converse may not be true
Topic: NFA & NFA-Λ
- TG ✓ Correct answer
- FA
- RE
- GTG
-
In NFA having multiple transitions at certain state, FA can be built by introducing:
Topic: NFA & NFA-Λ
- Empty state
- Combination of states ✓ Correct answer
- Initial state
- Final state
-
There ________ be a unique path for each valid string (called a word) in NFA
Topic: NFA & NFA-Λ
- May not ✓ Correct answer
- Must
- Should not
- Will
-
While developing NFA for the union of FA1 and FA2, there will be _____________ transition/transitions for both 'a' and 'b' on the new initial state
Topic: NFA & NFA-Λ
- Single
- Multiple ✓ Correct answer
- Only one
- Only three
-
In concatenation we accept the initial state of FA2 automatically after the final state of FA1 because of:
Topic: NFA & NFA-Λ
- initial state
- Final state
- We need just one final state
- We need just one initial state ✓ Correct answer
-
Every NFA can be converted to an FA.
Topic: NFA & NFA-Λ
- True ✓ Correct answer
- False
-
In GTG, if a state has more than one incoming transitions from a state. Then all those incoming transitions can be reduced to one transition using _____ sign
Topic: Transition Graphs & Generalized TG
- -
- + ✓ Correct answer
- *
- ()
-
In TG, there can be more than one _____________
Topic: Transition Graphs & Generalized TG
- start state only
- null state only
- start state and final state ✓ Correct answer
- final state only
-
Substrings as input letters can be specified on edges in:
Topic: Transition Graphs & Generalized TG
- NFA
- PDA
- FA
- TG ✓ Correct answer
-
In GTG, there can be more than one:
Topic: Transition Graphs & Generalized TG
- Start state
- Final state
- Start state and final state ✓ Correct answer
- Null state
-
GTG for the expression (aa+aba)* may have minimum number of states:
Topic: Transition Graphs & Generalized TG
- 1 ✓ Correct answer
- 2
- 3
- 4
-
In TG, the string is supposed to be _____________ if there is no path for a string from initial to final state
Topic: Transition Graphs & Generalized TG
- Accept null string
- Accept all strings
- Accept all non-empty strings
- Does not accept any string ✓ Correct answer
-
Edges are expressed with a regular expression in:
Topic: Transition Graphs & Generalized TG
- GTG ✓ Correct answer
- FA
- NFA
- TG
-
TG must have only one start state.
Topic: Transition Graphs & Generalized TG
- True
- False ✓ Correct answer
-
"One language can be expressed by ______ GTG"
Topic: Transition Graphs & Generalized TG
- Only one
- Only two
- Only three
- More than one ✓ Correct answer
-
If a TG has more than one start states, then we can make a single start state by introducing a new state and connecting it with all the previously existing start states by using _____
Topic: Transition Graphs & Generalized TG
- Any infinite string
- Single letter string
- Null string ✓ Correct answer
- Any finite string
-
The language having even numbers of a's and even number of b's defined over S={a,b} is called ______
Topic: Regular Languages & Closure Properties
- EVEN-EVEN ✓ Correct answer
- ODD-ODD
- PALINDROME
- FACTORIAL
-
If the intersection of two regular languages is regular then the complement of the intersection of these two languages is _____
Topic: Regular Languages & Closure Properties
- Regular ✓ Correct answer
- Irregular
- Irregular but finite
- Irregular but infinite
-
The strings or words which do not belong to a language are called ____ of that language
Topic: Regular Languages & Closure Properties
- Intersection
- Union
- Complement ✓ Correct answer
- Quotient
-
The language of all strings defined over alphabet set = {x, y} having triple x's or triple y's will have the minimum strings with length of:
Topic: Regular Languages & Closure Properties
- 1
- 3 ✓ Correct answer
- 4
- 2
-
The language of all strings defined over alphabet set = {a, b} containing 'bbb' will have the minimum string with length of:
Topic: Regular Languages & Closure Properties
- 1
- 2
- 3 ✓ Correct answer
- 4
-
If L is a regular language, then (L')' U L will be:
Topic: Regular Languages & Closure Properties
- L ✓ Correct answer
- C
- P
- F
-
Language of all strings whose length is odd and number of y's even defined over alphabet set ∑ = {x, y} . will be accepted by the given language
Topic: Regular Languages & Closure Properties
- xxyxyxyyyx
- xxyxyxyyyxy ✓ Correct answer
- xxyxyxyyyxx
- xxyxyxyyy
-
Palindrome is a regular language.
Topic: Regular Languages & Closure Properties
- True
- False ✓ Correct answer
-
The complement of a regular language is also
Topic: Regular Languages & Closure Properties
- regular ✓ Correct answer
- irregular but infinite
- irregular but finite
- irregular
-
Which of the following refers to the set of strings of letters that when concatenated to the front of some word in Q produces some word in R?
Topic: Regular Languages & Closure Properties
- Pref (Q in R) ✓ Correct answer
- Pref (R in Q)
- Postf (Q in R)
- Postf (R in Q)
-
Which of the following is a non-regular language?
Topic: Regular Languages & Closure Properties
- Prime ✓ Correct answer
- Even-Even
- Odd-Odd
- Language of strings ending in abba
-
A loop at a state is supposed to be____ transition while converting Moore machine into an equivalent Maley machine
Topic: Moore & Mealy Machines
- incoming ✓ Correct answer
- outgoing
- Both Incoming and incoming
- Complex
-
The length of output in case of _____ is one more than the length of corresponding input string
Topic: Moore & Mealy Machines
- Moore machine ✓ Correct answer
- Mealy machine
- Incremental machine
- Adding machine
-
In which of the following machine, the length of output string is the same to that of input string?
Topic: Moore & Mealy Machines
- Mealy machine ✓ Correct answer
- Moore machine
- Finite automaton with output
- Non-deterministic finite automaton
-
If we want to make a Moore machine equivalent to mealy machine then
Topic: Moore & Mealy Machines
- We should ignore the extra character printed by the Moore machine. ✓ Correct answer
- We should ignore the extra character printed by the Mealy machine.
- We will make the initial state as a no carry state.
- We should not ignore the extra character printed by the Moore
-
Length of output string is 1 less than that of input string in a Mealy machine.
Topic: Moore & Mealy Machines
- True
- False ✓ Correct answer
-
In a Mealy machine, output characters are mentioned on the transitions.
Topic: Moore & Mealy Machines
- True ✓ Correct answer
- False
-
In a CFG, the non-terminals are denoted by
Topic: Context-Free Grammars
- Small letters
- Numbers
- Capital letters ✓ Correct answer
- Small letters and numbers
-
The CFG is said to be ambiguous if there exist at least one word of its language that can be generated by the ………… production trees
Topic: Context-Free Grammars
- one
- Two
- More then one / Different ✓ Correct answer
- At most one
-
The CFG S → aSb | ab | Λ is used to express the language _______.
Topic: Context-Free Grammars
- Palindrome
- Prime
- Even
- Equal ✓ Correct answer
-
a* + b* = (a + b)*. This expression is:
Topic: Regular Expressions
- True
- False ✓ Correct answer
-
While developing an NFA for the union of FA1 and FA2, if there is a loop of 'a' at the initial state of FA1, then the new initial state will have a transition for 'a' that goes straight to:
Topic: NFA & NFA-Λ
- The final state of FA1
- The initial state of FA1 ✓ Correct answer
- The initial state of FA2
- The initial state of FA1*FA1
-
Let FA3 be an FA corresponding to FA1FA2 (concatenation). Then the final state of FA3 must correspond to the final state of:
Topic: NFA & NFA-Λ
- FA2 only ✓ Correct answer
- FA1 only
- FA1 or FA2
- FA1 and FA2
-
In the context of making an NFA for the concatenation of FA1 and FA2 (FA2 accepting the null string), the final states of the resulting NFA will be:
Topic: NFA & NFA-Λ
- Final states in both FAs ✓ Correct answer
- Initial states in both FAs
- FA2 having final state only
- FA2 having initial state only