[SOLVED] COMP5361- Programming Assignment 3

30.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

Rate this product

. 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:

  1. 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

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.