edited by
2,291 views
1 votes
1 votes

Write regular expressions for the following languages$:$

  1. The set of all strings of $0's$ and $1's$ such that every pair of adjacent $0's$ appears before any pair of adjacent $1's.$
  2. The set of strings of $0's$ and $1's$ whose number of $0's$ is divisible by five.
edited by

1 Answer

1 votes
1 votes

for part a go to this link

https://cs.stackexchange.com/questions/34025/regex-any-pair-of-zeros-is-before-any-pair-of-ones

for part b REX will be (1*01*01*01*01*0)* +1*

edited by

Related questions