Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lfa:2026:lab01 [2026/10/05 11:26]
tpruteanu
lfa:2026:lab01 [2026/10/05 11:36] (current)
tpruteanu
Line 22: Line 22:
 </​hidden>​*/​ </​hidden>​*/​
  
-**1.1.2.** $ L=\{w \in \{0,1\}^* \text{ | w contains an odd number of ones} \} $.+**1.1.2.** The language of binary words that contains only the words 010 and 1010. 
 + 
 +**1.1.3.** $ L=\{w \in \{0,1\}^* \text{ | w contains an odd number of ones} \} $.
  
  
Line 36: Line 38:
  
  
-**1.1.3.** The language of binary words which contain **exactly** two ones.+**1.1.4.** The language of binary words which contain **exactly** two ones.
  
 /​*<​hidden>​ /​*<​hidden>​
Line 46: Line 48:
 </​hidden>​*/​ </​hidden>​*/​
  
-**1.1.4.** The language of all binary words having the substring 00101.+**1.1.5.** The language of all binary words having the substring 00101.
  
-**1.1.5.** The language of binary words that start and end with different digits.+**1.1.6.** The language of binary words that start and end with different digits.
  
-**1.1.6.** (*) The language of words which encode binary numbers divisible by 3.+**1.1.7.** (*) The language of words which encode binary numbers divisible by 3.
  
-**1.1.7.** (* *) The language of words which encode binary numbers divisible by 3, represented in reverse order (the least significant digit is first).+**1.1.8.** (* *) The language of words which encode binary numbers divisible by 3, represented in reverse order (the least significant digit is first).
  
-**1.1.8.** (*) The language of quaternary words (base 4), that follow the rule that every zero is immediately followed by a sequence of at least 2 consecutive threes and every one is immediately followed by a sequence of at most 2 consecutive twos.+**1.1.9.** (*) The language of quaternary words (base 4), that follow the rule that every zero is immediately followed by a sequence of at least 2 consecutive threes and every one is immediately followed by a sequence of at most 2 consecutive twos. 
 + 
 +**1.1.10.** (*) The langauge of binary words that have an equal number of **01** sequences as **10** sequences.
  
 /​*<​hidden>​ /​*<​hidden>​
Line 73: Line 77:
 **1.2.1** What happens if we switch all final states to non-final states and vice-versa in a DFA? **1.2.1** What happens if we switch all final states to non-final states and vice-versa in a DFA?
  
-**1.2.2** Prove that if L(M) is infinite, there has to be some cycle in the states graph, such that there is a path from the initial state to the cycle, and from the cycle to a final state. +**1.2.2** Prove that if L(M) is infinite, there has to be some cycle in the states graph, such that there is a path from the initial state to the cycle, and from the cycle to a final state. If no such cycle exists, L(M) has to be finite.
- +
-**1.2.3** ​If no such cycle described above exist, L(M) is finite.+
  
-**1.2.4** Show that if you can construct a DFA to accept L, than you can also construct a DFA to accept $ L \cup \{a\}, \forall a \in \Sigma $.+**1.2.3** Show that if you can construct a DFA to accept L, than you can also construct a DFA to accept $ L \cup \{a\}, \forall a \in \Sigma $.