Skip to main content
added 24 characters in body
Source Link
Yamar69
  • 1.1k
  • 7
  • 11

Is there a general approach to do this for more complex expressions?

Yes, there is a way. Note that a regular language is the language accepted by a NFA/DFA so the general approach to problems of this kind is to convert your expression into its corresponding NFA/DFA and then lexicographically search through all the words of the language until you find the first one that is accepted by your machine (reach the final state). I am not aware of other general methods besides this one.

Is there a general approach to do this for more complex expressions?

Yes, there is a way. Note that a regular language is the language accepted by a NFA/DFA so the general approach to problems of this kind is to convert your expression into its corresponding NFA/DFA and then lexicographically search through all the words of the language until you find the first one that is accepted by your machine. I am not aware of other general methods besides this one.

Is there a general approach to do this for more complex expressions?

Yes, there is a way. Note that a regular language is the language accepted by a NFA/DFA so the general approach to problems of this kind is to convert your expression into its corresponding NFA/DFA and then lexicographically search through all the words of the language until you find the first one that is accepted by your machine (reach the final state). I am not aware of other general methods besides this one.

Source Link
Yamar69
  • 1.1k
  • 7
  • 11

Is there a general approach to do this for more complex expressions?

Yes, there is a way. Note that a regular language is the language accepted by a NFA/DFA so the general approach to problems of this kind is to convert your expression into its corresponding NFA/DFA and then lexicographically search through all the words of the language until you find the first one that is accepted by your machine. I am not aware of other general methods besides this one.