0 0 votes can anyone help me with regular expression for- a)set of all strings with equal number of 0s and 1s such that no prefix has 2 more than 0s than 1s nor 2 more than 1's than 0's. b) set of all strings of 0s and 1s whose number of 0s is divisible by 5 and whose number of 1's is even. Theory of Computation theory-of-computation regular-expression + – UK 7.3k views answer comment Share Follow Print See all 3 Comments 3 3 Comments reply papesh commented Jul 7, 2016 i moved by papesh Jan 8, 2017 reply Follow flag A. (01+10)* B. (x 1 y 1 z)* Here x,y,z should such that x+y+z= n(0) = 5 Ex. (0^3 1 0 1 0)* or (0^2 1 0 1 0^2)* 0 0 replyShare Iqra1042 commented Apr 7, 2022 reply Follow flag How can we create 1100 in a condition 0 0 replyShare Raaaaa commented Jan 31, 2024 reply Follow flag B. ((11)*00000)* is this correct 0 0 replyShare Please log in or register to add a comment.
0 0 votes I think for B this is the answer ((11)* 0 (11)* 0 (11)* 0 (11)* 0 (11)* 0 (11)*)* Naveen Sanapthi answered Feb 25, 2018 Naveen Sanapthi comment Share Follow See 1 comment 1 1 comment reply mad6193 commented Sep 30, 2018 reply Follow flag U should also be able to get 1000001. This is wrong. 0 0 replyShare Please log in or register to add a comment.
0 0 votes (1+01*01*01*01*0)*(0+0*10*1)* wa_tle answered Mar 1, 2022 wa_tle comment Share Follow 0 reply Please log in or register to add a comment.