266 views

1 Answer

1 votes
1 votes

There's no fixed method per se, it usually comes with practice.

However, for a somewhat systematic approach, you can try this:

1. Convert the language into a NFA.
2. Convert the NFA into a regex.
3. Double check if the regex you've derived is correct or not. 

For more info, check these links:

1. https://cs.stackexchange.com/questions/45570/how-do-i-find-a-regular-expression-for-a-particular-language
2. https://cs.stackexchange.com/questions/2016/how-to-convert-finite-automata-to-regular-expressions
3. https://cs.stackexchange.com/questions/1331/how-to-prove-a-language-is-regular
4. (more advanced) https://cstheory.stackexchange.com/questions/9221/known-algorithms-to-go-from-a-dfa-to-a-regular-expression/9261#9261

Related questions

1 votes
1 votes
1 answer
1
0 votes
0 votes
1 answer
2
hasina ali asked Mar 21
94 views
Set of binary strings starting with 11 and ending with 00. E.g., 1100,1110100 ,1100100
0 votes
0 votes
1 answer
3
utsav22222 asked Mar 15
138 views
Write regular expression for the set of strings of 0's and 1's with at most one pair of consecutive 1's.