Simulating 2 fsa s with 1 fsa
This presentation is the property of its rightful owner.
Sponsored Links
1 / 21

Simulating 2 FSA’s with 1 FSA PowerPoint PPT Presentation


  • 44 Views
  • Uploaded on
  • Presentation posted in: General

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.

Download Presentation

Simulating 2 FSA’s with 1 FSA

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Simulating 2 fsa s with 1 fsa

Simulating 2 FSA’s with 1 FSA


Purpose

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


The two input fsa s

a,b

b

a

b

a

The two input FSA’s

a,b

a

a

b

B

I

II

a

A

D

b

b

III

C

M1

M2


Initialization

a,b

b

a

b

a

Initialization

a,b

a

a

b

B

I

II

a

A

D

b

b

III

C

The initial state of the output FSA M3 is the ordered pair of the initial states of M1 and M2.


Expand state i a

a,b

b

a

b

a

Expand State I,A

a,b

a

a

b

B

I

II

a

A

D

b

b

III

C


Add new states

a,b

b

a

b

a

Add New States

a,b

a

a

b

B

I

II

a

A

D

b

b

III

C


Expand state i c

a,b

b

a

b

a

Expand State I,C

a,b

a

a

b

B

I

II

a

A

D

b

b

III

C


Add new states1

a,b

b

a

b

a

Add New States

a,b

a

a

b

B

I

II

a

A

D

b

b

III

C


Expand state ii b

a,b

b

a

b

a

Expand State II,B

a,b

a

a

b

B

I

II

a

A

D

b

b

III

C


Add one new state

a,b

b

a

b

a

Add One New State

a,b

a

a

b

B

I

II

a

A

D

b

b

III

C


Expand state i b

a,b

b

a

b

a

Expand State I,B

a,b

a

a

b

B

I

II

a

A

D

b

b

III

C


No new states added

a,b

b

a

b

a

No New States Added

a,b

a

a

b

B

I

II

a

A

D

b

b

III

C


Expand state ii d

a,b

b

a

b

a

Expand State II,D

a,b

a

a

b

B

I

II

a

A

D

b

b

III

C


Add one new state1

a,b

b

a

b

a

Add One New State

a,b

a

a

b

B

I

II

a

A

D

b

b

III

C


Expand state iii b

a,b

b

a

b

a

Expand State III,B

a,b

a

a

b

B

I

II

a

A

D

b

b

III

C


No new states added1

a,b

b

a

b

a

No New States Added

a,b

a

a

b

B

I

II

a

A

D

b

b

III

C


Expand state iii d

a,b

b

a

b

a

Expand State III,D

a,b

a

a

b

B

I

II

a

A

D

b

b

III

C


Add 1 new state

a,b

b

a

b

a

Add 1 New State

a,b

a

a

b

B

I

II

a

A

D

b

b

III

C


Expand state i d

a,b

b

a

b

a

Expand State I,D

a,b

a

a

b

B

I

II

a

A

D

b

b

III

C


No more new states

a,b

b

a

b

a

No More New States

a,b

a

a

b

B

I

II

a

A

D

b

b

III

C


Determining final states

a,b

a

a

a,b

b

b

B

I

II

a

a

b

a

A

D

b

b

III

C

Determining Final States

Set Intersection

Both input machines should accept in order for new machine to accept

The one accepting state of the new machine M3 is I,D

Set Union

If either input machine accepts, new machine should accept

The 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 not

The 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 not

The five accepting states of the new machine M3 are I,A; I,C; I,B; II,D; III,D


  • Login