Computer Science EngineeringHard
Which regular expression over {a, b} is equivalent to (a+b)*?
- A. (a*b*)*
- B. a*b*
- C. (ab)*
- D. a* + b*
Correct answer: A. (a*b*)*
(a*b*)* can generate every string, since any sequence of letters is a sequence of runs of a's and b's.
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
- The minimal complete DFA over {a, b} for strings with no two consecutive a's has how many states (including the dead state)?
- Which property immediately makes a grammar unsuitable for LL(1) parsing?
- For the grammar S -> aSb | ab, how many derivation steps produce the string aaabbb?
- For the grammar E -> E + E | id, how many reduce actions does a shift-reduce parser perform while parsing id + id?
- An operator grammar is one in which no production right-hand side contains
- An LL(1) grammar has 4 non-terminals and 5 terminals. The predictive parsing table (with the end marker as an extra column) has how many…