World's most popular travel blog for travel bloggers.

[Solved]: Is there a way to test if two NFAs accept the same language?

, , No Comments
Problem Detail: 

Or at least generate a set of strings that one NFA accepts, so I can feed it into the other NFA. If I do a search through every path of the NFA, will that work? Although that will take a long time.

Asked By : Duncan

Answered By : András Salamon

The decision problem is PSPACE-complete as Shaull noted.

However, it turns out that in practice it is often possible to decide NFA equivalence reasonably quickly. Mayr and Clemente (based on experimental evidence) claim that the average-case complexity scales quadratically. Their techniques rely on pruning the underlying labelled transition system via local approximations of trace inclusions.

Just like SAT is NP-complete in a worst-case analysis, yet often turns out surprisingly tractable for real-world instances, it therefore seems likely that NFA equivalence can be decided efficiently for many real-world instances.

Best Answer from StackOverflow

Question Source : http://cs.stackexchange.com/questions/12624

0 comments:

Post a Comment

Let us know your responses and feedback