Edit this page Backlinks This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== 3. Regular Expressions ====== ===== 3.1. Natural Language / DFA => 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} \} $ {{:lfa:2022:lfa2022_lab2_ex1.png?400|}} <hidden 3.1.1.> $math[0^*10^*(10^*10^*)^*] </hidden> **3.1.2.** The language of binary words which contain **exactly** two ones {{:lfa:2022:lfa2022_lab2_ex2.png?550|}} <hidden 3.1.2.> $math[0^*10^*10^*] </hidden> **3.1.3.** The language of binary words which encode odd numbers (the last digit is least significative) {{:lfa:2022:lfa2022_lab2_ex3.png?300|}} <hidden 3.1.3.> $math[(0 \cup 1)^*1] </hidden> **3.1.4.** The set of all binary strings having the substring 00101 {{:lfa:2022:ex_8_dfa.png?400|}} <hidden 3.1.4.> $math[((1(01^*0)^*1)\cup0)^*] </hidden>