Sensing as a Complexity Measure

. The size of deterministic automata required for recognizing regular and ω -regular languages is a well-studied measure for the complexity of languages. We introduce and study a new complexity measure, based on the sensing required for recognizing the language. Intuitively, the sensing cost quantiﬁes the detail in which a random input word has to be read in order to decide its membership in the language. We study the sensing cost of regular and ω -regular languages, as well as applications of the study in practice, especially in the monitoring and synthesis of reactive systems.


Introduction
Studying the complexity of a formal language, there are several complexity measures to consider.When the language is given by means of a Turing Machine, the traditional measures are time and space demands.Theoretical interest as well as practical considerations have motivated additional measures, such as randomness (the number of random bits required for the execution) [12] or communication complexity (number and length of messages required) [11].For regular and ω-regular languages, given by means of finite-state automata, the classical complexity measure is the size of a minimal deterministic automaton that recognizes the language.
We introduce and study a new complexity measure, namely the sensing cost of the language.Intuitively, the sensing cost of a language measures the detail with which a random input word needs to be read in order to decide membership in the language.Sensing has been studied in several other CS contexts.In theoretical CS, in methodologies such as PCP and property testing, we are allowed to sample or query only part of the input [9].In more practical applications, mathematical tools in signal processing are used to reconstruct information based on compressed sensing [6], and in the context of data streaming, one cannot store in memory the entire input, and therefore has to approximate its properties according to partial "sketches" [13].
Our interest in regular sensing is motivated by the use of finite-state automata in reasoning about on-going behaviors of reactive systems.In particular, a big challenge in the design of monitors is an optimization of the sensing needed for deciding the correctness of observed behaviors.Our goal is to formalize regular sensing in the finitestate setting and to study the sensing complexity measure for regular and ω-regular languages.
We consider languages over alphabets of the form 2 P , for a finite set P of signals.Consider a deterministic automaton A over an alphabet 2 P .For a state q of A, we say that a signal p ∈ P is sensed in q if at least one transition taken from q depends on the truth value of p.The sensing cost of q is the number of signals it senses, and the sensing cost of a run is the average sensing cost of states visited along the run.We extend the definition to automata by assuming a uniform distribution of the inputs. 1hus, the sensing cost of A is the limit of the expected sensing of runs over words of increasing length. 2 We show that this definition coincides with one that is based on the stationary distribution of the Markov chain induced by A, which enables us to calculate the sensing cost of an automaton in polynomial time.The sensing cost of a language L, of either finite or infinite words, is then the infimum of the sensing costs of deterministic automata for L. In the case of infinite words, one can study different classes of automata, yet we show that the sensing cost is independent of the acceptance condition being used.
We start by studying the sensing cost of regular languages of finite words.For the complexity measure of size, the picture in the setting of finite words is very clean: each language L has a unique minimal deterministic automaton (DFA), namely the residual automaton R L whose states correspond to the equivalence classes of the Myhill-Nerode right-congruence relation for L. We show that minimizing the state space of a DFA can only reduce its sensing cost.Hence, the clean picture of the size measure is carried over to the sensing measure: the sensing cost of a language L is attained in the DFA R L .In particular, since DFAs can be minimized in polynomial time, we can construct in polynomial time a minimally-sensing DFA, and can compute in polynomial time the sensing cost of languages given by DFAs.
We then study the sensing cost of ω-regular languages, given by means of deterministic parity automata (DPAs).Recall the size complexity measure.There, the picture for languages of infinite words is not clean: A language needs not have a unique minimal DPA, and the problem of finding one is NP-complete [15].It turns out that the situation is challenging also in the sensing measure.First, we show that different minimal DPAs for a language may have different sensing costs.In fact, bigger DPAs may have smaller sensing costs.
To see the intricacy in the case of ω-regular languages, consider a component in a vacuum-cleaning robot that monitors the dust collector and checks that it is empty infinitely often.The proposition empty indicates whether the collector is empty and a sensor needs to be activated in order to know its truth value.One implementation of the component would sense empty throughout the computation.This corresponds to the classical two-state DPA for "infinitely often empty".A different implementation can give up the sensing of empty for some fixed number k of states, then wait for empty to hold, and so forth.The bigger k is, the lazier is the sensing and the smaller the sensing cost is.As the example demonstrates, there may be a trade-off between the sensing cost of an implementation and its size.Other considerations, like a preference to have eventualities satisfied as soon as possible, enter the picture too.
Our main result is that despite the above intricacy, the sensing cost of an ω-regular language L is the sensing cost of the residual automaton R L for L. It follows that the sensing cost of an ω-regular language can be computed in polynomial time.Unlike the case of finite words, it may not be possible to define L on top of R L .Interestingly, however, R L does capture exactly the sensing required for recognizing L. The proof goes via a sequence (B n ) ∞ n=1 of DPAs whose sensing costs converge to that of L. The DPA B n is obtained from a DPA A for L by a lazy sensing strategy that spends time in n copies of R L between visits to A, but spends enough time in A to ensure that the language is L.
In the context of formal methods, sensing has two appealing applications.The first is monitoring: we are given a computation and we have to decide whether it satisfies a specification.When the computations are over 2 P , we want to design a monitor that minimizes the expected average number of sensors used in the monitoring process.Monitoring is especially useful when reasoning about safety specifications [8].There, every computation that violates the specification has a bad prefix -one all whose extensions are not in L. Hence, as long as the computation is a prefix of some word in L, the monitor continues to sense and examine the computation.Once a bad prefix is detected, the monitor declares an error and no further sensing is required.The second application is synthesis.Here, the set P of signals is partitioned into sets I and O of input and output signals, respectively.We are given a specification L over the alphabet 2 I∪O , and our goal is to construct an I/O transducer that realizes L. That is, for every sequence of assignments to the input signals, the transducer generates a sequence of assignments to the output signals so that the obtained computation is in L [14].Our goal is to construct a transducer that minimizes the expected average number of sensors (of input signals) that are used along the interaction.
The definition of sensing cost described above falls short in the above two applications.For the first, the definition above does not distinguish between words in the language and words not in the language, whereas in monitoring we care only for words in the language.In particular, according to the definition above, the sensing cost of a safety language is always 0. For the second, the definition above considers automata and does not partition P into I and O, whereas synthesis refers to I/O-transducers.Moreover, unlike automata, correct transducers generate only computations in the language, and they need not generate all words in the language -only these that ensure receptiveness with respect to all sequences of inputs.
We thus continue and study sensing in the context of monitoring and synthesis.We suggest definitions that capture the intuition of "required number of sensors" in these settings and solve the problems of generating monitors and transducers that minimize sensing.For both settings, we focus on safety languages.
Consider, for example, a traffic monitor that has access to various sensors on roads and whose goal is to detect accidents.Once a road accident is detected, an alarm is raised to the proper authorities and the monitoring is stopped until the accident has been taken care of.The monitor can read the speed of cars along the roads, as well as the state of traffic lights.An accident is detected when some cars do not move eventhough no traffic light is stopping them.Sensing the speed of every car and checking every traffic light requires huge sensing.Our goal is to find a monitor that minimizes the required sensing and still detects all accidents.In the synthesis setting, our goal is extended to designing a transducer that controls the traffic lights according to the speed of the traffic in each direction, and satisfies some specification (say, give priority to slow traffic), while minimizing the sensing of cars.
We revise our definition as follows.Let us start with monitoring.Recall that the definition of sensing above assumes a uniform probability on the assignments to the signals, whereas in monitoring we want to consider instead more intricate probability spaces -ones that restrict attention to words in the language.As we show, there is more than one way to define such probability spaces, each leading to a different measure.
We study two such measures.In the first, we sample a word randomly, letter by letter, according to a given distribution, allowing only letters that do not generate bad prefixes.In the second, we construct a sample space directly on the words in the language.We show that in both definitions, we can compute the sensing cost of the language in polynomial time, and that the minimal sensing cost is attained by a minimal-size automaton.Thus, luckily enough, even though different ways in which a computation may be given in an online manner calls for two definitions of sensing cost, the design of a minimallysensing monitor is the same in the two definitions.
Let us continue to synthesis.Recall that there, given a specification over sets I and O of input and output signals, the goal is to construct a finite-state system that, given a sequence of input signals, generates a computation that satisfies the specification.In each moment in time, the system reads an assignment to the input signals, namely a letter in 2 I , which requires the activation of |I| Boolean sensors.A well-studied special case of limited sensing is synthesis with incomplete information.There, the system can read only a subset of the signals in I, and should still generate only computations that satisfy the specification [10,4].A more sophisticated case of sensing in the context of synthesis is studied in [5], where the system can read some of the input signals some of the time.In more detail, sensing the truth value of an input signal has a cost, the system has a budget for sensing, and it tries to realize the specification while minimizing the required sensing budget.
The main challenge there is that we no longer need to consider all words in the language.This introduces a new degree of freedom, which requires different techniques than those used for the definition above.In particular, while a minimal-size transducer for a safety language can be defined on top of the state space of a minimal-size deterministic automaton for the language, this is not the case when we seek minimally-sensing transducers.In fact, we show that a minimally-sensing transducer for a safety language might be exponentially bigger than a minimal-size automaton for the language.Conse-quently, the problems of computing the minimal sensing cost and finding a minimallysensing transducer are EXPTIME-complete even for specifications given by means of deterministic safety automata.On the positive side, a transducer that attains the minimal sensing cost always exists for safety specifications.

Preliminaries
Automata A deterministic automaton on finite words (DFA) is A = Σ, Q, q 0 , δ, α , where Q is a finite set of states, q 0 ∈ Q is an initial state, δ : Q × Σ → Q is a total transition function, and α ⊆ Q is a set of accepting states.We sometimes refer to δ as a relation is the sequence of states q 0 , q 1 , . . ., q m such that q i+1 = δ(q i , σ i+1 ) for all i ≥ 0. The run is accepting if q m ∈ α.A word w ∈ Σ * is accepted by A if the run of A on w is accepting.The language of A, denoted L(A), is the set of words that A accepts.For a state q ∈ Q, we use A q to denote A with initial state q.We sometimes refer also to nondeterministic automata (NFAs), where δ : Q × Σ → 2 Q suggests several possible successor states.Thus, an NFA may have several runs on an input word w, and it accepts w if at least one of them is accepting.
Consider a language L ⊆ Σ * .For two finite words u 1 and u 2 , we say that u 1 and A deterministic automaton on infinite words is A = Σ, Q, q 0 , δ, α , where Q, q 0 , and δ are as in DFA, and α is an acceptance condition.The run of A on an infinite input word w = σ 1 • σ 2 • • • ∈ Σ ω is defined as for automata on finite words, except that the sequence of visited states is now infinite.For a run r = q 0 , q 1 , . .., let inf (r) denote the set of states that r visits infinitely often.Formally, inf (r) = {q : q = q i for infinitely many i's}.We consider the following acceptance conditions.In a Büchi automaton, the acceptance condition is a set α ⊆ Q and a run r is accepting iff inf (r) ∩ α = ∅.A looping automaton is a special case of the Büchi condition, with α = Q.Finally, a parity condition is a mapping α : Q → [i, . . ., j], for integers i ≤ j, and a run r is accepting iff max q∈inf (r) {α(q)} is even.We use the acronyms NBA, DBA, NLA, DLA, NPA, and DPA to denote nondeterministic/deterministic Büchi/looping/parity word automata.
We extend the right congruence ∼ L as well as the definition of the residual automaton R L to languages L ⊆ Σ ω .Here, however, R L need not accept the language of L, and we ignore its acceptance condition.
Sensing We study languages over an alphabet Σ = 2 P , for a finite set P of signals.
A letter σ ∈ Σ corresponds to a truth assignment to the signals.When we define lan-guages over Σ, we use predicates on P in order to denote sets of letters.For example, if P = {a, b, c}, then the expression (True) * • a • b • (True) * describes all words over 2 P that contain a subword σ a • σ b with σ a ∈ {{a}, {a, b}, {a, c}, {a, b, c}} and σ b ∈ {{b}, {a, b}, {b, c}, {a, b, c}}.
Consider an automaton A = 2 P , Q, q 0 , δ, α .For a state q ∈ Q and a signal p ∈ P , we say that p is sensed in q if there exists a set S ⊆ P such that δ(q, S \ {p}) = δ(q, S ∪ {p}).Intuitively, a signal is sensed in q if knowing its value may affect the destination of at least one transition from q.We use sensed (q) to denote the set of signals sensed in q.The sensing cost of a state q ∈ Q is scost(q) = |sensed (q)|. 3onsider a deterministic automaton A over Σ = 2 P (and over finite or infinite words).For a finite run r = q 1 , . . ., q m of A, we define the sensing cost of r, denoted scost(r), as 1 m m−1 i=0 scost(q i ).That is, scost(r) is the average number of sensors that A uses during r.Now, for a finite word w, we define the sensing cost of w in A, denoted scost A (w), as the sensing cost of the run of A on w.Finally, the sensing cost of A is the expected sensing cost of words of length that tends to infinity, where we assume that the letters in Σ are uniformly distributed.Thus, scost(A) = lim m→∞ |Σ| −m w:|w|=m scost A (w).Note that the definition applies to automata on both finite and infinite words.
Two DFAs may recognize the same language and have different sensing costs.In fact, as we demonstrate in Example 1 below, in the case of infinite words two different minimal automata for the same language may have different sensing costs.
For a language L of finite or infinite words, the sensing cost of L, denoted scost(L) is the minimal sensing cost required for recognizing L by a deterministic automaton.Thus, scost(L) = inf A:L(A)=L scost(A).For the case of infinite words, we allow A to be a deterministic automaton of any type.In fact, as we shall see, unlike the case of succinctness, the sensing cost is independent of the acceptance condition used.
Example 1.Let P = {a}.Consider the language L ⊆ (2 {a} ) ω of all words with infinitely many a and infinitely many ¬a.In the following figure we present two minimal DBAs for L with different sensing costs.While all the states of the second automaton sense a, thus its sensing cost is 1, the signal a is not sensed in all the states of the first automaton, thus its sensing cost is strictly smaller than 1).
Remark 1.Our study of sensing considers deterministic automata.The notion of sensing is less natural in the nondeterministic setting.From a conceptual point of view, we want to capture the number of sensors required for an actual implementation for recognizing the language.Technically, guesses can reduce the number of required sensors.To see this, take P = {a} and consider the language L = True * • a.A DFA for L needs two states, both sensing a.An NFA for L can guess the position of the letter before the last one, where it moves to the only state that senses a.The sensing cost of such an NFA is 0 (for any reasonable extension of the definition of cost on NFAs).
Probability Consider a directed graph G = V, E .A strongly connected component (SCC) of G is a maximal (with respect to containment) set C ⊆ V such that for all x, y ∈ C, there is a path from x to y.An SCC (or state) is ergodic if no other SCC is reachable from it, and is transient otherwise.
An automaton A = Σ, Q, q 0 , δ, α induces a directed graph G A = Q, E in which q, q ∈ E iff there is a letter σ such that q ∈ δ(q, σ).When we talk about the SCCs of A, we refer to those of G A .Recall that we assume that the letters in Σ are uniformly distributed, thus A also corresponds to a Markov chain M A in which the probability of a transition from state q to state q is p q,q = 1 |Σ| |{σ ∈ Σ : δ(q, σ) = q }|.Let C be the set of A's SCC, and C e ⊆ C be the set of its ergodic SCC's.
Consider an ergodic SCC C ∈ C e .Let P C be the matrix describing the probability of transitions in C. Thus, the rows and columns of P C are associated with states, and the value in coordinate q, q is p q,q .By [7], there is a unique probability vector π C ∈ [0, 1] C such that π C P C = π C .This vector describes the stationary distribution of C: m , where E C m (q) is the average number of occurrences of q in a run of M A of length m that starts anywhere in C [7].Thus, intuitively, π C (q) is the probability that a long run that starts in C ends in q.In order to extend the distribution to the entire Markov chain of A, we have to take into account the probability of reaching each of the ergodic components.The SCCreachability distribution of A is the function ρ : C → [0, 1] that maps each ergodic SCC C of A to the probability that M A eventually reaches C, starting from the initial state.We can now define the limiting distribution π : Q → [0, 1], as Note that q∈Q π(q) = 1, and that if P is the matrix describing the transitions of M A and π is viewed as a vector in [0, 1] Q , then πP = π.Intuitively, the limiting distribution of state q describes the probability of a run on a random and long input word to end in q.Formally, we have the following.Lemma 1.Let E m (q) be the expected number of occurrences of a state q in a run of length m of M A that starts in q 0 .Then, π(q) = lim m→∞ Em(q) m .
Computing The Sensing Cost of an Automaton Consider a deterministic automaton A = 2 P , Q, δ, q 0 , α .The definition of scost(A) by means of the expected sensing cost of words of length that tends to infinity does not suggest an algorithm for computing it.In this section we show that the definition coincides with a definition that sums the costs of the states in A, weighted according to the limiting distribution, and show that this implies a polynomial-time algorithm for computing scost(A).This also shows that the cost is well-defined for all automata.
Theorem 1.For all automata A, we have scost(A) = q∈Q π(q) • scost(q), where π is the limiting distribution of A.
Remark 2. It is not hard to see that if A is strongly connected, then π is the unique stationary distribution of M A and is independent of the initial state of A. Accordingly, scost(A) is also independent of A's initial state in this special case.
Theorem 2. Given an automaton A, the sensing cost scost(A) can be calculated in polynomial time.

The Sensing Cost of Regular Languages of Finite Words
In this section we study the setting of finite words.We show that there, sensing minimization goes with size minimization, which makes things clean and simple, as size minimization for DFAs is a feasible and well-studied problem.Consider a regular language L ⊆ Σ * , with Σ = 2 P .Recall that the residual automaton R L = Σ, L , ∆ L , [ ], α is the minimal-size DFA that recognizes L. We claim that R L also minimizes the sensing cost of L.
Lemma 2. Consider a regular language L ⊆ Σ * .For every DFA A with L(A) = L, we have that scost(A) ≥ scost(R L ).
Finally, since DFAs can be size-minimized in polynomial time, Theorems 2 and 3 imply we can efficiently minimize also the sensing cost of a DFA and calculate the sensing cost of its language: Theorem 4. Given a DFA A, the problem of computing scost(L(A)) can be solved in polynomial time.

The Sensing Cost of ω-Regular Languages
For the case of finite words, we have a very clean picture: minimizing the state space of a DFA also minimizes its sensing cost.In this section we study the case of infinite words.There, the picture is much more complicated.In Example 1 we saw that different minimal DBAs may have a different sensing cost.We start by showing that even for languages that have a single minimal DBA, the sensing cost may not be attained by this minimal DBA, and in fact it may be attained only as a limit of a sequence of DBAs.
Example 3. Let P = {p}, and consider the language L of all words w 1 • w 2 • • • such that w i = {p} for infinitely many i's.Thus, L = (True * • p) ω .A minimal DBA for L has two states.The minimal sensing cost for a two-state DBA for L is 2  3 (the classical two-state DBA for L senses p in both states and thus has sensing cost 1.By taking A 1 in the sequence we shall soon define we can recognize L by a two-state DBA with sensing cost 2  3 ).Consider the sequence of DBAs A m appearing in Figure 4.The DBA A m recognizes (True ≥m • p) ω , which is equivalent to L, yet enables a "lazy" sensing of p. Formally, The stationary distribution π for A m is such that π(q i ) = 1 m+1 for 0 ≤ i ≤ m − 1 and π(q m ) = 2 m+1 .In the states q 0 , . . ., q m−1 the sensing cost is 0 and in q m it is 1.Accordingly, scost(A m ) = 2 m+1 , which tends to 0 as m tends to infinity.hfill q 0 q 1 q m−1 q m true true ¬p p Fig. 4. The DBA Am.
Still we can characterize the sensing cost of an ω-regular language by means of the residual automaton for the language: Theorem 5.For every ω-regular language L ⊆ Σ ω , we have scost(L) = scost(R L ).

Trade-off between sensing and quality:
The key idea in the proof of Theorem 5 is that when we reason about languages of infinite words, it is sometimes possible to delay the sensing and only sense in "sparse" intervals.This sort of lazy sensing is sound, as eventualities are allowed to be satisfied in an unboundedly-far future (see also Example 3).In practice, however, it is often desirable to satisfy eventualities quickly.This is formalized in multi-valued formalisms such as LTL with future discounting [1], where formulas assign higher satisfaction values to computations that satisfy eventualities fast.Our study here suggests that lower sensing leads to lower satisfaction values.An interesting problem is to study and formalize this intuitive trade-off between sensing and quality.

Monitoring
As described in Section 1, the definition of sensing above takes into an account all words in (2 P ) ω , regardless their membership in the language.In monitoring, we restrict attention to words in the language, as once a violation is detected, no further sensing is required.In particular, in safety languages, violation amounts to a detection of a bad prefix, and indeed safety languages are the prominent class of languages for which monitoring is used [8].
As it turns out, however, there are many approaches to define the corresponding probability space.We suggest here two.We focus on safety languages, namely these recognizable by DLAs.Let A be a DLA and let L = L(A).
1. [Letter-based] At each step, we uniformly draw a "safe" letter -one with which we are still generating a word in pref (L), thereby iteratively generating a random word in L.

[Word-based]
At the beginning, we uniformly draw a word in L.
We denote the sensing cost of A in the letter-and word-based approaches lcost(A) and wcost(A), respectively.The two definitions yield two different probability measures on L, as demonstrated in Example 4 below.
Example 4. Let P = {a} and consider the safety language L = a ω + (¬a) • (True) ω .That is, if the first letter is {a}, then the suffix should be {a} ω , and if the first letter is ∅, then all suffixes result in a word in L. Consider the DLA A for L in Figure 5.In the letter-based definition, we initially draw a letter from 2 {a} uniformly, i.e., either a or ¬a w.p. 1  2 .If we draw ¬a, then we move to q 1 and stay there forever.If we draw a, then we move to q 2 and stay there forever.Since scost(q 1 ) = 0 and scost(q 2 ) = 1, and we reach q 1 and q 2 w.p 1 2 , we get lcost(A) = 1 2 .In the word-based definition, we assign a uniform probability to the words in L. In this case, almost all words are not a ω , and thus the probability of a ω is 0. This means that we will get to q 1 w.p. 1, and thus wcost(A) = 0.As a more realistic example, recall our traffic monitor in Section 1. There, the behavior of the cars is the random input, and the two approaches can be understood as follows.In the letter-based approach, we assume that the drivers do their best to avoid accidents regardless of the history of the traffic and the traffic lights so far.Thus, after every safe prefix, we assume that the next input is also safe.In the word-based approach, we assume that the city is planned well enough to avoid accidents.Thus, we a-priori set the distribution to safe traffic behaviors according to their likelihood.
We now define the two approaches formally.
The Letter-Based Approach Consider a DLA A = Σ, Q, q 0 , δ, Q .For a state q ∈ Q, let avail (q) be the set of letters available in q, namely letters that do not cause A to get stuck.Formally, avail (q) = {σ ∈ Σ : δ(q, σ) is defined }.We model the drawing of available letters by the Markov chain M A = Q, P , where the probability of a transition from state q to state q in M A is P (q, q ) = |{σ∈Σ:δ(q,σ)=q }| |avail(q)| .Let π be the limiting distribution of M A .We define lcost(A) = q∈Q π(q) • scost(q).
Since computing the limiting distribution can be done in polynomial time, we have the following.Theorem 6.Given a DLA A, the sensing cost lcost(A) can be calculated in polynomial time.
The Word-Based Approach Consider a DLA A = 2 P , Q, q 0 , δ, Q recognizing a nonempty safety language L. From Section 2, scost(A) = lim n→∞ 1 |Σ| n u∈Σ n scost A (u), which is proven to coincide with E[scost A (u)] where E is the expectation with respect to the standard measure on Σ ω .Our goal here is to replace this standard measure with one that restricts attention to words in L. Thus, we define wcost(A) = E[scost(u) | u ∈ L].For n ≥ 0, let pref (L, n) be the set of prefixes of L of length n.Formally, pref (L, n) = pref (L) ∩ Σ n .As in the case of the standard measure, the expectation-based definition coincides with one that that is based on a limiting process: wcost(A) = lim n→∞ 1 |pref (L,n)| u∈pref (L,n) scost A (u). Thus, the expressions for scost and wcost are similar, except that in the expectation-based definition we add conditional probability, restricting attention to words in L, and in the limiting process we replace Σ n by pref (L, n).
Note that the term 1 |pref (L,n)| is always defined, as L is a non-empty safety language.In particular, the expectation is well defined even if L has measure 0 in Σ ω .Theorem 7. Given a DLW A, we can compute wcost(A) in polynomial time.
Thus, ∼ L is the Myhill-Nerode right congruence used for minimizing automata.For u ∈ Σ * , let [u] denote the equivalence class of u in ∼ L and let L denote the set of all equivalence classes.Each class [u] ∈ L is associated with the residual language u −1 L = {w : uw ∈ L}.When L is regular, the set L is finite, and induces the residual automaton of L, defined by R L = Σ, L , ∆ L , [ ], α , with [u], a, [u • a] ∈ ∆ L for all [u] ∈ L and a ∈ Σ.Also, α contains all classes [u] with u ∈ L. The DFA R L is well defined and is the unique minimal DFA for L.

Fig. 1 .
Fig. 1.Two minimal DBAs for L with different sensing costs.