Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recursively check for epsilon closure states #21

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

joeylemon
Copy link
Owner

Closes #20

Before this change, we could have an NFA representing the regex string a*b*c*:

image

And the resulting DFA would not recognize 1,2,3 as reachable, instead it thinks 1,2 is correct:

image

After this change, the resulting DFA would correctly recognize 1,2,3 as reachable:

Screenshot 2024-03-09 at 2 34 06 PM

@joeylemon joeylemon merged commit 0ac6c95 into master Mar 15, 2024
1 check passed
@joeylemon joeylemon deleted the epsilon-closure-recursion branch March 15, 2024 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recursive / Multiple epsilon transitions can result in incorrect DFAs
1 participant