Does an algorithm exist which can determine whether one regular language matches any input another regular language matches?
问题 Let's say we have regular expressions: Hello W.*rld Hello World .* World .* W.* I would like to minimize the number of regexes required to match arbitrary input. To do that, I need to find if one regular expression matches any input matched by another expression. Is that possible? Billy3 回答1: Any regular expression can be linked to a DFA - you can minimize the DFA and since the minimal form is unique, you can decide whether two expressions are equivalent. Dani Cricco pointed out the Hopcroft