29 votes 29 votes Give a regular expression for the set of binary strings where every $0$ is immediately followed by exactly $k$ $1$'s and preceded by at least $k$ $1$’s ($k$ is a fixed integer) Theory of Computation gate1998 theory-of-computation regular-expression easy descriptive + – Arjun asked Oct 17, 2014 edited Mar 3, 2018 by kenzou Arjun 8.7k views answer comment Share Follow See all 8 Comments See all 8 8 Comments reply Show 5 previous comments kuldeep chamoli commented Jul 8, 2021 reply Follow Share Can anyone what's wrong in (1+e)^k0(1)^k here? pls 0 votes 0 votes raja11sep commented Jul 15, 2021 reply Follow Share @ kuldeep chamoli in the question, where every 0 is immediately followed….. So the string can have more than 1 zero right? But your regular expression contains a single 0. 1 votes 1 votes kuldeep chamoli commented Jul 16, 2021 reply Follow Share Thnx 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes 1*1k(0 1k)* + 1* should be the required RE mint answered Feb 3, 2017 mint comment Share Follow See all 0 reply Please log in or register to add a comment.