This a question in a compiler class, principles techniques and tools
Are the following identities on regular expressions correct. explain why?
1.) abb*c = ab*c
2.) ( a | b | c)* = (( a | b | c) e)*
3.) ( aa | ab | ac) = a ( a | b | c | e)
1.) abb*c = ab*c
Not correct
-Counter example-
ac is accepted by ab*c
ac is not accepted by abb*c
2.) ( a | b | c)* = (( a | b | c) e)*
Not correct
-Counter example-
a is accepted by ( a | b | c)*
a is not accepted by (( a | b | c) e)*
3.) ( aa | ab | ac) = a ( a | b | c | e)
Not correct
-Counter example-
ae is accepted by a ( a | b | c | e)
ae is not accepted by ( aa | ab | ac)
Please up vote. I need it very badly right now. Comment if you have any doubts. Happy Learning! Please post one from next time.
Get Answers For Free
Most questions answered within 1 hours.