COMPUTER SCIENCE AND ENGINEERING
COMPILER DESIGN
| 
 Question 
 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
 
 | 
 Regular expression (a|b)* denotes 
| 
 | 
  One or more occurrences of a or b 
 
 | 
| 
 | 
  One or more occurrences of a and b 
 
 | 
| 
 | 
  Zero or more occurrences of a or b 
 
 | 
| 
 | 
  Zero or more occurrences of a and b 
 
 | 
 Explanation: 
Detailed explanation-1: -Save this answer. Show activity on this post. In normal regular expression grammar, (a+b)* means zero or more of any sequence that start with a, then have zero or more a, then a b .
Detailed explanation-2: -( a + b )* corresponds to the set of all strings over the alphabet a, b. a*b* corresponds to the set of strings consisting of zero or more a’s followed by zero or more b’s. a*b+a* corresponds to the set of strings consisting of zero or more a’s followed by one or more b’s followed by zero or more a’s.
 There is 1 question to complete.