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. 2 3 1 none of the above Theory of Computation theory-of-computation regular-expression regular-language regular-grammar + – Ash666 asked Sep 12, 2021 Ash666 1.3k views answer comment Share Follow See 1 comment See all 1 1 comment reply Ash666 commented Sep 14, 2021 reply Follow Share Answer key has given the answer as a. 2 0 votes 0 votes Please log in or register to add a comment.
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. Yaman Sahu answered Sep 13, 2021 selected Sep 14, 2021 by Ash666 Yaman Sahu comment Share Follow See all 4 Comments See all 4 4 Comments reply Ash666 commented Sep 14, 2021 reply Follow Share Thank you for the answer Yaman, even I answered b. 3, but the released answer key mentioned a. 2 as the answer; which is why I posted the question in GO. 1 votes 1 votes VYAN_jy commented Dec 1, 2021 i edited by VYAN_jy Dec 1, 2021 reply Follow Share Try generating 11 with R2. 0 votes 0 votes Yaman Sahu commented Dec 1, 2021 reply Follow Share In r2, there is 1* so it generates 11. ;) 1 votes 1 votes VYAN_jy commented Dec 1, 2021 reply Follow Share Indeed i completely miss out on that. Thanks mate. 0 votes 0 votes Please log in or register to add a comment.
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 Mohitdas answered Sep 17, 2021 reshown Sep 17, 2021 by Mohitdas Mohitdas comment Share Follow See all 2 Comments See all 2 2 Comments reply Ash666 commented Sep 19, 2021 reply Follow Share r2 = 0*1 + 10* + 0* + 1* Can't 00, 01, 10 be derived from 0*, 0*1, 10* respectively? 0 votes 0 votes Mohitdas commented Sep 19, 2021 reply Follow Share I think it's mentioned smallest string in question So I took r2 without * and got the smallest 0 votes 0 votes Please log in or register to add a comment.