Question

Describe an algorithm that shows that the following problem is decidable: given two regular expressionsR1andR2, is...

Describe an algorithm that shows that the following problem is decidable: given two regular expressionsR1andR2, is L(R1) =L(R2)? Hint: use Kleene’s theorem that relates regular expressions and finite automata

0 0
Add a comment Improve this question Transcribed image text
Answer #1

We use the 2 properties here:-

1. Given a regular expression R, then by Kleene's theorem, there always exist a DFA M corresponding to R such that L(R) =L(M).

2. Given 2 DFAs M1 and M2, the problem of finding L(M1) = L(M2) is decidable.

Following is the decidable algorithm:-

1. Create DFA M1 and M2 corresponding to R1 and R2 respectively.

2. If L(M1) = L(M2) then accept else reject.

Hence the problem L(R1) = L(R2) is decidable.

Add a comment
Know the answer?
Add Answer to:
Describe an algorithm that shows that the following problem is decidable: given two regular expressionsR1andR2, is...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT