Computer Science EngineeringModerate
The regular expression (a+b)* over the alphabet {a, b} denotes
- A. only strings of a's
- B. only strings of b's
- C. strings of even length
- D. all strings over {a, b} including the empty string
Correct answer: D. all strings over {a, b} including the empty string
The Kleene star of (a+b) allows any sequence of a's and b's, including the empty sequence.
Practise more Theory of Computation, Compilers & Digital Logic (ISRO CS) questionsTheory of Computation, Compilers & Digital Logic (ISRO CS): notes and key points
More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions
- Context-free grammars correspond to which type in the Chomsky hierarchy?
- Which of the following languages over {a, b} is NOT regular?
- An NFA has 5 states. By subset construction, the equivalent DFA needs at most how many states?
- Context-free languages are NOT closed under which operation?
- Which of the following languages requires a nondeterministic pushdown automaton (cannot be accepted by a deterministic PDA)?
- If both a language L and its complement are recursively enumerable, then L is