Starting from:

$30

COMP5361- Programming Assignment 3 Solved

. Use the PySimpleAutomata-software to write a program that takes as input a transition table for a DFA or NFA A, and outputs the transition diagram for A. For example, the input could be the automaton A =({q0,q1,q2},{0,1},δ,q0,{q2}) that has transition table

→ q0
{q0,q1}
{q0}
q1

{q2}
⋆q2


The automaton A as a transition diagram:




→{q0}
{q0,q1}
{q0}
{q1}

{q[1]}
⋆{q2}


{q0,q1}
{q0,q1}
{q0,q2}
⋆{q0,q2}
{q0,q1}
{q0}
⋆{q1,q2}

{q2}
⋆{q0,q1,q2}
{q0,q1}
{q0,q2}
Input/Output format
The input/output format is up to the student. You may take and show the information in any format you want. The input/output streams is up to the student as well. For example, you may read from sys.stdin or from a file.

Use of libraries and some built-in python functions
Any other function, whether built-in or not, that directly simplifies the assignment is not allowed.
Using the Moodle system, submit a .zip file that includes:

Source code.
A .pdf file, explaining your format and how to run your code in few lines.

[1] . Write a Python program that takes as input the transition table for an NFA-transitions), such as the one above, and outputs the transition table and diagram for a DFA B, such that L(A)= L(B). For example, the NFA above should result in output

and

More products