0 votes 0 votes Let ‘R’ be a regular expression, then which of the following statements is/are TRUE for every 'R'? S1: There exists 'S' which satisfies property R + S = S. S2: There exists 'S' which satisfies property R.S = S A) only S1 is true B) only S2 is true C) Both are true D) Both are false Please answer this with a suitable explanation. Theory of Computation regular-expression + – Warlock lord asked Aug 12, 2017 retagged Jul 5, 2019 by Cristine Warlock lord 1.6k views answer comment Share Follow See 1 comment See all 1 1 comment reply joshi_nitish commented Aug 12, 2017 reply Follow Share in general, only S1 is true because if you take S=(sigma)*, it will absorb all strings of R and will become S, S2 is false because no matter what you choose S, string in R.S should always start with pattern of R. but if R contain epsilon both will be true 1 votes 1 votes Please log in or register to add a comment.
1 votes 1 votes S1: There exists 'S' which satisfies property R + S = S Suppose R = anything and S = $(a+b)^{*}$, Then R+S = S S2: There exists 'S' which satisfies property R.S = S Suppose R = anything and S = $\varnothing$, Then R.S = S So both S1 and S2 are true. stblue answered Aug 12, 2017 stblue comment Share Follow See all 2 Comments See all 2 2 Comments reply Warlock lord commented Aug 12, 2017 reply Follow Share In the statement 1, since R is an regular expression, it can have '∅' as a value. Am I right? So can we say that ∅ + S = S (where S is any regular expression). Is my understanding right? 0 votes 0 votes stblue commented Aug 12, 2017 reply Follow Share yes, you can think in that way also. 0 votes 0 votes Please log in or register to add a comment.