Discussion
Which of the following languages are denoted/represented by the regular expression :
\(((0+1)(0+1)^{*})^{*}\ 00\ (0+1)^{*}\)
(i) The language contains strings over 0's and 1's with at least one pair of consecutive zeros.
(ii) The language contains strings over 0's and 1's with strings starting with either 0 or 1 and may end with 0 or 1.
(iii) The language contains strings over 0's and 1's with number of 0's to be more than number of 1's.
Answer: C
The answer is (i) and (ii) only.
The prefix \(((0+1)(0+1)^{*})^{*}\) can produce any string of 0s and 1s, including the empty string, so it is equivalent to \((0+1)^{*}\). The whole expression is therefore \((0+1)^{*}\,00\,(0+1)^{*}\): any binary string that contains 00 somewhere, that is, at least one pair of consecutive zeros (i). Such strings can begin and end with either symbol, as statement (ii) says, for example 1001 or 0010.
Statement (iii) is false: 11001 contains 00 but has fewer 0s than 1s. So options including (iii) are wrong.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development