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:2022:lab02-dfa [2022/10/21 22:36]
alexandra.udrescu01
lfa:2022:lab02-dfa [2023/10/17 00:01] (current)
mihai.calitescu added exercises for DFA lab
Line 72: Line 72:
 <​hidden>​ <​hidden>​
 {{:​lfa:​2022:​lfa2022_lab2_ex5.png?​600|}} {{:​lfa:​2022:​lfa2022_lab2_ex5.png?​600|}}
-  * Note: Checking for moths with 30 or 31 days can be done with a slightly bigger DFA.+  * Note: Checking for months ​with 30 or 31 days can be done with a slightly bigger DFA.
   * Note: Even checking for bisect years (29 Feb) can still be done with a DFA, but it's too big to do as a seminar example.   * Note: Even checking for bisect years (29 Feb) can still be done with a DFA, but it's too big to do as a seminar example.
 </​hidden>​ </​hidden>​
Line 88: Line 88:
 </​hidden>​ </​hidden>​
  
 +**2.1.7.** The set of all binary strings having the substring 00101
 +
 +<​hidden>​
 +{{:​lfa:​2022:​ex_8_dfa.png?​400|}}
 +  * Every state corresponds to a certain current configuration (eg. state **B** translates to a sequence of **0**; **C** to a seq of **00**; **D** -> **001** and so on)
 +  * Analyze how each incoming character changes the current available sequence. For example, if we are in state **E** and we read character **1** we reach a final state, but if we read **0** we go back to state **C** since the available seq will be **00** ​
 +</​hidden>​
  
 === Describe the language of the following DFAs and simulate them on the given inputs: === === Describe the language of the following DFAs and simulate them on the given inputs: ===
  
-**2.1.7.** w<​sub>​1</​sub>​ = 10011110, w<​sub>​2</​sub>​ = 00110010+**2.1.8.** w<​sub>​1</​sub>​ = 10011110, w<​sub>​2</​sub>​ = 00110010
  
 {{:​lfa:​2022:​lfa2022_lab2_ex8.png?​400|}} {{:​lfa:​2022:​lfa2022_lab2_ex8.png?​400|}}