This repository has been archived by the owner. It is now read-only.
Finite Automata Optimizer
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc Adicionado formato do arquivo e legenda na documentação. Jul 27, 2012
lib Added project LICENSE. Jun 15, 2015
nbproject Os símbolos usados nas transições agora são adicionados automaticamen… Jul 27, 2012
samples Added .gitignore to replace svn:ignore. Jun 15, 2015
src Formatado comentários do código. Jul 27, 2012
.gitignore Added .gitignore to replace svn:ignore. Jun 15, 2015
LICENSE Added project LICENSE. Jun 15, 2015
README.md
build.xml Estrutura inicial do projeto de OAF (Otimizador de Autômatos Finitos) Jul 11, 2012
manifest.mf Estrutura inicial do projeto de OAF (Otimizador de Autômatos Finitos) Jul 11, 2012

README.md

Finite Automata Optimizer

This project Finite Automata Optimizer (Otimizador de Autômatos Finitos) was developed to reduce any NFA (Nondeterministic Finite Automata) to a minimal DFA (Deterministic Finite Automata).

This is a flowchart showing the operation of the application:

Flowchart

For the sample input below:

Input Output
a b c a c
q0 q1 q2 q3 q0 q2q3q3
q0 q0
q3 q2q3q3
q0 _ q1 q0 a q2q3q3
q0 a q3 q0 c q2q3q3
q0 b q2
q1 c q2
q1 c q3

Here are some screenshots of the automata been optimized:

Initial automata Initial automata

Elimination of epsilon transitions Elimination of epsilon transitions

Elimination of nondeterminism Elimination of nondeterminism

Elimination of unreachable states Elimination of unreachable states

Elimination of useless states Elimination of useless states

Minimal DFA Minimal DFA

Source code:

This source was written in Java language using NetBeans 7.x as IDE and the JUNG library to draw the graphs. All classes, methods, atributtes, etc. are written in English, but most comments are written in Brazilian Portuguese (as required by the teacher).

I’m not the only author of this code, it was written along with my classmate Guilherme Maganha Moreira. We can not guarantee that the algorithms are 100% correct, because at the time we wrote this code we are still learning about automata.

We decided to release our source code under the MIT License. The JUNG library is licensed under the BSD License and is included in binary form.