reduced automaton

reduced automaton

Besides eliminating useless states that do not contribute to word acceptance, what else can we do to “clean up” an

automaton

? In other words, we would like to reduce the number of states in an automaton to as small as possible without affecting its power of accepting words.

The next thing we can do is to look to find states that do the same thing and combine them into one state. Two states do the same thing if, acting as starting states, when an arbitrary word is fed into the automaton, they lead to the same

conclusion

: either both accept the word, or both reject it. Arbitrary automata are too general to ensure definite conclusions, so we restrict our attention to

deterministic

finite automata.

Definition

. Let

A

=

(

S

,

Σ

,

δ

,

q

0

,

F

)

be an automaton with a single start state

q

0

. For any state

s

∈

S

, define

A

s

to be the automaton obtained from

A

by replacing

q

0

by

s

. In other words,

A

s

:=

(

S

,

Σ

,

δ

,

s

,

F

)

. Two states

s

,

t

∈

S

are said to be

indistinguishable

if

L

⁢

(

A

s

)

=

L

⁢

(

A

t

)

.

Let us write

s

≈

t

to mean that

s

and

t

are indistinguishable. Then

≈

is an

equivalence relation

on

S

. For each

s

∈

S

, write

[

s

]

the

equivalence class

containing

s

. Let

S

/

≈

be the set of equivalence classes.

If

A

is a DFA,

s

≈

t

is the same as saying that, for all words

u

over

Σ

,

δ

⁢

(

s

,

u

)

∈

F

iff

δ

⁢

(

t

,

u

)

∈

F

. For the following discussion, we shall assume that

A

is a DFA, unless otherwise specified.

Here are two basic observations:

1.

if

[

s

]

=

[

t

]

, then

[

δ

⁢

(

s

,

a

)

]

=

[

δ

⁢

(

t

,

a

)

]

: Let

p

=

δ

⁢

(

s

,

a

)

and

q

=

δ

⁢

(

t

,

a

)

. Given any

u

over

Σ

, we have that

δ

⁢

(

p

,

u

)

=

δ

⁢

(

δ

⁢

(

s

,

a

)

,

u

)

=

δ

⁢

(

s

,

a

⁢

u

)

, which is in

F

iff

δ

⁢

(

t

,

a

⁢

u

)

=

δ

⁢

(

δ

⁢

(

t

,

a

)

,

u

)

=

δ

⁢

(

q

,

u

)

is in

F

. Hence

p

≈

q

.

2.

if

[

s

]

=

[

t

]

and

t

∈

F

, then

s

∈

F

: as

δ

⁢

(

t

,

λ

)

=

t

∈

F

shows that

s

=

δ

⁢

(

s

,

λ

)

∈

F

. As a result of this,

p

∈

F

iff

[

p

]

∈

F

′

.

Define

A

′

=

(

S

′

,

Σ

,

δ

′

,

q

0

′

,

F

′

)

as follows:

S

′

:=

S

/

≈

,

q

0

′

:=

[

q

0

]

,

F

′

:=

{

[

t

]

∣

t

∈

F

}

, and

δ

′

⁢

(

[

s

]

,

a

)

:=

[

δ

⁢

(

s

,

a

)

]

, for any

a

∈

Σ

.

Now,

δ

′

is a

well-defined

function

from the first observation above, so that

A

′

is a well-defined automaton. It has the following

property

: for any word

u

over

Σ

:

δ

′

⁢

(

[

s

]

,

u

)

=

[

δ

⁢

(

s

,

u

)

]

.

This can be proved by

induction

on the length of

u

:

•

δ

′

⁢

(

[

s

]

,

λ

)

=

[

s

]

=

[

δ

⁢

(

s

,

λ

)

]

•

suppose

δ

′

⁢

(

[

s

]

,

u

)

=

[

δ

⁢

(

s

,

u

)

]

, then for any

a

∈

Σ

,

δ

′

⁢

(

[

s

]

,

u

⁢

a

)

=

δ

′

⁢

(

δ

′

⁢

(

[

s

]

,

u

)

,

a

)

=

δ

′

⁢

(

[

δ

⁢

(

s

,

u

)

]

,

a

)

=

[

δ

⁢

(

δ

⁢

(

s

,

u

)

,

a

)

]

=

[

δ

⁢

(

s

,

u

⁢

a

)

]

.

It also has the property that for if two states are indistinguishable, they are in fact the same state: suppose

[

s

]

≈

[

t

]

, then for every

u

over

Σ

,

δ

′

⁢

(

[

s

]

,

u

)

∈

F

′

iff

δ

′

⁢

(

[

t

]

,

u

)

∈

F

′

, or

[

δ

⁢

(

s

,

u

)

]

∈

F

′

iff

[

δ

⁢

(

t

,

u

)

]

∈

F

′

, which is the same as saying

δ

⁢

(

s

,

u

)

∈

F

iff

δ

⁢

(

t

,

u

)

∈

F

, or

s

≈

t

, or

[

s

]

=

[

t

]

.

Definition

. An finite automaton with a single start state is said to be

reduced

or

minimal

if

s

≈

t

implies

s

=

t

, where

≈

is the indistinguishable relation on its state set.

Thus

A

′

constructed above is reduced.

Below are

state diagrams

of an automaton

A

(not deterministic) and its

reduction

A

′

:

Note that

p

≈

q

, as

L

⁢

(

A

p

)

=

L

⁢

(

A

q

)

=

{

a

⁢

a

,

a

⁢

b

,

b

⁢

a

,

b

⁢

b

}

, and are combined into one state

x

. Similarly,

r

≈

s

, as

L

⁢

(

A

r

)

=

L

⁢

(

A

s

)

=

{

a

,

b

}

, and are combined into

y

. Finally, note that

L

⁢

(

A

)

=

L

⁢

(

A

′

)

=

{

u

∣

|

u

|

=

3

}

.

With respect to DFA’s, the following is true:

Proposition 1

.

Every DFA

A

is

equivalent

to a reduced DFA

A

′

. Furthermore, if

A

is

accessible

(or simplified), so is

A

′

. Finally, two equivalent reduced accessible automata are

isomorphic

.

Proof.

We have already shown that given a DFA

A

, the automaton

A

′

constructed above is reduced. Next, we see that

u

∈

L

⁢

(

A

)

iff

δ

⁢

(

q

0

,

u

)

∈

F

iff

[

δ

⁢

(

q

0

,

u

)

]

∈

F

′

iff

δ

′

⁢

(

[

q

0

]

,

u

)

∈

F

′

iff

u

∈

L

⁢

(

A

′

)

. Therefore,

L

⁢

(

A

)

=

L

⁢

(

A

′

)

.

Next, suppose

A

is accessible, we want to show that

[

p

]

is accessible for any

p

∈

S

. Since

p

is accessible,

p

=

δ

⁢

(

q

0

,

u

)

for some word

u

over

Σ

. So

δ

⁢

(

[

q

0

]

,

u

)

=

[

δ

⁢

(

q

0

,

u

)

]

=

[

p

]

is accessible as well. This proves that

A

′

is accessible.

Suppose now that

A

is simplified. Pick any

s

∈

S

, we want to show that

[

s

]

is useful. Since

s

is useful, there are words

u

,

v

over

Σ

such that

δ

⁢

(

q

0

,

u

)

=

s

and

δ

⁢

(

s

,

v

)

∈

F

, or equivalently

δ

′

⁢

(

[

q

0

]

,

u

)

=

[

δ

⁢

(

q

0

,

u

)

]

=

[

s

]

and

δ

′

⁢

(

[

s

]

,

v

)

=

[

δ

⁢

(

s

,

v

)

]

∈

F

′

, so that

[

s

]

∈

S

′

is useful. This shows that

A

′

is simplified.

Finally, if

A

and

B

are both accessible and reduced such that

L

⁢

(

A

)

=

L

⁢

(

B

)

=

R

. Then the

Myhill-Nerode relations

induced by

A

and

B

are both equal to the

Nerode equivalence

𝒩

R

of

R

. As a result,

A

and

B

are both isomorphic to the automaton generated by

𝒩

R

.
∎

Remark

. The

proposition

above is not true in general for non-deterministic finite automata: two equivalent simplified reduced NDFA may not be isomorphic. However, there exist reduction techniques for NDFA such that the reduced automata produced using these techniques are unique up to

isomorphism

.

Title

reduced automaton

Canonical

name

ReducedAutomaton

Date of creation

2013-03-22 19:01:56

Last modified on

2013-03-22 19:01:56

Owner

CWoo (3771)

Last modified by

CWoo (3771)

Numerical id

14

Author

CWoo (3771)

Entry type

Definition

Classification

msc 03D10

Classification

msc 68Q42

Classification

msc 68Q05

Synonym

minimal automaton

Related topic

SimplifiedAutomaton

Defines

indistinguishable

Defines

reduced

Defines

minimal

Generated on Thu Feb 8 20:01:40 2018 by

LaTeXML