Code Monkey home page Code Monkey logo

nfa-to-dfa's People

Contributors

awillif avatar joeylemon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

nfa-to-dfa's Issues

do input from the table below

let user do input from table. i think it wil be really useful and fast to make the nfa by typing the state, transition, start, accept state, symbol from the table. First input the state name, then transition name, then select the start state from the list of state(using select or radio), then input the accept state from list of state. after that input the state transition direction in the table.

sorry if you confused with what i wrote here, i can't put words together well. you can ask for more detail. thank you

Recursive / Multiple epsilon transitions can result in incorrect DFAs

While tinkering with the program, I noticed that an NFA representing the regex string a*b*c* is not transcribed correctly.
image
Specifically, the program does not recursively check what states can be reached by epsilon transitions; in this case, 1,2,3 should be reachable, but the program believes that 1,2 is correct:
image
This not only results in redundant states, but also means the resulting DFA can be incorrect. In this case, the DFA rejects the string ccccc, even though it is valid according to the original regex rule.

It seems the error stems from the lack of recursion in the epsilon closure function.

About the Import file

Also one more thing. I can see at the index.js file that you have a querySelector about the import button. You are saving what the file has in a variable named “contents”. I can understand that the file has a specific type and format. Where do you define both of them?
I am trying to understand how we are going from the information of file (reading and analysing the information of the file) to the illustration of the NFA.
Thank you very much in advance!

Object "transitions"

Hello, i wnat ask this:
I can only see that is the fa.js file in the constructor you have written in the comments that transitions is an object, but where do you define the properties of this object and where do you define what the form of the transition look like (for example [starting stete][symbol]=>[final states])?

Τhank you very much in advance.

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.