Aug2016 cs Q24

0. Consider the following identities for regular expressions:
(a) (r + s)* = (s + r)*
(b) (r*)* = r*
(c) (r* s*)* = (r + s)*
Which of the above identities are true?

  • Option : D
  • Explanation :
  • (r + s)* will generate any strings containing r or s or both. We can draw DFA for (r + s)* and it is same as (s + r)*. It is a regular expression.
  • (r*)* will generate any sring containing r and its DFA can be drawn easily and it is same as r*. It is also a regular expression.
  • (r* s*)* will generate any strings containing r or s or both. We can draw DFA for (r* s*)* and it is same as (r + s)*. It is a regular expression. All option are true.
  • So, option (D) is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *