# How to specify an NFA using Automa.jl?

**URL:** <https://discourse.julialang.org/t/how-to-specify-an-nfa-using-automa-jl/37904>\
**Category:** New to Julia\
**Created:** [April 20, 2020, 3:03pm UTC](https://discourse.julialang.org/t/how-to-specify-an-nfa-using-automa-jl/37904 "2020-04-20T15:03:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lesshaste](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lesshaste/32/12302_2.png) [@lesshaste](https://discourse.julialang.org/u/lesshaste)\
**Post date:** [April 20, 2020, 3:03pm UTC](https://discourse.julialang.org/t/how-to-specify-an-nfa-using-automa-jl/37904/1 "2020-04-20T15:03:07Z")

</div>

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.

```julia
 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:

```julia
   | 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?
