toAutomaton

Compute a DFA that accepts all strings within an edit distance of n.

All automata have the following properties:

  • They are deterministic (DFA).

  • There are no transitions to dead states.

  • They are not minimal (some transitions could be combined).


fun toAutomaton(n: Int, prefix: String): Automaton?

Compute a DFA that accepts all strings within an edit distance of n, matching the specified exact prefix.

All automata have the following properties:

  • They are deterministic (DFA).

  • There are no transitions to dead states.

  • They are not minimal (some transitions could be combined).