Defining a language in a formal way

37 Views Asked by At

I'm doing my first automata and formal language homework and got stuck quite at the beginning where I was asked to define some language in a formal way The question: $\sum = \{0,1\}$

Write a definition for a language that in every word in it, between 2 consecutive 1's there are at lease two 0's (like 1 00..0..00 1) I'd glad for some help with this question and finding references on where to where I could study more about this

Thanks!

1

There are 1 best solutions below

0
On

You can use a regular expression like: $L=(0^*•1•00•0^*)^*+(0^*•1•0^*)$ Meaning you can start with 0 times how much you want or to start with 1 followed by at least two 0 and you can repeat it how many times you want so any word you will get from this expression are acceptable word, But you didn't give all of the needed information so this regular expression is for L that have the empty word $%epsilon$ and I assumed that any word with only one 1 is also acceptable (the second part of the expression after the or sign +