Skip to content

Question: how to make an explicit NFA? #47

@lesshaste

Description

@lesshaste

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions