Skip to content
Related Articles

Related Articles

UGC-NET | UGC NET CS 2016 Aug – III | Question 24
  • Last Updated : 17 Apr, 2018

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?
(A) (a) and (b) only
(B) (b) and (c) only
(C) (c) and (a) only
(D) (a), (b) and (c)


Answer: (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.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :