Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
You're offline
Unit 2 MCQsREGULAR EXPRESSIONS AND REGULAR SETS
CSE322 ·
50 questions. Pick an option to check it.
Which of the following is a valid identity for Regular Expressions?
Not quite. Try another option.
Answer:
Taking the union of any language represented by with the empty language results in the original language. Hence, .
Question 2 of 50
What is the equivalent regular expression for ?
Not quite. Try another option.
Answer:
The '+' operator in regular expressions denotes the union of languages. Since the union of a set with itself is the same set, . This is the idempotent property.
Question 3 of 50
What is the simplified form of ?
Not quite. Try another option.
Answer:
Applying the Kleene star operation multiple times does not generate any new strings beyond the first application. Therefore, .
Question 4 of 50
Which of the following regular expressions represents the language of all strings over ?
Not quite. Try another option.
Answer:
The expression generates any combination of 'a' and 'b' of any length, which encompasses all possible strings over the alphabet .
Question 5 of 50
The regular expression for the language of strings of even length over is:
Not quite. Try another option.
Answer:
The expression produces all strings of exactly length 2. Applying the Kleene star to this grouping, , allows only even-length combinations.
Question 6 of 50
Which identity correctly describes the relationship between the Kleene star and the positive closure ?
Not quite. Try another option.
Answer:
The positive closure includes all strings of except the empty string (unless is already in ). Thus, is the correct algebraic relation.
Question 7 of 50
What does the -closure of a state in an NFA represent?
Not quite. Try another option.
Answer: The set of states reachable from using only -transitions.
The -closure of is the set of all states that can be reached from along paths containing entirely (null) transitions, including itself.
Question 8 of 50
In terms of language recognition, how does the power of a Non-deterministic Finite Automaton with null moves (-NFA) compare to a standard DFA?
Not quite. Try another option.
Answer: It has the exact same computational power as a DFA.
Although -NFAs provide more flexibility in design, any language accepted by an -NFA can also be accepted by a standard DFA. They define the exact same class of regular languages.
Question 9 of 50
Let denote the -closure of state . Is always true?
Not quite. Try another option.
Answer: Yes, trivially by taking zero -transitions.
By definition, the -closure of a state always contains the state itself because you can reach it by making zero transitions.
Question 10 of 50
The transition function for an -NFA is defined as ?
Not quite. Try another option.
Answer:
Because it is non-deterministic, from any state using an input symbol or , the machine can transition to a set of states. This is represented by the power set .
Question 11 of 50
When converting an -NFA to a standard NFA without -moves, what determines if a state becomes a final state?
Not quite. Try another option.
Answer: If the -closure of contains at least one final state.
If a state can reach an original accepting state using only -moves, it must be marked as an accepting state in the newly constructed -free NFA.
Question 12 of 50
The standard algorithm used to convert a Non-deterministic Finite Automaton (NFA) to a Deterministic Finite Automaton (DFA) is called:
Not quite. Try another option.
Answer: Subset Construction
The Subset Construction (or powerset construction) algorithm systematically builds DFA states as subsets of the original NFA states to eliminate non-determinism.
Question 13 of 50
If an NFA has states, what is the maximum number of states the equivalent DFA could possibly have?
Not quite. Try another option.
Answer:
Since the Subset Construction algorithm models DFA states as elements of the power set of NFA states, and a set of size has subsets, the maximum number of DFA states is .
Question 14 of 50
In the Subset Construction algorithm, a state in the constructed DFA is considered an accepting (final) state if:
Not quite. Try another option.
Answer: It contains at least one accepting state of the NFA.
Because an NFA accepts a string if there is any valid path to a final state, the equivalent DFA must accept if the subset of current possible states includes at least one of those final states.
Question 15 of 50
During the conversion of an NFA to a DFA, a "dead state" is often introduced. This dead state typically corresponds to which subset of NFA states?
Not quite. Try another option.
Answer: The empty subset .
If an NFA has no valid transitions for a particular symbol from a set of states, the resulting subset is empty (). In a DFA, this must transition to a trap/dead state.
Question 16 of 50
What is the primary practical reason for converting an NFA to a DFA?
Not quite. Try another option.
Answer: To make the automaton deterministic for straightforward implementation in software or hardware.
NFAs are easier to design theoretically but hard to program directly without simulating multiple paths. DFAs provide single, deterministic paths making them trivial to implement as state machines in code.
Question 17 of 50
Arden's Theorem is primarily used in automation theory for:
Not quite. Try another option.
Answer: Converting a Transition System (DFA/NFA) into a Regular Expression.
Arden's Theorem provides an algebraic method to solve systems of equations representing finite automata, ultimately yielding the equivalent regular expression.
Question 18 of 50
According to Arden's Theorem, if , and does not contain , then the unique solution for is:
Not quite. Try another option.
Answer:
By repeatedly substituting into the equation (), the geometric series leads to the unique solution assuming .
Question 19 of 50
Solve the state equation using Arden's Theorem.
Not quite. Try another option.
Answer:
The equation is in the form , where and . According to Arden's theorem, the solution is , which gives .
Question 20 of 50
What specific condition must be satisfied for Arden's Theorem () to guarantee a unique solution?
Not quite. Try another option.
Answer: The language must not contain .
If , the equation has multiple solutions. The uniqueness of requires that does not contain the empty string.
Question 21 of 50
Thompson's Construction algorithm is utilized specifically to:
Not quite. Try another option.
Answer: Construct an -NFA equivalent to a given Regular Expression.
Thompson's Construction is a recursive algorithm that builds an -NFA structurally mimicking the abstract syntax tree of a regular expression.
Question 22 of 50
In Thompson's Construction, the base case for recognizing a single alphabet symbol produces an NFA with exactly how many states?
Not quite. Try another option.
Answer: 2
For a single symbol 'a', Thompson's construction creates an initial state and a final state, with a single transition labeled 'a' connecting them. Total states = 2.
Question 23 of 50
When applying Thompson's Construction for the union of two regular expressions (), how many completely new states are introduced?
Not quite. Try another option.
Answer: 2
The union operation adds one new overarching start state and one new overarching final state, with -transitions connecting to and from the sub-machines for and .
Question 24 of 50
When applying Thompson's Construction for the Kleene Star operation , how many new -transitions are added?
Not quite. Try another option.
Answer: 4
Four -transitions are added: new start to old start, new start to new final (bypassing), old final to old start (looping), and old final to new final.
Question 25 of 50
Which of the following properties is universally true for automata generated directly by Thompson's Construction?
Not quite. Try another option.
Answer: They always have exactly one final (accepting) state.
By design, Thompson's Construction always ensures the resulting -NFA has precisely one initial state and one accepting state.
Question 26 of 50
Two finite automata are formally defined to be equivalent if and only if:
Not quite. Try another option.
Answer: They accept exactly the same language.
Automata equivalence strictly depends on their behavior (the language they recognize). Two machines with completely different structures are equivalent if .
Question 27 of 50
A standard, definitive method to test the equivalence of two DFAs, and , is to:
Not quite. Try another option.
Answer: Minimize both DFAs and check if the resulting graphs are isomorphic.
Because the minimal DFA for a regular language is unique (up to state renaming), two DFAs accept the same language if and only if their minimized versions are identical.
Question 28 of 50
Are the regular expressions and equivalent?
Not quite. Try another option.
Answer: Yes, they generate the exact same language.
Both expressions define the universal language over . The expression allows any sequence of 's and 's to be repeated, which is equivalent to .
Question 29 of 50
Which of the following regular expressions is NOT equivalent to ?
Not quite. Try another option.
Answer:
The expression represents strings of only 'a's OR strings of only 'b's. It cannot generate a string with mixed characters like 'ab', unlike , so they are not equivalent.
Question 30 of 50
If and are regular languages, which of the following operations is NOT guaranteed to produce a regular language?
Not quite. Try another option.
Answer: Infinite Union of arbitrary regular languages
Regular languages are closed under finite union, but an infinite union of regular sets can produce non-regular languages (e.g., is not regular).
Question 31 of 50
Regular languages are mathematically closed under which of the following operations?
Not quite. Try another option.
Answer: Both Complementation and Intersection.
By De Morgan's laws and cross-product DFA construction, if and are regular, both their intersection and their complement are guaranteed to be regular.
Question 32 of 50
The complement of a regular language over an alphabet is represented as:
Not quite. Try another option.
Answer:
The complement of a language contains all valid strings over the alphabet that are not in . This is precisely .
Question 33 of 50
If is a regular language, then the language (the reversal of all strings in ) is:
Not quite. Try another option.
Answer: Regular.
Regular languages are closed under string reversal. One can simply reverse all transitions in an NFA and swap the start and final states to construct a machine for .
Question 34 of 50
The primary purpose of the Pumping Lemma for Regular Sets in automata theory is to:
Not quite. Try another option.
Answer: Prove a language is strictly NOT regular.
The Pumping Lemma provides a necessary property that all regular languages must possess. If a language fails this property, it is proven to be non-regular.
Question 35 of 50
In the Pumping Lemma for regular sets, an arbitrary string (where ) is divided into three parts: . Which part represents the "pumpable" substring?
Not quite. Try another option.
Answer:
The substring corresponds to a cycle in the DFA. By repeating (pumping) any number of times , the resulting string must remain in the language.
Question 36 of 50
According to the conditions of the Pumping Lemma for the decomposition , which strict requirement must hold true?
Not quite. Try another option.
Answer:
For the lemma to work, the pumped portion cannot be empty. If , pumping wouldn't change the string. Thus, the length of must be at least 1.
Question 37 of 50
Let be the pumping length. According to the Pumping Lemma, the length of the prefix must satisfy:
Not quite. Try another option.
Answer:
By the Pigeonhole Principle, within the first transitions on a DFA with states, a state must repeat. Thus, the loop must complete within the first characters: .
Question 38 of 50
Which of the following classical languages is typically proven to be NON-regular using the Pumping Lemma?
Not quite. Try another option.
Answer:
The language requires the automaton to "count" the number of 'a's to ensure an equal number of 'b's. Since finite automata have finite memory, they cannot do this for arbitrary , making it non-regular.
Question 39 of 50
Is the Pumping Lemma a sufficient condition to definitively prove that a language IS regular?
Not quite. Try another option.
Answer: No, it is only a necessary condition; some non-regular languages can also satisfy the Pumping Lemma.
The Pumping Lemma is a necessary but not sufficient condition for regularity. There exist specific non-regular languages that can still be "pumped" without leaving the language.
Question 40 of 50
Which of the following decision properties regarding regular languages is NOT decidable?
Not quite. Try another option.
Answer: None of the above (they are all decidable)
For regular languages (unlike context-free or Turing-recognizable languages), nearly all standard questions—including emptiness, finiteness, membership, and equivalence—have algorithmic decidable solutions.
Question 41 of 50
The Membership Problem for a regular language essentially asks whether:
Not quite. Try another option.
Answer: A specifically given string belongs to the language .
Membership decides if . For regular languages, it is easily solved by simulating the string on the DFA and checking if it halts on an accepting state.
Question 42 of 50
How can the Emptiness problem (?) for a regular language represented by a DFA be decided algorithmically?
Not quite. Try another option.
Answer: By performing a graph search to check if ANY final state is reachable from the start state.
If no accepting state can be reached from the initial state via valid transitions, the automaton accepts no strings, and the language is empty.
Question 43 of 50
The Finiteness problem (is finite or infinite?) for a DFA can be decided by:
Not quite. Try another option.
Answer: Checking if there is a cycle on a path from the start state to any final state.
If a DFA graph contains a cycle that is reachable from the start state and can reach a final state, the machine can generate infinitely many strings. Otherwise, the language is finite.
Question 44 of 50
The foundational Myhill-Nerode Theorem states that a language is regular if and only if:
Not quite. Try another option.
Answer: The number of equivalence classes of the relation is finite.
The Myhill-Nerode Theorem asserts a language is regular exactly when its distinguishing equivalence relation partitions all possible strings into a finite number of equivalence classes.
Question 45 of 50
In the context of the Myhill-Nerode Theorem, the equivalence relation defined over strings is:
Not quite. Try another option.
Answer: Right-invariant
The relation is right-invariant (or right congruence). This means if strings and are equivalent, then for any string , and must also be equivalent with respect to .
Question 46 of 50
According to the Myhill-Nerode Theorem, the number of equivalence classes of the relation for a regular language corresponds exactly to:
Not quite. Try another option.
Answer: The number of states in the minimal deterministic finite automaton (DFA) accepting .
Each equivalence class of maps uniquely to one state in the minimal DFA. Thus, minimizing a DFA equates to finding these equivalence classes.
Question 47 of 50
In DFA minimization algorithms based on Myhill-Nerode, two states and are considered distinguishable if:
Not quite. Try another option.
Answer: There exists a string such that exactly one of or ends in an accepting state.
States and are distinguishable if feeding the same suffix string to both yields different acceptance outcomes (one accepts, one rejects). They must be kept as separate states.
Question 48 of 50
Which mathematical approach is structurally used to combine indistinguishable states and find the minimal DFA?
Not quite. Try another option.
Answer: Equivalence Class Partitioning
The minimization algorithm starts with a coarse partition (Final vs. Non-Final) and iteratively refines it by partitioning states into finer equivalence classes until no more splits can occur.
Question 49 of 50
Which of the following is an immediate practical application of the Myhill-Nerode Theorem?
Not quite. Try another option.
Answer: Finding the unique, minimal DFA for a given regular language.
The Myhill-Nerode Theorem's most direct application is identifying indistinguishable strings, allowing the construction of the provably minimal DFA with the fewest possible states.
Question 50 of 50
A regular language is known to be mathematically closed under "homomorphism". What does this operation entail?
Not quite. Try another option.
Answer: Replacing individual symbols of the alphabet uniformly with specific strings.
A homomorphism maps symbols to strings. Since we can substitute the corresponding regular expression for each symbol in the original language's regex, the result remains regular.
That's unit 2
Answer a few questions and your score shows up here.
Nearly through. Did unit 2 of CSE322 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 2 of CSE322 save you a night before the exam?
Then you can help keep it free for the next batch. Ads cover part of the server bill;
the rest comes out of a student's own pocket: the domain, the storage, and keeping
the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.