in Theory of Computation edited by
653 views
1 vote
1 vote

Which of the following is a valid word of the language (1*(01*01*)*) U (0*(10*10*)*) ?

  1. 10110010101
  2. 1010101010
  3. 000101010000
  4. 001010001010
in Theory of Computation edited by
by
653 views

1 comment

Key says D is the answer

0
0

3 Answers

1 vote
1 vote

ANS IS D : because  (1*(01*01*)*) - it means not two zeros can be together 

(0*(10*10*)*) : it says no two 1s can be together 

but these two conditions are with union means either it will not contain 2zeros together or 1s 

A) in a option both 2 ones and 2 zeros are together so a cant be the ans

B) it seems to be correct but there is 1 which is extra

Lly c is also eliminated 

 

reshown by

3 Comments

B not accepted because of extra 0 in last
0
0
Right A also accepting
0
0
Yes michail u r right a and d are correct option..
1
1
1 vote
1 vote

Answer is both A and D.

Given : (1*(01*01*)*) U (0*(10*10*)*) 
(1*(01*01*)*) has even number of 0's and (0*(10*10*)*) has even number of 1's

 

(A) 10110010101 - Consider (0*(10*10*)*) :

(10*10*)* -> 101

(10*10*)*  -> 10010

(10*10*)* ->101

Hence the string (a).

(B) 1010101010 - both odd number of 0's and 1's,even 1 comes in-between two 0's and vice versa.

(C) 000101010000 - same as above.

(D) 001010001010 - use (0*(10*10*)*) and count 001010 twice.

0 votes
0 votes
yes ans is D only
reshown by
by

Related questions