Describing Homing and Distinguishing Sequences for Nondeterministic Finite State Machines via Synchronizing Automata Natalia Kushik and Nina Yevtushenko Tomsk State University, Russia
2 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
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 i/o a s 1 s 2 FSM transition s 1 s 2 Automata transition 4
Finite State Machine (FSM) i/o 2 S = (S, I, O, h S ) is FSM - S is a finite nonempty set of states - I and O are finite input and output alphabets - h S S I O S is the behavior relation i/o 1 1 i/o 1,o 3 2 i i i FSM o 1 o 2 o 3 5
FSM S = (S, I, O, h S ) 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ʹ ) h S 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ʹ ) h S 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ʹ ) h S otherwise, S is nonobservable This FSM is nondeterministic, complete and observable i/o 1 1 i/o 2 2 6 i/o 1, o 3
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 α s 1 s 2 α/β 1 α/β 2 s m α/β m s 1ʹ s 2ʹ s mʹ out(s i, α) out(s j, α) = (Preset) distinguishing experiment = applying α + observing β i + drawing a conclusion about s i 7
Homing sequence A homing (input) sequence α allows to determine the final state Homing sequence α of the machine under experiment after applying s 1 s 2 s m α After applying α at any α/β 1 α/β state s and observing an 2 α/β m output response β the final state sʹ becomes known s 1ʹ s 2ʹ s mʹ (Preset) homing experiment = applying α + observing β i + drawing a conclusion about s i ʹ 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 α s 1 s 2 s m α/β α/β 2 1 α/β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, h S ) 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) o ((s 1, i j, o, s 1ʹ, ) h S & (s 2, i j, o, s 2ʹ ) h S ) - 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 Rule 3 P contains a singleton 11 i 1 s 1,s 2 i j i n s ʹ 1, s ʹ 2, s ʺ 1, s ʺ 2... s 1,s 2 Pʹ α sequence P α is a distinguishing sequence iff it labels the path truncated by Rule 1
One way to derive a homing sequence for nondeterministic FSM Derive a truncated successor tree (TST) o ((s 1, i j, o, s 1ʹ ) h S & (s 2, i j, o, s 2ʹ ) h S ) - Truncating rules 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 Rule 3 P contains only singletons 12 i 1 P s 1,s 2 i j i n s ʹ 1, s ʹ 2, s ʺ 1, s ʺ 2... s 1,s 2 Pʹ α sequence α 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
14 Idea Let s look over the languages Given complete nondeterministic FSM S = (S, I, O, h S ) L home (S) is the set of all homing sequences of S L dist (S) is the set of all distinguishing sequences of S Our objective : to derive an automaton A with the set L synch (A) of synchronizing sequences such that o L dist (S) = L synch (A) o L home (S) = L synch (A) And the question is : does there exist such automaton and if it exists then how to derive such automaton?
Deriving automata of interest i 1 s 1,s 2 i j i n s ʹ 1, s ʹ 2, s ʺ 1, s ʺ 2... The truncated successor tree looks like this s 1!, s2! These are the automaton transitions i j s 1,s 2 15 i j s 1!!, s2!! The designated sink state where each path of interest is terminated
Deriving an automaton S 2 home S 2 home S 2 home s j, s k states :, j < k, designated state sink actions : inputs of FSM S For each input i I For each state s of the automaton S 2 j, s k home Add to the automaton S 2 home the transition ( s j, s k, i, s p, s t ), if s p, s t is the io-successor of s j, s k for some output o O Add to the automaton S 2 home the transition ( s j, s k, i, sink) if for each output o O the io-successor of s j, s k is a singleton or states s j and s k are separated by the input i Add to the automaton S 2 home the transition (sink, i, sink) EndFor EndFor 16
Example FSM S 4 17
S 4 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 S 4 and its automaton S 2 home A shortest synchronizing sequence for S 2 home is i 0 i 1 i 0 i 2 i 0 i 1 i 0 19
Deriving an automaton S 2 dist S 2 dist states :, j < k, designated state sink S 2 dist actions : inputs of FSM S For each input i I For each state s of the automaton S 2 j, s k dist Add to the automaton S 2 dist the transition ( s j, s k, i, sink), if states s j and s k are separated by the input i Add to the automaton S 2 dist the transition ( s j, s k, i, s p, s t ), if for each o O, the io-successors of states s j and s k do not coincide and s p, s t is the ioʹ -successor of s j, s k for some oʹ O Add to the automaton S 2 dist the transition (sink, i, sink) EndFor EndFor 20 s j, s k
Properties of S 2 home and S2 dist L home (S) = L synch (S 2 home ) L dist (S) = L synch (S 2 dist ) FSM S is homing if and only if the automaton S 2 home is synchronizing There exists a distinguishing sequence for S if and only if the automaton S 2 dist is synchronizing S 2 home can be nondeterministic can be nondeterministic and partial S 2 dist 21
Some complexity issues The number of S 2 home and S2 dist exceed I n 2 (n 1), S = n transitions does not When I is O(n k ), S 2 home and S2 dist can be derived in a polynomial time and can be stored in a polynomial space The problem of checking the existence of a distinguishing sequence for complete nondeterministic observable FSMs is PSPACE-complete 22
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 23 It is interesting To study specific FSM classes that result in automata S 2 home and S2 dist with synchronizing sequences of polynomial length To consider adaptive homing and distinguishing experiments and check whether the similar reduction is possible
Thank you! 24