How to Create a Regular Expression for Strings with an Odd Number of Zeroes?

Join the discussion
Registration is free. Start your own thread to ask a follow-up.
1 reply · 2K views
EvLer
Messages
454
Reaction score
0
How do I approach this problem?
give a regular expression for a set containing strings consisting of 0s and 1s where numbr of zeroes is odd...
thanks

ps: I have tried it with Kleene's theorem, but there is so many possibilities that i get lost
 
Physics news on Phys.org
What does FSA stand for? finite state automaton?

The way to do this is to break it up into
1. A single block that contains one 0 and otherwise contains 1's
2. Some number of blocks that contain two zeros each and otherwise contain 1's
 
Last edited: