Machine-translated by Google. Questions are authored in English.
Top

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.

  • A.(ii) and (iii) only
  • B.(iii) only
  • C.(i) and (ii) only
  • D.(i) and (iii) only

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.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.