Presentation is loading. Please wait.

Presentation is loading. Please wait.

Simulating 2 FSA’s with 1 FSA. Purpose This presentation presents an example execution of the algorithm which takes as input two FSA’s and produces as.

Similar presentations


Presentation on theme: "Simulating 2 FSA’s with 1 FSA. Purpose This presentation presents an example execution of the algorithm which takes as input two FSA’s and produces as."— Presentation transcript:

1 Simulating 2 FSA’s with 1 FSA

2 Purpose This presentation presents an example execution of 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 Algorithm Specification –Input: FSA’s M 1 and M 2 –Output: FSA M 3

3 The two input FSA’s a b b b a a a,b a a b b I III II A B C D M1M1 M2M2

4 Initialization a b b b a a a,b a a b b The initial state of the output FSA M 3 is the ordered pair of the initial states of M 1 and M 2. I III II A B C D

5 Expand State I,A a b b b a a a,b a a b b I III II A B C D

6 Add New States a b b b a a a,b a a b b I III II A B C D

7 Expand State I,C a b b b a a a,b a a b b I III II A B C D

8 Add New States a b b b a a a,b a a b b I III II A B C D

9 Expand State II,B a b b b a a a,b a a b b I III II A B C D

10 Add One New State a b b b a a a,b a a b b I III II A B C D

11 Expand State I,B a b b b a a a,b a a b b I III II A B C D

12 No New States Added a b b b a a a,b a a b b I III II A B C D

13 Expand State II,D a b b b a a a,b a a b b I III II A B C D

14 Add One New State a b b b a a a,b a a b b I III II A B C D

15 Expand State III,B a b b b a a a,b a a b b I III II A B C D

16 No New States Added a b b b a a a,b a a b b I III II A B C D

17 Expand State III,D a b b b a a a,b a a b b I III II A B C D

18 Add 1 New State a b b b a a a,b a a b b I III II A B C D

19 Expand State I,D a b b b a a a,b a a b b I III II A B C D

20 No More New States a b b b a a a,b a a b b I III II A B C D

21 Determining Accepting States a b b b a a I III II a,b a a b b A B C D Set Intersection Both input machines should accept in order for new machine to accept The one accepting state of the new machine M 3 is I,D Set Union If either input machine accepts, new machine should accept The six accepting states of the new machine M 3 are I,A; I,C; I,B; II,D; III,D; I,D Set Difference: M 1 should accept but M 2 should not The three accepting states of the new machine M 3 are I,A; I,C; I,B Symmetric Difference: M 1 should accept but M 2 should not or M 2 should accept but M 1 should not The five accepting states of the new machine M 3 are I,A; I,C; I,B; II,D; III,D


Download ppt "Simulating 2 FSA’s with 1 FSA. Purpose This presentation presents an example execution of the algorithm which takes as input two FSA’s and produces as."

Similar presentations


Ads by Google