Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: how to make an explicit NFA? #47

Open
lesshaste opened this issue Apr 21, 2020 · 0 comments
Open

Question: how to make an explicit NFA? #47

lesshaste opened this issue Apr 21, 2020 · 0 comments

Comments

@lesshaste
Copy link

I apologise if this in the docs but I could not find it.

I would like to convert NFAs to DFAs using the function nfa2dfa from Automa.jl. However I can't see in the docs how to specify an NFA. Here is a toy example NFA.

 Automaton("nondet",2,"abcd",[ [ [ 1 ], [ 2 ] ], [ [ 2 ], [ ] ], [ [ 2 ], [ ] ], [ [ 1 ], [ 2 ] ] ],[ 1 ],[ 1, 2 ])

This follows the specification from GAP. It has 2 states and 4 letters. Here it is as a transition matrix:

   |  1       2
-------------------
 a | [ 1 ]   [ 2 ]   
 b | [ 2 ]           
 c | [ 2 ]           
 d | [ 1 ]   [ 2 ]   
Initial state:    [ 1 ]
Accepting states: [ 1, 2 ]

How can you make an NFA in Automa.jl from this example?

@lesshaste lesshaste changed the title Question: how make specify an explicit NFA? Question: how make an explicit NFA? Apr 21, 2020
@lesshaste lesshaste changed the title Question: how make an explicit NFA? Question: how to make an explicit NFA? Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant