-
Which of the following languages is regular?
-
- { WWR | W ∈ (0,1)+ }
- { WWRX | X , W ∈ (0,1)+ }
- { WXWR | X , W ∈ (0,1)+ }
- { XWWR | X , W ∈ (0,1)+ }
- { WWR | W ∈ (0,1)+ }
Correct Option: C
Lets study the regular language.
Convenstions on regular expressions
1. Bold face is not used for regular expressions when the expression is not confusing. So, for example, (r + s) is used instead (r + s).
2. The operation * has precedence over concatentation, which further has precedence over union (+). Thus, the regular expression (a + b(c*))) is written as a + bc*.
3. The concatenation of k r' s, where r is regular expression, is written as rk. Thus, for example rr = r2. The language corresponding to rk is Lkr , where Lr is language corresponding to the regular expression r. For a recursive definition of Lkr .
4. The (r+) is used as a regular expression to represent L+r .
Since, language L can be expressed as
r = [0 (0 + 1) * 0] + [1 (0 + 1) * 1]
and follows the above convention, therefore is regular