Tool for converting nondeterministic finite automaton with one letter transitions and without epsilon edges to:
- deterministic finite automaton
- complete deterministic finite automaton
- minimal complete deterministic finite automaton
Just run main.py in interactive way or with input file. For example:
cat tests/test2.txt | python3 pdkator.pyor for interactive just
python3 pdkator.pyExample of output:
********************
Total 8 vertexes
Start vertex is - {1}
Terminal vertexes: {{3, 5}, {3, 4, 5}, {5}}
Edges: format from -letter-> to1 | to2 ...
----------
{1} -a-> {3}
{1} -b-> {11}
----------
{3} -a-> {4}
{3} -b-> {5}
----------
{4} -a-> {11}
{4} -b-> {3}
----------
{3, 5} -a-> {3, 4, 5}
{3, 5} -b-> {5}
----------
{6} -a-> {5}
{6} -b-> {11}
----------
{3, 4, 5} -a-> {3, 4, 5}
{3, 4, 5} -b-> {3, 5}
----------
{5} -a-> {3, 5}
{5} -b-> {6}
----------
{11} -a-> {11}
{11} -b-> {11}
********************
To run tests:
python3 tests.pyTo get coverage
coverage run -m unittest discover
coverage html
open htmlcov/index.html