2 2 votes Write a regular expression for all strings of 0’s and 1’s in which the total number of 0’s to the left of each 1 is even? I'm getting - 0*+((00)*1(0)*)* is it correct? Theory of Computation finite-automata regular-expression theory-of-computation + – iarnav 1.6k views answer comment Share Follow Print See all 5 Comments 5 5 Comments reply Show 2 previous comments joshi_nitish commented Sep 2, 2017 reply Follow flag if you look carefully your RE will also generate 101 , 10001 , 1000001......so on 1 1 replyShare joshi_nitish commented Sep 2, 2017 reply Follow flag @iarnav also see RE given by @hs_yadav , it is also good RE for above language. 1 1 replyShare iarnav commented Sep 2, 2017 reply Follow flag True that! 0 0 replyShare Please log in or register to add a comment.
Best answer 2 2 votes RE=(1* (00)* 1*)* 0* ?????? hs_yadav answered Sep 2, 2017 • selected Jan 30, 2018 by iarnav hs_yadav comment Share Follow See all 5 Comments 5 5 Comments reply joshi_nitish commented Sep 2, 2017 reply Follow flag @hs_yadav correct more simply you can write RE as (1 + 00)*0* 0 0 replyShare iarnav commented Sep 2, 2017 reply Follow flag @ hs_yadav Thanks. @ joshi_nitish Always been grateful. Though, bro, how you simplify this (1 + 00)*0* by (a*+b*)* property? 0 0 replyShare iarnav commented Sep 2, 2017 reply Follow flag @ joshi_nitish Bro, waiting for your reply! ): 0 0 replyShare iarnav commented Sep 2, 2017 reply Follow flag @hs_yadav Any technique how you write this RegEx? 0 0 replyShare hs_yadav commented Sep 3, 2017 reply Follow flag i think ,the way is:)....first write some possible strings of the language and then your intuition(finding the pattern) or find DFA and use state elimination method........??? 1 1 replyShare Please log in or register to add a comment.