Describing Homing and Distinguishing Sequences for

Describing Homing and
Distinguishing Sequences
for Nondeterministic Finite
State Machines via
Synchronizing Automata
Natalia Kushik and Nina Yevtushenko
Tomsk State University, Russia
Motivation
Relies on pure mathematical interest J
o  Finite automata and (synchronizing) experiments with them
are well studied
However…
o  Many reactive systems are often described using Finite State
Machines (FSMs)
o  Experiments with FSMs should be also considered
⇓
We reduce the problem of deriving preset homing/distinguishing
experiments for nondeterministic FSMs to solving the
synchronizing problem for automata
2
Outline
1)  Finite State Machines (FSMs) and Automata
2)  Experiments with FSMs
3) Reducing the problem of deriving homing sequences for
FSMs to deriving synchronizing sequences for automata
4) Reducing the problem of deriving distinguishing
sequences for FSMs to deriving synchronizing sequences
for automata
5) Complexity issues for distinguishing sequences for
nondeterministic FSMs
6) Conclusions and Future Work
3
Finite State Machines and
Automata
¢ 
¢ 
¢ 
Finite state machines (FSMs) and Automata describe
the behavior of discrete event systems
Differently from automata, FSMs usually model the
behavior of reactive systems
Reactive systems mostly work in query/request mode
⇓
¢ 
FSM transitions are labeled with input/output pairs
a
i/o
s2
s1
FSM transition
4
s1
s2
Automata transition
Finite State Machine (FSM)
i/o2
S = (S, I, O, hS) is FSM
-  S is a finite nonempty set of
states
-  I and O are finite input and
output alphabets
-  hS ⊆ S × I × O × S is the
behavior relation
i/o1
1
i/o1,o3
iii…
5
2
FSM
o1 o2 o3 …
FSM S = (S, I, O, hS) can be
-
deterministic if for each pair (s, i) ∈ S × I there exists at most one
pair (o, sʹ′) ∈ O × S such that (s, i, o, sʹ′) ∈ hS
otherwise, S is nondeterministic
-  complete if for each pair (s, i) ∈ S × I there exists
(o, sʹ′) ∈ O × S such that (s, i, o, sʹ′) ∈ hS
otherwise, S is partial
- observable if for each triple (s, i, o) ∈ S × I × O there exists at most
one state sʹ′ ∈ S such that (s, i, o, sʹ′) ∈ hS
otherwise, S is nonobservable
i/o2
i/o1
This FSM is nondeterministic,
complete and observable
6
1
2
i/o1, o3
Distinguishing sequence
¢ 
¢ 
¢ 
Distinguishing = separating for
nondeterministic machines
A distinguishing (input)
sequence α allows to
determine the initial state of
the machine under experiment
After applying α at any state s
and observing an output
response β the initial state s
becomes known
Separating sequence α
s1
α/β1
s1ʹ′
s2 …
α/β2
s2ʹ′
sm
α/βm
smʹ′
out(si, α) ∩ out(sj, α) = ∅
(Preset) distinguishing experiment = applying α + observing βi +
drawing a conclusion about si
7
Homing sequence
A homing (input)
sequence α allows to
Homing sequence α
determine the final state
of the machine under
s1 s2 … sm
experiment after applying
α
α/β1
¢  After applying α at any
α/βm
α/β2
state s and observing an
output response β the
smʹ′
s2ʹ′
s1ʹ′
final state sʹ′ becomes
known
(Preset) homing experiment = applying α + observing βi + drawing
a conclusion about si ʹ′
¢ 
8
Synchronizing sequence
¢ 
¢ 
A synchronizing
sequence α takes the
machine under
experiment to a given
state after applying α
After applying α at any
state the final state is sʹ′
Synchronizing sequence α
s1
α/β1
s2 …
sm
α/β2
α/βm
sʹ′
For a synchronizing sequence output reactions are not taken into account
⇒ synchronizing sequences are usually derived for automata (machines
without outputs)
9
Does there exist a
distinguishing sequence?
The decision problem is considered
DISTINGUISHING problem
Input: complete deterministic FSM S = (S, I, O, hS)
Output: Does there exist a distinguishing sequence for S?
The problem of checking the existence of a distinguishing
sequence for deterministic FSMs is PSPACE-complete
Lee, D., Yannakakis, M., 1994
10
One way to derive a distinguishing
sequence for nondeterministic FSM
Derive a truncated successor
tree (TST)
s1, s2
i1
∃ o ((s1, ij, o, s1ʹ′, ) ∈ hS &
(s2, ij, o, s2ʹ′) ∈ hS)
-  Truncating rules
Rule 1 P is the empty set
Rule 2 Set P contains a
subset that labels another node
of the path from the root to the
node labeled by the set P
…
…
ij … in
…
s1ʹ′ , s2ʹ′ , s1ʺ″ , s2ʺ″...
s1, s2
Pʹ′
α sequence
P
α is a distinguishing sequence iff it
Rule 3 P contains a singleton
labels the path truncated by Rule 1
11
One way to derive a homing
sequence for nondeterministic FSM
Derive a truncated successor
tree (TST)
s1, s2
∃ o ((s1, ij, o, s1ʹ′) ∈ hS &
(s2, ij, o, s2ʹ′) ∈ hS)
i1
…
…
-  Truncating rules
Rule 3 P contains only
singletons
12
…
s1ʹ′ , s2ʹ′ , s1ʺ″ , s2ʺ″...
Rule 1 P is the empty set
Rule 2 Set P apart from
singletons contains a set
labeling a node at a higher tree
level
ij … in
s1, s2
Pʹ′
α sequence
P
α is a homing sequence iff it labels the
path truncated by Rule 1 or Rule 3
Another way to derive homing
and distinguishing sequences
Let’s derive homing/distinguishing sequences for
nondeterministic FSMs without addressing truncated trees
Huge truncated
successor tree
Compact automaton
that preserves all the
necessary sequences
Why and what it gives to us?
o  Always nice to have an alternative method
o  Might help to estimate the complexity of related decision and derivation
problems for distinguishing and homing sequences
o  Can help to construct special FSM classes with low complexity bounds
13
Idea… Let’s look over the
languages
Given complete nondeterministic FSM S = (S, I, O, hS)
Lhome(S) is the set of all homing sequences of S
Ldist(S) is the set of all distinguishing sequences of S
Our objective : to derive an automaton A with the set Lsynch(A)
of synchronizing sequences such that
o  Ldist(S) = Lsynch(A)
o  Lhome(S) = Lsynch(A)
⇓
And the question is : does there exist such automaton and if it
exists then how to derive such automaton?
14
Deriving automata of interest
The truncated
successor tree looks
like this
s1, s2
i1
…
…
ij … in
…
s1ʹ′ , s2ʹ′ , s1ʺ″ , s2ʺ″...
!
!
s1, s2
ij
s1, s2
15
ij
!!
!!
s1 , s2
These are the
automaton transitions
The designated sink
state where each path
of interest is terminated
Deriving an automaton S2home
S2home states : s j , sk , j < k,
designated state sink
S2home actions : inputs of FSM S
For each input i ∈ I
For each state s j , sk of the automaton S2home
Add to the automaton S2home the transition ( s j , sk, i, s p , st ),
if s p , st is the io-successor of s j , sk for some output o ∈ O
Add to the automaton S2home the transition ( s j , sk , i, sink) if for
each output o ∈ O the io-successor of s j , sk is a singleton or
states sj and sk are separated by the input i
Add to the automaton S2home the transition (sink, i, sink)
EndFor
EndFor
16
Example… FSM S4
17
S4 truncated successor tree
A shortest homing
sequence traverses a
sequence of all state
subsets which are not
singletons
0,1, 2, 3, 1, 2, 3 ,
0, 2, 3 , 2, 3 ,
0,1, 3 , 1, 3,
0, 3
18
FSM S4 and its automaton S2home
A shortest synchronizing
sequence for S2home is
i 0i 1i 0i 2i 0i 1i 0
19
Deriving an automaton S2dist
S2dist states :
s j , sk , j < k,
designated state sink
S2dist actions : inputs of FSM S
For each input i ∈ I
For each state s j , sk of the automaton S2 dist
Add to the automaton S2dist the transition ( s j , sk , i, sink),
if states sj and sk are separated by the input i
Add to the automaton S2 dist the transition (s j , sk , i, s p , st ),
if for each o ∈ O, the io-successors of states sj and sk do not
coincide and s p , st is the ioʹ′-successor of s j , sk for some oʹ′ ∈ O
Add to the automaton S2dist the transition (sink, i, sink)
EndFor
EndFor
20
Properties of S2home and S2dist
¢ 
¢ 
¢ 
¢ 
¢ 
¢ 
21
Lhome(S) = Lsynch(S2home)
Ldist(S) = Lsynch(S2dist)
FSM S is homing if and only if the automaton S2home is
synchronizing
There exists a distinguishing sequence for S if and only if
the automaton S2dist is synchronizing
S2home can be nondeterministic
S2dist can be nondeterministic and partial
Some complexity issues…
¢ 
The number of S2home and S2dist transitions does not
exceed | I | n2 (n – 1),
|S| = n
⇓
¢ 
When | I | is O(nk), S2home and S2dist can be derived in a
polynomial time and can be stored in a polynomial space
⇓
¢ 
22
The problem of checking the existence of a distinguishing
sequence for complete nondeterministic observable FSMs
is PSPACE-complete
Conclusions and future work
¢ 
The problem of deriving homing/distinguishing sequences
for a possibly nondeterministic FSM can be reduced to that
of deriving a synchronizing sequence for a
nondeterministic (partial) automaton
It is interesting…
¢  To study specific FSM classes that result in automata
S2home and S2dist with synchronizing sequences of
polynomial length
¢  To consider adaptive homing and distinguishing
experiments and check whether the similar reduction is
possible
¢  …
23
Thank you!
24