simulating 2 fsa’s with 1 fsa
DESCRIPTION
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 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. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Simulating 2 FSA’s with 1 FSA](https://reader036.vdocument.in/reader036/viewer/2022062500/56814fd5550346895dbd98b1/html5/thumbnails/1.jpg)
Simulating 2 FSA’s with 1 FSA
![Page 2: Simulating 2 FSA’s with 1 FSA](https://reader036.vdocument.in/reader036/viewer/2022062500/56814fd5550346895dbd98b1/html5/thumbnails/2.jpg)
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 M1 and M2
– Output: FSA M3
![Page 3: Simulating 2 FSA’s with 1 FSA](https://reader036.vdocument.in/reader036/viewer/2022062500/56814fd5550346895dbd98b1/html5/thumbnails/3.jpg)
The two input FSA’s
a
b
b b
a
a
a,b
aa
b
b
a,b
I
III
II
A
B
C
D
M1 M2
![Page 4: Simulating 2 FSA’s with 1 FSA](https://reader036.vdocument.in/reader036/viewer/2022062500/56814fd5550346895dbd98b1/html5/thumbnails/4.jpg)
Initializationa
b
b b
a
a
a,b
aa
b
b
a,b
a bI,A
The initial state of the output FSA M3 is the ordered pair of the initial states of M1 and M2.
I
III
II
A
B
C
D
![Page 5: Simulating 2 FSA’s with 1 FSA](https://reader036.vdocument.in/reader036/viewer/2022062500/56814fd5550346895dbd98b1/html5/thumbnails/5.jpg)
Expand State I,Aa
b
b b
a
a
a,b
aa
b
b
a,b
a bI,A I,C II,B
I
III
II
A
B
C
D
![Page 6: Simulating 2 FSA’s with 1 FSA](https://reader036.vdocument.in/reader036/viewer/2022062500/56814fd5550346895dbd98b1/html5/thumbnails/6.jpg)
Add New Statesa
b
b b
a
a
a,b
aa
b
b
a,b
a bI,A I,C II,BI,CII,B
I
III
II
A
B
C
D
![Page 7: Simulating 2 FSA’s with 1 FSA](https://reader036.vdocument.in/reader036/viewer/2022062500/56814fd5550346895dbd98b1/html5/thumbnails/7.jpg)
Expand State I,Ca
b
b b
a
a
a,b
aa
b
b
a,b
a bI,A I,C II,BI,C I,B II,DII,B
I
III
II
A
B
C
D
![Page 8: Simulating 2 FSA’s with 1 FSA](https://reader036.vdocument.in/reader036/viewer/2022062500/56814fd5550346895dbd98b1/html5/thumbnails/8.jpg)
Add New Statesa
b
b b
a
a
a,b
aa
b
b
a,b
a bI,A I,C II,BI,C I,B II,DII,BI,BII,D
I
III
II
A
B
C
D
![Page 9: Simulating 2 FSA’s with 1 FSA](https://reader036.vdocument.in/reader036/viewer/2022062500/56814fd5550346895dbd98b1/html5/thumbnails/9.jpg)
Expand State II,Ba
b
b b
a
a
a,b
aa
b
b
a,b
a bI,A I,C II,BI,C I,B II,DII,B II,B III,BI,BII,D
I
III
II
A
B
C
D
![Page 10: Simulating 2 FSA’s with 1 FSA](https://reader036.vdocument.in/reader036/viewer/2022062500/56814fd5550346895dbd98b1/html5/thumbnails/10.jpg)
Add One New Statea
b
b b
a
a
a,b
aa
b
b
a,b
a bI,A I,C II,BI,C I,B II,DII,B II,B III,BI,BII,DIII,B
I
III
II
A
B
C
D
![Page 11: Simulating 2 FSA’s with 1 FSA](https://reader036.vdocument.in/reader036/viewer/2022062500/56814fd5550346895dbd98b1/html5/thumbnails/11.jpg)
Expand State I,Ba
b
b b
a
a
a,b
aa
b
b
a,b
a bI,A I,C II,BI,C I,B II,DII,B II,B III,BI,B I,B II,BII,DIII,B
I
III
II
A
B
C
D
![Page 12: Simulating 2 FSA’s with 1 FSA](https://reader036.vdocument.in/reader036/viewer/2022062500/56814fd5550346895dbd98b1/html5/thumbnails/12.jpg)
No New States Addeda
b
b b
a
a
a,b
aa
b
b
a,b
a bI,A I,C II,BI,C I,B II,DII,B II,B III,BI,B I,B II,BII,DIII,B
I
III
II
A
B
C
D
![Page 13: Simulating 2 FSA’s with 1 FSA](https://reader036.vdocument.in/reader036/viewer/2022062500/56814fd5550346895dbd98b1/html5/thumbnails/13.jpg)
Expand State II,Da
b
b b
a
a
a,b
aa
b
b
a,b
a bI,A I,C II,BI,C I,B II,DII,B II,B III,BI,B I,B II,BII,D II,D III,DIII,B
I
III
II
A
B
C
D
![Page 14: Simulating 2 FSA’s with 1 FSA](https://reader036.vdocument.in/reader036/viewer/2022062500/56814fd5550346895dbd98b1/html5/thumbnails/14.jpg)
Add One New Statea
b
b b
a
a
a,b
aa
b
b
a,b
a bI,A I,C II,BI,C I,B II,DII,B II,B III,BI,B I,B II,BII,D II,D III,DIII,BIII,D
I
III
II
A
B
C
D
![Page 15: Simulating 2 FSA’s with 1 FSA](https://reader036.vdocument.in/reader036/viewer/2022062500/56814fd5550346895dbd98b1/html5/thumbnails/15.jpg)
Expand State III,Ba
b
b b
a
a
a,b
aa
b
b
a,b
a bI,A I,C II,BI,C I,B II,DII,B II,B III,BI,B I,B II,BII,D II,D III,DIII,B III,B I,BIII,D
I
III
II
A
B
C
D
![Page 16: Simulating 2 FSA’s with 1 FSA](https://reader036.vdocument.in/reader036/viewer/2022062500/56814fd5550346895dbd98b1/html5/thumbnails/16.jpg)
No New States Addeda
b
b b
a
a
a,b
aa
b
b
a,b
a bI,A I,C II,BI,C I,B II,DII,B II,B III,BI,B I,B II,BII,D II,D III,DIII,B III,B I,BIII,D
I
III
II
A
B
C
D
![Page 17: Simulating 2 FSA’s with 1 FSA](https://reader036.vdocument.in/reader036/viewer/2022062500/56814fd5550346895dbd98b1/html5/thumbnails/17.jpg)
Expand State III,Da
b
b b
a
a
a,b
aa
b
b
a,b
a bI,A I,C II,BI,C I,B II,DII,B II,B III,BI,B I,B II,BII,D II,D III,DIII,B III,B I,BIII,D III,D I,D
I
III
II
A
B
C
D
![Page 18: Simulating 2 FSA’s with 1 FSA](https://reader036.vdocument.in/reader036/viewer/2022062500/56814fd5550346895dbd98b1/html5/thumbnails/18.jpg)
Add 1 New Statea
b
b b
a
a
a,b
aa
b
b
a,b
a bI,A I,C II,BI,C I,B II,DII,B II,B III,BI,B I,B II,BII,D II,D III,DIII,B III,B I,BIII,D III,D I,DI,D
I
III
II
A
B
C
D
![Page 19: Simulating 2 FSA’s with 1 FSA](https://reader036.vdocument.in/reader036/viewer/2022062500/56814fd5550346895dbd98b1/html5/thumbnails/19.jpg)
Expand State I,Da
b
b b
a
a
a,b
aa
b
b
a,b
a bI,A I,C II,BI,C I,B II,DII,B II,B III,BI,B I,B II,BII,D II,D III,DIII,B III,B I,BIII,D III,D I,DI,D I,D II,D
I
III
II
A
B
C
D
![Page 20: Simulating 2 FSA’s with 1 FSA](https://reader036.vdocument.in/reader036/viewer/2022062500/56814fd5550346895dbd98b1/html5/thumbnails/20.jpg)
No More New Statesa
b
b b
a
a
a,b
aa
b
b
a,b
a bI,A I,C II,BI,C I,B II,DII,B II,B III,BI,B I,B II,BII,D II,D III,DIII,B III,B I,BIII,D III,D I,DI,D I,D II,D
I
III
II
A
B
C
D
![Page 21: Simulating 2 FSA’s with 1 FSA](https://reader036.vdocument.in/reader036/viewer/2022062500/56814fd5550346895dbd98b1/html5/thumbnails/21.jpg)
Determining Final Statesa b
I,A I,C II,BI,C I,B II,DII,B II,B III,BI,B I,B II,BII,D II,D III,DIII,B III,B I,BIII,D III,D I,DI,D I,D II,D
a
b
b b
a
aI
III
II
a,b
aa
b
b
a,b
A
B
C
D
Set IntersectionBoth input machines should accept in order for new machine to acceptThe one accepting state of the new machine M3 is I,D
Set UnionIf either input machine accepts, new machine should acceptThe six accepting states of the new machine M3 are I,A; I,C; I,B; II,D; III,D; I,D
Set Difference: M1 should accept but M2 should notThe three accepting states of the new machine M3 are I,A; I,C; I,B
Symmetric Difference: M1 should accept but M2 should not or M2 should accept but M1 should notThe five accepting states of the new machine M3 are I,A; I,C; I,B; II,D; III,D