edited by
8,500 views
23 votes
23 votes

Which of the following regular expressions describes the language over$\{0, 1\}$ consisting of strings that contain exactly two $1$'s?

  1. $(0 + 1)^ * \ 11(0 + 1) ^*$
  2. $0 ^* \ 110 ^*$
  3. $0 ^* 10 ^* 10 ^*$
  4. $(0 + 1) ^* 1(0 + 1) ^* 1 (0 + 1) ^*$
edited by

3 Answers

Best answer
37 votes
37 votes
  1. with at least $2$ consecutive $1$'s, any no of $0$'s and any no of $1$'s
  2. exactly two consecutive $1$'s
  3. exactly two $1$'s but need not be consecutive
  4. any no of $1$'s and $0$'s with at least two $1$'s


Hence, (C) is the correct option.

edited by
14 votes
14 votes
A. We can get any number of 1.

B.More strict .. means it is covering only one possibility of containing exactly two ones.eg. 0110 ,11  . But 0101 is also satisfying the condition which is not covered by option B.

C. It is covering all d possibility of containing exactly two one's . 101,11,0011,01010........

D. Any no. Of one we can take from here

 

So, answer is option C.
0 votes
0 votes

Draw the Deterministic finite automata with all the transitions for ∑ = {0,1} for no. of 1’s equal to two and get it’s corresponding Regular expression.

Answer:

Related questions

30 votes
30 votes
2 answers
2
Ishrat Jahan asked Oct 28, 2014
7,479 views
Match the following flag bits used in the context of virtual memory management on the left side with the different purposes on the right side of the table below.$$\small ...
26 votes
26 votes
4 answers
3