Cheap and Secure Web Hosting Provider : See Now

[Solved]: Regular expression for a binary string containing even number of 0's

, , No Comments
Problem Detail: 

To get the regular expression I made a finite automata as the following (not sure if you can directly write regular expression without it):

enter image description here

The regular expression for the above according to me should be $(1+01^*0)^*$ but elsewhere I have seen it can be $(1^*01^*01^*)^*$. Why is it different?

Asked By : cpx

Answered By : Raphael

There are (infinitely) many regular expressions for every regular language. Your approach gives you one (good job on a structured approach!), others give you others.

Consider, for instance, two distinct yet equivalent NFA translated using Thompson's construction.

Best Answer from StackOverflow

Question Source :

3.2K people like this

 Download Related Notes/Documents


Post a Comment

Let us know your responses and feedback