1,254 views
2 votes
2 votes

Let r1=(0+1)*, r2=0*1+10*+0*+1*. What is the length of the smallest string that is present in language corresponds to regular expression r1 and not present in language corresponds to regular expression r2.

  1. 2
  1. 3
  1. 1
  1. none of the above

2 Answers

Best answer
5 votes
5 votes

Given,

r1 = (0+1)* = set of all strings of 0 or 1 

r2 = 0*1+10*+0*+1*

    = { ɛ, 0, 1, 00, 01, 10, 11, 000, 001, 100, 111, ….}

Since, 010, 011, 101, 110 is present in r1 but not in r2 and length is 3

so ans is b. 

selected by
0 votes
0 votes
11 is the smallest expression formed by r2

00,01,10 are those present in r1 and not present in r2

length is 2
reshown by

Related questions

0 votes
0 votes
1 answer
3