This is an old revision of the document!


3. Regular Expressions

For each of the exercises from DFA practice write a regex describing the same language.

2.2.1.

2.2.1.

$ 0^*10^*(10^*10^*)^*$

2.2.2.

2.2.2.

$ 0^*10^*10^*$

2.2.3.

2.2.3.

$ (0 \cup 1)^*1$

<hidden 2.2.4.> creating the regex directly is not easy, but the pattern can be derived by studying the dfa, and trying to 'replace' states with more complex transitions. For a step-by-step description of the method, wait until the lecture/lab about the dfa to regex transformation algorithm

$ ((1(01^*0)^*1)\cup0)^*$