Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Plot a nondeterministic finite automaton
ResourceFunction["NFAPlot"][rules,start,accept] plots the NFA described by rules, with the starting state start and the accept state(s) accept. |
Plot a simple NFA with six rules and one accept state:
In[1]:= |
Out[1]= |
Remove all state labels:
In[2]:= |
Out[2]= |
Reduce the size of the labels:
In[3]:= |
Out[3]= |
Specify whether the transitions should be labeled:
In[4]:= |
Out[4]= |
Decrease the transition label size:
In[5]:= |
Out[5]= |
For larger plots, the labels are often too big. This can simply be adjusted using "StateLabelSize":
In[6]:= |
Out[6]= |
In[7]:= |
Out[7]= |
This work is licensed under a Creative Commons Attribution 4.0 International License