Научная статья на тему 'The effect of partiality and adaptivity on the complexity of FSM state identification problems'

The effect of partiality and adaptivity on the complexity of FSM state identification problems Текст научной статьи по специальности «Математика»

CC BY
248
81
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
КОНЕЧНЫЕ АВТОМАТЫ / FINITE STATE MACHINES (FSMS) / STATE IDENTIFICATION PROBLEMS / СЛОЖНОСТЬ / COMPLEXITY / ЗАДАЧА ИДЕНТИФИКАЦИИ СОСТОЯНИЙ

Аннотация научной статьи по математике, автор научной работы — Yenigun H., Yevtushenko N., Kushik N., López J.

State identification is a long standing problem in the area of Finite State Machine (FSM) based modeling and testing of discrete event systems. For the identification of the current state of the system, so-called homing and synchronizing experiments with FSMs are used whereas for the initial state identification one can perform a distinguishing experiment. The homing, synchronizing, and distinguishing experiments are known as “gedanken” experiments, and the sequences for these experiments can be derived for deterministic and nondeterministic, partial and complete specification FSMs that are used to formally represent the required behavior of systems under investigation. The problems of checking the existence and derivation of homing, synchronizing, and distinguishing sequences are known to become harder as a specification FSM turns to be nondeterministic and partial. It is also known that in some cases the complexity can be reduced through a ‘switch’ from preset to adaptive experiment derivation. In this paper, we study how the partiality and adaptivity affect the complexity of checking the existence of homing/synchronizing/distinguishing sequences for deterministic and nondeterministic FSMs and visualize the complexity issues via appropriate figures. We also mention that the existing solutions to state identification problems are widely used for verification and testing of finite state transition systems.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «The effect of partiality and adaptivity on the complexity of FSM state identification problems»

The effect of partiality and adaptivity on the complexity of FSM state identification problems

'H. Yenigun <yenigun@sabanciuniv.edu> 2,3,4N. Yevtushenko <nyevtush@gmail.com> 5N. Kushik <natalia.kushik@telecom-sudparis.eu > 5J. López <jorge.lopez@telecom-sudparis.eu > ' Sabanci University, Istanbul, Turkey OrtaMahallesi, Sabanci Ünv. No:27, 34956 Tuzla/lstanbul 2 Tomsk State University, 634050, Tomsk, 36 Lenin str. 3 Ivannikov Institute for System Programming, RAS, '09004, Moscow, 25 Solzhenitsyn str.

4National Research University Higher School of Economics (HSE) 20 Myasnitskaya Ulitsa, Moscow, '01000, Russia 5SAMOVAR, CNRS, Télécom SudParis/Université Paris-Saclay, Evry, France 9 Rue Charles Fourier, 91000 Évry

Abstract. State identification is a long standing problem in the area of Finite State Machine (FSM) based modeling and testing of discrete event systems. For the identification of the current state of the system, so-called homing and synchronizing experiments with FSMs are used whereas for the initial state identification one can perform a distinguishing experiment. The homing, synchronizing, and distinguishing experiments are known as "gedanken" experiments, and the sequences for these experiments can be derived for deterministic and nondeterministic, partial and complete specification FSMs that are used to formally represent the required behavior of systems under investigation. The problems of checking the existence and derivation of homing, synchronizing, and distinguishing sequences are known to become harder as a specification FSM turns to be nondeterministic and partial. It is also known that in some cases the complexity can be reduced through a 'switch' from preset to adaptive experiment derivation. In this paper, we study how the partiality and adaptivity affect the complexity of checking the existence of homing/synchronizing/distinguishing sequences for deterministic and nondeterministic FSMs and visualize the complexity issues via appropriate figures. We also mention that the existing solutions to state identification problems are widely used for verification and testing of finite state transition systems.

Key words: Finite State Machines (FSMs), state identification problems, complexity. DOI: 10.15514/ISPRAS-2018-30( 1)-1

Для цитирования: Yenigun H., Yevtushenko N., Kushik N., Lopez J. The effect of partiality and adaptivity on the complexity of FSM state identification problems. Trudy ISP RAN/Proc. ISP RAS, vol. 30, issue 1, 2018, pp. 7-24. DOI: 10.15514/ISPRAS-2018-30(1)-1

1. Introduction

The state identification problem using gedanken experiments with Finite State Machines (FSMs) is a long standing problem. The first results were obtained by Moore [1] and have been then improved by many researchers. For the identification of the current state of the system, so-called homing and synchronizing experiments are used whereas for the initial state identification one can perform a distinguishing experiment. The first results on the state identification problem were obtained for complete deterministic FSMs [1-4] while nowadays the homing, synchronizing, and distinguishing sequences are derived for deterministic and nondeterministic, observable and non-observable, partial and complete specification FSMs that are used to formally model the required behavior of systems under investigation. References [1-16] present only a short list of existing papers on this topic. An FSM is a 4-tuple with finite non-empty sets of states, inputs and outputs; it moves to the next state producing an output when an input is applied. An FSM is complete and deterministic if at each state for each input, there is exactly one transition. FSM state identification experiments include homing/synchronizing/distinguishing experiments (and corresponding input sequences), which are known to be either preset or adaptive. A sequence is adaptive if the next input to be applied to an IUT is chosen based on the previously observed outputs; otherwise, the sequence is preset. Homing and synchronizing sequences are used for identifying the current state of the machine under experiment while distinguishing sequences identify its initial state. The methods for deriving homing/synchronizing/distinguishing sequences are well elaborated for complete and deterministic FSMs. In this case, the length of most such sequences is polynomial with respect to the number of FSM states but it is nearly to impossible to derive a complete specification for modern interactive digital systems due to their complexity. Moreover, current specifications often include various options for output responses under the same input. That is the reason why nowadays nondeterministic and partial FSM models attract a lot of attention [17, 18]. The problems of checking the existence and derivation of homing, synchronizing, and distinguishing sequences are known to become harder as the specification FSM turns to be nondeterministic and partial. It is also known that in some cases the complexity can be reduced through a 'switch' from preset to adaptive experiment derivation [6]. Partiality and adaptivity can be considered like two forces working in the opposite directions. Partiality tends to make the problems more complex, and adaptivity tends to make the problem solutions simpler. Correspondingly, it is interesting to study the dynamics here. Why in some cases partiality beats adaptivity, and why in some cases adaptivity beats partiality? Thus, one of the contributions of the paper is to pose this question as a new problem in this area.

In this paper, we also collect the results of how the partiality and adaptivity affect the complexity of checking the existence of homing/synchronizing/distinguishing sequences for deterministic and nondeterministic FSMs. Given a complete deterministic strongly connected reduced FSM, the problem of checking the existence of preset homing and synchronizing sequences is in P [5] while for distinguishing sequences it is PSPACE-complete [6]; the latter means that there exists a complete deterministic FSM such that the length of a shortest distinguishing sequence is exponential with respect to the FSM size. The polynomial complexity is preserved for adaptive homing/synchronizing sequences and the problem of checking the existence of an adaptive distinguishing sequence also 'falls into' P, i.e., in the latter case, the adaptivity reduces the problem complexity. For partial deterministic FSMs, the complexity of checking the existence of an adaptive distinguishing sequence is also in P, i.e., for distinguishing sequences the partiality does not destroy the polynomial complexity. That is not the case for homing and synchronizing sequences, since given a partial deterministic reduced strongly connected FSM, the problem of checking the existence of an adaptive homing or synchronizing sequence is PSPACE-complete [14].

For nondeterministic complete observable FSMs, checking the existence of a preset homing/synchronizing/distinguishing sequence is PSPACE-complete [5, 6, 15] and in this paper, we show that it is the same for partial machines. For nondeterministic complete FSMs the adaptivity reduces the complexity of the problem of checking the existence of a homing/synchronizing sequence as the problem 'falls into' P [8, 13]. For distinguishing sequences, it is proven that there exists a class of FSMs where the length of a shortest adaptive distinguishing sequence is exponential with respect to the number of FSM states [16]. Moreover, in this paper, we strengthen this result by proving the same result for 2-input FSMs. For partial nondeterministic observable FSMs, the problem of checking the existence of an adaptive homing/synchronizing sequence is shown to be PSPACE-hard and in this paper, we show that it is PSPACE-complete. We also show that the problem of checking the existence of an adaptive distinguishing sequence for complete nondeterministic FSMs is out of P. Finally, all the results on the complexity of the existence check of homing/synchronizing/distinguishing sequences for deterministic and nondeterministic, complete and partial FSMs are collected together and the complexity issues are visualized via appropriate figures.

Therefore, the main contributions of the paper are as follows. First, we identify the phenomenon of the dependency between partiality and adaptivity, and their influence on the complexity of "gedanken" experiments for FSMs. Second, we collect and visualize the known results in the area. Third, we close some gaps in the area, in particular, we show that differently from deterministic machines the adaptivity does not help to reduce the complexity of adaptive distinguishing experiments for nondeterministic 2-input FSMs.

The structure of the paper is as follows. Section 2 contains the preliminaries. Section 3 is devoted to exhibit how partiality and adaptivity affect the FSM state

identification problems for deterministic FSMs while nondeterministic FSMs are considered in Section 4. Section 5 concludes the paper.

2. Preliminaries

A Finite State Machine (FSM) S is a 4-tuple (S, I, O, h), where S is a finite set of states; I and O are finite non-empty disjoint sets of inputs and outputs; h c S x I x O x S is a transition relation, where a 4-tuple (s, i, o, s') e h is a transition. We consider that the machine S is non-initialized, i.e., it can start working at any state of the set S, unless the opposite is stated explicitly. An FSM S = (S, I, O, h) is complete if for each pair (s, i) e S x I there exists a pair (o, s') e O x S such that (s, i, o, s') e h; otherwise, the machine is partial. Given a partial FSM S, an input i is a defined input at state s if there exists a pair (o, s') e O x S such that (s, i, o, s') e h. In this case, we say that input i can take the machine from state s to state s' and the set of all states where input i can take the machine from state s is the i-successor of state s. An FSM S is nondeterministic if for some pair (s, i) e S x I, there exist at least two transitions (s, i, o1, s1), (s, i, o2, s2) e h, such that o1 # o2 or s1 # s2. An FSM S is single-input if at each state there is at most one defined input, i.e., for each two transitions (s, i1, o1, s1), (s, i2, o2, s2) e h at state s it holds that i 1 = i 2, and S is output-complete if for each pair (s, i) e S x I such that the input i is defined at state s, there exists a transition from s with i for every output in O. An FSM is observable if for each state s and input i it holds that if (s, i, o, s1'), (s, i, o, s2') e h then s1' = s2'; otherwise, the machine is non-observable. In this paper, we consider only observable FSMs.

In usual way, the FSM behavior is extended to sequences of inputs and outputs, i.e., input/output sequences a/p, a e I*, p e O*. Given a state s and an input sequence a.i, the input sequence a.i is a defined input sequence at state s if a is a defined input sequence at state s and i is a defined input at each state of the a-successor of s. The set out(s, a) includes all possible output responses for the defined sequence a at state s. A trace of S at state s is a sequence of input/output pairs of sequential transitions starting from state s. As usual, for state s and a sequence y e (IO)* of input-output pairs, the y-successor of state s is the set of all states that are reached from s by trace y. If y is not a trace at state s then the y-successor of state s is empty or we simply say that the y-successor of state s does not exist. As usual, the input (output) sequence of y is the input (output) projection of y. For an observable FSM S, for any sequence y e (IO)*, the cardinality of the y-successor of state s is at most one. In this paper, an FSM under experiment is considered to be strongly connected, i.e., we assume that for every two states s1 and s2 there is a trace that can take the machine from state s1 to state s2, i.e., state s2 is reachable from state s1 via some trace.

If an FSM has the assigned initial state s0 then it is an initialized FSM (S, s0, I, O, h). An initialized FSM S is acyclic if the set of traces at the initial state is finite, i.e., the

FSM transition diagram has no cycles. An initialized, single-input, output-complete, and observable FSM P such that each state is reachable from the initial state, over input alphabet I and output alphabet O with an acyclic transition graph is a test case (over alphabets I and O). A test case P over alphabets I and O is a test case for FSM S that can be partial and nondeterministic if for each trace y(io) of FSM P at the initial state, it holds that if y is a trace at a state s of S then i is a defined input at all states in the y-successor of s. A state p of P without any transitions is a deadlock state. A trace from the initial state to a deadlock state is a complete trace of P. Note that when S is complete, any test case P over input alphabet I and output alphabet O is a test case for S and if |I| > 1 then a test case P is a partial FSM. According to [8], a test case P for S specifies an adaptive experiment with S. The length or the height of a test case is the length of a longest trace from the initial state to a deadlock state. A test case P for an FSM S is a distinguishing test case (DTC) for S if for each complete trace y of P, the trace y is a trace of at most one state of the FSM S. A test case P for an FSM S is a homing test case (HTC) for S if for each complete trace y of P, the y-successor of the set S has at most one state. An FSM S is adaptively distinguishing (adaptively homing) [8] if there exists a DTC (HTC) for S.

Given a possibly nondeterministic observable partial FSM S, an input sequence a is a distinguishing sequence if a is a defined input sequence at each state and for every two different states si and s2, out(si, a) and out(s2, a) do not intersect. An input sequence a is a homing sequence if it is a defined input sequence at each state and for each input/output sequence a/p, the non-empty a/p-successors of two initial states coincide. The sequence a is a synchronizing sequence if it is a defined input sequence at each state and for every two states s1 and s2, the a-successors of s1 and s2 are singletons and coincide.

As synchronizing sequences are usually constructed for finite automata, researchers also use the notion of a finite automaton (FA, without empty messages, initial and final states) [19]. The sequence a is a synchronizing sequence for an FA [20] if a is a defined sequence of actions at each state of the automaton and for every two states s1 and s2, the a-successors of s1 and s2 are singletons and coincide. If such a sequence exists, the automaton is called synchronizing.

3. How adaptivity and partiality affect the complexity of distinguishing/homing/synchronizing experiments for deterministic FSMs

In this section, we consider possibly partial deterministic FSMs, which are reduced and strongly connected. Given a possibly partial deterministic FSM S, S is reduced if for each two different states s1 and s2 there exists an input sequence a that is a defined input sequence at both states such that output responses to a at states s1 and s2 are different. For other kinds of deterministic FSMs more results on homing/synchronizing sequences can be found in [5, 14].

3.1 Distinguishing experiments

It is known [6] that the problem of checking the existence of a distinguishing sequence for deterministic complete FSMs is PSPACE-complete and the length of such a sequence can be exponential with respect to the number of FSM states. A distinguishing sequence for a possibly partial deterministic FSM can be derived by the following procedure.

Algorithm 1 Deriving a distinguishing sequence for a deterministic possibly partial FSM

Input: Deterministic possibly partial FSM S = (S, I, O, h)

Output: A distinguishing sequence for FSM S or the reply «There is no

distinguishing sequence for the FSM S »

Step 1. Derive a truncated successor tree for the FSM S. Each node in the tree is labeled by a set of subsets of S of cardinality 1 or 2, i.e., the label of a node is a subset of the set S2 = { S| Sc S and 1< |Sf < 2 }. The root of the tree is labeled by

the set of all state pairs, i.e., by the set of all pairs sp, s , sp, sq e S, p < q. Given a

non-leaf node of the tree that is labeled with a set P c S2, there exists an edge labeled by an input i from this node if and only if i is a defined input at every state of each pair in uP, where uP is the union of the elements of P, and states of any pair of P do not have the same /o-successor (for any output o e O). If this is the case, then the edge labeled with i leads to the node labeled with the set Q = { q | q is the non-empty /o-successor of p, p e P, o e O }. A node at the kh level, k > 0, labeled with a set P c S2 is a leaf if one of the following conditions holds. Rule 1: The set P has only singletons.

Rule 2: There exists a node at the jth level, j, j < k, labeled with a set R such that P contains each pair of R that is not a singleton.

Rule 3: There does not exist an input defined at every state of each pair in uP. Rule 4: For each input /, states of some pair of P have the same /o-successor. Step 2. If all the tree paths are terminated using Rules 2, 3 and 4 then return reply «There is no distinguishing sequence for the FSM S». If there exists a path terminated using Rule 1, then the sequence a labeling this path is a distinguishing sequence for the FSM S.

Due to the above procedure, for each input the set of pairs of states of the given FSM is considered. On the other hand, the problem is known to be PSPACE-complete for deterministic complete FSMs and thus the following statement holds. Proposition 1. The problem of checking the existence of a distinguishing sequence for a possibly partial deterministic FSM is PSPACE-complete. In [6], the authors show that the existence check and the derivation of a DTC1 for a complete deterministic FSM is in P. In [10], Hierons and Turker presented a method

1 In [10], a DTC is called as an Adaptive Distinguishing Sequence (ADS)

12

to check the existence of a DTC for a partial deterministic FSM by augmenting the partial FSM up to a complete FSM and show that the upper bound on the height of the DTC is polynomial with respect to the number of FSM states. The upper bound on the length of a shortest adaptive distinguishing sequence was improved in [11]. Correspondingly, the conclusion can be drawn that the problem of checking the existence of a DTC for a possibly partial deterministic FSM is in P, i.e., the FSM partiality does not destroy the polynomial complexity for DTCs. To illustrate the effects of adaptivity and partiality on checking the existence of a distinguishing sequence for a deterministic FSM we present these results in Fig. 1. We hereafter notice that when the upper bound of the shortest distinguishing/homing/synchronizing sequence is known to be exponential but the tight upper bound is unknown, we denote this fact by putting O(2n) for the sequence length.

Fig. 1. How partiality and adaptivity affect the complexity of distinguishing experiments for

deterministic FSMs

3.2 Homing experiments

It is known [4, 5] that a homing sequence always exists for deterministic complete strongly connected reduced FSMs, and the length of a shortest homing sequence is polynomial, O(n2), with respect to the number n of FSM states. The upper bound of the length of the homing experiment remains the same for the adaptive case [21]. An algorithm that is very similar to Algorithm 1 can be used when deriving a preset homing sequence for a possibly partial deterministic FSM. The condition "states of any pair of P do not have the same io-successor (for any output o e O)" at Step 1 and Rule 4 should be deleted.

Proposition 2. The problem of checking the existence of a homing sequence for possibly partial deterministic FSM is in PSPACE.

In [14], the authors also show the hardness of this problem. In fact, they prove that the problem of checking the non-emptiness of the language of the product of k finite automata can be reduced to the problem of checking the existence of a homing

Sequence length

Deterministic FSMs Distinguishing Experiments

sequence for partial reduced strongly connected deterministic FSM and thus, the following statement holds.

Proposition 3 [14]. 1) The problem of checking the existence of a homing sequence for deterministic reduced strongly connected partial FSMs is PSPACE-complete. 2) The problem of checking the existence of an adaptive homing sequence for (unreduced and reduced) deterministic strongly connected partial FSMs is PSPACE-complete.

Correspondingly, the conclusion can be drawn that the problem of checking the existence of a homing sequence for possibly partial deterministic FSM is PSPACE-complete even for the class of reduced strongly connected FSMs, i.e., the FSM partiality destroys the polynomial complexity for preset and adaptive homing sequences. We present the impact of adaptivity and partiality on checking the existence of a homing sequence in Fig. 2.

F/g. 2. How part/al/ty and adapt/v/ty affect the complex/ty of hom/ng exper/ments

for determ/n/st/c FSMs

3.3 Synchronizing experiments

Given an FSM, the problem of deriving a synchronizing sequence can be reduced to deriving such a sequence for an automaton that is obtained by erasing transition outputs. Correspondingly, the problem of checking the existence of a synchronizing sequence for complete deterministic FSMs is known to have the polynomial complexity [5]. However, for the automaton that is obtained from a partial FSM by erasing the output action at each transition, the problem is PSPACE-complete [22]. Using a bit modified termination rules in Algorithm 1 for getting a synchronizing sequence one can conclude the problem of checking the existence of a synchronizing sequence for deterministic partial FSMs is PSPACE-complete. Once a homing sequence is constructed for a deterministic strongly connected possibly partial FSM, an adaptive synchronizing sequence can be constructed similar to that for complete machines [5], i.e., by prolonging a homing sequence

with a corresponding transfer sequence that takes a machine under investigation to a given state s. Therefore, the following statement can be established. Proposition 4. The problem of checking the existence of a synchronizing test case for deterministic strongly connected partial FSMs is PSPACE-complete. Correspondingly, the conclusion can be drawn that the problem of checking the existence of a synchronizing sequence for possibly partial deterministic FSM is PSPACE-complete even for the class of reduced strongly connected FSMs, i.e., the FSM partiality destroys the polynomial complexity for adaptive synchronizing sequences. The impact of adaptivity and partiality on checking the existence of a synchronizing sequence for a deterministic FSM is presented in Fig. 3.

Sequence

Deterministic FSMs Synchronizing Experiments

ф Complete I Partial

Figure 3: How partiality and adaptivity affect the complexity of synchronizing experiments for deterministic FSMs

4. How adaptivity and partiality affect the complexity of distinguishing/homing/synchronizing experiments for nondeterministic FSMs

In this section, we study how adaptivity and partiality affect the complexity of distinguishing/homing/synchronizing experiments for nondeterministic FSMs.

4.1 Distinguishing experiments

In order to describe the set of all distinguishing sequences for a nondeterministic possibly partial FSM we use the procedure for deriving an appropriate automaton proposed in [23] with slight modifications. For a nondeterministic FSM S = (S, I, O, h), S = {s1, s2, ..., sn}, we derive an automaton S2dist such that the set of (all) synchronizing sequences of this automaton coincides with the set of (all) distinguishing sequences of FSM S, i.e., LdUS) = Lsynch(S2dist). Algorithm 2 for deriving the automaton S2dist Input: Possibly partial observable FSM S = (S, I, O, h) Output: The automaton S2dist

States of S2dist are pairs (s,-, sk), j < k, and the designated state sink while actions are inputs of the FSM S;

For each input / e I

For each state (s,, sk) of the automaton S2dist

J ^

Add to the automaton S d/stthe transition ((s,, sk), /, s/nk) if states s, and sk are separated by /, i.e., out(s,, /) n out(sk, /) = 0;

Add to the automaton S2dist the transition ((s,, sk), /, (sp, st)), p < t and j < k, if for each o e O, the /o-successors of states s, and sk do not coincide and {sp, st} is the /o-successor of the set {s,, sk} for some o' e O; EndFor

Add to the automaton S2d/st the transition (s/nk, /, s/nk) for each input / e I; EndFor

Based on the construction of S2dist, similar to [23], the following result can be established.

Proposition 5. An input sequence a is a distinguishing sequence for the FSM S if and only if a is a synchronizing sequence for S2d/st.

This result means that the set of all distinguishing sequences of the possibly partial and nondeterministic FSM S coincides with the set of all synchronizing sequences of the automaton S2 d/st, i.e., Ld/JS) = lSynch(S2d/st).

Given a partial observable nondeterministic FSM S, the automaton S2dist derived by Algorithm 2 can be nondeterministic and partial, since for some pair (s,, sk), j < k, of states of FSM S, there can be no transition to different pairs under an input / if states s, and sk have the same non-empty /o-successor for some output o or the input / is an undefined input for some state of the pair. Therefore, taking into account the complexity of the existence check for the synchronizing experiments and the fact that the problem of deriving a distinguishing sequence for complete deterministic FSMs is PSPACE-complete, we conclude the following.

Proposition 6. The problem of checking the existence of a distinguishing sequence is PSPACE-complete for observable complete and partial nondeterministic FSMs.

The length of a shortest distinguishing sequence for complete observable machines

2

with n states is known to be O( 2" ) and cannot be more for partial observable nondeterministic FSMs according to Algorithm 1 that can be applied for nondeterministic observable FSMs.

We now show that the problem of checking the existence of an adaptive distinguishing test case for a complete observable FSM is PSPACE-hard. In order to prove this, we will show that for any integer n, one can construct a 2-input FSM S such that the size of FSM S is polynomial in n, but the minimal length of an adaptive test case for a subset of n states of S is exponential in n. In fact, this strengthens the previous result [16] where the exponential height of a DTC was proven for an FSM with the exponential number of inputs.

Let n > 2 be an integer and pi, p2, ..., pn be the first n different primes considered in increasing order. Furthermore, let S„ = p1 + p2 + ... + pn be the sum of the first n primes, and let n„ = p1 x p2 x ... x pn be the product of the first n primes. For n > 2, 16

we show that there exists an FSM Sn with En states such that the minimal length of an adaptive test case for a subset with n states equals nn. Note that En is polynomial in n and Пп is exponential in n. The state set of the FSM is S = {1, 2, ..., En}. We consider the set of states partitioned into n subsets S1, S2, ..., Sn, where Sj = { Ej -pj + 1, Ej - pj + 2, ..., Ej}, for 1 < j < n. An FSM has two inputs i1 and i2 and the set of outputs is {0, E1, E2, ..., En}. The transitions under i1 constitute a cycle of length pj for the states in Sj, for 1 < j < n, with the same output 0. Formally, for a state к e Sj, for 1 < j < n, we have the transition (к, i1, 0, K) where K = к + 1 if к < Ej and K = Ej -pj + 1 if к = Ej. For a state Ej, for 1 < j < n, we have the transition (Ej, i2, Ej, Ej). Finally, for a state к e Sj\{Ej}, for 1 < j < n, we have the transitions (к, i2, E1, E1), (к, i2, E2, E2), ..., (к, i2, En, En). Transitions under i2 distinguish only states of the subset b = {E1, E2, ..., En}. An example of such an FSM for n = 3 is shown below inTab. 1. The number of states is E3= 2 + 3 + 5=10.

Table 1. FSM Sn for n = 3

S1 S2 S3

1 2 3 4 5 6 7 8 9 10

i1 2/0 1/0 4/0 5/0 3/0 7/0 8/0 9/0 10/0 6/0

i2 2/2 2/2 2/2 2/2 5/5 2/2 2/2 2/2 2/2 10/10

5/5 5/5 5/5 5/5 5/5 5/5 5/5

10/10 10/10 10/10 10/10 10/10 10/10 10/10

By definition, only states can be distinguished by i2; therefore, until

this subset is reached states of any other subset of cardinality more than two cannot be distinguished. Moreover, input i2 cannot be applied when analyzing such a subset due to merging reasons. Given the initial subset c = {1, E1+1, E2+1, •.., En-1+1} of n states, the subset b can be reached from c only when input i1 is applied nn times, that is known to be exponential in n.

Proposition 7. The length of a shortest DTC for Sn is at least nn.

The height of a shortest adaptive distinguishing test case for a complete observable

FSM with n states is known to reach 2n - n - 1 [8, 16]. However, the machines of

the proposed class have exponential number of inputs with respect to the number of states. On the other hand, given an arbitrary observable FSM, we still have no procedure for deriving an adaptive distinguishing experiment by using a memory of polynomial size. For this reason, Fig. 4 has only the upper bound on the length of an adaptive distinguishing experiment.

F/g. 4. How part/al/ty and adapt/v/ty affect the complex/ty of d/st/ngu/sh/ng exper/ments for nondeterm/n/st/c FSMs

4.2 Homing experiments

For complete reduced deterministic FSMs a homing sequence always exists. For complete nondeterministic but observable FSMs the problem becomes PSPACE-complete. In order to describe the set of all homing sequences for a nondeterministic possibly partial FSM we again use the procedure (with slight modifications) for deriving an appropriate automaton in [23].

For a nondeterministic FSM S = (S, I, O, h), S = {s1, s2, ..., sn}, we derive an automaton S2home such that the set of (all) synchronizing sequences of this automaton coincides with the set of (all) homing sequences of FSM S, i.e., Lhome(S) = Lsynch(S2home). The derivation of this automaton is very close to S2d/st: we do not care if for some o e O, the /o-successors of states s, and skcoincide. Differently from complete nondeterministic FSMs, the automaton S2home can be partial and nondeterministic. Similar to [32], it can be shown that the set of synchronizing sequences of the automaton S2home coincides with the set of all homing sequences of the FSM S.

Proposition 8. An input sequence a is a homing sequence for the FSM S if and only if a is a synchronizing sequence for S2home.

The length of a shortest homing sequence for a complete observable FSM with n states is known to reach 2n-1 - 1 [8]. This means that the complexity of checking the existence of a homing sequence for nondeterministic observable FSMs cannot be in NP. Therefore, taking into account the complexity of the existence check for the synchronizing sequences, we conclude the following.

Sequence

*n#h Nondeterministic FSMs Distinguishing Experiments

0(2">

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

Existence check complexity

^Complete ^ Partial

Proposition 9. The problem of checking the existence of a homing sequence is PSPACE-complete for observable complete and partial nondeterministic FSMs. For complete FSMs the complexity of checking the existence of a homing test case is in P [8]. For partial deterministic FSMs it was shown that the problem is PSPACE-complete [14], i.e., the partiality destroys the polynomial complexity for adaptive homing sequences. The impact of adaptivity and partiality on homing experiments for nondeterministic FSMs is shown in Fig. 5.

Sequence

tow Nondeterministic FSMs

Homing Experiments

ф Complete i Partial

Fig. 5. How partiality and adaptivity affect the complexity of homing experiments for nondeterministic FSMs

4.3 Synchronizing experiments

As the problem of checking the existence of a homing sequence for complete and partial nondeterministic FSMs is PSPACE-complete, the problem of checking the existence of a synchronizing sequence for complete and partial nondeterministic FSMs is not easier, but it is known to have the same complexity. For adaptive experiments, it was shown that for complete nondeterministic FSMs the existence check of an adaptive synchronizing sequence/test case is in P [12].

Sequence

len^h Nondeterministic FSMs

Synchronizing Experiments

PSPACE

£ Complete ^ Partial

Fig. 6. How partiality and adaptivity affect the complexity of synchronizing experiments for nondeterministic FSMs

The problem of checking the existence of an adaptive homing sequence for deterministic partial FSMs is PSPACE-complete, and thus, the existence check of an adaptive synchronizing sequence for nondeterministic observable partial FSMs is PSPACE-hard. The impact of adaptivity and partiality on synchronizing experiments for nondeterministic FSMs is shown in Fig. 6.

5. Conclusions

In this paper, we have considered the problems of checking the existence of homing, synchronizing, and distinguishing experiments for various FSM types, namely, for complete and partial, deterministic and nondeterministic FSMs. We studied how the adaptivity and partiality influence the complexity of the existence check for such experiments as well as the length of the corresponding sequences. As a conclusion, we can say that in general, for distinguishing experiments the partiality does not increase the complexity but it is not the case for homing/synchronizing sequences. For the sake of simplicity, we visualized the obtained complexity results via appropriate figures. Thus, there are the following contributions. A new problem has been introduced of studying the dependencies how partiality and adaptivity influence the complexity issues of "gedanken" experiments for FSMs. We also close some open issues in the area; in particular, we show that differently from deterministic machines the adaptivity does not help to reduce the complexity of adaptive distinguishing experiments for nondeterministic FSMs (even for 2-input FSMs). All the known results have been collected together and the complexity issues have been visualized via appropriate figures. A simple, yet important conclusion from this study is that the partiality and adaptivity work in opposite directions on the complexity of the state identification problems. When we consider partiality and adaptivity together, in some cases partiality is more dominant and it makes the problem more complex, and in some cases, adaptivity is more dominant and it makes the problem easier. It is interesting to study what are the characteristics of the problem in order to be able to decide which force, adaptivity or partiality, wins, and why.

An interesting question for future research covers the complexity of deriving such experiments for various FSM types and the tight upper bounds on the length/height of a shortest distinguishing/homing/synchronizing experiment (if it exists). Moreover, the complexity issues are very interesting for non-observable FSMs and in fact, there are not many papers on this topic. We also mention that appropriate FSM classes can be considered where the complexity goes down compared to a general case. The issues listed above form the challenges for the nearest future work.

Acknowledgements

This work was supported by the Russian Science Foundation (RSF), project #16-4903012, and by the Scientific and Technological Research Council of Turkey

(TUBiTAK), project #114E921.

References

[1]. Moore E.F. Gedanken-experiments on sequential machines. Automata Studies (Annals of Mathematical Studies), 1956, 1, pp. 129-153.

[2]. Gill A. State-identification experiments in finite automata. Information and Control, 1961, pp. 132-154.

[3]. Gill A. Introduction to the Theory of Finite-State Machines. 1962, 207 p.

[4]. Kohavi Z. Switching and Finite Automata Theory. 1979, 658 p.

[5]. Sandberg S. Homing and Synchronization Sequences. Lecture Notes in Computer Science, 2005, 3472, pp. 5-33.

[6]. Lee D., Yannakakis M. Testing Finite-State Machines: State Identification and Verification. IEEE Transactions on Computers, 1994, 43 (3), pp. 306-320.

[7]. Alur R., Courcoubetis C., Yannakakis, M. Distinguishing tests for nondeterministic and probabilistic machines. Proc. of the 27th ACM Symposium on Theory of Computing, 1995, pp. 363-372.

[8]. Kushik N., El-Fakih K., Yevtushenko, N. Adaptive homing and distinguishing experiments for nondeterministic finite state machines. Lecture Notes in Computer Science, 2013, 8254, pp. 33-48.

[9]. Kushik N., Yevtushenko N. On the Length of Homing Sequences for Nondeterministic Finite State Machines. Lecture Notes in Computer Science, 2013, 7982, pp. 220-231.

[10]. Hierons R.M., Turker U.C. Distinguishing Sequences for Partially Specified FSMs. Lecture Notes in Computer Science, 2014, 8430, pp. 62-76.

[11]. Yenigun H., Yevtushenko N., Kushik N. Some classes of finite state machines with polynomial length of distinguishing test cases. Proc, of International Symposium on Applied Computing (SAC'2016), 2016, pp. 1680-1685.

[12]. Kushik N., Yevtushenko N., Yenigun H. Reducing the complexity of checking the existence and derivation of adaptive synchronizing experiments for nondeterministic FSMs. Proc. of Intern. Workshop on Domain Specific Model-based Approaches to Verification and Validation (AMARETTO'2016), 2016, pp. 83-90.

[13]. Kushik N., El-Fakih K., Yevtushenko N., Cavalli A.R. On adaptive experiments for nondeterministic finite state machines. Software Tools for Technology Transfer, Springer, 2016, 18 (3), pp. 251-264.

[14]. Yenigun H., Yevtushenko N., Kushik N. The complexity of checking the existence and derivation of adaptive synchronizing experiments for deterministic FSMs. Information Processing Letters, 2017, 127, pp. 49-53.

[15]. Kushik N. G., Kulyamin V. V., Evtushenko N. V. On the complexity of existence of homing sequences for nondeterministic finite state machines. Programming and Computer Software, 2014, 40(6), pp. 333-336.

[16]. El-Fakih K., Yevtushenko N., Kushik N. Adaptive distinguishing test cases of nondeterministic finite state machines: test case derivation and length estimation. Formal Asp. Comput., 2018, 30(2), pp. 319-332.

[17]. N. Kushik, J. López, A. Cavalli, N. Yevtushenko. Improving Protocol Passive Testing through "Gedanken" Experiments with Finite State Machines. In Proceedings of Intern. Conf. on Software Quality, Reliability & Security (QRS'2016), 2016, pp. 315322.

[18]. Yenigün H., Kushik N., López J., Yevtushenko N., Cavalli A.R. Decreasing the complexity of deriving tests against nondeterministic finite state machines. Proc. of East-West Design & Test Symposium (EWDTS), 2017, IEEE Xplore, IEEE, pp. 1-4.

[19]. Hopcroft, J.E., Ullman, J.D. Introduction to Automata Theory, Languages, and Computation (1st ed.), 1979, 521 p.

[20]. Volkov, M.V. Synchronizing automata preserving a chain of partial orders. Lecture Notes in Computer Science, Vol. 4783, pp. 27-37 (2007)

[21]. Hibbard T.N. Least Upper Bounds on Minimal Terminal State Experiments for Two Classes of Sequential Machines. J. ACM, 1961, 8(4), pp. 601-612.

[22]. Pavel V. Martyugin. Careful Synchronization of Partial Automata with Restricted Alphabets. Proceedings of the Intern. Conf. Computer Science in Russia (CSR'2013), 2013, pp. 76-87.

[23]. Kushik N., Yevtushenko N. Describing Homing and Distinguishing Sequences for Nondeterministic Finite State Machines via Synchronizing Automata. Lecture Notes in Computer Science, 2015, 9223, pp. 188-198.

Влияние частичности и адаптивности на сложность задачи идентификации состояний автомата

'Х. Йенигун <yenigun@sabanciuniv.edu> 2,3,4Н. Евтушенко <nyevtush@gmail.com> 5Н. Кушик <natalia.kushik@telecom-sudparis.eu > 5Х. Лопез <jorge.lopez@telecom-sudparis.eu > ' Университет Сабанчи, Стамбул, Турция 2 Национальный исследовательский Томский государственный университет,

634050, Томск, пр. Ленина 36 3Институт системного программирования им. В.Р. Иванникова РАН, '09004, Москва, ул. Солженицына 25 4Национальный исследовательский университет Высшая школа экономики, 101000, Москва, ул. Мясницкая, д. 20 5SAMOVAR, CNRS, Телеком Южный Париж/Университет Париж Сакле,

Еври, Франция

Аннотация. Задача идентификации состояний в конечном автомате была и остается актуальной, поскольку используется во многих приложениях, в частности, при моделировании и тестировании дискретных управляющих систем. Для идентификации текущего состояния системы строятся так называемые установочные и синхронизирующие эксперименты с конечными автоматами, в то время как для идентификации начального состояния системы используются диагностические или различающие эксперименты. Установочные, синхронизирующие, диагностические или различающие эксперименты известны как «умозрительные» эксперименты с конечными автоматами, и методы синтеза входных последовательностей для таких

экспериментов (если существуют) в настоящее время определены для недетерминированных и детерминированных, полностью и частично определенных автоматов, описывающих эталонное поведение системы. Известно, что проблема проверки существования и построения установочных, синхронизирующих, диагностических или различающих экспериментов существенно усложняется, если эталонное поведение системы описывается недетерминированным и частичным автоматом, что достаточно часто случается при описании сложных современных систем. Известно также, что в некоторых случаях сложность можно понизить, переключившись на адаптивный (условный) эксперимент с системой. В настоящей работе мы исследуем влияние частичности автомата и адаптивности эксперимента на сложность проверки существования и построения установочных, синхронизирующих, диагностических и различающих экспериментов для детерминированных и недетерминированных автоматов и иллюстрируем соответствующую сложность с использованием подходящих рисунков.

Ключевые слова: конечные автоматы, задача идентификации состояний, сложность. DOI: 10.15 514/ISPRAS-2018-30(1)-1

Для цитирования: Йенигун Х., Евтушенко Н., Кушик Н., Лопез Х. Влияние частичности и адаптивности на сложность задачи идентификации состояний автомата. Труды ИСП РАН, том 30, вып. 1, 2018 г., стр. 7-24. DOI: 10.15 514/ISPRAS-2018-30( 1)-1

Список литературы

[1]. Moore E.F. Gedanken-experiments on sequential machines. Automata Studies (Annals of Mathematical Studies), 1956, 1, pp. 129-153.

[2]. Gill A. State-identification experiments in finite automata. Information and Control, 1961, pp. 132-154.

[3]. Gill A. Introduction to the Theory of Finite-State Machines. 1962, 207 p.

[4]. Kohavi Z. Switching and Finite Automata Theory. 1979, 658 p.

[5]. Sandberg S. Homing and Synchronization Sequences. Lecture Notes in Computer Science, 2005, 3472, pp. 5-33.

[6]. Lee D., Yannakakis M. Testing Finite-State Machines: State Identification and Verification. IEEE Transactions on Computers, 1994, 43 (3), pp. 306-320.

[7]. Alur R., Courcoubetis C., Yannakakis, M. Distinguishing tests for nondeterministic and probabilistic machines. Proc. of the 27th ACM Symposium on Theory of Computing, 1995, pp. 363-372.

[8]. Kushik N., El-Fakih K., Yevtushenko, N. Adaptive homing and distinguishing experiments for nondeterministic finite state machines. Lecture Notes in Computer Science, 2013, 8254, pp. 33-48.

[9]. Kushik N., Yevtushenko N. On the Length of Homing Sequences for Nondeterministic Finite State Machines. Lecture Notes in Computer Science, 2013, 7982, pp. 220-231.

[10]. Hierons R.M., Turker U.C. Distinguishing Sequences for Partially Specified FSMs. Lecture Notes in Computer Science, 2014, 8430, pp. 62-76.

[11]. Yenigun H., Yevtushenko N., Kushik N. Some classes of finite state machines with polynomial length of distinguishing test cases. Proc, of International Symposium on Applied Computing (SAC'2016), 2016, pp. 1680-1685.

[12]. Kushik N., Yevtushenko N., Yenigun H. Reducing the complexity of checking the existence and derivation of adaptive synchronizing experiments for nondeterministic FSMs. Proc. of Intern. Workshop on Domain Specific Model-based Approaches to Verification and Validation (AMARETTO'2016), 2016, pp. 83-90.

[13]. Kushik N., El-Fakih K., Yevtushenko N., Cavalli A.R. On adaptive experiments for nondeterministic finite state machines. Software Tools for Technology Transfer, Springer, 2016, 18 (3), pp. 251-264.

[14]. Yenigun H., Yevtushenko N., Kushik N. The complexity of checking the existence and derivation of adaptive synchronizing experiments for deterministic FSMs. Information Processing Letters, 2017, 127, pp. 49-53.

[15]. Kushik N. G., Kulyamin V. V., Evtushenko N. V. On the complexity of existence of homing sequences for nondeterministic finite state machines. Programming and Computer Software, 2014, 40(6), pp. 333-336.

[16]. El-Fakih K., Yevtushenko N., Kushik N. Adaptive distinguishing test cases of nondeterministic finite state machines: test case derivation and length estimation. Formal Asp. Comput., 2018, 30(2), pp. 319-332.

[17]. N. Kushik, J. López, A. Cavalli, N. Yevtushenko. Improving Protocol Passive Testing through "Gedanken" Experiments with Finite State Machines. In Proceedings of Intern. Conf. on Software Quality, Reliability & Security (QRS'2016), 2016, pp. 315322.

[18]. Yenigün H., Kushik N., López J., Yevtushenko N., Cavalli A.R. Decreasing the complexity of deriving tests against nondeterministic finite state machines. Proc. of East-West Design & Test Symposium (EWDTS), 2017, IEEE Xplore, IEEE, pp. 1-4.

[19]. Hopcroft, J.E., Ullman, J.D. Introduction to Automata Theory, Languages, and Computation (1st ed.), 1979, 521 p.

[20]. Volkov, M.V. Synchronizing automata preserving a chain of partial orders. Lecture Notes in Computer Science, Vol. 4783, pp. 27-37 (2007)

[21]. Hibbard T.N. Least Upper Bounds on Minimal Terminal State Experiments for Two Classes of Sequential Machines. J. ACM, 1961, 8(4), pp. 601-612.

[22]. Pavel V. Martyugin. Careful Synchronization of Partial Automata with Restricted Alphabets. Proceedings of the Intern. Conf. Computer Science in Russia (CSR'2013), 2013, pp. 76-87.

[23]. Kushik N., Yevtushenko N. Describing Homing and Distinguishing Sequences for Nondeterministic Finite State Machines via Synchronizing Automata. Lecture Notes in Computer Science, 2015, 9223, pp. 188-198.

i Надоели баннеры? Вы всегда можете отключить рекламу.