GithubHelp home page GithubHelp logo

thienanh96 / automata-operations-on-relations Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 2.38 MB

Implementations of operations on relations - An algorithmic approach , Automata theory.

JavaScript 100.00%

automata-operations-on-relations's Introduction

Automata-Operations-on-relations

Operations on Relations: Implementations

Modeling with Automata , Hanoi University of Science and Technology
Group 1:

  • Pham Van Tien
  • Nguyen Thien Anh
  • Vu Nhat Anh

Introduction

Automata-Operations-on-relations is a project written in Javascript , using Nodejs which is a JavaScript runtime. Based on Chapter 6 of the lecture notes: Automata theory , an algorithmic approach - Javier Esparza released on August 26 , 2017 , this project is constructed, concentrating on implementing some algorithms of operations on relations. We implemented 5 operations : PROJECT ( on component 1 ) , PROJECT ( on component 2 ) , JOIN , POST, PRE. We also implemented the NFA-to-DFA conversion , state minimization ( remove unreachable states , merge equivalent states ) to reduce the number of states.
In term of this project, we used examples in that above lecture notes to conveniently help you follow.

Installation

  1. Download and install Nodejs.
  2. Download this project and extract the zip file.

Usage

  1. The .jff input files are in input folder, they are examples so you can replace them by others.
  2. Go into project folder by command line , then type npm install xml2js to create node modules folder and download xml2js library
  3. Go into project folder by command line , then type node buildxml
  4. The .jff output files will be created in output folder , they will be opened automatically with JFlap.

About algorithms

Projection operation

GitHub Logo

Join operation

GitHub Logo

Post operation

We only have to replace lines 7-8 of join's algorithm by this two line to get post's algorithm GitHub Logo

Pre operation

We only have to replace lines 7-8 of join's algorithm by this two line to get post's algorithm GitHub Logo

Pad closure function

GitHub Logo

State minimization

  1. Convert NFA to DFA
    First we need to do this before implementing the state minimization.
    Refer to this link for the algorithm.
  2. Remove unreachable states
    First, we need to identify the reachable states
    GitHub Logo
    Eventually, we remove the unreachable states
  3. Merge the equivalent states
    GitHub Logo
    GitHub Logo

automata-operations-on-relations's People

Contributors

thienanh96 avatar

Stargazers

 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.