This is an old revision of the document!
3. Regular Expressions
3.1. Natural Language / DFA $ \rightarrow $ Regex conversion
For each of the exercises from DFA Seminary 1 write a regex describing the same language.
3.1.1. $ L=\{w \in \{0,1\}^* \text{ | w contains an odd number of ones} \} $
3.1.2. The language of binary words which contain exactly two ones
3.1.3. The language of binary words which encode odd numbers (the last digit is least significative)
3.1.4. The set of all binary strings having the substring 00101
3.2. Formation rules (concatenation, reunion, Kleene star)
3.2.1.
$ A=\{ 0^{2k} \mid k \geq 1 \}$
$ B = \{0, \epsilon \}$
$ AB = ? $
3.2.2.
$ A = \{ 0^n 1^n \mid n \geq 1 \}$
$ B = \{ 1^n \mid n \geq 1 \} $
$ AB = ? $
$ BA = ? $
3.2.3
$ A = \{ 0^n 1^n 0^m \mid m \geq n \geq 1 \}$
$ B = \{ 0^n \mid n \geq 1 \} $
$ AB = ? $
$ BA = ? $
3.2.4.
$ A = ∅ $
$ B = \{ 1^n \mid n \geq 1 \} $
$ AB = ? $
$ A^* = ? $
$ B^* = ? $