Question: 1. Write a function that takes as arguments a FSA f, a regular expression r, and a string s, and returns True if f and

1. Write a function that takes as arguments a FSA f, a regular expression r, and a string s, and returns True if f and r are equivalent with respect to that string. That means that either both f accepts s and r matches s or both f and r reject the string. Your function should False otherwise.

2. Give an example FSA and RE that are equivalent and use your function and at least two example strings, a string which they both accept and a string which they both reject.

*using python

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!