Which of the following statements about Regular Expression is/are incorrect? A. The union of two regular expressions is also a regular expression B. The concatenation of two regular expressions is also a regular expression C. The iteration of a regular expression is also a regular expression
Which of the following statements about Regular Expression is/are incorrect? A. The union of two regular expressions is also a regular expression B. The concatenation of two regular expressions is also a regular expression C. The iteration of a regular expression is also a regular expression Correct Answer Only C
The correct answer is option 1.
Concept:
Statement A: The union of two regular expressions is also a regular expression.
True, The union of two regular expressions is closed it means the union of two regular expressions is gives a regular expression.
Regular expression 1 ∪ Regular expression 2 = Regular expression.
Example:
RE1 = a(aa)*
RE2 = (aa)*
So, L1 = {a, aaa, aaaaa,.....}
and L2 ={ ε, aa, aaaa, aaaaaa,.......}
L1 ∪ L2 = { ε, a, aa, aaa, aaaa, aaaaa, aaaaaa,.......}
RE = (L1 ∪ L2) = a* which is a regular expression.
Statement B: The concatenation of two regular expressions is also a regular expression.
True, The concatenation of two regular expressions is closed which means the concatenation of two regular expressions gives a regular expression.
Regular expression 1 . Regular expression 2 = Regular expression.
L1 = {0, 00, 10, 000, 010, ......}
L2 = {01, 010,011,.....}
Then, L1.L2 = {001,0010,0011,0001,00010,00011,1001,10010,.............}
Additional Information Close Properties:
| Regular | DCFL | CFL | CSL | Recursive | REL | |
| Union | Y | N | Y | Y | Y | Y |
| Intersection | Y | N | N | Y | Y | Y |
| Complement | Y | Y | N | Y | Y | N |
| Difference | Y | N | N | Y | Y | N |
| Prefix | Y | Y | Y | Y | Y | Y |
| Suffix | Y | Y | Y | Y | Y | Y |
| Substring | Y | Y | Y | Y | Y | Y |
| Concatenation | Y | N | Y | Y | Y | Y |
| Reversal | Y | N | Y | Y | Y | Y |
| Kleen closure | Y | N | Y | Y | Y | Y |
| positive closure | Y | N | Y | Y | Y | Y |
| subset | N | N | N | N | N | N |
| substitution | Y | N | Y | N | N | Y |
| Homomorphism | Y | N | Y | N | N | Y |
| Inverse Homomorphism | Y | Y | Y | Y | Y | Y |
|
Y = Closed N = Not closed |
||||||