This is an old revision of the document!
4. Regular expressions
4.1. Formation rules (concatenation, reunion, Kleene star)
4.1.1.
$ A=\{ 0^{2k} \mid k \geq 1 \}$
$ B = \{0, \epsilon \}$
$ AB = ? $
4.1.2.
$ A = \{ 0^n 1^n \mid n \geq 1 \}$
$ B = \{ 1^n \mid n \geq 1 \} $
$ AB = ? $
$ BA = ? $
4.1.3.
$ A = \emptyset $
$ B = \{ 1^n \mid n \geq 1 \} $
$ AB = ? $
$ A^* = ? $
$ B^* = ? $
4.2. Regex implementation
4.3. Writing Regular Expressions
4.3.1. Write a regular expression for the language of arithmetic expressions containing +, * and numbers.
Hint: you can abbreviate $ 0 \cup 1 \cup \ldots \cup 9 $ by $ [0-9] $
4.3.2. Write a regular expression for $ L = \{ \omega \text{ in } \text{{0,1}} ^* \text{ | every sequence of consecutive zeros appears before ANY sequence of consecutive ones} \} $
4.3.3. Write a DFA for $ L(( 10 \cup 0) ^* ( 1 \cup \epsilon )) $
4.3.4. Write a regular expression which generates the accepted language of A:
4.3.5. Simplify the regular expression you found.
4.3.6. Describe as precisely as possible the language generated by $ (1 \cup 1(01^*0)1)^*$