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:lab02-dfa [2021/10/08 11:00]
pdmatei
lfa:lab02-dfa [2021/10/13 16:13] (current)
ioana.georgescu [Classes in Python]
Line 10: Line 10:
 class Example: class Example:
    # the class constructor.    # the class constructor.
-   ​def ​__init___(self,​param1,​param2):​+   ​def ​__init__(self,​param1,​param2):​
       # the keyword self is similar to this from Java       # the keyword self is similar to this from Java
       # it is the only legal mode of initialising and referring class member variables       # it is the only legal mode of initialising and referring class member variables
Line 118: Line 118:
 ---- ----
  
-**2.2.2.** Define a function which takes a string of the following form showed below, and returns a DFA:+**2.2.2.** Define a function which takes a string of the following form showed below, and returns a DFA **with states as integers**:
 <​code>​ <​code>​
 <​initial_state>​ <​initial_state>​
Line 149: Line 149:
 **2.2.4.** Implement function which takes a DFA and a **configuration** (pair of state and rest of word) and returns the next configuration. **2.2.4.** Implement function which takes a DFA and a **configuration** (pair of state and rest of word) and returns the next configuration.
  
-**2.2.5.** Implement a function which verifies if a word is **accepted** by a Dfa.+**2.2.5.** Implement a function which verifies if a word is **accepted** by a Dfa. What kind of general list-operation best matches the accepting process?