Question

I wrote a program which can generate DFAs. But the DFAs are slightly incorrect. That is, sometimes they can't accept the correct strings.

My question is: is there any algorithm can correct the DFAs, so that they can accept the given correct strings?

More formally,

Suppose DFA D doesn't accept string str.

Need an algorithm A, s.t. D' = A( D, str) and D' accepts str

Was it helpful?

Solution

You could represent the additional string(s) you want to accept as chain automata and then simply take the union of these chains with the DFA D. Afterwards you may also need to determinize the unioned machine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top