You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm using version 8.3.0 and would like to compare different DFAs based on their regular expressions. When I convert a DFA to GNFA and use to_regex() method, I sometimes get different results for the same DFA when executing the code more then once. Is there a way to make this process deterministic, so I would get the same regular expression every time?
Thanks in advance,
Hila.
I'm using the following code when I sometimes receive (012(012|12)*(03|3)|03)*(012(012|12)*(01?|1?)|(01?)?)
and sometimes (0(12(12)*(30|0)|30)*(12(12)*(3|1?)|(3|1?)))?
The text was updated successfully, but these errors were encountered:
HilaZiv
changed the title
to_regex method gives different results for the same input
to_regex method returns different results for the same input
Jul 7, 2024
Interesting. @eliotwrobson I wonder if this has to do with some assumption in the GNFA logic about the order of set elements, when the order of set elements in Python can change between interpreter runs. Thoughts?
I'd have to play around with the code a little bit to get a better feel for what's going on. However, I don't think this is technically a bug, when I checked the different regexs output by the algorithm, they were equivalent.
Hello, I'm using version 8.3.0 and would like to compare different DFAs based on their regular expressions. When I convert a DFA to GNFA and use to_regex() method, I sometimes get different results for the same DFA when executing the code more then once. Is there a way to make this process deterministic, so I would get the same regular expression every time?
Thanks in advance,
Hila.
I'm using the following code when I sometimes receive
(012(012|12)*(03|3)|03)*(012(012|12)*(01?|1?)|(01?)?)
and sometimes
(0(12(12)*(30|0)|30)*(12(12)*(3|1?)|(3|1?)))?
The text was updated successfully, but these errors were encountered: