質問

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

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top