Friday 27 November 2015

Q20,P3,j15. The regular expression corresponding to the language L

where L={xε {0,1}* |x ends with 1 and does not contain  substring 00} is:
Options
A.      (1+01)*(10+01)
B.      (1+01)*01
C.      (1+01)*(1+01)
D.      (10+01)01.
Answer C.
Explanation.
Option A can yield string terminating with 0 hence it fails.
Option D  an yield string 1001. Hence it also fails.

Option C. generates all string with  length1,2,3,----- terminating with 1 and does not contain 00 substring.

1 comment:

Note: only a member of this blog may post a comment.