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

Issue with regular expression gym simplication #53

Open
arunaabh95 opened this issue Feb 22, 2023 · 1 comment
Open

Issue with regular expression gym simplication #53

arunaabh95 opened this issue Feb 22, 2023 · 1 comment

Comments

@arunaabh95
Copy link

These 2 expressions are same but give different output in the Regular Expression Gym

Input : b+ab*a+(b+$+ab*a)(b+ab*a)*(b+$+ab*a)
Gives: (b+ab*a)*

but Input b+ab*a+(b+ab*a)(b+ab*a)*(b+ab*a)
does not simplify at all.

I believe output 1 is the correct answer but I wanted to double-check this

@vvulpes0
Copy link

vvulpes0 commented Jun 3, 2023

The given expressions do not represent the same languages. They have different behaviour on the empty string. The second is equivalent not to (b+ab*a)* but to (b+ab*a)(b+ab*a)*

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

No branches or pull requests

2 participants