Time Complexity DFA construction from regex directly -


I wanted to use algo 3.36 directly in the Python book from the regular expression of DFA time.

I was confused how many times would the loop be executed? As the distinction mentioned in Elgo, will they be equal to many operands in the Ragex?

In addition, how much work will be done inside the for loop, which executes the equivalent. Σ | time?

Thank you.

The complexity of the build will still be (2 n ). Consider the worst case scenario:

L = {w} {0}} *: | W | ≥ N and the last symbol with the n-th symbol 1}

is a regular expression corresponding to the language (0 + 1) * 1 (0 + 1) ... (0 + 1) Where repeats for the last time - 1 time. The complexity of time will still be o (2 n ), because the number of states in DFA is o (2 n ) related to the number of suffixes of one word in L ).


Comments