768 views
1 1 vote
consider following input sequence 01010101............

A) what will be regular expression to accept all prefixes of the given sequence__

1. 0(10)*

2. 0(01)*

3. 0(10)*+(01)*

4. 0*+(101)*

B) how many minimum number of state are required in a DFA for accepting the correct regular expression?

a.3

b.2

c.4

d.5

1 Answer

Best answer
1 1 vote

A) answer must be 3.

1. 0(10)*  //Cannot accept the prefix 01

2. 0(01)*  // accpets the wrong prefix 001 and cannot accpet 010

3. 0(10)*+(01)*      

4. 0*+(101)* // Cannot accept the prefix 01

So option 3 must be the answer


B. We need 4 states to represent this sequence

selected by
Position:
Show:

Related questions

1 1 vote
1 1 answer
645
645 views
Hira Thakur asked Aug 29, 2016
645 views
which of following regular expression generate the set of all string not cantaing "baa" as a substring over the input alphbet{a,b} is___1 a*(b*a*)2 a*b*ab3 a*baba*4 a*(ba...
4 4 votes
0 0 answers
998
998 views
Hira Thakur asked Aug 29, 2016
998 views
if M1 machine recognizing L1 with n state the M recognizing L1* constructed using thomson construction will have minimum number of states1. n2 n+13. n+24. n-1
1 1 vote
1 1 answer
341
341 views
Hira Thakur asked Aug 29, 2016
341 views
the left liner grammer given below genratesH→Ha/aS→Hb1.(a+b)^+2.aa*b3 a*b4 none
1 1 vote
0 0 answers
307
307 views
Hira Thakur asked Aug 29, 2016
307 views
the number of state in MDF of the language {L(10*10*1) U L(01*01*0)} is_______???