This is an old revision of the document!
NFA Python Implementation
Implement (in Python) an NFA class that supports the following methods:
- step(configuration) = returns a list including all reachable configurations in one step. An epsilon transition is also considered a step.
- kstep(configuration, k) = returns a list including all reachable configurations in k steps. An epsilon transition is also considered a step.
- accept(self, word: Word) = True or False if the NFA accepts the given word. To simplify this task, you can use the kstep function.
- epsilonClosure(self, state: State) = the set of all states where we can go from the current state by going through epsilon transitions
- emptyLanguage(self) = True or False if the NFA's accepted language is the Empty Language