Coder Social home page Coder Social logo

finite-automata-simulator's Introduction

Finite Automata Simulator

DFA and NFA to DFA converter


Theory of machines and languages course project.
`dfa.py` reads a DFA from `DFA_Input_1.txt` in the following input order and then gets a string from input. Then it outputs whether input string was accepted by DFA or not.
`nfa_to_dfa.py` reads a NFA from `NFA_Input_2.txt` in the following input order and then writes equivalent DFA to `DFA_Output_2.txt`.

Input file format

  • First line are automata's alphabet separated by space.
  • Second line are states in the automata separated by space.
  • Third line is initial state of automata.
  • Fourth line are final states separated by space.
    And the rest are transitions in states in the automata and each line specifies one transition in the automata (that hasthe following order):
<current state> <letter> <next state>

Sample input file

0 1
q0 q1 q2
q0
q1
q0 λ q1
q0 0 q1
q1 0 q0
q1 1 q1
q1 0 q2
q1 1 q2
q2 0 q2
q2 1 q1

finite-automata-simulator's People

Contributors

amirhossein-rajabpour avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.