Given two regular languages (fx given by it's accepting regular expression), is there an algorithm to determine if one is a subset of the other?
Asked
Active
Viewed 241 times
1 Answers
1
Yes, there is an algorithm for it, but there is unlikely to be an efficient algorithm.
Notice that you can convert between a regular expression and a NFA in polynomial time. Moreover, determining whether one regular language is a subset of another, if both are represented as NFAs, is PSPACE-complete. Therefore, there is unlikely to be a polynomial-time algorithm for this, unless there is a huge surprise in complexity theory.
See Is there an efficient test for if an NFA accepts a subset of another NFA?. Related: Is language decideable (subset)?.
D.W.
- 167,959
- 22
- 232
- 500