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:lab05-nfa-python [2020/11/02 11:07]
lfa
lfa:lab05-nfa-python [2020/11/08 13:11] (current)
dmihai
Line 34: Line 34:
 You'll find in //​nfa_skel.rar//​ a class that already reads the input and forms the NFA. You'll find in //​nfa_skel.rar//​ a class that already reads the input and forms the NFA.
  
-Also, you can use the **graphvizNFA** method to get a graphical representation ​for the NFA, but you will have to install the //​graphviz//​ library.+Also, you can use the **graphvizNFA** method to get a graphical representation ​of the NFA, but you will have to install the //​graphviz//​ library.
 <​code>​ <​code>​
    pip install graphviz    pip install graphviz
Line 53: Line 53:
 3. **accept(self,​ word: Word)** 3. **accept(self,​ word: Word)**
   * True or False if the NFA accepts the given word.   * True or False if the NFA accepts the given word.
-  * to simplify this task, you can use the //kstep// function. 
  
 4. **epsilonClosure(self,​ state: State)** 4. **epsilonClosure(self,​ state: State)**