Git Product home page Git Product logo

finiteautomata's Introduction

FiniteAutomata

This repository is intended to contain code files for various properties of finite automata. It is created for instructors who want to quickly provide/verify solutions. And for students who want to verify solutions.

Version 1.0 contains code for following algorithm

  • NFA to DFA
  • NFA-null to NFA
  • Minimization of DFA
  • DFA to RE using State Elimination method

Abbreviations

Following Abbreviations are used throughout this repository

  • FA=Finite Automata
  • NFA= Non-deterministic Finite Automata
  • DFA= Deterministic Finite Automata
  • NFA-null= Non-deterministic Finite Automata with null transitions
  • RE= Regular Expression

Code

All the code files are in Jupyter Notebook Python 3

Input

All codes take a transition table, in CSV file, as input. The following columns should be in the file

  • state, this column contains name of file
  • input_x column for each x in symbols, a comma separated list of states that can be reached from state on symbol x
  • isInitial, a binary column containing True if state is initial state and False otherwise.
  • isFinal, a binary column containing True if state is final state and False otherwise. For NFA-null following column is also required
  • input_null column, a comma separated list of states that can be reached from state of null input

Input Example

An example CSV file for NFA-null given in figure is

states,input_0,input_1,input_null,isInitial,isFinal
1,,,2,TRUE,FALSE
2,"2,3",,,FALSE,TRUE
3,,4,,FALSE,FALSE
4,,5,1,FALSE,FALSE
5,4,,,FALSE,FALSE

##Output The output of each code will be printed in the notebook and is self-explanatory. Some of the working will also be printed to help understand the working of algorithm.

Future Work.

Some more algorithms that should be added to this repository are

  • Extended transition function of FA
  • RE to FA

finiteautomata's People

Contributors

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