7 votes 7 votes Find regular expressions for: All binary strings with exactly two $1’s$ The set $\{a^nb^m :n\geq3, m$ is even$\}$ All binary strings with a double symbol (contains $00$ or $11$) somewhere. The language on $\Sigma=\{a,b\}, L=\{w:n_a(w) \mod 3=0\}$ Theory of Computation theory-of-computation regular-language finite-automata + – Garrett McClure asked Sep 22, 2017 edited Aug 8, 2021 by soujanyareddy13 Garrett McClure 1.3k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 8 votes 8 votes $1.L_{1}=0^{*}10^{*}10^{*}$ $2.L_{2}=aaaa^{*}\left ( bb \right )^{*}$ $3.L_{3}=\left ( 0+1 \right )^{*}00\left ( 0+1 \right )^{*}+\left ( 0+1 \right )^{*}11\left ( 0+1 \right )^{*}$ $4.L_{4}=b^{*}(ab^{*}ab^{*}ab^{*})^{*}$ sourav. answered Sep 22, 2017 edited Sep 25, 2017 by sourav. sourav. comment Share Follow See all 11 Comments See all 11 11 Comments reply Arjun commented Sep 23, 2017 reply Follow Share For $L_4$, b is not accepted. 1 votes 1 votes sourav. commented Sep 23, 2017 reply Follow Share sir $L_{4}=(b^{*}ab^{*}ab^{*}ab^{*})^{+}?$ 0 votes 0 votes Pawan Kumar 2 commented Sep 23, 2017 reply Follow Share can we write L1 as (110* + 0*110*+ 0*10*1+10*10*) ? I know L1=0*10*10* covers it , but still is above is also correct? 0 votes 0 votes Arjun commented Sep 23, 2017 reply Follow Share No, that also won't accept b rt? We should allow no a's because 0 is divisible by 3. 0 votes 0 votes sourav. commented Sep 23, 2017 reply Follow Share Sir , i am not getting you . If you are saying that my $L_{4}$ should accept $b$,then my $L_{4}$ is actually accepting $b$ $L_{4}=b^{1}(b^{*}ab^{*}ab^{*}ab^{*})^{0}b^{0}$ Actually i too though that $n(a)=0$ should be accpeted as 0 is divisible by 3 0 votes 0 votes Arjun commented Sep 23, 2017 reply Follow Share yes, sorry I missed that. But you can avoid b* at end. 0 votes 0 votes sourav. commented Sep 23, 2017 reply Follow Share okk sir , thank you :) 0 votes 0 votes OO7 commented Sep 24, 2017 reply Follow Share thank you Sir 0 votes 0 votes Diksha Aswal commented Sep 25, 2017 reply Follow Share for L4 why not b*(ab*ab*ab*)* ? 0 votes 0 votes sourav. commented Sep 25, 2017 reply Follow Share @diksha , yes you are correct.Thanks 0 votes 0 votes akash.dinkar12 commented Sep 29, 2017 reply Follow Share L4 can also be expressed as (b + ab*ab*a)* 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes solution Ans1. 0*10*10* stdntlfe answered Sep 23, 2017 stdntlfe comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes ......... abhishekmehta4u answered Mar 30, 2019 edited Mar 30, 2019 by abhishekmehta4u abhishekmehta4u comment Share Follow See all 0 reply Please log in or register to add a comment.