Presentation is loading. Please wait.

Presentation is loading. Please wait.

Why the algorithm works! Simulating 2 FSA’s with 1 FSA.

Similar presentations


Presentation on theme: "Why the algorithm works! Simulating 2 FSA’s with 1 FSA."— Presentation transcript:

1 Why the algorithm works! Simulating 2 FSA’s with 1 FSA

2 Purpose This presentation attempts to give the reader some intuition as to why the algorithm which takes as input two FSA’s and produces as output an FSA which “simulates” both input FSA’s on any input string works correctly. We use the example from the previous presentation to illustrate this intuition.

3 Why the Transformation Works a b b b a a I III II a,b a a b b A B C D M1M1 M2M2 Constructed FSA

4 Key Idea a b b b a a I III II a,b a a b b A B C D M1M1 M2M2 Constructed FSA In all configurations, the pair of states that M 1 and M 2 are in is exactly the state that the constructed FSA is in.

5 Initial Configurations a b b b a a I III II a,b a a b b A B C D I,[1,abbb] A,[1,abbb](I,A),[1,abbb]

6 Second Configurations a b b b a a I III II a,b a a b b A B C D I,[1,abbb] A,[1,abbb](I,A),[1,abbb] I,[2,abbb] C,[2,abbb](I,C),[2,abbb]

7 Third Configurations a b b b a a I III II a,b a a b b A B C D I,[1,abbb] A,[1,abbb](I,A),[1,abbb] I,[2,abbb] C,[2,abbb](I,C),[2,abbb] II,[3,abbb]D,[3,abbb](II,D),[3,abbb]

8 Fourth Configurations a b b b a a I III II a,b a a b b A B C D I,[1,abbb] A,[1,abbb](I,A),[1,abbb] I,[2,abbb] C,[2,abbb](I,C),[2,abbb] II,[3,abbb]D,[3,abbb](II,D),[3,abbb] III,[4,abbb]D,[4,abbb](III,D),[4,abbb]

9 Final Configurations a b b b a a I III II a,b a a b b A B C D I,[1,abbb] A,[1,abbb](I,A),[1,abbb] I,[2,abbb] C,[2,abbb](I,C),[2,abbb] II,[3,abbb]D,[3,abbb](II,D),[3,abbb] III,[4,abbb]D,[4,abbb](III,D),[4,abbb] I,[5,abbb]D,[5,abbb](I,D),[5,abbb]

10 Determining Acceptance a b b b a a I III II a,b a a b b A B C D I,[5,abbb]D,[5,abbb](I,D),[5,abbb] The input string abbb is accepted by both input FSA’s. Thus, if the constructed FSA is designed to accept the set intersection or set union of the two languages accepted by the two input FSA’s, the constructed FSA should accept the input string abbb. If the constructed FSA is designed to accept the set difference or symmetric difference of the two languages accepted by the two input FSA’s, it should reject the input string abbb.


Download ppt "Why the algorithm works! Simulating 2 FSA’s with 1 FSA."

Similar presentations


Ads by Google