Skip to content

Instantly share code, notes, and snippets.

@draftcode
Created December 16, 2011 06:45
Show Gist options
  • Select an option

  • Save draftcode/1484843 to your computer and use it in GitHub Desktop.

Select an option

Save draftcode/1484843 to your computer and use it in GitHub Desktop.
delta(q0, a, q1).
delta(q1, a, q1).
delta(q1, a, q2).
delta(q1, b, q1).
delta(q2, b, q3).
ndfa(L) :- ndfa(q0, L, q3).
ndfa(Q, [], Q).
ndfa(Q0, [A|L], Q) :-
delta(Q0, A, Q1), ndfa(Q1, L, Q).
% vim: ft=prolog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment