What is the language expressed by these expressions and why aren't they equal?
L1 = (ab)*
stands for ab
repeated 0 or more times.
L2 = a*b*
stands for a
repeated 0 or more times followed by b
repeated 0 or more times.
Those languages aren't equal because word abab
is in language L1
but it's not in language L2
.
Those languages aren't equal because word a
is in language L2
but it's not in language L1
.
There is a very useful service web service used for comparing regular expressions. Once you type in the regular expression, it describes it and let's you test it.
Examples of words in those languages:
L1:
L2:
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments