On the Expressiveness and Complexity of Randomization in Finite

On the Expressiveness and Complexity of
Randomization in Finite State Monitors
Rohit Chadha
Univ. of Illinois at Urbana-Champaign
and
A. Prasad Sistla
Univ. of Illinois at Chicago
and
Mahesh Viswanathan
Univ. of Illinois at Urbana-Champaign
In this paper we introduce the model of finite state probabilistic monitors (FPM), which are finite
state automata on infinite strings that have probabilistic transitions and an absorbing reject state.
FPMs are a natural automata model that can be seen as either randomized run-time monitoring
algorithms or as models of open, probabilistic reactive systems that can fail. We give a number of
results that characterize, topologically as well as with respect to their computational power, the
sets of languages recognized by FPMs. We also study the emptiness and universality problems for
such automata and give exact complexity bounds for these problems.
Categories and Subject Descriptors: D.2.4 [Software Engineering]: Program Verification; F.1.1 [Theory of
Computation]: Models of Computation; F.1.2 [Theory of Computation]: Modes of Computation
1.
INTRODUCTION
In this paper we introduce the model of Finite state Probabilistic Monitors (FPMs) and
study their expressive power and complexity of their decision problems. FPMs are finite
state automata on infinite strings that choose the next state on a transition based on a probability distribution, in addition to the input symbol read. They have a special reject state,
with the property that once the automaton enters the reject state, it remains there no matter
what the input symbol read is. On an infinite input word 𝛼, a FPM defines an infinite-state
Markov chain and the word 𝛼 is said to be accepted (rejected) with probability π‘₯ if the
probability of reaching the reject state is 1 βˆ’ π‘₯ (π‘₯ respectively).
FPMs are natural models of computation that arise in a variety of settings. They can be
seen as a special case of Probabilistic Büchi Automata (PBA) [Baier and GroΜˆπ›½er 2005] 1 .
PBAs are like FPMs, except that instead of a reject state they have a set of accept states.
PBAs are a generalization of probabilistic finite automata of [Rabin 1963; Salomaa 1973;
Paz 1971] to infinite strings and the probability of acceptance of an infinite word 𝛼 is the
probability measure of runs on 𝛼 that satisfy the Büchi acceptance condition, namely, those
that visit an accepting state infinitely often. A FPM is nothing but a PBA ℬ, where instead
1 In
some ways, FPMs considered here are more general than the PBA model. Baier et. al. consider PBAs to be
language acceptors that accept all strings whose measure of accepting runs in non-zero. We, on the other hand,
consider various probability thresholds for acceptance, and as will be seen in this paper, this generalization makes
a big difference to both the expressive power and the complexity of decision problems.
ACM Journal Name, Vol. V, No. N, Month 20YY, Pages 1–42.
2
β‹…
of the Büchi acceptance condition, the accepting runs are defined by a πœ”-regular safety
language (or the complement of a safety language) over the states of ℬ.
Another context where FPMs arise is as randomized monitoring algorithms, and this was
our original motivation for studying them. Run-time monitoring of system components is
an important technique that has widespread applications. It is used to detect erroneous behavior in a component that either has undergone insufficient testing or has been developed
by third party vendors. It is also used to discover emergent behavior in a distributed network like intrusion, or more generally, perform event correlation. In all these scenarios,
the monitor can be abstractly viewed as an algorithm that observes an unbounded stream
of events to and from the component being examined. Based on what the monitor has seen
up until some point, the monitor may decide that the component is behaving erroneously
(or is under attack) and raise an β€œalarm”, or may decide that nothing worrisome has been
observed. Hence, the absence of an error (or intrusion) is indicated implicitly by the monitor by the absence of an alarm. On the flip side, a behavior is deemed incorrect by the
monitor based on what has been observed in the past, and this decision is independent of
what maybe observed in the future. FPMs are finite state monitors that make probabilistic
decisions while they are observing the input stream. The unique, absorbing reject state
corresponds to the fact that once a behavior is deemed incorrect by a monitor, it does not
matter what events are seen in the future.
Finally, FPMs are also models of open, finite state probabilistic systems that can fail.
An open reactive system is a system that takes an infinite sequence of inputs from the environment and performs a computation by going through a sequence of states. Finite state
automata on infinite strings have been used to model the behavior of such systems that have
a finite number of possible states. Probabilistic open reactive systems are systems whose
behavior on an input sequence is probabilistic in nature. Such probabilistic behavior can be
either due to the randomization employed in the algorithm executed by the system or due
to other uncertainties, such as component failure, modeled probabilistically. Probabilistic
Büchi Automata (PBA) can be used to model the behavior of such systems having a finite
state space. FPMs which are PBAs having a single absorbing reject state can be used to
model open probabilistic systems that can fail; the failure state is modelled by the reject
state of the FPM. Decision problems on the language accepted by the FPM can help answer
a number of verification problems on such systems, including, determining the probability
of failure on some or all input sequences, and checking πœ”-regular safety properties (or their
complement).
Motivated by these applications we study a number of questions about FPMs. The first
question we ask is whether randomization is useful in the context of run-time monitoring.
We consider both algorithms with one-sided and two-sided errors. We say that a property is
monitorable with strong acceptance (M SA) if there is a monitor for the property that never
deems a correct behavior to be erroneous, but may occasionally pass an incorrect behavior.
On the other hand, a property is monitorable with weak acceptance (M WA) if there is a
monitor that may raise false alarms on a correct behavior, but would never fail to raise an
alarm on an incorrect one. Similarly we define classes of properties that have monitors
with two-sided errors. We say a property is monitorable with strict cut-points (M SC) if, for
some π‘₯, there is monitor such that on behaviors 𝛼 satisfying the property, the probability
that the monitor rejects 𝛼 is strictly less than π‘₯. Finally, a property is monitorable with nonstrict cut-points (M NC) if, for some π‘₯, there is monitor such that on behaviors 𝛼 satisfying
ACM Journal Name, Vol. V, No. N, Month 20YY.
β‹…
3
the property, the probability that the monitor rejects 𝛼 is at most π‘₯.
We compare the classes of properties monitorable with FPMs with those that can be
monitored deterministically. Deterministic monitors are well understood [Schneider 2000]
to be only able to detect violations of safety properties [Alpern and Schneider 1985; Lamport 1985; Sistla 1985]. In addition, if the deterministic monitor is finite state, then the
monitorable properties are regular safety languages. We contrast this with our observations
about properties monitorable by FPMs, which are summarized in Figure 5 on page 18. We
show that while the class M SA is exactly the class of πœ”-regular safety properties, the class
M NC not only contains all πœ”-regular safety properties, but also contains some non-regular
safety properties. However, even though the class M NC is uncountable, it is properly
contained in the class of all safety properties. The classes M WA and M SC allow us to
go beyond deterministic monitoring along a different axis. We show that M WA strictly
contains all the πœ”-regular almost safety properties 2 . Even though, M WA contains some
non-regular properties, they are very close to being πœ”-regular. More precisely, we show
that the safety closure of any property in M WA (i.e., the smallest safety property containing
it) and the safety closure of its complement, are both πœ”-regular. We note here that if we
were to define the class M WA for probabilistic automata over finite strings then we will
only obtain regular languages. We show that M WA is strictly contained in M SC which in
turn is strictly contained in the class of all almost safety properties. Finally, we show that
M SC and M NC are incomparable.
We also consider a sub-class of FPMs. Let us call a FPM β„³ π‘₯-robust if for some
πœ– > 0, the probability that β„³ rejects any string is bounded away from π‘₯ by πœ–, i.e., it either
rejects a string with probability greater than π‘₯ + πœ– or with probability less than π‘₯ βˆ’ πœ–. A
robustly monitorable property then is just a property that has a robust monitor. Robustly
monitorable properties are a natural class of properties. They are the constant space analogs
of the complexity classes RP and co-RP, when π‘₯ is 0 or 1. They also are a generalization
of the notion of isolated cut-points [Rabin 1963; Salomaa 1973; Paz 1971] in finite string
probabilistic automata to infinite strings. We show that robustly monitorable properties are
exactly the same as the class of πœ”-regular safety properties.
We conclude the summary of our expressiveness results with one more observation about
the advantage of randomization in the context of monitoring. Even though M SA and robust
monitors recognize the same class of languages as deterministic monitors, they can be
exponentially more succinct. More specifically, there exists a family {𝐿𝑖 }∞
𝑖=0 such that
each 𝐿𝑖 is an πœ”-regular safety language. Each 𝐿𝑖 can be recognized by a robust FPMs 𝑀𝑖
with 𝑖 + 2 states that accepts every string in 𝐿𝑖 with probability 1, and rejects every string
not in 𝐿𝑖 with probability at least 2𝑖 . In contrast the smallest deterministic monitor for
𝐿𝑖 has 2𝑖 states. Thus, FPMs are space efficient algorithms for monitoring regular safety
properties. Although, non-deterministic automata also exhibit the succinctness property,
they are not directly executable.
The next series of questions that we investigate in this paper, is the complexity of the
emptiness and universality problems for the various classes of FPM languages introduced.
Apart from being natural decision problems for automata, emptiness and universality are
important in this context for a couple of reasons. For FPMs that model monitoring algorithms, emptiness and universality checking serve as sanity checks: if the language of a
monitor is empty then it means that it is too conservative, and if the language is universal
2 An
almost safety property is a countable union of safety properties.
ACM Journal Name, Vol. V, No. N, Month 20YY.
4
β‹…
then it means that it is too liberal. On the other hand, for FPMs modeling open, probabilistic reactive systems, emptiness and universality are the canonical verification problems for
such systems.
We give exact complexity bounds for these decision problems for all the classes of FPMs
considered; our results are summarized in Figure 6 on page 26. We show that the emptiness problems for monitors with one sided error, i.e., for the classes M SA and M WA, are
PSPACE-complete. These results are interesting in the light of the fact that checking nonemptiness of a non-deterministic finite state automaton on infinite strings, with respect
to any of the commonly used acceptance conditions, is in polynomial time. We also show
that the emptiness problem for monitors with two sided errors is undecidable. More specifically, we show that the emptiness problem for the class M NC is R.E.-complete, while it is
co-R.E.-complete for the class M SC. Next, we show that the universality problem for the
class M SA is NL-complete while for M WA it is PSPACE-complete. This problem is coR.E.-complete for the class M NC, while it is Ξ 11 -complete for M SC. Many of these results,
for both the lower and upper bounds, are quite surprising, and their proofs non-trivial. We
conclude the introduction by highlighting the reason why the complexity for the emptiness
and universality problems is so different for M SC and M NC. Words which have rejection
probability π‘₯ (which is the threshold of the FPM) can only be detected in the limit, whereas
words rejected with probability > π‘₯ are witnessed by a finite prefix.
Paper Outline. The rest of paper is organized as follows. We first discuss related work.
Then in Section 2, we motivate FPMs with some examples. In Section 3 we give basic
definitions and properties of safety and almost safety languages. We formally define FPM’s
in Section 4 and the language classes M SA, M WA, M NC and M SC. Our expressiveness
results are presented in Section 5 and the complexity, decidability results are presented in
Section 6. We conclude in Section 7.
1.1
Related Work
The model of FPMs introduced here is a special case of Probabilistic Büchi Automata
(PBA) introduced in [Baier and GroΜˆπ›½er 2005], which accept infinite strings whose accepting runs have non-zero measure β€” the language β„›<1 (β„³) of a monitor β„³ is the same
as the language β„’(ℬ) of a PBA ℬ which has the same transition structure as β„³ and has
as accept states the non-reject states of β„³. [Baier and GroΜˆπ›½er 2005] show that there are
PBAs ℬ such that β„’(ℬ) is non-regular. The emptiness and universality problems for such
PBAs has been shown to be undecidable in [Baier et al. 2008]. Thus, our results on M WA
demonstrate that we have identified a restricted form of PBAs that are effective. Under
the almost-sure semantics of PBAs, introduced in [Baier et al. 2008], a PBA ℬ is taken to
accept all strings whose accepting runs have measure 1. Thus, the universality problem of
β„›<1 (β„³) can also be seen as the emptiness problem for almost-sure semantics of special
kinds of PBAs. The emptiness problem of PBAs with almost-sure semantics was shown
to be in EXPTIME in [Baier et al. 2008]; the fact that the universality problem for M WA
is PSPACE-complete once again demonstrates that FPMs are more effective than general
PBAs.
We draw upon, and generalize, many proof techniques introduced in the context of finite strings and probabilistic automata [Rabin 1963; Salomaa 1973; Paz 1971] to infinite
strings. In particular, the iteration lemma and its proof presented here, is closely related
to a similar result in the context of finite strings (though it is generalized here to infinite
strings). Also, the proof that robust monitors define πœ”-regular languages is inspired by a
ACM Journal Name, Vol. V, No. N, Month 20YY.
β‹…
5
similar result for finite strings by [Rabin 1963], that says that probabilistic finite automata
with isolated cut-points define regular (finite word) languages. However, our proof for
infinite word languages, crucially relies on the fact that robust monitors define safety languages, and no such topological property is relied upon in the finite case. Another proof
technique that we use extensively is the co-R.E.-hardness proof for the emptiness of PFAs
on finite words due to [Condon and Lipton 1989]. The proof is by a reduction from deterministic two-counter machines and uses a weak equality test by [Freivalds 1981] designed
to check (using coin tosses and finite memory) whether two counters have the same value.
The co-R.E.-hardness of the emptiness for the class M SC and universality for the class
M NC, proved herein, are proved as a consequence of co-R.E.-hardness of emptiness of
probabilistic automata with cut-points. The R.E.-hardness of the emptiness for the class
M NC and Ξ 11 -hardness for the class M SC shown here are proved by a non-trivial modification of the weak-equality test of [Freivalds 1981].
Our work was initially inspired by a desire to understand the power of randomization
in the context of run time monitoring. Observing the dynamic behavior of a system has
long been understood to be an important technique to detect faults; see [Plattner and Nievergelt 1981; Mansouri-Samani and Sloman 1992; Schroeder 1995] for early surveys about
the area. A number of tools have been built in the recent past to analyze the behavior of
software systems; examples of such systems include [Diaz et al. 1994; rov 1997; Ranum
et al. 1997; Paxson 1997; Jeffery et al. 1998; Kim et al. 1999; Kortenkamp et al. 2001;
Gates and Roach 2001; Havelund and Rosu 2001; Chen and Rosu 2007]. The importance
of this area can be gauged by the success of a workshop series devoted exclusively to this
topic [rv- 2008]. The theoretical foundations of what can and cannot be monitored was initiated by [Schneider 2000] where it was observed that only safety properties [Alpern and
Schneider 1985; Lamport 1985; Sistla 1985] can be deterministically monitored; this characterization was refined to take into account computability considerations in [Viswanathan
2000]. Though safety properties constitute an upper bound on the class of deterministically monitorable properties, in practice, properties other than safety are also monitored by
either under or over approximating them to safety properties [Amorium and Rosu 2005;
Margaria et al. 2005], or by using a multi-valued interpretation of whether formula holds
on a finite prefix [Pnueli and Zaks 2006; Bauer et al. 2006].
There has been quite a bit of work on enforcing different security properties through
run time monitoring by employing different types of deterministic automata. For example,
truncation automata and suppression automata have been proposed in [Schneider 2000]
and [Ligatti et al. 2005], respectively. Both these automata effectively enforce properties
that are only safety properties. In [Ligatti et al. 2005; 2009; Ligatti 2006], a new kind of
automata called edit automata are proposed. These automata can buffer outputs generated
by the system and release them only when the required property is satisfied by the buffered
sequence of outputs. The authors show that edit automata can be used to enforce a class of
properties called reasonable infinite renewable properties, which include many non-safety
properties. In general, edit automata can buffer arbitrary number of outputs and hence
can use unbounded amount of memory. They also can delay as well as transform the
outputs generated by the system that is being monitored. Compared to these, FPMs only
have finite number of states, and do not delay or modify the system outputs, i.e., they are
passive in nature. On the other hand, they employ randomization and can monitor nonsafety properties with some error probability. It will be interesting to investigate whether
ACM Journal Name, Vol. V, No. N, Month 20YY.
6
β‹…
infinite renewable properties can be monitored using FPMs. This will be part of future
work.
Further, in [Hamlen et al. 2006], the authors propose a taxonomy of enforceable security policies. Using this they broadly classify existing enforcement techniques into three
different classes based onβ€” static analysis, execution monitoring and program rewriting.
Although FPMs are based on execution monitoring, they employ randomization which is
quite novel and is not covered by the above classification. Randomization can make the
monitor unpredictable making it difficult for an adversary to exploit it. Lastly, the use of
statistical techniques is ubiquitous in intrusion detection systems [Group 2001]. However,
the study of designing randomized monitors for formally specified properties was only recently initiated [Sistla and Srinivas 2008]. In this paper we continue this line of work. We
would, however, like to contrast this line of work with that of [Sammapun et al. 2007],
where they consider the design of randomized monitors for probabilistic systems. We also
like to point out that [Gondi et al. 2009] presents and compares different monitoring techniques, i.e., deterministic, probabilistic and hybrid, for monitoring properties, specified by
automata on infinite strings, of systems modeled as Hidden Markov Chains. It proposes
and uses two different accuracy measures, called acceptance and rejection accuracies. It
performs both theoretical as well as experimental analysis of these techniques on realistic
systems and shows that randomization can be quite effective in achieving high levels of
accuracies, especially when combined with deterministic techniques.
Finally, we would like to point out that a preliminary version of these results was presented in [Chadha et al. 2008]. The main difference between these two papers is as follows.
First, since [Chadha et al. 2008] was an extended abstract it did not contain many proofs,
which have been presented fully for the first time here. Second, the proof of Theorem 5.15
had an incorrect expression in [Chadha et al. 2008] which has been corrected here. Finally, while we stated the results for the emptiness problem of M WA and M SC in [Chadha
et al. 2008], we had neither considered the emptiness problem for M SC and M NC, nor the
universality problem for any of the classes of FPMs.
2.
MOTIVATION
In this section, we motivate FPMs with some examples in monitoring and verification. The
first two examples are on monitoring and the last two are on verification.
Monitoring non-safety properties. Consider a system that outputs an infinite sequence
of symbols from {π‘Ž, 𝑏}. Suppose we want to monitor the property which states that the
symbol π‘Ž should eventually appear in the input sequence. Since this property is not a
safety property, it can not be monitored using deterministic monitors. On the other hand
the probabilistic monitor 𝑀 , shown in Figure 1, monitors this property. From the initial
state π‘ž0 , after each input symbol, β„³ acts as follows. If the input symbol is 𝑏 then β„³ goes
to the reject state π‘žπ‘Ÿ with probability 21 and stays in the initial state with probability 12 . If
the input symbol is π‘Ž then it goes to an accept state π‘žπ‘Ž with probability one. Both π‘žπ‘Ÿ and
π‘žπ‘Ž are absorbing states, i.e., on further inputs β„³ remains in those states with probability
one. It is easy to see that, an input sequence that violates the property, i.e., that does not
have π‘Ž appearing in it, will be rejected with probability one. On the other hand, a good
sequence, i.e., one that satisfies the property, may also be rejected, but with probability
less than one. The probability of rejection of such a sequence gracefully degrades, i.e.,
increases, with the number of input symbols before the first π‘Ž in the input. It is to be
ACM Journal Name, Vol. V, No. N, Month 20YY.
β‹…
7
a, b, 1
π‘žπ‘Ž
π‘ž1
a, b, 1
π‘ž2
π‘ž
a, b, 1
π‘žπ‘›
a, 1
b,
1
2
π‘ž0
a,
b,
1
2
π‘žπ‘Ÿ
a, b, 1
Fig. 1.
FPM for β—‡π‘Ž
a,
1
2
1
2
b, 1
a, 1
π‘ž0
π‘žπ‘Ÿ
b, 1
a, b, 1
Fig. 2.
Robust FPM with exponentially fewer states
noted that one can give deterministic algorithms, e.g., employing counters and/or using
over-approximations, for monitoring this property; such an algorithm rejects the sequence
that does not contain π‘Ž and that also rejects some other good sequences. Combining such
methods with probabilities, one can ensure that more good sequences are accepted (see
[Sistla and Srinivas 2008; Gondi et al. 2009]).
Succinct monitors. The previous example illustrates a property that can be monitored in
a probabilistic sense, but that can not be monitored using a deterministic monitor. Probabilistic monitors can also be used to generate succinct monitors even for safety properties.
Let 𝑛 > 0 be a positive integer. Consider the following πœ”-regular safety property 𝐿𝑛 ,
over the input alphabet {π‘Ž, 𝑏}, that requires that the π‘›π‘‘β„Ž symbol after every π‘Ž should be
the symbol 𝑏. It is not difficult to show that any deterministic monitor for this property
has to have at least 2𝑛 states. On the other hand, the probabilistic monitor 𝑁 with 𝑛 + 2
states, shown in Figure 2, monitors this property as follows. In the initial state π‘ž0 , when
ever the monitor 𝑁 sees π‘Ž, with probability 21 it remains in π‘ž0 , and with probability 12 it
goes to another state, say π‘ž1 . From π‘ž1 it counts 𝑛 input symbols and checks if the π‘›π‘‘β„Ž
symbol is 𝑏; if that symbol is 𝑏 then it goes back to the initial state π‘ž0 , else it goes to the
reject state π‘žπ‘Ÿ . It is not difficult to see that if the input sequence satisfies the property 𝐿𝑛
then 𝑁 rejects it with zero probability. On the other, if it does not satisfy 𝐿𝑛 then it is
rejected with probability at least 21𝑛 . This is because it catches the error if for all the 𝑛
symbols before the faulty π‘Ž the machine did not take the transition π‘ž0 to π‘ž1 , while at the
faulty π‘Ž it does take this transition. Notice that 𝑁 is different from 𝑀 in the sense that it
rejects all bad sequences with probability at least 21𝑛 and rejects all good sequences with
probability 0. It is also to be noted that if the input sequence has infinite number of errors,
i.e., infinite number of occurrences of π‘Ž such that the π‘›π‘‘β„Ž symbol after it is is not a 𝑏, then
the sequence is rejected by 𝑁 with probability 1 (in general, the probability of rejecting an
input sequence increases with the number of errors). This monitor has only 𝑛 + 2 states
and is succinct compared to any deterministic monitors. Thus, we see that probabilistic
monitors can give space efficient monitors. Note that non-deterministic automata can also
be succinct language recognizers, but they are not executable.
The above two examples show that randomization can be used to monitor for liveness
properties and can also be used for obtaining succinct monitors for safety properties. One
ACM Journal Name, Vol. V, No. N, Month 20YY.
8
β‹…
can also give deterministic monitors for both of the above properties that err sometimes,
with the monitor for the later property being succinct. These examples show that randomization is an alternate/complementary technique for monitoring. It has the advantage of
being unpredictable making it difficult to be exploited by an adversary when monitoring
for security properties. The reader is referred to [Sistla and Srinivas 2008; Gondi et al.
2009] for various practical examples and for comparison between deterministic, randomized and hybrid techniques for monitoring various properties, including liveness properties,
specified by automata on infinite strings.
Checking failure freedom property. Consider a system consisting of π‘˜ number of machines (for some π‘˜ > 0) and a repair kit (this system may be a robot exploring Martian
surface). At any time, only a subset of the machines are operational. The state of the
system is denoted by the set of machines that are operational. There is also a special state
denoting the failure of the repair kit as well as all the machines. The repair kit repairs
failed machines over time. At any time the system takes an input from outside and performs work denoted by the input. During the processing of the input, some machines may
fail and some previously failed machines may get repaired, or the repair kit and all the
machines may fail. Both failures of machines and the repair kit, as well as repairing of machines is probabilistic in nature. Thus after each input, the state of the system may change
according to a discrete probability distribution which may depend on the input symbol as
well as the current state. One may want to determine the sequences of inputs on which
the systems fails with more than a critical probability, or determine if the system never fail
with more than a critical probability.
Verifying πœ”-regular safety properties of probabilistic open systems. FPMs can also
be used for verifying safety properties of open probabilistic systems. As indicated in the
introduction, such a system can be modeled as PBA, call it as system automaton. Now,
suppose we want to verify that on every infinite input sequence, the sequence of states
the system goes through satisfies a safety property specified by a deterministic finite state
automaton 𝐴, with probability greater than some π‘₯. The input symbols to 𝐴 are the states
of the system automaton. The automaton 𝐴 has an error state which is an absorbing state.
Any sequence of inputs leading to the error state is a bad sequence. An infinite sequence
of inputs to 𝐴 is good if none of its prefixes is bad. To perform the verification, we take a
synchronous product of the system automaton and the property automaton 𝐴. Each state
of the product is a pair of the form (𝑠, π‘ž) where 𝑠 is the system state and π‘ž is the state
of 𝐴. There is a transition from (𝑠, π‘ž) to (𝑠′ , π‘ž β€² ) with probability 𝑝 on input π‘Ž iff i) there
is a transition from 𝑠 on input π‘Ž to 𝑠′ in the system automaton with probability 𝑝 and ii)
there is a transition on input 𝑠 from π‘ž to π‘ž β€² in 𝐴. We convert this product automaton to a
FPM β„³, by merging all states of the form (𝑠, π‘ž), where π‘ž is the error state of 𝐴, into a
single absorbing state which is the rejecting state. Now, on every infinite input sequence
the system satisfies the safety property specified by 𝐴 with probability greater than π‘₯ iff
every input sequence is rejected by β„³ with probability less than 1 βˆ’ π‘₯.
3.
PRELIMINARIES
Sequences. Let 𝑆 be a finite set. We let βˆ£π‘†βˆ£ denote the cardinality of 𝑆. Let πœ… = 𝑠1 , 𝑠2 , . . .
be a possibly infinite sequence over 𝑆. The length of πœ…, denoted as βˆ£πœ…βˆ£, is defined to be
the number of elements in πœ… if πœ… is finite, and πœ” otherwise. 𝑆 βˆ— denotes the set of finite
sequences, 𝑆 + the set of finite sequences of length β‰₯ 1 and 𝑆 πœ” denotes the set of infinite
ACM Journal Name, Vol. V, No. N, Month 20YY.
β‹…
9
sequences. If πœ‚ is a finite sequence, and πœ… is either a finite or an infinite sequence then πœ‚πœ…
denotes the concatenation of the two sequences in that order. If 𝑅 βŠ† 𝑆 βˆ— and 𝑅′ βŠ† 𝑆 βˆ— βˆͺ𝑆 πœ” ,
the set 𝑅𝑅′ = {πœ‚πœ… ∣ πœ‚ ∈ 𝑅 and πœ‚ ∈ 𝑅′ }.
For integers 𝑖 and 𝑗 such that 1 ≀ 𝑖 ≀ 𝑗 < βˆ£πœ…βˆ£, πœ…[𝑖 : 𝑗] denotes the (finite) sequence
𝑠𝑖 , . . . 𝑠𝑗 and the element πœ…(𝑖) denotes the element 𝑠𝑖 . A finite prefix of πœ… is any πœ…[1 : 𝑗] for
𝑗 < βˆ£πœ…βˆ£. We denote the set of πœ…β€™s finite prefixes by Pref (πœ…).
Languages. Given a finite alphabet Σ, a language 𝐿 of finite words over Σ is a set of finite
sequences over Ξ£ and a language β„’ of infinite words over Ξ£ is a set of infinite sequences
over Ξ£.
Metric topology on Ξ£πœ” . Given a finite alphabet Ξ£, one can define a metric 𝑑 : Ξ£πœ” ×Ξ£πœ” β†’
ℝ+ on Ξ£πœ” as follows. For 𝛼1 , 𝛼2 ∈ Ξ£πœ” , 𝛼1 βˆ•= 𝛼2 , 𝑑(𝛼1 , 𝛼2 ) = 21𝑗 where 𝑗 is the unique
integer such that 𝛼1 (𝑗) βˆ•= 𝛼2 (𝑗) and βˆ€π‘– < 𝑗, 𝛼1 (𝑖) = 𝛼2 (𝑖). Also 𝑑(𝛼, 𝛼) = 0 for all
𝛼 ∈ Ξ£πœ” . Given 𝛼 ∈ Ξ£πœ” and r ∈ ℝ, the set B(𝛼, r) = {𝛽 ∣ 𝑑(𝛼, 𝛽) < r} is said to be an
open ball with center 𝛼 and radius r. A language β„’ βŠ† Ξ£πœ” is said to be open if for every
𝛼 ∈ β„’ there is a r𝛼 such that B(𝛼, r𝛼 ) βŠ† β„’. It can be shown that a language β„’ is open iff
β„’ = πΏΞ£πœ” for some 𝐿 βŠ† Ξ£βˆ— . A language β„’ is closed if its complement Ξ£πœ” βˆ– β„’ is open.
Given a language β„’ βŠ† Ξ£πœ” , the set cl(β„’) = {𝛼 ∣ βˆ€r, B(𝛼, r) ∩ β„’ =
βˆ• βˆ…} is the smallest closed
set containing β„’.
Safety Languages. Given an alphabet Ξ£ andβˆͺa language β„’ βŠ† Ξ£πœ” , we denote the set of
prefixes of β„’ by Pref (β„’), i.e., Pref (β„’) =
π›Όβˆˆβ„’ Pref (𝛼). Following [Lamport 1985;
Alpern and Schneider 1985], a language β„’ is a safety property (also, called safety language)
if for every 𝛼 ∈ Ξ£πœ” : Pref (𝛼) βŠ† Pref (β„’) β‡’ 𝛼 ∈ β„’ . In other words, β„’ is a safety
property if it is limit closed – for every infinite string 𝛼, if every prefix of 𝛼 is a prefix of
some string in β„’, then 𝛼 itself is in β„’. Safety languages coincide exactly with the closed
languages in the metric topology 𝑑 defined above [Perrin and Pin 2004]. We will denote
the set of safety languages by Safety.
Almost Safety Languages. It is well known that the class of safety languages are closed
under finite union and countable intersection [Sistla 1985], but not under countable unions.
We say that a language β„’ is an almost safety property/language if it is a countable union
of safety languages, i.e., β„’ := βˆͺ0≀𝑖<∞ ℒ𝑖 where ℒ𝑖 , for 0 ≀ 𝑖 < ∞, is a safety
language. For β„’, as given above, and 𝑖 β‰₯ 0, let ℳ𝑖 = βˆͺ0≀𝑗≀𝑖 ℒ𝑗 . It is easy to see
that, for each 𝑖 β‰₯ 0, ℳ𝑖 is a safety language and ℳ𝑖 βŠ† ℳ𝑖+1 . Thus the languages
β„³0 , ..., ℳ𝑖 , ... form an increasing chain of safety languages with β„’ as its limit. Thus,
we see that, although an almost safety language is not a safety language, it nevertheless
can be approximated more and more accurately by safety languages. Please note that the
complement of an almost safety property can be written as a countable intersection of
open sets of the metric topology 𝑑 defined above. We will denote the set of almost safety
languages by AlmostSafety.
Automata and πœ”-regular Languages. A Büchi automaton π’œ on infinite strings over a
finite alphabet Ξ£ is a 4-tuple (𝑄, Ξ”, π‘ž0 , 𝐹 ) where 𝑄 is a finite set of states, Ξ” βŠ† 𝑄×Ξ£×𝑄
is a transition relation, π‘ž0 ∈ 𝑄 is an initial state, and 𝐹 βŠ† 𝑄 is a set of accepting/final
automaton states. If for every π‘ž ∈ 𝑄 and π‘Ž ∈ Ξ£, there is exactly one π‘ž β€² such that (π‘ž, π‘Ž, π‘ž β€² ) ∈
Ξ” then π’œ is called a deterministic automaton. Let 𝛼 = π‘Ž1 , . . . be an infinite sequence over
ACM Journal Name, Vol. V, No. N, Month 20YY.
10
β‹…
Ξ£. A run π‘Ÿ of π’œ on 𝛼 is an infinite sequence π‘Ÿ0 , π‘Ÿ1 , . . . over 𝑄 such that π‘Ÿ0 = π‘ž0 and for
every 𝑖 > 0, (π‘Ÿπ‘–βˆ’1 , π‘Žπ‘– , π‘Ÿπ‘– ) ∈ Ξ”. The run π‘Ÿ is accepting if some state in 𝐹 appears infinitely
often in π‘Ÿ. The automaton π’œ accepts the string 𝛼 if it has an accepting run over 𝛼. The
language accepted (recognized) by π’œ, denoted by 𝐿(π’œ), is the set of strings that π’œ accepts.
A language β„’ is called πœ”-regular if it is accepted by some finite state Büchi automaton.
We will denote the set of πœ”-regular languages by Regular. Regular is closed under finite
boolean operations.
A language β„’ ∈ Regular ∩ AlmostSafety iff there is a deterministic Büchi automaton
which accepts its complement Ξ£πœ” βˆ– β„’ [Perrin and Pin 2004; Thomas 1990]. It is wellknown that a language β„’ ∈ Regular ∩ Safety iff there is a deterministic Büchi automaton
π’œ = (𝑄, Ξ”, π‘ž0 , {π‘žπ‘Ÿ }) such that βˆ€π‘Ž ∈ Ξ£, (π‘žπ‘Ÿ , π‘Ž, π‘žπ‘Ÿ ) ∈ Ξ” and π’œ recognizes the complement
Ξ£πœ” βˆ– β„’. A language β„’ ∈ Regular ∩ Safety iff there is a Büchi automaton π’œ (not necessarily
deterministic) such that each state of π’œ is a final state [Perrin and Pin 2004]. This implies
that a language β„’ ∈ Safety is πœ”-regular iff the set of finite prefixes of β„’, Pref (β„’) βŠ† Ξ£βˆ— ,
is a regular language (here Pref (β„’) is a language of finite words).
Probability Spaces. Let 𝑉 be a set and 𝐸 be a set of subsets of 𝑉 . We say that 𝐸 is a 𝜎algebra on 𝑉 if 𝐸 contains the empty set, is closed under complementation and also under
finite as well as countable unions. Let 𝐹 be a set of subsets of 𝑉 . A 𝜎-algebra generated
by 𝐹 is the smallest 𝜎-algebra that contains 𝐹 . A probability space is a triple (𝑉, 𝐸, πœ‡)
where 𝐸 is a 𝜎-algebra on 𝑉 and πœ‡ is a probability function [Papoulis and Pillai 2002] on
𝐸.
4.
FINITE STATE PROBABILISTIC MONITORS
We will now define finite state probabilistic monitors which can be viewed as probabilistic automata over infinite strings that have a special reject state. The transition relation
from a state on a given input is described as a probability distribution that determines the
probability of transitioning to that state. The transition relation ensures that the probability
of transitioning from the reject state to a non-reject state is 0. A FPM can thus be seen
as a generalization of deterministic finite state monitors where the deterministic transition
is replaced by a probabilistic transition. Alternately, it can be viewed as the restriction
of probabilistic monitors [Sistla and Srinivas 2008] to finite memory. From an automatatheoretic viewpoint, they are special cases of probabilistic Büchi automata described in
[Baier and GroΜˆπ›½er 2005] which generalized the probabilistic finite automata [Rabin 1963;
Salomaa 1973; Paz 1971] on finite words to infinite words. The main difference here is that
instead of having a set of accepting states, we have one (absorbing) reject state. Formally,
Definition: A finite state probabilistic monitor (FPM) over a finite alphabet Ξ£ is a tuple
β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿) where 𝑄 is a finite set of states; π‘žπ‘  ∈ 𝑄 is the initial state; π‘žπ‘Ÿ ∈ 𝑄 is
the reject state, and; 𝛿 : 𝑄 × Ξ£βˆ‘× π‘„ β†’ [0, 1] is the probabilistic transition relation such
that for all π‘ž ∈ 𝑄 and π‘Ž ∈ Ξ£, π‘žβ€² βˆˆπ‘„ 𝛿(π‘ž, π‘Ž, π‘ž β€² ) = 1 and 𝛿(π‘žπ‘Ÿ , π‘Ž, π‘žπ‘Ÿ ) = 1. In addition, if
𝛿(π‘ž, π‘Ž, π‘ž β€² ) is a rational number for all π‘ž, π‘ž β€² ∈ 𝑄, π‘Ž ∈ Ξ£, then we say that β„³ is a rational
finite state probabilistic monitor (RatFPM).
It will be useful to view the transition function 𝛿 of a FPM on an input π‘Ž as a matrix π›Ώπ‘Ž
with the rows labeled by β€œcurrent” state and columns labeled by β€œnext” state and the entry
π›Ώπ‘Ž (π‘ž, π‘ž β€² ) denoting the probability of transitioning from π‘ž to π‘ž β€² . Formally,
Notation: Given a FPM, β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿) over Ξ£, and π‘Ž ∈ Ξ£, π›Ώπ‘Ž is a square matrix
ACM Journal Name, Vol. V, No. N, Month 20YY.
β‹…
11
of order βˆ£π‘„βˆ£ such that π›Ώπ‘Ž (π‘ž, π‘ž β€² ) = 𝛿(π‘ž, π‘Ž, π‘ž β€² ). Given a word 𝑒 = π‘Ž1 π‘Ž2 . . . π‘Žπ‘› ∈ Ξ£+ , 𝛿𝑒
is the matrix product π›Ώπ‘Ž1 π›Ώπ‘Ž2 . . . π›Ώπ‘Žπ‘› . Please note that π›Ώπœ– is not defined. However, we shall
sometimes abuse notation andβˆ‘say that π›Ώπœ– (π‘ž1 , π‘ž2 ) is 1 if π‘ž1 = π‘ž2 and 0 otherwise. For
𝑄1 βŠ† 𝑄, we say 𝛿𝑒 (π‘ž, 𝑄1 ) = π‘ž1 βˆˆπ‘„1 𝛿𝑒 (π‘ž, π‘ž1 ).
Intuitively, the matrix entry 𝛿𝑒 (π‘ž, π‘ž β€² ) denotes the probability βˆ‘
of being in π‘ž β€² after having
read the input word 𝑒 and having started in π‘ž. Please note that π‘žβ€² βˆˆπ‘„ 𝛿𝑒 (π‘ž, π‘ž β€² ) = 1 for all
𝑒 ∈ Ξ£+ and π‘ž, π‘ž β€² ∈ 𝑄.
The behavior of a FPM β„³ on an input word 𝛼 = π‘Ž1 π‘Ž2 , . . . , . can be described as
follows. The FPM starts in the initial state π‘žπ‘  and if reading input symbols π‘Ž1 π‘Ž2 π‘Ž3 . . . π‘Žπ‘–
results in state π‘ž, then it moves to state π‘ž β€² with probability π›Ώπ‘Žπ‘–+1 (π‘ž, π‘ž β€² ) on symbol π‘Žπ‘–+1 .
An infinite sequence of states, 𝜌 ∈ π‘„πœ” , is a run of the FPM β„³. We say that a run 𝜌 is
rejecting if the reject state occurs infinitely often in 𝜌. A run 𝜌 is said to be accepting if the
run is not a rejecting run. In order to determine the probability of rejecting the word 𝛼, the
FPM β„³ can be thought of as a infinite state Markov chain which gives rise to the standard
probability measure on Markov Chains [Vardi 1985; Kemeny and Snell 1976]:
Definition: Given a FPM, β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿) on the alphabet Ξ£ and a word 𝛼 ∈ Ξ£πœ” ,
the probability space generated by β„³ and 𝛼 is the probability space (π‘„πœ” , β„±β„³,𝛼 , πœ‡β„³,𝛼 )
where
β€”β„±β„³,𝛼 is the smallest 𝜎-algebra on π‘„πœ” generated by the collection {Cπœ‚ ∣ πœ‚ ∈ 𝑄+ } where
Cπœ‚ = {𝜌 ∈ π‘„πœ” ∣ πœ‚ is a prefix of 𝜌}.
β€”πœ‡β„³,𝛼 is the unique probability measure on (π‘„πœ” , β„±β„³,𝛼 ) such that πœ‡β„³,𝛼 (Cπ‘ž0 ...π‘žπ‘› ) is
β€”0 if π‘ž0 βˆ•= π‘žπ‘  ,
β€”1 if 𝑛 = 0 and π‘ž0 = π‘žπ‘  , and
—𝛿(π‘ž0 , 𝛼(1), π‘ž1 ) . . . 𝛿(π‘žπ‘›βˆ’1 , 𝛼(𝑛), π‘žπ‘› ) otherwise.
The set of rejecting runs and the set of accepting runs for a given word 𝛼 can be shown to
be measurable which gives rise to the following definition.
Definition: Let πœ‡β„³,𝛼 be the probability measure defined by the FPM, β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿)
on Ξ£ and the word 𝛼 ∈ Ξ£πœ” . Let rej = {𝜌 ∈ π‘„πœ” ∣ π‘žπ‘Ÿ occurs infinitely often in 𝜌} and
acc = π‘„πœ” βˆ– rej. The quantity πœ‡β„³,𝛼 (rej) is said to be the probability of rejecting 𝛼 and will
be denoted by πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 . The quantity πœ‡β„³,𝛼 (acc) is said to be the probability of accepting 𝛼
π‘Ÿπ‘’π‘—
π‘Žπ‘π‘
and will be denoted by πœ‡π‘Žπ‘π‘
β„³, 𝛼 . We have that πœ‡β„³, 𝛼 + πœ‡β„³, 𝛼 = 1.
Please note that as the probability of transitioning from a reject state to a non-reject state
is 0, the probability of rejecting an infinite word can be seen as a limit of the probability of
rejecting its finite prefixes. This is the content of the following Lemma.
L EMMA 4.1. For any FPM, β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿) over Ξ£, and any word 𝛼 = π‘Ž1 π‘Ž2 . . . ... ∈
Ξ£πœ” , the sequence of reals numbers {π›Ώπ‘Ž1 π‘Ž2 ...π‘Žπ‘› (π‘žπ‘  , π‘žπ‘Ÿ ) ∣ 𝑛 ∈ β„•} is an non-decreasing sequence. Furthermore, πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 = limπ‘›β†’βˆž π›Ώπ‘Ž1 π‘Ž2 ...π‘Žπ‘› (π‘žπ‘  , π‘žπ‘Ÿ ).
The rest of this section is organized as follows. We first present some special monitors
and technical constructions involving FPMs. We then conclude this section by introducing
the class of monitorable languages that we consider in this paper.
ACM Journal Name, Vol. V, No. N, Month 20YY.
12
4.1
β‹…
Some Tools and Techniques
The special monitors and monitor constructions that we present in this section, will be used
both in the definition of the classes of monitorable languages, as well as in establishing
the expressiveness results in Section 5. We will also generalize the iteration lemma for
probabilistic automata over finite words to FPMs.
Scaling acceptance/rejection probabilities. Given a FPM β„³ and a real number π‘₯ ∈
[0, 1], we can construct monitors, where the acceptance (or rejection) probability of a word
is scaled by a factor π‘₯. We begin by proving such a proposition for acceptance probabilities,
before turning our attention to rejection probabilities.
P ROPOSITION 4.2. Given a FPM, β„³ on Ξ£, and a real number π‘₯ ∈ [0, 1], there is a
π‘Žπ‘π‘
FPM, β„³π‘₯ , such that for any 𝛼 ∈ Ξ£πœ” , πœ‡π‘Žπ‘π‘
β„³π‘₯ , 𝛼 = π‘₯ × πœ‡β„³, 𝛼 .
P ROOF. Let β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿). Pick a new state π‘žπ‘ 0 not in 𝑄 and let β„³π‘₯ = (𝑄 βˆͺ
{π‘žπ‘ 0 }, π‘žπ‘ 0 , π‘žπ‘Ÿ , 𝛿π‘₯ ) where the transition function 𝛿π‘₯ is defined as follows. For each π‘Ž ∈ Ξ£
—𝛿π‘₯ (π‘ž, π‘Ž, π‘ž β€² ) = 𝛿(π‘ž, π‘Ž, π‘ž β€² ) if π‘ž, π‘ž β€² ∈ 𝑄.
—𝛿π‘₯ (π‘žπ‘ 0 , π‘Ž, π‘ž β€² ) = π‘₯ × π›Ώ(π‘žπ‘  , π‘Ž, π‘ž β€² ) if π‘ž β€² ∈ 𝑄 βˆ– {π‘žπ‘Ÿ }.
—𝛿π‘₯ (π‘žπ‘ 0 , π‘Ž, π‘žπ‘Ÿ ) = 1 βˆ’ π‘₯ + π‘₯ × π›Ώ(π‘žπ‘  , π‘Ž, π‘žπ‘Ÿ ).
—𝛿π‘₯ (π‘ž, π‘Ž, π‘ž β€² ) = 0 if π‘ž β€² = π‘žπ‘ 0 .
Now, for any 𝑒 ∈ Ξ£βˆ— , we can show by induction that 𝛿π‘₯ (π‘žπ‘ 0 , 𝑒, π‘žπ‘Ÿ ) = (1 βˆ’ π‘₯) + π‘₯ ×
𝛿(π‘žπ‘  , 𝑒, π‘žπ‘Ÿ ) and 𝛿π‘₯ (π‘žπ‘ 0 , 𝑒, π‘ž) = π‘₯ × π›Ώ(π‘žπ‘  , 𝑒, π‘ž) for π‘ž βˆ•= π‘žπ‘Ÿ . It is easy to see that β„³π‘₯ is the
desired FPM.
Similarly we can construct a FPM β„³π‘₯ which scales the probability of rejecting any
word by a factor of π‘₯.
P ROPOSITION 4.3. Given a FPM, β„³ on Ξ£, and a real number π‘₯ ∈ [0, 1], there is a
π‘Ÿπ‘’π‘—
FPM, β„³π‘₯ , such that for any 𝛼 ∈ Ξ£πœ” , πœ‡π‘Ÿπ‘’π‘—
β„³π‘₯ , 𝛼 = π‘₯ × πœ‡β„³, 𝛼 .
P ROOF. Let β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿). Pick two new states π‘žπ‘Ÿ0 and π‘žπ‘Ÿ1 not occurring in 𝑄
and let β„³π‘₯ = (𝑄 βˆͺ {π‘žπ‘Ÿ0 , π‘žπ‘Ÿ1 }, π‘žπ‘  , π‘žπ‘Ÿ0 , 𝛿 π‘₯ ) where 𝛿 π‘₯ is defined as follows. For each π‘Ž ∈ Ξ£
—𝛿 π‘₯ (π‘ž, π‘Ž, π‘ž β€² ) = 𝛿(π‘ž, π‘Ž, π‘ž β€² ) if π‘ž, π‘ž β€² ∈ 𝑄 βˆ– {π‘žπ‘Ÿ }.
—𝛿 π‘₯ (π‘žπ‘Ÿ , π‘Ž, π‘žπ‘Ÿ0 ) = π‘₯.
—𝛿 π‘₯ (π‘žπ‘Ÿ , π‘Ž, π‘žπ‘Ÿ1 ) = 1 βˆ’ π‘₯.
—𝛿 π‘₯ (π‘ž, π‘Ž, π‘ž) = 1 if π‘ž ∈ {π‘žπ‘Ÿ0 , π‘žπ‘Ÿ1 }.
—𝛿 π‘₯ (π‘ž, π‘Ž, π‘ž β€² ) = 0 if none of the above hold.
Now, for any 𝑒 ∈ Ξ£βˆ— and π‘Ž ∈ Ξ£, we can show that 𝛿 π‘₯ (π‘žπ‘  , π‘’π‘Ž, π‘žπ‘Ÿ0 ) = π‘₯ × π›Ώ(π‘žπ‘  , 𝑒, π‘žπ‘Ÿ ).
Using Lemma 4.1, we get the desired result.
We get as an immediate consequence of Proposition 4.2 and Proposition 4.3.
P ROPOSITION 4.4. Given a FPM β„³ on Ξ£ and a real number π‘₯ ∈ [0, 1], there are
π‘Ÿπ‘’π‘—
π‘Žπ‘π‘
FPM’s β„³π‘₯ and β„³π‘₯ such that for any 𝛼 ∈ Ξ£πœ” , πœ‡π‘Žπ‘π‘
β„³π‘₯ , 𝛼 = π‘₯ × πœ‡β„³, 𝛼 and πœ‡β„³π‘₯ , 𝛼 =
π‘₯ × πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 .
Product automata. Given two FPM’s, β„³1 and β„³2 , we can construct a new FPM β„³
such that the probability that β„³ accepts a word 𝛼 is the product of the probabilities that
β„³1 and β„³2 accept the same word 𝛼.
ACM Journal Name, Vol. V, No. N, Month 20YY.
β‹…
13
P ROPOSITION 4.5. Given two FPM, β„³1 and β„³2 on Ξ£, there is a FPM, β„³1 βŠ— β„³2
π‘Žπ‘π‘
π‘Žπ‘π‘
such that for any 𝛼 ∈ Ξ£πœ” , πœ‡π‘Žπ‘π‘
β„³1 βŠ—β„³2 , 𝛼 = πœ‡β„³1 , 𝛼 × πœ‡β„³2 , 𝛼 .
P ROOF. Let β„³1 = (𝑄1 , π‘žπ‘ 1 , π‘žπ‘Ÿ1 , 𝛿1 ) and β„³2 = (𝑄2 , π‘žπ‘ 2 , π‘žπ‘Ÿ2 , 𝛿2 ). Pick a new state π‘žπ‘Ÿ
not occurring in 𝑄1 βˆͺ 𝑄2 . Let β„³1 βŠ— β„³2 = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿) where
—𝑄 = {π‘žπ‘Ÿ } βˆͺ ((𝑄1 βˆ– {π‘žπ‘Ÿ1 }) × (𝑄2 βˆ– {π‘žπ‘Ÿ2 }))
β€”π‘žπ‘  = (π‘žπ‘ 1 , π‘žπ‘ 2 )
β€”For each π‘Ž ∈ Ξ£,
—𝛿((π‘ž1 , π‘ž2 ), π‘Ž, (π‘ž1β€² , π‘ž2β€² )) = 𝛿1 (π‘ž1 , π‘Ž, π‘ž1β€² )𝛿2 (π‘ž2 , π‘Ž, π‘ž2β€² ).
βˆ‘
—𝛿((π‘ž1 , π‘ž2 ), π‘Ž, π‘žπ‘Ÿ ) = 1 βˆ’ π‘žβˆ•=π‘žπ‘Ÿ 𝛿((π‘ž1 , π‘ž2 ), π‘Ž, π‘ž).
—𝛿(π‘žπ‘Ÿ , π‘Ž, π‘žπ‘Ÿ ) = 1 and 𝛿(π‘žπ‘Ÿ , π‘Ž, π‘ž) = 0 for π‘ž βˆ•= π‘žπ‘Ÿ .
Given any finite word 𝑒 ∈ Ξ£+ , we can shown by induction on the length of 𝑒 that for any
π‘ž1 , π‘ž1β€² ∈ 𝑄1 βˆ–{π‘žπ‘Ÿ1 } and π‘ž2 , π‘ž2β€² ∈ 𝑄2 βˆ–{π‘žπ‘Ÿ2 }, we have 𝛿𝑒 ((π‘ž1 , π‘ž2 ), (π‘ž1β€² , π‘ž2β€² )) = 𝛿1 (π‘ž1 , 𝑒, π‘ž1β€² )×
𝛿2 (π‘ž2 , 𝑒, π‘ž2β€² ).
Now, given a 𝛼 = π‘Ž0 π‘Ž1 . . ., let 𝑒𝑗 = π‘Ž1 . . . π‘Žπ‘— . Using Lemma 4.1, we get
π‘Ÿπ‘’π‘—
πœ‡π‘Žπ‘π‘
β„³1 βŠ—β„³2 , 𝛼 = 1 βˆ’ πœ‡β„³1 βŠ—β„³2 , 𝛼
= 1 βˆ’ limπ‘—β†’βˆž 𝛿𝑒𝑗 (π‘žπ‘  , π‘žπ‘Ÿ )
= limπ‘—β†’βˆž (1
βˆ‘βˆ’ 𝛿𝑒𝑗 (π‘žπ‘  , π‘žπ‘Ÿ ))
= limπ‘—β†’βˆž ( π‘žβˆ•=π‘žπ‘Ÿ 𝛿𝑒𝑗 (π‘žπ‘  , π‘ž))
βˆ‘
βˆ‘
= limπ‘—β†’βˆž π‘žβ€² βˆ•=π‘žπ‘Ÿ
π‘ž2β€² βˆ•=π‘žπ‘Ÿ2
1
1
β€²
β€²
(𝛿1 (π‘ž
βˆ‘π‘ 1 , 𝑒𝑗 , π‘ž1 )𝛿2 (π‘žπ‘ 2 , 𝑒𝑗 ,β€² π‘ž2 ))
= limπ‘—β†’βˆž (( π‘žβ€² βˆ•=π‘žπ‘Ÿ 𝛿1 (π‘žπ‘ 1 , 𝑒𝑗 , π‘ž1 ))
βˆ‘ 1 1
×( π‘žβ€² βˆ•=π‘žπ‘Ÿ 𝛿2 (π‘žπ‘ 2 , 𝑒𝑗 , π‘ž2β€² ))
2
2
= limπ‘—β†’βˆž ((1 βˆ’ 𝛿1 (π‘žπ‘ 1 , 𝑒𝑗 , π‘žπ‘Ÿ1 ))
×(1 βˆ’ 𝛿2 (π‘žπ‘ 2 , 𝑒𝑗 , π‘žπ‘Ÿ2 )))
π‘Žπ‘π‘
= πœ‡π‘Žπ‘π‘
β„³1 , 𝛼 × πœ‡β„³2 , 𝛼 .
Given two FPM’s, β„³1 and β„³2 , we can construct a new FPM β„³ such that the probability that β„³ rejects a word 𝛼 is the product of the probabilities that β„³1 and β„³2 reject
the same word 𝛼.
P ROPOSITION 4.6. Given two FPM, β„³1 and β„³2 on Ξ£, there is a FPM, β„³1 × β„³2
π‘Ÿπ‘’π‘—
π‘Ÿπ‘’π‘—
such that for any 𝛼 ∈ Ξ£πœ” , πœ‡π‘Ÿπ‘’π‘—
β„³1 ×β„³2 , 𝛼 = πœ‡β„³1 , 𝛼 × πœ‡β„³2 , 𝛼 .
P ROOF. Let β„³1 = (𝑄1 , π‘žπ‘ 1 , π‘žπ‘Ÿ1 , 𝛿1 ) and β„³2 = (𝑄2 , π‘žπ‘ 2 , π‘žπ‘Ÿ2 , 𝛿2 ). Let β„³1 × β„³2 =
(𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿) where
—𝑄 = 𝑄1 × π‘„2
β€”π‘žπ‘  = (π‘žπ‘ 1 , π‘žπ‘ 2 )
β€”π‘žπ‘Ÿ = (π‘žπ‘Ÿ1 , π‘žπ‘Ÿ2 )
β€”For each π‘Ž ∈ Ξ£, 𝛿((π‘ž1 , π‘ž2 ), π‘Ž, (π‘ž1β€² , π‘ž2β€² )) = 𝛿1 (π‘ž1 , π‘Ž, π‘ž1β€² )𝛿2 (π‘ž2 , π‘Ž, π‘ž2β€² ).
Given any finite word 𝑒 ∈ Ξ£+ , we can show by induction on the length of 𝑒 that for any
π‘ž1 , π‘ž1β€² ∈ 𝑄1 and π‘ž2 , π‘ž2β€² ∈ 𝑄2 , we have 𝛿𝑒 ((π‘ž1 , π‘ž2 ), (π‘ž1β€² , π‘ž2β€² )) = 𝛿1 (π‘ž1 , 𝑒, π‘ž1β€² ) × π›Ώ2 (π‘ž2 , 𝑒, π‘ž2β€² ).
The result now follows from Lemma 4.1.
ACM Journal Name, Vol. V, No. N, Month 20YY.
14
β‹…
Iteration Lemma. We present herein a technical lemma that will be used to demonstrate
that certain languages are not recognized by probabilistic monitors. Please note that the
iteration lemma is a generalization of a similar lemma for probabilistic automata over finite
words [Nasu and Honda 1968; Paz 1971] and the generalization relies on the fact that the
probability of rejection of an infinite word can be taken as a limit of probability of rejection
of its finite prefixes (see Lemma 4.1).
L EMMA 4.7. Given a FPM, β„³ on Ξ£, and a finite word 𝑒 ∈ Ξ£+ , there is a natural
number π‘˜ and real numbers 𝑐0 , . . . π‘π‘˜βˆ’1 ∈ ℝ (depending only upon β„³ and 𝑒) such that
for all 𝑣 ∈ Ξ£+ , 𝛼 ∈ Ξ£πœ” ,
+ . . . + 𝑐0 πœ‡π‘Ÿπ‘’π‘—
= π‘π‘˜βˆ’1 πœ‡π‘Ÿπ‘’π‘—
πœ‡π‘Ÿπ‘’π‘—
β„³, 𝑣𝛼
β„³, π‘£π‘’π‘˜βˆ’1 𝛼
β„³, π‘£π‘’π‘˜ 𝛼
and π‘π‘˜βˆ’1 + . . . + 𝑐0 = 1.
P ROOF. Let β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿). Consider the matrix 𝛿𝑒 . From elementary linear algebra there is a polynomial 𝑝(π‘₯) = π‘₯π‘˜ βˆ’ π‘π‘˜βˆ’1 π‘₯π‘˜βˆ’1 βˆ’ π‘π‘˜βˆ’2 π‘₯π‘˜βˆ’2 βˆ’ . . . βˆ’ 𝑐0 (the minimal
polynomial of 𝛿𝑒 ) such that
(1) 𝑝(𝛿𝑒 ) = 0 and
(2) 𝑝(πœ†) = 0 where πœ† is an eigenvalue of 𝛿𝑒 .
Since 𝑝(𝛿𝑒 ) = 0, we get π›Ώπ‘’π‘˜ = π‘π‘˜βˆ’1 π›Ώπ‘’π‘˜βˆ’1 + . . . 𝑐0 I where I is the identity matrix. Now
if 𝛼 = π‘Ž1 π‘Ž2 . . . then we get for each 𝑛 > 0,
𝛿𝑣 π›Ώπ‘’π‘˜ π›Ώπ‘Ž1 ...π‘Žπ‘› = π‘π‘˜βˆ’1 𝛿𝑣 π›Ώπ‘’π‘˜βˆ’1 π›Ώπ‘Ž1 ...π‘Žπ‘› + . . . + 𝑐0 𝛿𝑣 π›Ώπ‘Ž1 ...π‘Žπ‘› .
This implies that
π›Ώπ‘£π‘’π‘˜ π‘Ž1 ...π‘Žπ‘› = π‘π‘˜βˆ’1 π›Ώπ‘£π‘’π‘˜βˆ’1 π‘Ž1 ...π‘Žπ‘› + . . . + 𝑐0 π›Ώπ‘£π‘Ž1 ...π‘Žπ‘› .
Thus,
π›Ώπ‘£π‘’π‘˜ π‘Ž1 ...π‘Žπ‘› (π‘žπ‘  , π‘žπ‘Ÿ ) = π‘π‘˜βˆ’1 π›Ώπ‘£π‘’π‘˜βˆ’1 π‘Ž1 ...π‘Žπ‘› (π‘žπ‘  , π‘žπ‘Ÿ ) + . . . + 𝑐0 π›Ώπ‘£π‘Ž1 ...π‘Žπ‘› (π‘žπ‘  , π‘žπ‘Ÿ ).
Taking the limit (𝑛 β†’ ∞) on both sides, we get by Lemma 4.1
πœ‡π‘Ÿπ‘’π‘—
= π‘π‘˜βˆ’1 πœ‡π‘Ÿπ‘’π‘—
+ . . . + 𝑐0 πœ‡π‘Ÿπ‘’π‘—
β„³, 𝑣𝛼 .
β„³, π‘£π‘’π‘˜ 𝛼
β„³, π‘£π‘’π‘˜βˆ’1 𝛼
Now, please note that 1 is an eigenvalue of 𝛿𝑒 (with an eigenvector all of whose entries are
1). Thus, we get 𝑝(1) = 0 which implies that π‘π‘˜βˆ’1 + . . . + 𝑐0 = 1.
The unit interval as the acceptance (or rejection) probability of a monitor. We will
now define two monitors that will be used for proving expressiveness results. These monitors will be defined on the alphabet Ξ£ = {0, 1}. By associating the numeral 0 to 0 and
associating the numeral 1 to 1, we can associate 𝛼 = π‘Ž1 π‘Ž2 . . . ∈ Ξ£ to a real number bin(𝛼)
by thinking of 𝛼 as the β€œbinary” real number 0.π‘Ž1 π‘Ž2 . . .. Formally,
Definition: Let Ξ£ = {0, 1}, bin(0) = 0 and bin(1) = 1. We define the functions bin(β‹…) :
𝑗=π‘˜
βˆ‘
π‘Žπ‘—
Ξ£+ β†’ [0, 1] as bin(π‘Ž1 π‘Ž2 . . . π‘Žπ‘˜ ) =
, and bin(β‹…) : Ξ£πœ” β†’ [0, 1] as bin(π‘Ž1 π‘Ž2 . . .) =
𝑗
2
𝑗=1
ACM Journal Name, Vol. V, No. N, Month 20YY.
β‹…
0,
0, 1,
1
2
1
2
0, 1, 1
0, 1
π‘ž1
π‘ž
0,
π‘ž0
1,
1
2
0,
0, 1, 1
𝑗=∞
βˆ‘
𝑗=1
1, 1
π‘žπ‘ 
π‘ž2
Fig. 3. Transition diagram for FPMs β„³Id and β„³1βˆ’Id
1
2
Fig. 4.
1, 1
15
0, 1, 1
π‘žπ‘Ÿ
1
2
FPM β„³ used in proof of Theorem 5.8
π‘Žπ‘—
. If π‘₯ ∈ [0, 1] is an irrational number, let wrd(π‘₯) ∈ Ξ£πœ” be the unique word such
2𝑗
that bin(wrd(π‘₯)) = π‘₯.
The following proposition will be useful.
P ROPOSITION 4.8. Let Ξ£ = {0, 1} and let π‘₯ ∈ [0, 1] be an irrational number. Then
the languages β„’π‘₯ = {𝛼 ∈ Ξ£πœ” ∣ bin(𝛼) ≀ π‘₯} and β„’π‘₯ = {𝛼 ∈ Ξ£πœ” ∣ bin(𝛼) < π‘₯} are not
πœ”-regular.
P ROOF. We will just show that β„’π‘₯ is not πœ”-regular. The proof of non-πœ”-regularity of
β„’π‘₯ is similar.
Please note that the language β„’π‘₯ defines an equivalence relation (the Myhill-Nerode
equivalence) on Ξ£βˆ— – 𝑒 ≑ℒπ‘₯ 𝑣 iff for all 𝛼 ∈ Ξ£πœ” , 𝑒𝛼 ∈ β„’π‘₯ ⇔ 𝑣𝛼 ∈ β„’π‘₯ . If β„’π‘₯ is πœ”-regular,
then there should be only a finite number of ≑ℒπ‘₯ classes (see [Thomas 1990]). We will
show that this is not the case.
By confusing 0 with the numeral 0 and 1 with the numeral 1, consider the binary expansion of π‘₯ = .π‘Ž1 π‘Ž2 . . .. Let wrd(π‘₯) = π‘Ž1 π‘Ž2 . . . and for each 𝑖 > 0, π‘₯𝑖 be the suffix
π‘Žπ‘– π‘Žπ‘–+1 . . .. Since π‘₯ is irrational, no two suffixes π‘₯𝑖 and π‘₯𝑗 for 𝑖 < 𝑗 can be the same
infinite word.
So given 𝑖 < 𝑗, let 𝑒𝑖 = π‘Ž1 π‘Ž2 . . . π‘Žπ‘– and 𝑒𝑗 = π‘Ž1 π‘Ž2 . . . π‘Žπ‘— . Let π‘˜ be the smallest natural
number such that π‘Žπ‘–+π‘˜ βˆ•= π‘Žπ‘—+π‘˜ . Let 𝛽 = π‘Žπ‘–+1 π‘Žπ‘–+2 . . . π‘Žπ‘–+π‘˜βˆ’1 10πœ” . Please note that
𝛽 = π‘Žπ‘—+1 π‘Žπ‘—+2 . . . π‘Žπ‘—+π‘˜βˆ’1 10πœ” . There are two cases: either π‘Žπ‘–+π‘˜ = 1 and π‘Žπ‘—+π‘˜ = 0,
or π‘Žπ‘–+π‘˜ = 0 and π‘Žπ‘—+π‘˜ = 1. If π‘Žπ‘–+π‘˜ = 1 and π‘Žπ‘—+π‘˜ = 0, it can be easily shown that
bin(𝑒𝑖 𝛽) < π‘₯ while bin(𝑒𝑗 𝛽) > π‘₯. If π‘Žπ‘–+π‘˜ = 0 and π‘Žπ‘—+π‘˜ = 1, bin(𝑒𝑖 𝛽) > π‘₯ while
bin(𝑒𝑗 𝛽) < π‘₯. Hence 𝑒𝑖 βˆ•β‰‘β„’π‘₯ 𝑒𝑗 for 𝑖 < 𝑗. Thus, β„’π‘₯ is not πœ”-regular.
We point out here that the proof of non-πœ”-regularity of β„’π‘₯ and β„’π‘₯ is a modification of
the proof that the language of finite words {𝑒 ∈ Ξ£βˆ— ∣ bin(𝑒) < π‘₯} is not regular (see [Paz
1971; Salomaa 1973]).
We can construct two monitors whose probability of accepting a word 𝛼 is bin(𝛼) and
1 βˆ’ bin(𝛼) respectively as follows.
ACM Journal Name, Vol. V, No. N, Month 20YY.
16
β‹…
L EMMA 4.9. Let Ξ£ = {0, 1}. There are π‘…π‘Žπ‘‘πΉ 𝑃 𝑀 ’s, β„³Id and β„³1βˆ’Id on Ξ£, such
that for any word 𝛼 ∈ Ξ£πœ” ,
π‘Žπ‘π‘
πœ‡π‘Žπ‘π‘
β„³Id , 𝛼 = bin(𝛼) and πœ‡β„³1βˆ’Id , 𝛼 = 1 βˆ’ bin(𝛼).
P ROOF. The transition diagrams of the FPMs β„³Id and β„³1βˆ’Id are shown in Figure 3.
Let 𝑄 = {π‘ž0 , π‘ž1 , π‘ž2 } and 𝛿 : 𝑄 × Ξ£ × π‘„ β†’ [0, 1] be defined as follows. The states π‘ž1
and π‘ž2 are absorbing, i.e., 𝛿(π‘ž1 , 0, π‘ž1 ) = 𝛿(π‘ž1 , 1, π‘ž1 ) = 𝛿(π‘ž2 , 0, π‘ž2 ) = 𝛿(π‘ž2 , 1, π‘ž2 ) = 1.
For transitions out of π‘ž0 , 𝛿(π‘ž0 , 0, π‘ž0 ) = 𝛿(π‘ž0 , 0, π‘ž1 ) = 𝛿(π‘ž0 , 1, π‘ž0 ) = 𝛿(π‘ž0 , 1, π‘ž2 ) = 12 Let
β„³Id = (𝑄, π‘ž0 , π‘ž1 , 𝛿) and β„³1βˆ’Id = (𝑄, π‘ž0 , π‘ž2 , 𝛿).
Given 𝑒 ∈ Ξ£+ , it can be easily shown by induction (on the length of 𝑒) that 𝛿𝑒 (π‘ž0 , π‘ž0 ) =
1
1
, 𝛿𝑒 (π‘ž0 , π‘ž2 ) = bin(𝑒) and 𝛿𝑒 (π‘ž0 , π‘ž1 ) = 1 βˆ’ bin(𝑒) βˆ’ 2βˆ£π‘’βˆ£
. Using Lemma 4.1, it can
2βˆ£π‘’βˆ£
π‘Ÿπ‘’π‘—
πœ”
π‘Žπ‘π‘
easily shown that for any word 𝛼 ∈ Ξ£ , πœ‡β„³Id , 𝛼 = 1 βˆ’ πœ‡β„³Id , 𝛼 = bin(𝛼) and πœ‡π‘Žπ‘π‘
β„³1βˆ’Id , 𝛼 =
1 βˆ’ πœ‡π‘Ÿπ‘’π‘—
β„³1βˆ’Id , 𝛼 = 1 βˆ’ bin(𝛼).
We point out here that if we consider the reject state as an accept state and view the monitor
β„³1βˆ’Id as a probabilistic automaton over finite words, the resulting automaton is the probabilistic automaton (see [Salomaa 1973]) often used to show that non-regular languages
are accepted by probabilistic automaton.
4.2
Monitored languages
We conclude this section, by defining the classes of probabilistic monitors that we will
consider in this paper. Recall that in the case of deterministic monitors, the language
rejected is defined as the set of words upon which the monitor reaches the β€œunique” reject
state. The language permitted by the monitor is defined as the complement of the words
rejected. For probabilistic monitoring, on the other hand, the set of languages permitted
may depend upon the probability of rejecting a word. In other words, it is reasonable to
think of a language permitted by a FPM to be the set of words which are rejected with a
probability strictly less than (or just less than) a threshold π‘₯. This gives rise to the following
definition.
Definition: Given a FPM β„³ on Ξ£ and π‘₯ ∈ [0, 1],
β€”β„›<π‘₯ (β„³) = {𝛼 ∈ Ξ£πœ” ∣ πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 < π‘₯}.
—ℛ≀π‘₯ (β„³) = {𝛼 ∈ Ξ£πœ” ∣ πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 ≀ π‘₯}.
Thus potentially, given π‘₯ ∈ [0, 1], we can define two subclasses of languages over an
alphabet Ξ£β€” {β„’ ∣ βˆƒβ„³ s.t. β„’ = β„›<π‘₯ (β„³)} and {β„’ ∣ βˆƒβ„³ s.t. β„’ = ℛ≀π‘₯ (β„³)}. It turns out
that as long as π‘₯ is strictly between 0 and 1, the exact value of π‘₯ does not affect the classes
defined.
L EMMA 4.10. Let β„³ be a FPM on an alphabet Ξ£. Then, given π‘₯1 , π‘₯2 ∈ (0, 1), there
is a β„³β€² such that ℛ≀π‘₯1 (β„³) = ℛ≀π‘₯2 (β„³β€² ) and β„›<π‘₯1 (β„³) = β„›<π‘₯2 (β„³β€² ).
P ROOF. First consider the case π‘₯2 ≀ π‘₯1 . Let π‘₯3 = π‘₯π‘₯12 . By Proposition 4.4, there is a
π‘Ÿπ‘’π‘—
FPM β„³π‘₯3 such that for all 𝛼 ∈ Ξ£ such that πœ‡π‘Ÿπ‘’π‘—
β„³π‘₯3 , 𝛼 = π‘₯3 × πœ‡β„³, 𝛼 . An easy calculation
shows that ℛ≀π‘₯2 (β„³π‘₯3 ) = ℛ≀π‘₯1 (β„³) and β„›<π‘₯2 (β„³π‘₯3 ) = β„›<π‘₯1 (β„³).
2
Now, consider the case π‘₯1 ≀ π‘₯2 . Let π‘₯3 = 1βˆ’π‘₯
1βˆ’π‘₯1 . By Proposition 4.4, there is a FPM
ACM Journal Name, Vol. V, No. N, Month 20YY.
β‹…
β„³π‘₯3 such that for all 𝛼 ∈ Ξ£, πœ‡π‘Žπ‘π‘
β„³π‘₯
πœ‡π‘Ÿπ‘’π‘—
β„³π‘₯
3, 𝛼
3
,𝛼
17
= π‘₯3 × πœ‡π‘Žπ‘π‘
β„³, 𝛼 . Now for any word 𝛼,
≀ π‘₯2 ⇔ 1 βˆ’ π‘₯2 ≀ 1 βˆ’ πœ‡π‘Ÿπ‘’π‘—
β„³π‘₯3 , 𝛼
⇔ 1 βˆ’ π‘₯2 ≀ πœ‡π‘Žπ‘π‘
β„³π‘₯3 , 𝛼
⇔ 1 βˆ’ π‘₯2 ≀ π‘₯3 × πœ‡π‘Žπ‘π‘
β„³, 𝛼
⇔ 1 βˆ’ π‘₯1 ≀ πœ‡π‘Žπ‘π‘
β„³, 𝛼
⇔ 1 βˆ’ πœ‡π‘Žπ‘π‘
β„³, 𝛼 ≀ π‘₯1
⇔ πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 ≀ π‘₯1 .
Hence, ℛ≀π‘₯2 (β„³π‘₯3 ) = ℛ≀π‘₯1 (β„³). Similarly, β„›<π‘₯2 (β„³π‘₯3 ) = β„›<π‘₯1 (β„³).
Please note that β„›<0 (β„³) = βˆ… and ℛ≀1 (β„³) = Ξ£πœ” for any FPM. Hence, we restrict
our attention to four classes of languages as follows.
Definition: Given an alphabet Ξ£ and a language β„’ βŠ† Ξ£πœ” .
β€”β„’ is said to be monitorable with strong acceptance if there is a monitor β„³ such that
β„’ = ℛ≀0 (β„³). We will denote the class of such properties by M SA.
β€”β„’ is said to be monitorable with weak acceptance if there is a monitor β„³ such that
β„’ = β„›<1 (β„³). We will denote the class of such properties by M WA.
β€”β„’ is said to be monitorable with strict cut-point if there is a monitor β„³ and 0 < π‘₯ < 1
such that β„’ = β„›<π‘₯ (β„³). Such properties will be denoted by M SC.
β€”β„’ is said to be monitorable with non-strict cut-point if there is a monitor β„³ and 0 <
π‘₯ < 1 such that β„’ = ℛ≀π‘₯ (β„³). Such properties will be denoted by M NC.
We point out here that in the literature on probabilistic automata over finite words [Rabin
1963; Paz 1971; Salomaa 1973], there is usually no distinction between strict and non-strict
inequality. Also, if we were to define the classes M WA and M SA for probabilistic automata
over finite words, they will turn out to be subclasses of regular languages. As we will see,
over infinite words, while the class of languages M SA coincides with πœ”-regular and safety
languages, the class M WA may contain non-πœ”-regular languages.
5.
EXPRESSIVENESS
In this Section, we will compare the relative expressiveness of the class of Languages
M SA, M WA, M SC and M NC defined in Section 4.2. For this Section, we will assume
that the alphabet Ξ£ is fixed unless otherwise stated. We will also assume that Ξ£ contains
at least 2 elements (if Ξ£ contains only one element, then Ξ£πœ” consists of exactly only one
element). We summarize our results in Figure 5 below. The rest of this section is organized
as follows. We begin by establishing the results for the classes M SA and M NC. We then
consider the classes M WA and M SC. We conclude the section by proving the results for
robust monitors.
5.1
Monitored Languages M SA and M NC.
Please recall that given an alphabet Ξ£, M SA= {β„’ βŠ† Ξ£πœ” ∣ βˆƒ FPM β„³ s.t. β„’ = ℛ≀0 (β„³)}
and M NC= {β„’ βŠ† Ξ£πœ” βˆ£βˆƒ FPM β„³ and π‘₯ ∈ (0, 1) s.t. β„’ = ℛ≀π‘₯ (β„³)}. We start by showing
that both M SA and M NC are subclasses of safety languages.
T HEOREM 5.1. M SA,M NC βŠ† Safety.
ACM Journal Name, Vol. V, No. N, Month 20YY.
18
β‹…
Regular ∩ Safety
=
M SA (5.3)
=
5.2,5.4
Robust (5.13)
Regular
∩
AlmostSafety
5.8
M WA
5.10
M SC
5.7,5.11
AlmostSafety
Not Comparable (5.15)
M NC
5.1,5.6
Safety
Fig. 5. An arrow from class A to B indicates the strict containment of class A in B. The
numbers on the arrows refer to the theorem in the paper that establishes this relationship.
P ROOF. Let β„³ = (𝑄, π‘žπ‘Ÿ , π‘žπ‘  , 𝛿) be a FPM on an alphabet Ξ£ and let 0 ≀ π‘₯ < 1. It suffices to show that the set β„’ = Ξ£πœ” βˆ–β„›β‰€π‘₯ (β„³) is an open set. Pick any word 𝛼 = π‘Ž1 π‘Ž2 . . . ∈
β„’. Then, we must have by definition and Lemma 4.1, πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 = lim π›Ώπ‘Ž1 ...π‘Žπ‘› (π‘žπ‘  , π‘žπ‘Ÿ ) > π‘₯.
π‘›β†’βˆž
Hence, there is a 𝑙 > 0 such that π›Ώπ‘Ž1 ...π‘Žπ‘™ (π‘žπ‘  , π‘žπ‘Ÿ ) > π‘₯. Now, consider the open ball
B(𝛼, 21𝑙 ) = π‘Ž1 . . . π‘Žπ‘™ Ξ£πœ” . Clearly 𝛼 ∈ B(𝛼, 21𝑙 ) and again by Lemma 4.1, πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛽 β‰₯
1
πœ”
π›Ώπ‘Ž1 ...π‘Žπ‘› (π‘žπ‘  , π‘žπ‘Ÿ ) > π‘₯ for any 𝛽 ∈ π‘Ž1 . . . π‘Žπ‘™ Ξ£ . Thus B(𝛼, 2𝑙 ) βŠ† β„’. Hence, β„’ is an open
set.
We will now show that any πœ”-regular safety language is contained in the classes M SA
and M NC.
T HEOREM 5.2. Regular ∩ Safety βŠ† M SA and Regular ∩ Safety βŠ† M NC.
P ROOF. If β„’ is πœ”-regular and safety, then there is a deterministic Büchi automaton
ℬ = (𝑄, Ξ”, π‘žπ‘  , {π‘žπ‘Ÿ }) with (π‘žπ‘Ÿ , π‘Ž, π‘žπ‘Ÿ ) ∈ Ξ” for each π‘Ž ∈ Ξ£ such that Ξ£πœ” βˆ– β„’ is the
language recognized by ℬ (see Section 3). Now consider the FPM, β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿)
where 𝛿(π‘ž, π‘Ž, π‘ž β€² ) is 1 if (π‘ž, π‘Ž, π‘ž β€² ) ∈ Ξ” and is 0 otherwise. It can be shown easily that
π‘Ÿπ‘’π‘—
πœ”
πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 = 0 ⇔ 𝛼 ∈ β„’ and πœ‡β„³, 𝛼 = 1 ⇔ 𝛼 ∈ Ξ£ βˆ– β„’. Hence β„’ = ℛ≀π‘₯ (β„³) for all
0 ≀ π‘₯ < 1.
We will now show that the the class of πœ”-regular and safety languages coincides exactly
with the class M SA. Thus, as a consequence of Theorem 5.2, M SA βŠ† M NC.
T HEOREM 5.3. M SA= Regular ∩ Safety.
P ROOF. In light of Theorem 5.2, we only need to show that M SAβŠ† Regular ∩ Safety.
Pick β„’ ∈M SA. Let β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿) be a monitor such that ℛ≀0 (β„³) = β„’. Please
note that β„’ is a safety language by Theorem 5.1. Thus, it suffices to show that Ξ£πœ” βˆ– β„’ is
πœ”-regular.
Now, in order to show that Ξ£πœ” βˆ– β„’ is a πœ”-regular set, consider the Büchi automaton
ℬ = (𝑄, Ξ”, π‘žπ‘  , {π‘žπ‘Ÿ }) where (π‘ž, π‘Ž, π‘ž β€² ) ∈ Ξ” iff 𝛿(π‘ž, π‘Ž, π‘ž β€² ) > 0. Let β„’1 be the language
recognized by ℬ. We claim that β„’1 = Ξ£πœ” βˆ– β„’.
It is easy to show that a word 𝛼 = π‘Ž1 π‘Ž2 . . . ∈ β„’1 iff there is a finite prefix π‘Ž1 . . . π‘Žπ‘™ of
𝛼 and a sequence of states π‘ž0 = π‘žπ‘  , π‘ž1 , . . . π‘žπ‘™ = π‘žπ‘Ÿ such that (π‘žπ‘– , π‘Žπ‘–+1 , π‘žπ‘–+1 ) ∈ Ξ” for all
0 ≀ 𝑖 < 𝑙. Since (π‘žπ‘– , π‘Žπ‘–+1 , π‘žπ‘–+1 ) ∈ Ξ” iff 𝛿(π‘ž, π‘Žπ‘–+1 , π‘ž β€² ) > 0, it can be easily shown that
there is a sequence of states π‘ž0 = π‘žπ‘  , π‘ž1 , . . . π‘žπ‘™ = π‘žπ‘Ÿ such that (π‘žπ‘– , π‘Žπ‘–+1 , π‘žπ‘–+1 ) ∈ Ξ” for all
0 ≀ 𝑖 < 𝑙 iff π›Ώπ‘Ž1 ...π‘Žπ‘™ (π‘žπ‘  , π‘žπ‘Ÿ ) > 0. Thus 𝛼 ∈ β„’1 iff there is a finite prefix π‘Ž1 . . . π‘Žπ‘™ such that
ACM Journal Name, Vol. V, No. N, Month 20YY.
β‹…
19
πœ”
π›Ώπ‘Ž1 ...π‘Žπ‘™ (π‘žπ‘  , π‘žπ‘Ÿ ) > 0. In light of Lemma 4.1, 𝛼 ∈ β„’1 iff πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 > 0. Thus, β„’1 = Ξ£ βˆ– β„’ as
required.
Hence, we have M SA βŠ† M NC βŠ† Safety. We will now show that each of these containments is strict. Please note that since our alphabet is finite, the set M SA= Regular ∩ Safety
is countable while the set Safety is uncountable. We can show that the set M NC contains an
uncountable number of safety languages that are not πœ”-regular. The proof uses the automaton β„³(1βˆ’Id) constructed in Lemma 4.9. As we pointed out before, the same automaton
viewed as probabilistic automaton over finite words is often used to prove that non-regular
languages (of finite words) can be recognized by probabilistic finite automata.
T HEOREM 5.4. The class M NC contains an uncountable number of safety languages
which are not πœ”-regular. Thus M SA ⊊ M NC.
P ROOF. It suffices to prove the result for the case where the alphabet contains two elements. Let Ξ£ = {0, 1}. Consider the FPM β„³(1βˆ’Id) constructed in Lemma 4.9. We have
π‘Žπ‘π‘
for every word 𝛼 ∈ Ξ£πœ” , πœ‡π‘Ÿπ‘’π‘—
β„³(1βˆ’Id) , 𝛼 = 1 βˆ’ πœ‡β„³(1βˆ’Id) , 𝛼 = bin(𝛼). Thus, for each irrational
π‘₯ ∈ (0, 1), the language ℛ≀π‘₯ (β„³(1βˆ’Id) ) = {𝛼 ∣ bin(𝛼) ≀ π‘₯} which is not a πœ”-regular
language by Proposition 4.8.
One may argue that the non-regularity in Theorem 5.4 is a consequence of the irrationality
of cut-point π‘₯ in the proof. However,
P ROPOSITION 5.5. There is a π‘…π‘Žπ‘‘πΉ 𝑃 𝑀 , β„³ on Ξ£ = {0, 1}, such that the language
ℛ≀ 21 (β„³) is not πœ”-regular.
P ROOF. Consider the FPM β„³Id constructed in Lemma 4.9. Let β„³ = β„³Id βŠ— β„³Id
2
π‘Žπ‘π‘
π‘Žπ‘π‘
as defined in Proposition 4.5. Now, πœ‡π‘Žπ‘π‘
β„³, 𝛼 = πœ‡β„³Id , 𝛼 × πœ‡β„³Id , π›Όβˆš= (bin(𝛼)) . Thus,
1
2
πœ‡π‘Ÿπ‘’π‘—
β„³Id , 𝛼 = 1 βˆ’ (bin(𝛼)) . Hence, ℛ≀ 21 (β„³) = {𝛼 ∣ bin(𝛼) β‰₯
2 } which is not πœ”regular by Proposition 4.8, and the fact that the class of πœ”-regular languages is closed
under complementation.
We finally show that class of safety languages contains strictly the class M NC.
T HEOREM 5.6. M NC ⊊ Safety.
P ROOF. In light of Theorem 5.1, we just need to show that the containment is strict. Let
Ξ£ = {0, 1}. We need to show that there is a safety language β„’ βŠ† Ξ£πœ” such that for any
monitor β„³ and π‘₯ ∈ (0, 1), β„’ βˆ•= ℛ≀π‘₯ (β„³). Let 𝐿 = {0𝑗 1(0βˆ— 1)βˆ— 0𝑗 1 ∣ 𝑗 ∈ β„•, 𝑗 > 0}. Let
β„’1 = πΏΞ£πœ” and β„’ = Ξ£πœ” βˆ– β„’1 . Now β„’1 is an open set and hence β„’ is a safety language.
Assume that there is some β„³ and some π‘₯ ∈ (0, 1) such that β„’ = ℛ≀π‘₯ (β„³). Then by
=
Lemma 4.7, there are constants 𝑐0 , 𝑐1 , . . . , π‘π‘˜ ∈ ℝ such that for all 𝛼 ∈ Ξ£πœ” πœ‡π‘Ÿπ‘’π‘—
β„³, 0π‘˜ 𝛼
π‘π‘˜βˆ’1 πœ‡π‘Ÿπ‘’π‘—
+ . . . + 𝑐0 πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 and π‘π‘˜βˆ’1 + . . . + 𝑐0 = 1.
β„³, 0π‘˜βˆ’1 𝛼
Consider the set Pos = {𝑖 ∣ 𝑐𝑖 > 0} and let 𝑖1 , 𝑖2 , . . . , π‘–π‘Ÿ be an enumeration of the
elements of Pos. Please note that Pos is a non-empty set (otherwise 𝑐𝑖 ’s do not add up-to
1). Also observe that for 𝛼 = 010𝑖1 +1 10𝑖2 +1 . . . 10π‘–π‘Ÿ +1 1πœ” , it is the case that 0𝑖 𝛼 ∈ β„’1
iff 𝑖 ∈ Pos and hence 0𝑖 𝛼 ∈
/ β„’ iff 𝑖 ∈ Pos. Therefore, each 𝑖 ∈ POS, we have πœ‡π‘Ÿπ‘’π‘—
β„³, 0𝑖 𝛼 > π‘₯
and for 𝑖 ∈
/ Pos, πœ‡π‘Ÿπ‘’π‘—
β„³, 0𝑖 𝛼 ≀ π‘₯. Please note that β„’ = ℛ≀π‘₯ (β„³) by assumption. Thus, we
ACM Journal Name, Vol. V, No. N, Month 20YY.
β‹…
20
have
πœ‡π‘Ÿπ‘’π‘—
βˆ’π‘₯
β„³, 0π‘˜ 𝛼
+ . . . + 𝑐0 πœ‡π‘Ÿπ‘’π‘—
= π‘π‘˜βˆ’1 πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 βˆ’ π‘₯ × 1 =
β„³, 0π‘˜βˆ’1 𝛼
π‘Ÿπ‘’π‘—
π‘Ÿπ‘’π‘—
= π‘π‘˜βˆ’1 πœ‡β„³, 0π‘˜βˆ’1 𝛼 + . . . + 𝑐0 πœ‡β„³, 𝛼 βˆ’ π‘₯(π‘π‘˜βˆ’1 + . . . + 𝑐0 )
= π‘π‘˜βˆ’1 (πœ‡π‘Ÿπ‘’π‘—
βˆ’ π‘₯) + . . . + 𝑐0 (πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 βˆ’ π‘₯).
β„³, 0π‘˜βˆ’1 𝛼
Now, the left-hand side of the above equation is ≀ 0 as πœ‡π‘Ÿπ‘’π‘—
≀ π‘₯. The right hand side
β„³, 0π‘˜ 𝛼
π‘Ÿπ‘’π‘—
is > 0 as 𝑐𝑖 > 0 β‡’ πœ‡π‘Ÿπ‘’π‘—
β„³, 0𝑖 𝛼 βˆ’ π‘₯ > 0 and 𝑐𝑖 ≀ 0 β‡’ πœ‡β„³, 0𝑖 𝛼 βˆ’ π‘₯ ≀ 0. Thus, we obtain a
contradiction.
Consider the language 𝐿 βŠ† Ξ£+ defined in the proof above. We point out here that the
language πΏΞ£βˆ— is often used as an example to show that there are context-free languages
over finite words which are not accepted by any probabilistic automaton [Paz 1971]. The
proof uses the iteration lemma for probabilistic finite words and is similar to the proof
outlined above. Summarizing the results of this Section, we have Regular ∩ Safety = M SA
⊊ M NC ⊊ Safety.
5.2
Monitored Languages M WA and M SC.
Recall that given an alphabet Ξ£, M WA= {β„’ βŠ† Ξ£πœ” ∣ βˆƒ FPM β„³ s.t. β„’ = β„›<1 (β„³)}
and M SC= {β„’ βŠ† Ξ£πœ” ∣ βˆƒ FPM β„³ and π‘₯ ∈ (0, 1) s.t. β„’ = β„›<π‘₯ (β„³)}. Note that if
we were to allow for β€œinfinite” state monitoring, the class M WA would coincide with
AlmostSafety [Sistla and Srinivas 2008]. However, FPM’s as defined in this paper have
only finite memory. We start by showing that both M WA and M SC are subclasses of almost safety languages. Recall that a language β„’ βŠ† Ξ£πœ” is an almost safety language if and
only if it can written as a countable union of safety languages. Of course, the containment
M WA βŠ† AlmostSafety can also be viewed as a special case of correspondence between
AlmostSafety and the monitoring with infinite states [Sistla and Srinivas 2008].
T HEOREM 5.7. M WA, M SC βŠ† AlmostSafety.
P ROOF. Please note that for any FPM β„³, any 0 < π‘₯ ≀ 1 and any word 𝛼 ∈ Ξ£πœ” ,
1
π‘Ÿπ‘’π‘—
we have β„›<π‘₯ (β„³) = βˆͺ∞
𝑗=1 {𝛼 ∣ πœ‡β„³, 𝛼 ≀ π‘₯ βˆ’ }. The result follows by observing that
𝑗
π‘Ÿπ‘’π‘—
1
{𝛼 ∣ πœ‡β„³, 𝛼 ≀ π‘₯ βˆ’ 𝑗 } is a safety language for each 𝑗 by Theorem 5.1.
We will now show that the class of πœ”-regular and almost safety languages is strictly
contained in the class M WA. The proof of containment relies on the fact that if a language β„’ βŠ† Ξ£πœ” is πœ”-regular and almost safety then its complement is recognized by a
deterministic Büchi automaton [Perrin and Pin 2004; Thomas 1990] (see Section 3). Once
this is observed, the proof of containment follows the lines of the proof of the fact that
every AlmostSafety language is monitorable with infinite β€œmemory” [Sistla and Srinivas
2008]. The strictness of the containment is witnessed by a probabilistic monitor which is a
modified version of the probabilistic Büchi automaton defined in [Baier and GroΜˆπ›½er 2005].
T HEOREM 5.8. Regular ∩ AlmostSafety ⊊ M WA.
P ROOF. We first show that Regular ∩ AlmostSafety βŠ† M WA. Let β„’ ∈ Regular ∩
AlmostSafety. Since β„’ is πœ”-regular and almost safety, there is a deterministic Büchi automaton ℬ = (𝑄, Ξ”, π‘žπ‘  , 𝑄𝑓 ) such that Ξ£πœ” βˆ– β„’ is the language recognized by ℬ. Now pick
ACM Journal Name, Vol. V, No. N, Month 20YY.
β‹…
21
a new state π‘žπ‘Ÿ and consider the FPM, β„³ = (𝑄 βˆͺ {π‘žπ‘Ÿ }, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿) where for each π‘Ž ∈ Ξ£
⎧1
π‘ž ∈ 𝑄𝑓 , π‘ž β€² = π‘žπ‘Ÿ


 21

⎨ 2 π‘ž ∈ 𝑄𝑓 , π‘ž β€² ∈ 𝑄, (π‘ž, π‘Ž, π‘ž β€² ) ∈ Ξ”
β€²
𝛿(π‘ž, π‘Ž, π‘ž ) = 1 π‘ž = π‘ž β€² = π‘žπ‘Ÿ


1 π‘ž ∈ 𝑄 βˆ– 𝑄𝑓 , π‘ž β€² ∈ 𝑄, (π‘ž, π‘Ž, π‘ž β€² ) ∈ Ξ”


⎩
0 π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’
It can be shown easily that β„’ = β„›<1 (β„³). Hence, Regular ∩ AlmostSafety βŠ† M WA.
In order to show that the containment is strict, we just need to show that there is a FPM
β„³ such that β„›<1 (β„³) is not a πœ”-regular language. Let Ξ£ = {0, 1} and consider the FPM,
β„³ = {𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿}, shown in Figure 4 on page 15, where 𝑄 = {π‘žπ‘  , π‘ž, π‘žπ‘Ÿ } and 𝛿 is defined
as follows. 𝛿(π‘žπ‘  , 1, π‘žπ‘Ÿ ) = 1, 𝛿(π‘žπ‘  , 0, π‘ž) = 21 , 𝛿(π‘žπ‘  , 0, π‘žπ‘  ) = 12 , 𝛿(π‘ž, 0, π‘ž) = 1, 𝛿(π‘ž, 1, π‘žπ‘  ) =
1 and 𝛿(π‘žπ‘Ÿ , 0, π‘žπ‘Ÿ ) = 𝛿(π‘žπ‘Ÿ , 1, π‘žπ‘Ÿ ) = 1.
Now, note that any word 𝛼 ∈ Ξ£πœ” that contains two consecutive occurrences of 1 is
rejected by β„³ with probability 1. Also note that the word 0πœ” is accepted by β„³ with
probability 1. Thus, β„›<1 (β„³) βŠ† {0πœ” } βˆͺ {0𝑛1 10𝑛2 1 . . . 0π‘›π‘˜ 10πœ” ∣ 𝑛1 , 𝑛2 , π‘›π‘˜ > 0} βˆͺ
{0𝑛1 10𝑛2 10𝑛3 1 . . . ∣ 𝑛𝑖 > 0 for each 𝑖 }. Now, given 𝑛1 , 𝑛2 , . . . , π‘›π‘˜ > 0 and 1 ≀ 𝑖 ≀
π‘˜, let 𝑒𝑖 = 0𝑛1 10𝑛2 1 . . . 10𝑛𝑖 and 𝑣𝑖 = 0𝑛1 10𝑛2 1 . . . 10𝑛𝑖 1. We make the following
observations:
𝛿𝑣𝑖 (π‘žπ‘  , π‘žπ‘  ) = 𝛿𝑒𝑖 (π‘žπ‘  , π‘žπ‘  ) × π›Ώ1 (π‘žπ‘  , π‘žπ‘  ) + 𝛿𝑒𝑖 (π‘žπ‘  , π‘ž) × π›Ώ1 (π‘ž, π‘žπ‘  ) = 𝛿𝑒𝑖 (π‘žπ‘  , π‘ž).
𝛿𝑣𝑖 (π‘žπ‘  , π‘ž) = 𝛿𝑒𝑖 (π‘žπ‘  , π‘žπ‘  ) × π›Ώ1 (π‘žπ‘  , π‘ž) + 𝛿𝑒𝑖 (π‘žπ‘  , π‘ž) × π›Ώ1 (π‘ž, π‘ž) = 0.
𝛿𝑒𝑖+1 (π‘žπ‘  , π‘žπ‘  ) = 𝛿𝑣𝑖 (π‘žπ‘  , π‘žπ‘  )×(𝛿0𝑛𝑖+1 (π‘žπ‘  , π‘žπ‘  )+𝛿0𝑛𝑖+1 (π‘ž, π‘žπ‘  )) = 𝛿𝑣𝑖 (π‘žπ‘  , π‘žπ‘  )×(1/2)𝑛𝑖+1 .
𝛿𝑒𝑖+1 (π‘žπ‘  , π‘ž) = 𝛿𝑣𝑖 (π‘žπ‘  , π‘žπ‘  ) βˆ’ 𝛿𝑒𝑖+1 (π‘žπ‘  , π‘žπ‘  ) = 𝛿𝑣𝑖 (π‘žπ‘  , π‘žπ‘  ) × (1 βˆ’ (1/2)𝑛𝑖+1 ).
βˆπ‘–+1
(5) Thus, we get that 𝛿𝑣𝑖+1 (π‘žπ‘  , π‘žπ‘  ) = 𝛿𝑣𝑖 (π‘žπ‘  , π‘žπ‘  ) × (1 βˆ’ (1/2)𝑛𝑖+1 ) = 𝑗=1 (1 βˆ’ (1/2)𝑛𝑗 )
and 𝛿𝑣𝑖+1 (π‘žπ‘  , π‘ž) = 0.
(1)
(2)
(3)
(4)
Therefore, any word of the form 0𝑛1 10𝑛2 1 . . . 0π‘›π‘˜ 10πœ” is accepted by β„³ with probability
the probability of accepting a word of the form 0𝑛1 10𝑛2 1 . . .
∏∞> 0. Furthermore,
π‘›π‘˜
is π‘˜=1 (1 βˆ’ (1/2) ). Thus, it can be easily checked that β„›<1 (β„³) is the union of
two disjoint languages β„’1 = 00βˆ— (100βˆ— )βˆ— 0πœ” and β„’2 = {0𝑛1 10𝑛2 10𝑛3 1...... ∣ 𝑛𝑖 >
∞
∏
0 for each 𝑖 and
(1 βˆ’ (1/2)π‘›π‘˜ ) > 0}. Now β„’1 is a πœ”-regular language, but β„’2 is not.
π‘˜=1
Thus, β„›<1 (β„³) is not a πœ”-regular language.
We will shortly show that the class M WA is strictly contained in the class M SC. However,
before we proceed, we will need the following lemma which shows that even if a language
β„’ ∈ M WA is not πœ”-regular, the languages cl(β„’) and cl(Ξ£πœ” βˆ– β„’) must be πœ”-regular. Recall
that for a language β„’1 , cl(β„’1 ) is the smallest safety language containing β„’1 . Hence, πœ”regularity of cl(β„’1 ) and cl(Ξ£πœ” βˆ– β„’1 ) is a necessary (but not sufficient) condition for an
almost safety language β„’1 to belong to M WA.
L EMMA 5.9. Let β„’ ∈ M WA. Then the safety languages cl(β„’) and cl(Ξ£πœ” βˆ– β„’) are
πœ”-regular. There is an almost safety language β„’1 such that cl(β„’1 ) and cl(Ξ£πœ” βˆ– β„’1 ) are
πœ”-regular but β„’1 βˆ•βˆˆ M WA.
P ROOF. Let β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿) be such that β„’ = β„›<1 (β„³). For π‘ž ∈ 𝑄 βˆ– {π‘žπ‘Ÿ }, let
β„³π‘ž = (𝑄, π‘ž, π‘žπ‘Ÿ , 𝛿), i.e., the FPM obtained by making π‘ž the initial state.
ACM Journal Name, Vol. V, No. N, Month 20YY.
22
β‹…
We first show that cl(β„’) is πœ”-regular. Please note that if β„’ is empty, then this is trivially
true. Let β„’ be non-empty. Let 𝑄0 = {π‘ž ∈ π‘„βˆ£π‘ž βˆ•= π‘žπ‘Ÿ and there is some 𝛼 s.t. πœ‡π‘Žπ‘π‘
β„³π‘ž , 𝛼 > 0}.
β€²
Consider the Büchi automaton ℬ = (𝑄0 , Ξ”, π‘žπ‘  , 𝑄0 ) where Ξ”(π‘ž, π‘Ž, π‘ž ) iff 𝛿(π‘ž, π‘Ž, π‘ž β€² ) > 0.
We claim that the language β„’(ℬ) recognized by ℬ is the set cl(β„›<1 (β„³)). Please note
that since the set of accepting states of ℬ is the set of states of ℬ, the language β„’(ℬ) is a
safety language. Hence, in order to show that β„’(ℬ) = cl(β„›<1 (β„³)), it suffices to show
that β„’(ℬ) βŠ† cl(β„›<1 (β„³)) and β„›<1 (β„³) βŠ† β„’(ℬ).
We will show that β„’(ℬ) βŠ† cl(β„›<1 (β„³)). Let 𝛼 = π‘Ž1 π‘Ž2 . . . ∈ β„’(ℬ) and for π‘₯ > 0 let
B(𝛼, π‘₯) be the open ball of radius π‘₯ centered at 𝛼. Pick π‘˜ > 0 such that 21π‘˜ < π‘₯. Clearly,
π‘Ž1 π‘Ž2 . . . π‘Žπ‘˜ Ξ£πœ” βŠ† B(𝛼, π‘₯). Therefore, it suffices to show that π‘Ž1 π‘Ž2 . . . π‘Žπ‘˜ Ξ£πœ” ∩ β„›<1 (β„³) βˆ•=
βˆ…. Now since 𝛼 ∈ β„’(ℬ), there are some π‘˜ + 1 states π‘ž0 = π‘žπ‘  , π‘ž1 , . . . π‘žπ‘˜ ∈ 𝑄0 such
that (π‘ž0 , π‘Ž1 , π‘ž1 ), (π‘ž1 , π‘Ž2 , π‘ž2 ), . . . , (π‘žπ‘˜βˆ’1 , π‘Žπ‘˜ , π‘žπ‘˜ ) ∈ Ξ”. By definition 𝛿(π‘žπ‘– , π‘Žπ‘– , π‘žπ‘–+1 ) > 0
for each 0 ≀ 𝑖 < π‘˜ and there is word 𝛽 such that πœ‡π‘Žπ‘π‘
β„³π‘žπ‘˜ , 𝛽 > 0. Consider the word 𝛼1 =
>
0.
Thus π‘Ž1 π‘Ž2 . . . π‘Žπ‘˜ Ξ£πœ” βˆ©β„›<1 (β„³) βˆ•= βˆ….
π‘Ž0 π‘Ž1 . . . π‘Žπ‘˜ 𝛽. It can be easily shown that πœ‡π‘Žπ‘π‘
β„³, 𝛼1
Now we show that β„›<1 (β„³) βŠ† β„’(ℬ). Pick 𝛼 = π‘Ž1 π‘Ž2 π‘Žπ‘› . . . ∈ β„›<1 and fix it. In
order to show that 𝛼 ∈ β„’(ℬ), by Koning’s lemma, it suffices to show that for each π‘˜ > 1
there is a path in ℬ from π‘žπ‘  on input symbols π‘Ž1 , π‘Ž2 . . . π‘Žπ‘˜βˆ’1 . Let π›Όπ‘˜ = π‘Žπ‘˜ π‘Žπ‘˜+1 . . . and
π‘’π‘˜ = π‘Ž1 π‘Ž2 . . . π‘Žπ‘˜βˆ’1 .
We have by definition πœ‡π‘Žπ‘π‘
β„³, 𝛼 > 0. Please note that it can be shown that for each π‘˜,
βˆ‘
π‘Žπ‘π‘
π‘Žπ‘π‘
π›Ώπ‘’π‘˜ (π‘žπ‘  , π‘ž)πœ‡π‘Žπ‘π‘
πœ‡β„³, 𝛼 =
β„³π‘ž , π›Όπ‘˜ . Now since πœ‡β„³π‘ž , 𝛽 = 0 for every π‘ž ∈ π‘„βˆ–(𝑄0 βˆͺ{π‘žπ‘Ÿ })
π‘žβˆˆπ‘„βˆ–{π‘žπ‘Ÿ }
and 𝛽 ∈ Ξ£πœ” , we get that πœ‡π‘Žπ‘π‘
β„³, 𝛼 =
βˆ‘
π›Ώπ‘’π‘˜ (π‘žπ‘  , π‘ž)πœ‡π‘Žπ‘π‘
β„³π‘ž , π›Όπ‘˜ . If there is no path on input
π‘žβˆˆπ‘„0
π‘Ž1 π‘Ž2 . . . π‘Žπ‘˜βˆ’1 in the automaton ℬ, then π›Ώπ‘’π‘˜ (π‘žπ‘  , π‘ž) = 0 for every π‘ž ∈ 𝑄0 which contradicts
πœ‡π‘Žπ‘π‘
β„³, 𝛼 > 0. Hence, there is a path in ℬ on input symbols π‘Ž1 , π‘Ž2 . . . π‘Žπ‘˜βˆ’1 .
Now in order to show that cl(Ξ£πœ” βˆ–β„›<1 (β„³)) is πœ”-regular, we can assume that β„›<1 (β„³) βˆ•=
πœ”
Ξ£ (otherwise, cl(Ξ£πœ” βˆ– β„›<1 (β„³)) = βˆ… which is πœ”-regular). We now construct the Büchi
automata ℬ = (𝜌, Ξ”, {π‘žπ‘  }, 𝜌) where 𝜌 βŠ† β„˜(𝑄) (the power-set of 𝑄) and Ξ” are defined as follows. A set 𝑄1 βŠ† 𝑄 belongs to 𝜌 iff there is a 𝛽 ∈ Ξ£πœ” such that for any
π‘ž ∈ 𝑄1 , πœ‡π‘Ÿπ‘’π‘—
β„³π‘ž , 𝛽 = 1. Please note that {π‘žπ‘  } ∈ 𝜌. Now (𝑄1 , π‘Ž, 𝑄2 ) ∈ Ξ” iff post(𝑄1 , π‘Ž) =
{π‘ž β€² βˆ£βˆƒπ‘ž ∈ 𝑄1 s.t. 𝛿(π‘ž, π‘Ž, π‘ž β€² ) > 0} βŠ† 𝑄2 . We can once again show that cl(Ξ£πœ” βˆ–β„›<1 (β„³)) =
β„’(ℬ).
However, the πœ”-regularity of cl(β„’) and cl(Ξ£πœ” βˆ–β„’) is not sufficient to guarantee inclusion
of β„’ in M WA. Let Ξ£ = {0, 1}. Now, consider the Language β„’2 = {0, 1}βˆ— 11{0, 1}πœ” . The
set β„’2 is an open set and hence an almost safety language. Let β„’1 = β„’2 βˆͺ{0102 103 1 . . .}.
Now, the set {0102 103 1 . . .} is a closed set and hence an almost safety language. It can
be easily shown that cl(β„’1 ) = Ξ£πœ” and cl({0, 1}πœ” βˆ– β„’1 ) = {0, 1}πœ” βˆ– β„’2 both of which are
πœ”-regular.
Now, we show that β„’1 βˆ•= β„›<1 (β„³1 ) for any FPM β„³1 by contradiction. Suppose
there is a β„³β€² such that β„’ = β„›<1 (β„³β€² ). Then, by the Lemma 4.7, there are real numbers
𝑐0 , . . . π‘π‘˜βˆ’1 ∈ ℝ such that for all 𝑣 ∈ Ξ£+ , 𝛼 ∈ Ξ£πœ” ,
πœ‡π‘Ÿπ‘’π‘—
= π‘π‘˜βˆ’1 πœ‡π‘Ÿπ‘’π‘—
+ . . . + 𝑐0 πœ‡π‘Ÿπ‘’π‘—
β„³β€² , 𝑣𝛼
β„³β€² , 𝑣0π‘˜ 𝛼
β„³β€² , 𝑣0π‘˜βˆ’1 𝛼
and π‘π‘˜βˆ’1 + . . . + 𝑐0 = 1.
ACM Journal Name, Vol. V, No. N, Month 20YY.
β‹…
23
Now, pick 𝑣1 = 0102 . . . 10π‘˜+1 1. and 𝛼1 = 0010π‘˜+3 10π‘˜+4 1 . . .. We get
πœ‡π‘Ÿπ‘’π‘—
= π‘π‘˜βˆ’1 πœ‡π‘Ÿπ‘’π‘—
+ . . . + 𝑐0 πœ‡π‘Ÿπ‘’π‘—
β„³β€² , 𝑣1 𝛼1 .
β„³β€² , 𝑣1 0π‘˜ 𝛼1
β„³β€² , 𝑣1 0π‘˜βˆ’1 𝛼1
Now 𝑣1 0𝑗 𝛼1 ∈ Ξ£πœ” βˆ– β„’1 for all 0 ≀ 𝑗 < π‘˜. Hence, πœ‡π‘Ÿπ‘’π‘—
β„³β€² , 𝑣1 0𝑗 𝛼1 = 1 for all 0 ≀ 𝑗 < π‘˜.
Hence, we get
= π‘π‘˜βˆ’1 + . . . + 𝑐0 = 1.
πœ‡π‘Ÿπ‘’π‘—
β„³β€² , 𝑣0π‘˜ 𝛼
However, 𝑣1 0π‘˜ 𝛼1 = 0102 103 . . . ∈ β„’1 and therefore
πœ‡π‘Ÿπ‘’π‘—
< 1.
β„³β€² , 𝑣0π‘˜ 𝛼
Thus, we have arrived at a contradiction.
We are ready to show that the class M SC strictly contains the class M WA.
T HEOREM 5.10. M WA ⊊ M SC.
P ROOF. We start by showing that M WA βŠ† M SC. Given a FPM β„³ and π‘₯ ∈ (0, 1), let
π‘Ÿπ‘’π‘—
β„³β€² = β„³π‘₯ be the FPM defined in Proposition 4.4 such that πœ‡π‘Ÿπ‘’π‘—
β„³β€² , 𝛼 = π‘₯ × πœ‡β„³, 𝛼 for every
word 𝛼. Now, it follows easily that β„›<1 (β„³) = β„›<π‘₯ (β„³β€² ). Hence, M WA βŠ† M SC.
In order to show that the containment is strict, construct β„³ as in the proof of Theo2
rem 5.5 such that for every 𝛼, πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 = 1 βˆ’ (bin(𝛼)) . Thus, β„›< 21 (β„³) = {𝛼 ∣ bin(𝛼) >
√
√
1
1
1 (β„³)) = {𝛼 ∣ bin(𝛼) β‰₯
}.
Now,
it
can
be
shown
that
cl(β„›
<2
2
2 } which is not
β€²
πœ”-regular by Proposition 4.8. Thus, if there is some FPM β„³ such that β„›<1 (β„³β€² ) =
β„›< 12 (β„³) then cl(β„›<1 (β„³β€² )) is not πœ”-regular which contradicts Lemma 5.9.
Finally, we show that the class M SC is strictly contained in the class of almost safety
languages. The proof is similar to the proof of Theorem 5.6 which showed that there is a
safety language β„’ that is not contained in M NC. Indeed the same safety language used in
the proof of Theorem 5.6 (any safety language is also an almost safety language) witnesses
the strictness of the containment M SC βŠ† AlmostSafety.
T HEOREM 5.11. M SC ⊊ AlmostSafety.
P ROOF. Please note that M SC βŠ† AlmostSafety as a consequence of Theorem 5.7.
Consider the safety language β„’ defined in the proof of Theorem 5.6 as follows. Let
𝐿 = {0𝑗 1(0βˆ— 1)βˆ— 0𝑗 1βˆ£π‘— ∈ β„•, π‘˜ > 0}. Let β„’1 = πΏΞ£πœ” and β„’ = Ξ£πœ” βˆ– β„’1 . We can show that
β„’ βˆ•βˆˆ M SC by an argument similar to proof of β„’ ∈M
/ NC sketched in Theorem 5.7.
Summarizing the results of this Section, we have Regular ∩ AlmostSafety ⊊ M WA
⊊ M SC ⊊ AlmostSafety. Please note that since M SA coincides with πœ”-regular safety
languages, M SA is strictly contained in M WA and M SC. Also, since there are πœ”-regular
almost safety languages which are not safety, it follows immediately that neither M WA nor
M SC is contained in M NC. Therefore, a natural question to ask is if M NC βŠ† M SC? We
will answer the question in negative in Section 5.3 as the proof requires a result which we
will prove in Section 5.3.
5.3
Robust Monitors
In this Section, we will show that the class M NC βˆ•βŠ† M SC. The proof will utilize a result on
robust monitors. Robust monitors are probabilistic FPM’s such that there is a separation
ACM Journal Name, Vol. V, No. N, Month 20YY.
24
β‹…
between probability of rejecting a word in the language permitted by the monitor and the
probability of rejecting a word in the language rejected by the monitor. Formally,
Definition: A FPM, β„³ on Ξ£, is said to be π‘₯-robust for π‘₯ ∈ (0, 1) if there is an πœ– > 0 such
that for any 𝛼 ∈ Ξ£πœ” , βˆ£πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 βˆ’ π‘₯∣ > πœ–.
Observe that if β„³ is π‘₯-robust then the languages β„›<π‘₯ (β„³) and ℛ≀π‘₯ (β„³) coincide. Robustness is a generalization of the concept of isolated cut-points defined for probabilistic
automata over finite words [Rabin 1963] - π‘₯ is said to be an isolated cut-point for a probabilistic automaton over finite words if there is an πœ– > 0 such that for every finite word
𝑒 the probability of accepting 𝑒 is bounded away from π‘₯ by πœ–. It was shown in [Rabin
1963] that if π‘₯ is an isolated cut-point then the language of finite words accepted by the
probabilistic automaton is a regular language. We can generalize this result to probabilistic
monitors and demonstrate that the language β„›<π‘₯ (β„³) is a πœ”-regular safety language. The
proof relies on the fact that ℛ≀π‘₯ (β„³) is a safety language which implies that πœ”-regularity
of ℛ≀π‘₯ (β„³) is equivalent to the regularity of the set of its finite prefixes (see Section 3).
This observation is crucial in the proof we present, whereas the result in [Rabin 1963] does
not depend on any such topological consideration. The proof that the set of finite prefixes
of ℛ≀π‘₯ (β„³) is regular, however, follows an argument similar to the result in [Rabin 1963].
The proof depends on the following result, proved in [Rabin 1963].
𝑛
P ROPOSITION 5.12. Given
βˆ‘π‘› 𝑛 ∈ β„•, 𝑛 > 0, let 𝒫𝑛 βŠ† ℝ be the set of vectors defined as
{(πœ‰1 , . . . πœ‰π‘› ) ∣ 0 ≀ πœ‰π‘— ≀ 1, 𝑗=1 πœ‰π‘— = 1}. Given πœ– ∈ ℝ, πœ– > 0, let 𝒰 βŠ† 𝒫𝑛 be a set such
βˆ‘π‘›
that for any (πœ‰1 , . . . πœ‰π‘› ), (πœ‰1β€² , . . . πœ‰π‘›β€² ) ∈ 𝒰, 𝑗 βˆ£πœ‰π‘— βˆ’ πœ‰π‘—β€² ∣ > πœ–. Then 𝒰 must be finite.
Using the above observation, we can show,
T HEOREM 5.13. Let β„³ be π‘₯-robust for some π‘₯ ∈ (0, 1). Then β„›<π‘₯ (β„³) = ℛ≀π‘₯ (β„³)
is a πœ”-regular safety language.
P ROOF. Let β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿) be π‘₯-robust and let πœ– > 0 be such that βˆ£πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 βˆ’ π‘₯∣ > πœ–
for all 𝛼 ∈ Ξ£πœ” . Let β„’ = ℛ≀π‘₯ (β„³) and let 𝐿 βŠ† Ξ£βˆ— be the set of finite prefixes of β„’. In
other words 𝐿 = {𝑒 ∈ Ξ£βˆ— ∣ βˆƒπ›Ό ∈ Ξ£πœ” s. t. 𝑒𝛼 ∈ β„’}.
Since β„’ is a safety language, in order to prove that β„’ is πœ”-regular, it suffices to show that
𝐿 is a regular language (viewed as a language over finite words). We will demonstrate that
𝐿 is a regular language by demonstrating that it has finite Myhill-Nerode index, i.e., the
number of equivalence classes ≑𝐿 is finite. Recall that for two finite words 𝑒1 , 𝑒2 βŠ† Ξ£βˆ— ,
𝑒1 ≑𝐿 𝑒2 if for all 𝑣 ∈ Ξ£βˆ— , 𝑒1 𝑣 ∈ 𝐿 iff 𝑒2 𝑣 ∈ 𝐿.
Now assume that 𝑒1 and 𝑒2 are two finite words such that 𝑒1 βˆ•β‰‘πΏ 𝑒2 . Then, there is
some 𝑣 ∈ Ξ£βˆ— such that either 𝑒1 𝑣 ∈ 𝐿 and 𝑒2 𝑣 βˆ•βˆˆ 𝐿 or 𝑒1 𝑣 βˆ•βˆˆ 𝐿 and 𝑒2 𝑣 ∈ 𝐿.
First, consider the case 𝑒1 𝑣 ∈ 𝐿 and 𝑒2 𝑣 βˆ•βˆˆ 𝐿. Now, since 𝑒1 𝑣 ∈ 𝐿, there is some
𝛼 ∈ Ξ£πœ” such that 𝑒1 𝑣𝛼 ∈ β„’. Pick one such word, say 𝛼0 and fix it. Thus 𝑒1 𝑣𝛼0 ∈ β„’. Also
π‘Ÿπ‘’π‘—
since 𝑒2 𝑣 βˆ•βˆˆ 𝐿, 𝑒2 𝑣𝛼0 βˆ•βˆˆ β„’. By definition of β„’, we get πœ‡π‘Ÿπ‘’π‘—
β„³, 𝑒1 𝑣𝛼0 ≀ π‘₯ and πœ‡β„³, 𝑒2 𝑣𝛼0 > π‘₯.
π‘Ÿπ‘’π‘—
Since π‘₯ is an isolated cut-point, we get πœ‡π‘Ÿπ‘’π‘—
β„³, 𝑒1 𝑣𝛼0 < π‘₯ βˆ’ πœ– and πœ‡β„³, 𝑒2 𝑣𝛼0 > π‘₯ + πœ–.
β€²
By Lemma 4.1, there exists a finite prefix of 𝛼0 , say 𝑣 , such that 𝛿𝑒1 𝑣𝑣′ (π‘žπ‘  , π‘žπ‘Ÿ ) <
π‘₯ βˆ’ πœ– and 𝛿𝑒2 𝑣𝑣′ (π‘žπ‘  , π‘žπ‘Ÿ ) > π‘₯ +βˆ‘
πœ–. Thus, 𝛿𝑒2 𝑣𝑣′ (π‘žπ‘  , π‘žπ‘Ÿ ) βˆ’ 𝛿𝑒1 𝑣𝑣′ (π‘žπ‘  , π‘žπ‘Ÿ ) > 2πœ–. Now,
β€² (π‘žπ‘  , π‘žπ‘Ÿ ) βˆ’ 𝛿𝑒 𝑣𝑣 β€² (π‘žπ‘  , π‘žπ‘Ÿ ) =
β€²
𝛿𝑒2 π‘£π‘£βˆ‘
1
π‘žβˆˆπ‘„ (𝛿𝑒2 (π‘žπ‘  , π‘ž) βˆ’ 𝛿𝑒1 (π‘žπ‘  , π‘ž))𝛿𝑣𝑣 (π‘ž, π‘žπ‘Ÿ ). Thus, we get
β€² (π‘ž, π‘žπ‘Ÿ ) > 2πœ–.
that π‘žβˆˆπ‘„ (𝛿𝑒2 (π‘žπ‘  , π‘ž) βˆ’
𝛿
(π‘ž
,
π‘ž))𝛿
𝑒
𝑠
𝑣𝑣
1
βˆ‘
βˆ‘
β€² (π‘ž, π‘žπ‘Ÿ ) ≀
Now, we have that π‘žβˆˆπ‘„ (𝛿𝑒2 (π‘žπ‘  , π‘ž) βˆ’ 𝛿𝑒1 (π‘žπ‘  , π‘ž))π›Ώπ‘£π‘£βˆ‘
π‘žβˆˆπ‘„ βˆ£π›Ώπ‘’2 (π‘žπ‘  , π‘ž) βˆ’
𝛿𝑒1 (π‘žπ‘  , π‘ž)βˆ£βˆ£π›Ώπ‘£π‘£β€² (π‘ž, π‘žπ‘Ÿ )∣. Since 0 ≀ 𝛿𝑣𝑣′ (π‘ž, π‘žπ‘Ÿ ) ≀ 1, we get π‘žβˆˆπ‘„ βˆ£π›Ώπ‘’2 (π‘žπ‘  , π‘ž)βˆ’π›Ώπ‘’1 (π‘žπ‘  , π‘ž)∣ β‰₯
ACM Journal Name, Vol. V, No. N, Month 20YY.
β‹…
25
βˆ‘
βˆ‘π‘žβˆˆπ‘„ (𝛿𝑒2 (π‘žπ‘  , π‘ž) βˆ’ 𝛿𝑒1 (π‘žπ‘  , π‘ž))𝛿𝑣𝑣′ (π‘ž, π‘žπ‘Ÿ ) > 2πœ–. Similarly, if 𝑒1 𝑣 βˆ•βˆˆ 𝐿 and 𝑒2 𝑣 ∈ 𝐿 then
π‘žβˆˆπ‘„ βˆ£π›Ώπ‘’2 (π‘žπ‘  , π‘ž) βˆ’ 𝛿𝑒1 (π‘žπ‘  , π‘ž)∣ > 2πœ–.
βˆ‘
Therefore, if 𝑒1 βˆ•β‰‘πΏβˆ‘
𝑒2 , it must be the case
βˆ‘ that π‘žβˆˆπ‘„ βˆ£π›Ώπ‘’2 (π‘žπ‘  , π‘ž) βˆ’ 𝛿𝑒1 (π‘žπ‘  , π‘ž)∣ > 2πœ–.
Also, please note that π‘žβˆˆπ‘„ 𝛿𝑒1 (π‘žπ‘  , π‘ž) = π‘žβˆˆπ‘„ 𝛿𝑒2 (π‘žπ‘  , π‘ž) = 1. By Proposition 5.12, it
follows that there can only finite number of equivalence classes.
The above proof is sound even if only one side of the rejection probabilities is bounded
away. Therefore, we get the following corollary.
C OROLLARY 5.14. Let β„³ be a monitor such that there is an πœ– > 0 such that for each
π‘Ÿπ‘’π‘—
𝛼 ∈ Ξ£πœ” either πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 = 1 or πœ‡β„³, 𝛼 ≀ 1 βˆ’ πœ–, then β„›<1 (β„³) ∈ Regular ∩ Safety.
P ROOF. Follows immediately from the fact that β„³ is 1 βˆ’ 2πœ– -robust and β„›<1 (β„³) =
β„›<1βˆ’ 2πœ– (β„³) ∈ Regular ∩ Safety.
Now, we are ready to show that M SC and M NC are incomparable.
T HEOREM 5.15. M SC βˆ•βŠ† M NC and M NC βˆ•βŠ† M SC.
P ROOF. Observe that since M SC contains almost safety languages that are not safety
languages, we get that M SC βˆ•βŠ† M NC. In order to show that M NC βˆ•βŠ† M SC, let Ξ£ = {0, 1}.
We will show that there is a RatFPM β„³ on Ξ£, such that for any FPM β„³β€² on Ξ£, and any
β€²
15 (β„³) βˆ•= β„›<π‘₯ (β„³ ).
π‘₯ ∈ [0, 1], ℛ≀ 16
Now, by repeated use of Lemma 4.9, Proposition 4.5 and Proposition 4.6, we can con4
2 2
struct a RatFPM β„³ such that for all 𝛼 ∈ Ξ£πœ” , πœ‡π‘Žπ‘π‘
β„³, 𝛼 = (bin(𝛼)) (1 βˆ’ bin(𝛼) ) . Now
π‘Ÿπ‘’π‘—
15
15
1
π‘Žπ‘π‘
4
15 (β„³) ⇔ πœ‡
a word 𝛼 ∈ ℛ≀ 16
β„³, 𝛼 ≀ 16 ⇔ 1 βˆ’ πœ‡β„³, 𝛼 ≀ 16 ⇔ 16 ≀ (bin(𝛼)) (1 βˆ’
bin(𝛼)2 )2 ⇔ 41 ≀ bin(𝛼)2 (1 βˆ’ bin(𝛼)2 ) ⇔ 0 ≀ βˆ’ 41 + bin(𝛼)2 (1 βˆ’ bin(𝛼)2 ) ⇔ 0 ≀
βˆ’( 21 βˆ’ bin(𝛼)2 )2 ⇔ √12 = bin(𝛼).
Now there is only one word 𝛽, namely wrd( √12 ), (the β€œbinary expansion” of √12 ) such
1
15 (β„³) = {wrd( √ )}. Now, β„› 15 (β„³) is not πœ”-regular since
that bin(𝛽) = √12 . Thus ℛ≀ 16
≀ 16
2
every πœ”-regular language must contain an ultimately periodic word [Perrin and Pin 2004;
Thomas 1990], and wrd( √12 ) is not ultimately periodic (as √12 is irrational).
We proceed by contradiction. Suppose there is some β„³β€² and π‘₯ such that ℛ≀ 15
(β„³) =
16
β„›<π‘₯ (β„³β€² ). Let 𝑦 = πœ‡π‘Ÿπ‘’π‘—
. By definition 𝑦 < π‘₯ and for all words 𝛼 βˆ•= wrd( √12 ),
β„³β€² , wrd( √1 )
2
π‘₯+𝑦
β€²
β€²
πœ‡π‘Ÿπ‘’π‘—
β„³β€² , 𝛼 β‰₯ π‘₯. Let π‘₯1 = 2 . Clearly β„³ is π‘₯1 -robust. Thus, by Theorem 5.13, β„›<π‘₯1 (β„³ )
1
15 (β„³) = wrd( √ ) is not
is πœ”-regular. This contradicts the fact that β„›<π‘₯1 (β„³β€² ) = ℛ≀ 16
2
πœ”-regular.
6.
DECISION PROBLEMS
In this section, we consider the problems of checking emptiness and universality of RatFPMs (with rational cut-points). Our results for these problems are summarized in Figure 6.
6.1
Emptiness Problem: Upper Bounds
In this section we will prove the upper bounds for the emptiness problem for monitors in
the classes M SA, M WA, M SC, and M WA. We will assume that the automata given as input
to the emptiness problem is a RatFPM i.e., a probabilistic monitor with rational transition
ACM Journal Name, Vol. V, No. N, Month 20YY.
26
β‹…
M SA
M WA
M SC
M NC
E MPTINESS
PSPACE-complete (Theorems 6.1 and 6.6)
PSPACE-complete (Theorems 6.4 and 6.6)
co-R.E.-complete (Theorems 6.4 and 6.8)
R.E.-complete (Theorems 6.5 and 6.9)
U NIVERSALITY
NL-complete (Theorems 6.10 and 6.16)
PSPACE-complete (Theorems 6.13 and 6.17)
Ξ 11 -complete (Theorems 6.15 and 6.19)
co-R.E.-complete (Theorems 6.14 and 6.18)
Fig. 6. Table summarizing the complexity of the emptiness and universality problems for
the various classes of monitors.
probabilities.
M SA: We begin by considering the class of monitors in M SA. We show that the emptiness
problem is in PSPACE by reducing it to the universality problem of Büchi automata.
T HEOREM 6.1. Let β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿) be a RatFPM on an alphabet Ξ£. The problem
of checking the emptiness of ℛ≀0 (β„³) is in PSPACE.
P ROOF. We construct a non-deterministic Büchi automaton ℬ, which is essentially the
same as β„³, except that the transition probabilities are discarded. Formally, ℬ = (𝑄, Ξ”, π‘žπ‘  , π‘žπ‘Ÿ )
where Ξ” = {(π‘ž, π‘Ž, π‘ž β€² ) ∣ 𝛿(π‘ž, π‘Ž, π‘ž β€² ) > 0}. Note that π‘žπ‘Ÿ is the only final state of the Büchi
automaton ℬ. It is easy to see that ℛ≀0 (β„³) = βˆ… iff 𝐿(ℬ) = Ξ£πœ” where 𝐿(ℬ) is the the language accepted by the Büchi automaton ℬ. The universality problem for Büchi automata
is known to be in PSPACE, and hence the result follows.
M WA and M SC: Next we establish that for monitors in M WA and M SC, the emptiness
problems are in PSPACE and R.E., respectively. The proofs for both of these rely on a
technical lemma that we state and prove before presenting the upper bound for the emptiness problem. We begin with some definitions that we will need.
Definition: For a FPM β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿), the deterministic graph associated with it
is the edge-labeled multi-graph (2𝑄 , E), where E βŠ† 2𝑄 × Ξ£ × 2𝑄 is defined as follows:
(𝑆, π‘Ž, 𝑆 β€² ) ∈ E iff 𝑆 β€² = {π‘ž β€² ∈ 𝑄 ∣ βˆƒπ‘ž ∈ 𝑆 s.t. 𝛿(π‘ž, π‘Ž, π‘ž β€² ) > 0}. We denote the deterministic
graph of β„³ by 𝐺(β„³).
A vertex 𝑆 ∈ 2𝑄 of 𝐺(β„³) will be said to be good if π‘žπ‘Ÿ ∈
/ 𝑆. A cycle in 𝐺(β„³) is a
sequence of edges (𝑆0 , π‘Ž0 , 𝑆1 ), (𝑆1 , π‘Ž1 , 𝑆2 ), ..., (π‘†π‘›βˆ’1 , π‘Žπ‘›βˆ’1 , 𝑆𝑛 ) such that 𝑆0 = 𝑆𝑛 ; 𝑆0
is the starting vertex of the cycle, and π‘Ž0 . . . π‘Žπ‘›βˆ’1 is the input sequence associated with the
cycle. Finally, we say that the cycle is good if all the nodes on it are good.
L EMMA 6.2. Let β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿) be a FPM on an alphabet Ξ£, and π‘₯ ∈ (0, 1].
The language β„›<π‘₯ (β„³) is non-empty iff there exists a finite word 𝑒, a set 𝑆 βŠ† 𝑄 such
that
βˆ‘ 𝑆 lies on β€²a good cycle in 𝐺(β„³), and 𝛿𝑒 (π‘žπ‘  , 𝑆) > 1 βˆ’ π‘₯, where 𝛿𝑒 (π‘žπ‘  , 𝑆) =
π‘ž β€² βˆˆπ‘† 𝛿𝑒 (π‘žπ‘  , π‘ž ).
P ROOF. We prove the β€œif” part of the lemma as follows. Let 𝑒, 𝑆 be such that 𝛿𝑒 (π‘žπ‘  , 𝑆) >
1 βˆ’ π‘₯ and 𝑆 lies on a good cycle in 𝐺(β„³). Let 𝐢 be the good cycle on which 𝑆 lies. Without loss of generality, we assume that 𝑆 is the starting state of 𝐢 and 𝑣 is the finite input
sequence associated with 𝐢. Since 𝐢 is a good cycle and 𝛿𝑒 (π‘žπ‘  , 𝑆) > 1 βˆ’ π‘₯, it is not diffiπ‘Ÿπ‘’π‘—
cult to see that, for 𝛼 = 𝑒𝑣 πœ” , πœ‡π‘Žπ‘π‘
β„³, 𝛼 > 1 βˆ’ π‘₯, and hence πœ‡β„³, 𝛼 < π‘₯. Thus 𝛼 ∈ β„›<π‘₯ (β„³).
The β€œonly if” part of the lemma is proved as follows. Assume that for some 𝛼 ∈ Ξ£πœ” ,
π‘Ÿπ‘’π‘—
βˆ£π‘„βˆ£
πœ‡β„³, 𝛼 < π‘₯. This means πœ‡π‘Žπ‘π‘
. Note that
β„³, 𝛼 > 1 βˆ’ π‘₯. Let 𝛼 = π‘Ž1 π‘Ž2 . . . and π‘˜ = 2
ACM Journal Name, Vol. V, No. N, Month 20YY.
β‹…
27
the number of states of 𝐺(β„³) is bounded by π‘˜. For every, 𝑗 β‰₯ 1, let 𝑇𝑗 be the set of all
π‘ž β€² ∈ 𝑄 such that 𝛿𝛼[𝑗+1:𝑗+π‘˜] (π‘ž β€² , π‘žπ‘Ÿ ) > 0; i.e., 𝑇𝑗 is the set of all states from which π‘žπ‘Ÿ can
be reached on the input sequence 𝛼[𝑗 + 1 : 𝑗 + π‘˜].
Claim: There exists an 𝑖 β‰₯ 1 such that 𝛿𝛼[1:𝑖] (π‘žπ‘  , 𝑇𝑖 ) < π‘₯.
Before proving the above claim, let us observe that the β€œonly if” part of the lemma
follows from it. Let 𝑖 β‰₯ 1 be such that 𝛿𝛼[1:𝑖] (π‘žπ‘  , 𝑇𝑖 ) < π‘₯. Let 𝑆𝑖 be the set of π‘ž β€² ∈ 𝑄 βˆ– 𝑇𝑖
such that 𝛿𝛼[1:𝑖] (π‘žπ‘  , π‘ž β€² ) > 0. It is easy to see that 𝛿𝛼[1:𝑖] (π‘žπ‘  , 𝑆𝑖 ) > 1 βˆ’ π‘₯. Note that from
each of the states in 𝑆𝑖 , the state π‘žπ‘Ÿ can not be reached in the automaton β„³ on the input
sequence 𝛼[𝑖 + 1 : 𝑖 + π‘˜]. From this it follows that, the sequence 𝑆𝑖 , 𝑆𝑖+1 , . . . , 𝑆𝑖+π‘˜ of
vertices of 𝐺(β„³) reached on the input sequence 𝛼[𝑖 + 1 : 𝑖 + π‘˜] starting from 𝑆𝑖 are all
good. Since π‘˜ equals the number of vertices of 𝐺(β„³), using pigeon hole principle, we see
that the above sequence contains a cycle and it is a good cycle. Furthermore, we see that
𝛿𝛼[1:𝑗] (π‘žπ‘  , 𝑆𝑗 ) > 1 βˆ’ π‘₯ for every 𝑗 such that 𝑖 ≀ 𝑗 ≀ 𝑖 + π‘˜. Thus, the β€œonly if” part of the
lemma follows.
Proof of the claim: We conclude this proof by showing the claim by contradiction. Assume the claim is not true. This means for every 𝑗 β‰₯ 1, 𝛿𝛼[1:𝑗] (π‘žπ‘  , 𝑇𝑗 ) β‰₯ π‘₯. Let
𝑗0 < 𝑗1 < ... < 𝑗ℓ ... be the infinite sequence of natural numbers such that for each
β„“ β‰₯ 0, 𝑗ℓ = β„“ β‹… π‘˜. Clearly, for each β„“ > 0, 𝛿𝛼[1:𝑗ℓ ] (π‘žπ‘  , 𝑇𝑗ℓ ) β‰₯ π‘₯ and 𝑗ℓ+1 = 𝑗ℓ + π‘˜.
Let 𝑝 be the value min{𝛿𝑒′ (π‘ž β€² , π‘žπ‘Ÿ ) ∣ 𝑒′ ∈ Ξ£π‘˜ , 𝛿𝑒′ (π‘ž β€² , π‘žπ‘Ÿ ) > 0}; note that this value is well
defined and > 0. Let 𝐹0 = 0 and for every β„“ > 0, let 𝐹ℓ = 𝛿𝛼[1:𝑗ℓ ] (π‘žπ‘  , π‘žπ‘Ÿ ), i.e., it is
the probability that β„³ is in state π‘žπ‘Ÿ after the finite prefix 𝛼[1 : 𝑗ℓ ]. We claim that for each
β„“>0
𝐹ℓ+1 β‰₯ 𝐹ℓ + (π‘₯ βˆ’ 𝐹ℓ )𝑝 = (1 βˆ’ 𝑝)𝐹ℓ + π‘₯𝑝.
In order to see this, first observe that π‘žπ‘Ÿ ∈ 𝑇ℓ for each 𝑙 > 0. Also, note that it must be the
case that π‘žπ‘  ∈ 𝑇1 (otherwise the claim is simply true). Therefore, 𝐹1 = 𝛿𝛼[1:𝑗1 ] (π‘žπ‘  , π‘žπ‘Ÿ ) β‰₯
𝑝 β‰₯ 0 + (π‘₯ βˆ’ 0)𝑝 = 𝐹0 + (π‘₯ βˆ’ 𝐹0 )𝑝.
For each π‘ž ∈ 𝑄 and β„“ > 0, let the probability of being in state π‘ž after reading the
input
βˆ‘ 𝛼[1 : 𝑗ℓ ] be denoted as π‘π‘Ÿβ„“ (π‘ž). Note that π‘π‘Ÿβ„“ (π‘ž) = 𝛿𝛼[1:𝑗ℓ ] (π‘žπ‘  , π‘ž), π‘π‘Ÿβ„“ (π‘žπ‘Ÿ ) = 𝐹ℓ and
π‘žβˆˆπ‘‡π‘—β„“ π‘π‘Ÿβ„“ (π‘ž) = 𝛿𝛼[1:𝑗ℓ ] (π‘žπ‘  , 𝑇𝑗ℓ ) β‰₯ π‘₯. Also, for each π‘ž ∈ 𝑄 and β„“ > 0, let π‘π‘Ÿβ„“+1 (π‘žπ‘Ÿ βˆ£π‘ž)
be the probability of being in state π‘žπ‘Ÿ after reading the input 𝛼[𝑗ℓ + 1 : 𝑗ℓ+1 ] having
started in the state π‘ž. In other words, let π‘π‘Ÿβ„“+1 (π‘žπ‘Ÿ βˆ£π‘ž) = 𝛿𝛼[𝑗ℓ +1:𝑗ℓ+1 ] (π‘ž, π‘žπ‘Ÿ ). Note that
π‘π‘Ÿβ„“+1 (π‘žπ‘Ÿ βˆ£π‘žπ‘Ÿ ) = 1, π‘π‘Ÿβ„“+1 (π‘žπ‘Ÿ βˆ£π‘ž) β‰₯ 𝑝 for each π‘ž ∈ 𝑇𝑗ℓ and π‘π‘Ÿβ„“+1 (π‘žπ‘Ÿ βˆ£π‘ž) = 0 for all π‘ž ∈
𝑄 βˆ– 𝑇𝑗ℓ . It follows from definition that for each β„“ > 1,
𝐹ℓ+1 = π›Ώβˆ‘
𝛼[1:𝑗ℓ+1 ] (π‘žπ‘  , π‘žπ‘Ÿ )
=
π‘žβˆˆπ‘„ π‘π‘Ÿβ„“ (π‘ž)π‘π‘Ÿβ„“+1 (π‘žπ‘Ÿ βˆ£π‘ž)
βˆ‘
βˆ‘
= π‘π‘Ÿβ„“ (π‘žπ‘Ÿ )π‘π‘Ÿβ„“+1 (π‘žπ‘Ÿ βˆ£π‘žπ‘Ÿ ) + π‘žβˆˆπ‘‡π‘— βˆ–{π‘žπ‘Ÿ } π‘π‘Ÿβ„“ (π‘ž)π‘π‘Ÿβ„“+1 (π‘žπ‘Ÿ βˆ£π‘ž) + π‘žβˆˆπ‘„βˆ–π‘‡β„“ π‘π‘Ÿβ„“ (π‘ž)π‘π‘Ÿβ„“+1 (π‘žπ‘Ÿ βˆ£π‘ž)
β„“
βˆ‘
= 𝐹ℓ + π‘žβˆˆπ‘‡π‘— βˆ–{π‘žπ‘Ÿ } π‘π‘Ÿβ„“ (π‘ž)π‘π‘Ÿβ„“+1 (π‘žπ‘Ÿ βˆ£π‘ž) + 0
β„“
βˆ‘
β‰₯ 𝐹ℓ + π‘žβˆˆπ‘‡π‘— βˆ–{π‘žπ‘Ÿ } π‘π‘Ÿβ„“ (π‘ž)𝑝
βˆ‘ β„“
β‰₯ 𝐹ℓ + 𝑝(( π‘žβˆˆπ‘‡π‘— π‘π‘Ÿβ„“ (π‘ž)) βˆ’ π‘π‘Ÿβ„“ (π‘žπ‘Ÿ ))
β„“
β‰₯ 𝐹ℓ + 𝑝(π‘₯ βˆ’ 𝐹ℓ ).
Thus, we have that for each β„“, 𝐹ℓ+1 β‰₯ 𝐹ℓ + (π‘₯ βˆ’ 𝐹ℓ )𝑝 = (1 βˆ’ 𝑝)𝐹ℓ + π‘₯𝑝. By induction
on β„“, it follows that
βˆ‘
𝐹ℓ+1 β‰₯ (1 βˆ’ 𝑝)𝑙 𝐹0 + π‘₯𝑝
(1 βˆ’ 𝑝)π‘Ÿ
0β‰€π‘Ÿβ‰€β„“
ACM Journal Name, Vol. V, No. N, Month 20YY.
28
β‹…
From this, we see that,
( lim 𝐹ℓ ) β‰₯ π‘₯𝑝
β„“β†’βˆž
Hence
πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼
βˆ‘
(1 βˆ’ 𝑝)π‘Ÿ = π‘₯
0β‰€π‘Ÿ<∞
β‰₯ π‘₯, which contradicts the fact that 𝛼 ∈ β„›<π‘₯ (β„³).
An immediate consequence of the proof of Lemma 6.2 is that non-emptiness of β„›<π‘₯ (β„³)
for a FPM β„³ means that there is an ultimately periodic word in β„›<π‘₯ (β„³).
C OROLLARY 6.3. Let β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿) be a FPM on an alphabet Ξ£, and π‘₯ ∈
(0, 1]. β„›<π‘₯ (β„³) βˆ•= βˆ… if and only if there exist 𝑒, 𝑣 ∈ Ξ£βˆ— such that 𝑒𝑣 πœ” ∈ β„›<π‘₯ (β„³).
We thus obtain the upper bounds for checking the emptiness of M WA and M SC.
T HEOREM 6.4. Let β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿) be a RatFPM on an alphabet Ξ£, and rational
π‘₯ ∈ (0, 1) be a rational number. Emptiness of β„›<1 (β„³) can be determined in PSPACE,
while emptiness of β„›<π‘₯ (β„³) can be determined in co-R.E..
P ROOF. From Lemma 6.2, we know that if β„›<π‘₯ (β„³) is non-empty then there is 𝑒, 𝑆
such that 𝑆 is on a good cycle and 𝛿𝑒 (π‘žπ‘  , 𝑆) > 1 βˆ’ π‘₯. So the algorithm for checking nonemptiness, non-deterministically guesses 𝑆 βŠ† 𝑄 and the string 𝑒. Then the semi-decision
first checks that 𝑆 is on a good cycle of 𝐺(β„³), which can be done using space that is
polynomial in the size of β„³ without explicitly constructing 𝐺(β„³). Next, it is easy to see
that there is a semi-decision procedure to check if 𝛿𝑒 (π‘žπ‘  , 𝑆) > 1 βˆ’ π‘₯. This proves that the
non-emptiness of β„›<π‘₯ (β„³) is recursively enumerable.
Based on the observations in the previous paragraph, in order to prove that non-emptiness
of β„›<1 (β„³) is in PSPACE, all we need to show is that the check 𝛿𝑒 (π‘žπ‘  , 𝑆) > 0 can be
accomplished in PSPACE. Notice that 𝛿𝑒 (π‘žπ‘  , 𝑆) > 0 iff the vertex 𝑆 β€² reached on the sequence 𝑒 in 𝐺(β„³) is such that 𝑆 ∩ 𝑆 β€² βˆ•= βˆ…. Thus the PSPACE upper bound can be shown
by observing that this check can be done by guessing the symbols of 𝑒 incrementally following a path in 𝐺(β„³).
M NC: We will conclude this section on upper bounds by showing that the emptiness problem for M NC is recursively enumerable.
T HEOREM 6.5. Let β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿) be a RatFPM on an alphabet Ξ£, and rational
π‘₯ ∈ (0, 1) be a rational number. The problem of checking the emptiness of ℛ≀π‘₯ (β„³) is in
R.E..
P ROOF. A collection π‘Š βŠ† Ξ£+ of finite strings will be called a witness if for every
𝑒 ∈ π‘Š , 𝛿𝑒 (π‘žπ‘  , π‘žπ‘Ÿ ) > π‘₯ and for every 𝛼 ∈ Ξ£πœ” , there is 𝑒 ∈ π‘Š such that 𝑒 is a prefix of
𝛼. Observe that if there is a witness set π‘Š then for every 𝛼 ∈ Ξ£πœ” , πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 > π‘₯, and so
ℛ≀π‘₯ (β„³) = βˆ….
Our main observation is that ℛ≀π‘₯ (β„³) = βˆ… if and only if there is a finite set π‘Š βŠ† Ξ£+
such that π‘Š is a witness. Before proving this, let us note that this gives us a semi-decision
procedure to check the emptiness of ℛ≀π‘₯ (β„³). The algorithm to check emptiness will
guess a finite set of finite strings π‘Š , and check that π‘Š is indeed a witnessing set. It is easy
to see that checking if π‘Š is a witness is decidable, which proves the theorem.
We now prove the key technical claim that ℛ≀π‘₯ (β„³) = βˆ… if and only if there is a finite
set π‘Š βŠ† Ξ£+ such that π‘Š is a witness. Clearly, the existence of a finite witnessing set
implies that ℛ≀π‘₯ (β„³) = βˆ…, and so the main challenge is in proving the converse.
ACM Journal Name, Vol. V, No. N, Month 20YY.
β‹…
29
Let ℛ≀π‘₯ (β„³) = βˆ…. Consider the set 𝐺 = {𝑒 ∈ Ξ£βˆ— ∣ 𝛿𝑒 (π‘žπ‘  , π‘žπ‘Ÿ ) ≀ π‘₯}. Note that the
empty string πœ– ∈ 𝐺. The set 𝐺 can be viewed as vertices of a Ξ£-branching tree, because
𝐺 is prefix closed. We will abuse notation and view 𝐺 both as a tree and a collection of
strings. Suppose 𝐺 is not finite. Then by König’s Lemma, 𝐺 has an infinite path, which
means that there is 𝛼 ∈ Ξ£πœ” such that every prefix of 𝛼 is in 𝐺. This means that for every
prefix 𝑒 of 𝛼, 𝛿𝑒 (π‘žπ‘  , π‘žπ‘Ÿ ) ≀ π‘₯, and hence πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 ≀ π‘₯. This contradicts our assumption that
ℛ≀π‘₯ (β„³) = βˆ…. Hence 𝐺 must be finite.
Consider the set π‘Š = (𝐺Σ) βˆ– 𝐺. Observe that π‘Š is finite. Second, since π‘Š βŠ† Ξ£+ βˆ– 𝐺,
we have for every 𝑒 ∈ π‘Š , 𝛿𝑒 (π‘žπ‘  , π‘žπ‘Ÿ ) > π‘₯. Finally, since 𝐺 is finite, for every 𝛼 ∈ Ξ£πœ” ,
there are infinite number of prefixes of 𝛼 that are not in 𝐺; from this, it follows that there
is a 𝑒 ∈ π‘Š such that 𝑒 is a prefix of 𝛼. This shows that π‘Š is a finite witness set, and this
completes the proof of the theorem.
6.2
Emptiness Problem: Lower Bounds
In this section, we will show that the upper bounds proved in Section 6.1 for the various
classes of monitors are tight. We will first prove lower bounds for M WA and M SA, before
we consider the classes M SC and M NC.
M WA and M SA: We will show the PSPACE-hardness of the emptiness problem for M WA
and M SA.
T HEOREM 6.6. For a RatFPM β„³, the problems of checking the emptiness of ℛ≀0 (β„³)
and β„›<1 (β„³) are PSPACE-hard.
P ROOF. The PSPACE-hardness problem for β„›<1 (β„³) might appear deceptively similar to the PSPACE-hardness of the universality problem of non-deterministic automata;
however, we could not find any easy reduction from the later to the former problem. We
prove the hardness result by reducing the membership problem for a language in PSPACE.
Let 𝐿 ∈PSPACE and let 𝑀 be a single tape deterministic Turing machine that accepts 𝐿
in space 𝑝(𝑛) for some polynomial 𝑝 where 𝑛 is the length of its input. Without loss of
generality, let 𝑀 = (𝑄, Ξ£, Ξ“, 𝐡, 𝛿, π‘ž0 , π‘žπ‘Ž , π‘žπ‘Ÿ ), where 𝑄 is a finite set of control states; Ξ£, Ξ“
are the input and tape alphabets respectively, such that Ξ£ ⊊ Ξ“; 𝐡 ∈ Ξ“ βˆ– Ξ£ is the blank
symbol; 𝛿 : 𝑄 × Ξ“ β†’ 𝑄 × Ξ“ × {βˆ’1, 1} is the transition function, with βˆ’1 denoting moving
the tape head left, and 1 denoting moving the tape head right; π‘ž0 ∈ 𝑄 is the initial state;
π‘žπ‘Ž ∈ 𝑄 is the unique accepting state, i.e., if π‘₯ ∈ 𝐿 then 𝑀 on input π‘₯ eventually reaches
control state π‘žπ‘Ž ; π‘žπ‘Ÿ ∈ 𝑄 is the unique rejecting state, i.e., if π‘₯ βˆ•βˆˆ 𝐿 then 𝑀 on input π‘₯
eventually reaches π‘žπ‘Ÿ . Let 𝑐 = βˆ£Ξ“βˆ£ + ∣(Ξ“ × π‘„)∣, π‘š = 𝑝(𝑛) and π‘˜ = π‘π‘š . Without loss of
generality, we can make the following simplifying assumptions about 𝑀 .
1. 𝑀 cannot take any further steps once its control state is either π‘žπ‘Ž or π‘žπ‘Ÿ . Thus, π‘žπ‘Ž and π‘žπ‘Ÿ
are halting states of the machine 𝑀 .
2. When started in any configuration, 𝑀 reaches one of the halting states π‘žπ‘Ž or π‘žπ‘Ÿ within
π‘˜ steps.
Let Config = Ξ“βˆ— (Ξ“ × π‘„)Ξ“βˆ— . A configuration of 𝑀 on an input of length 𝑛 is a string
of length π‘š = 𝑝(𝑛) in Config, where the unique symbol in Ξ“ × π‘„ indicates the head
position as well as the control state. For a configuration 𝑠 = 𝑠1 𝑠2 β‹… β‹… β‹… π‘ π‘š ∈ Config, 𝑠𝑑(𝑠)
denotes the control state in 𝑠, π‘π‘œπ‘ (𝑠) denotes the position of the head, and π‘ π‘¦π‘š(𝑠) denotes
the input symbol being scanned. More formally, if 𝑖 = π‘π‘œπ‘ (𝑠) then 𝑠𝑖 = (𝑠𝑑(𝑠), π‘ π‘¦π‘š(𝑠)).
ACM Journal Name, Vol. V, No. N, Month 20YY.
30
β‹…
Let Σ𝑛 = {1, . . . 𝑝(𝑛)} × (Ξ“ × π‘„). For a configuration 𝑠, π‘ π‘‘π‘Ÿπ‘–π‘(𝑠) will denote the triple
(π‘π‘œπ‘ (𝑠), (π‘ π‘¦π‘š(𝑠), 𝑠𝑑(𝑠))) ∈ Σ𝑛 and for a sequence of configurations 𝜌 = 𝑠1 , 𝑠2 , . . . 𝑠ℓ ,
π‘ π‘‘π‘Ÿπ‘–π‘(𝜌) ∈ Ξ£βˆ—π‘› is the word π‘ π‘‘π‘Ÿπ‘–π‘(𝑠1 )π‘ π‘‘π‘Ÿπ‘–π‘(𝑠2 ) β‹… β‹… β‹… π‘ π‘‘π‘Ÿπ‘–π‘(𝑠ℓ ).
Recall that a valid computation of 𝑀 starting from a configuration 𝑠 is a sequence of
configurations 𝑠1 , 𝑠2 , . . . 𝑠ℓ such that 𝑠 = 𝑠1 and for each 𝑖 < β„“, 𝑠𝑖+1 follows from 𝑠𝑖
by one step of 𝑀 . The initial configuration on an input of size 𝑛 is of the form (Ξ£ ×
{π‘ž0 })Ξ£π‘›βˆ’1 𝐡 π‘šβˆ’π‘› . We will say that a word 𝑒 ∈ Ξ£βˆ—π‘› is valid from configuration 𝑠 iff there
is a valid computation 𝜌 starting from 𝑠 such that 𝑒 = π‘ π‘‘π‘Ÿπ‘–π‘(𝜌); observe that because 𝑀 is
deterministic there is at most one valid computation 𝜌 such that 𝑒 = π‘ π‘‘π‘Ÿπ‘–π‘(𝜌). Finally we
will say 𝑒 ∈ Ξ£βˆ—π‘› is valid, if it is valid from some configuration 𝑠.
Let 𝜎 = 𝜎1 𝜎2 β‹… β‹… β‹… πœŽπ‘› be an input of length 𝑛 to 𝑀 . We will construct an RatFPM π’žπœŽ
such that β„›<1 (π’žπœŽ ) βˆ•= βˆ… (and ℛ≀0 (π’žπœŽ ) βˆ•= βˆ…) if and only if 𝜎 ∈ 𝐿. Formally, π’žπœŽ =
(π‘„π’ž , π‘žπ‘ π’ž , π‘žπ‘Ÿπ’ž , 𝛿 π’ž ) will be a RatFPM over the alphabet Ξ£π’ž = Σ𝑛 βˆͺ {𝜏 }. The set of states
π‘„π’ž = {π‘žπ‘ π’ž , π‘žπ‘Ÿπ’ž } βˆͺ ({1, . . . , π‘š} × Ξ“ × π‘„) βˆͺ ({1, . . . , π‘š} × Ξ“). Thus, a state of π’žπœŽ is either
π‘žπ‘ π’ž , or π‘žπ‘Ÿπ’ž , or of the form (𝑖, π‘Ž), where 1 ≀ 𝑖 ≀ π‘š and π‘Ž ∈ Ξ“ βˆͺ (Ξ“ × π‘„). Intuitively, π’žπœŽ in
state (𝑖, π‘Ž) denotes that π‘–π‘‘β„Ž element of the current configuration of the computation of 𝑀
has value π‘Ž.
Before defining the transitions of π’žπœŽ , we define some concepts that we find useful. Consider any symbol (𝑖, (𝑏, π‘ž)) ∈ Σ𝑛 . Note that such a triple can either be an input symbol or a
state of π’žπœŽ . Let 𝛿(π‘ž, 𝑏) = (π‘ž β€² , 𝑐, 𝑑). For such a pair (𝑖, π‘Ž), we define 𝑛𝑒π‘₯𝑑 π‘ π‘‘π‘Žπ‘‘π‘’(𝑖, (𝑏, π‘ž))
and 𝑛𝑒π‘₯𝑑 π‘£π‘Žπ‘™(𝑖, (𝑏, π‘ž)) to be π‘ž β€² and 𝑐, respectively. We also define 𝑛𝑒π‘₯𝑑 π‘π‘œπ‘ (𝑖, (𝑏, π‘ž)) to
be 𝑖 + 𝑑. Given two such triples (𝑖, (𝑏, π‘ž)) and (𝑖′ , (𝑏′ , π‘ž β€² )), we say that (𝑖′ , (𝑏′ , π‘ž β€² )) is a
successor of (𝑖, (𝑏, π‘ž)) iff 𝑖′ = 𝑛𝑒π‘₯𝑑 π‘π‘œπ‘ (𝑖, (𝑏, π‘ž)) and π‘ž β€² = 𝑛𝑒π‘₯𝑑 π‘ π‘‘π‘Žπ‘‘π‘’(𝑖, (𝑏, π‘ž)).
The transitions of π’žπœŽ are defined as follows. From the initial state π‘žπ‘ π’ž , on input 𝜏 , there
are transitions to the states (𝑖, 𝑒𝑖 ) , for each 𝑖 ∈ {1, ..., π‘š} where 𝑒1 = (1, (𝜎1 , π‘ž0 )), and
for 1 < 𝑖 ≀ 𝑛, 𝑒𝑖 = (𝑖, πœŽπ‘– ), and for 𝑛 < 𝑖 ≀ π‘š, 𝑒𝑖 = (𝑖, 𝐡); the probability of each of
1
these transitions is π‘š
. Thus the input 𝜏 β€œsets up” the initial configuration when π’žπœŽ is in the
initial state π‘žπ‘ π’ž . From every other state on input 𝜏 there is a transition to the reject state π‘žπ‘Ÿπ’ž
with probability 1. Also, from the state π‘žπ‘ π’ž , on every input other than 𝜏 there is a transition
to π‘žπ‘Ÿπ’ž with probability 1. From π‘žπ‘Ÿπ’ž , on every input there is a transition back to itself with
probability 1.
We now define the transitions on the input symbols in Σ𝑛 . Consider an input symbol π‘₯
of the form (𝑖, (𝑏, π‘ž)). Intuitively, such an input denotes π‘ π‘‘π‘Ÿπ‘–π‘(𝑠) of the next configuration
𝑠 in the computation; thus, it denotes the new head position, new state, and the new symbol
being scanned. If π‘ž = π‘žπ‘Ÿ , then from every state there is a transition to the reject state π‘žπ‘Ÿπ’ž
with probability 1 on input π‘₯. We have the following transitions on input π‘₯ for the case
when π‘ž = π‘žπ‘Ž . From every state, of π’žπœŽ , of the form (𝑗, 𝑐), where 𝑐 ∈ Ξ“, there is a transition
to π‘žπ‘ π’ž with probability 1. From every state of the form (𝑗, (𝑐, π‘ž β€² )), there is a transition to
π‘žπ‘ π’ž with probability 1 if π‘₯ is a successor of (𝑗, (𝑐, π‘ž β€² )); otherwise there is a transition to
π‘žπ‘Ÿπ’ž from (𝑗, (𝑐, π‘ž β€² )) with probability 1. Intuitively, these transitions allow the automaton
to start from the initial state again, if the computation described by the input symbols is
accepting. Next, we describe the transitions when π‘ž ∈
/ {π‘žπ‘Ž , π‘žπ‘Ÿ }. From a state of the form
(𝑗, 𝑐), where 𝑐 ∈ Ξ“, transitions on input π‘₯ = (𝑖, (𝑏, π‘ž)) are defined as follows. If 𝑗 = 𝑖
and 𝑏 βˆ•= 𝑐 then there is a single transition with probability 1 to the reject state π‘žπ‘Ÿπ’ž ; this
means the contents of the cell specified by π‘₯ does not match with the one specified by the
state. If 𝑗 = 𝑖 and 𝑐 = 𝑏 then there is a single transition with probability 1 to the state
ACM Journal Name, Vol. V, No. N, Month 20YY.
β‹…
31
(𝑖, (𝑏, π‘ž)). If 𝑗 βˆ•= 𝑖 then there are two transitions each with probability 12 to the states
(𝑗, 𝑐) and (𝑖, (𝑏, π‘ž)). Note that the former transition is a self loop denoting that the contents
of the cell did not change; the later, called cross transition, is to the state denoting new
head position and control state. Transitions from a state of the form (𝑗, (𝑐, π‘ž β€² )) on input
π‘₯ = (𝑖, (𝑏, π‘ž)), where π‘ž βˆ•= π‘žπ‘Ž , π‘žπ‘Ÿ , are defined as follows. If π‘₯ is a successor of the pair
(𝑗, (𝑐, π‘ž β€² )) then there are two transitions, each with probability 21 , to the states (𝑗, 𝑑) and
(𝑖, (𝑏, π‘ž)), where 𝑑 = 𝑛𝑒π‘₯𝑑 π‘£π‘Žπ‘™(𝑗, (𝑐, π‘ž β€² )). If the above condition does not hold then there
is a single transition to the reject state π‘žπ‘Ÿπ’ž with probability 1.
Before proving the correctness of the reduction, we formally spell out some properties
π’žπœŽ satisfies. These properties capture the intuition behind the correctness. Consider an
input sequence 𝑒 ∈ Ξ£βˆ—π‘› such that 𝑒 does not contain 𝜏 and does not contain any symbol of
the form (𝑖, (𝑏, π‘žπ‘Ž )) or of the form (𝑖, (𝑏, π‘žπ‘Ÿ )) for any 𝑖, 𝑏.
A. Let 𝜌 be a valid computation starting from configuration 𝑠 and ending in configuration
𝑠′ such that 𝑒 = π‘ π‘‘π‘Ÿπ‘–π‘(𝜌). Suppose further that the 𝑗 π‘‘β„Ž symbol of 𝑠 is π‘Ž ∈ Ξ“ βˆͺ (Ξ“ × π‘„).
Then on input 𝑒 from state (𝑗, π‘Ž), π’žπœŽ has a non-zero probability of reaching the state
𝑒 ∈ π‘„π’ž iff 𝑒 = (𝑖, 𝑏) for some 𝑖 ∈ {1, ..., π‘š}, 𝑏 ∈ Ξ“ βˆͺ (Ξ“ × π‘„) and the π‘–π‘‘β„Ž symbol of 𝑠′
is 𝑏, and either 𝑖 = 𝑗 or 𝑒 contains a symbol of the form (𝑖, (𝑐, π‘ž β€² )) for some 𝑐, π‘ž β€² . This
is because of the cross transitions. One consequence of this is that, on input 𝑒 from state
(𝑗, π‘Ž), π’žπœŽ has probability zero of reaching the rejecting state π‘žπ‘Ÿπ’ž .
B. If 𝑒 is not valid starting from any configuration then from any state (𝑗, π‘Ž), on input 𝑒,
1
π’žπœŽ reaches the reject state π‘žπ‘Ÿπ’ž with probability at least 2βˆ£π‘’βˆ£
where βˆ£π‘’βˆ£ is the length of 𝑒.
The above property is proved to hold as follows. Since 𝑒 is not valid from any configuration, it can be shown that one of the following two conditions is satisfied: (i) there
exist two input symbols π‘₯, 𝑦 appearing consecutively in that order in 𝑒 such that 𝑦 is not
a successor of u; (ii) there exist two input symbols π‘₯ = (𝑖, (𝑏, π‘ž)), 𝑦 = (𝑖, (𝑐, π‘Ÿ)) such
that π‘₯ appears sometimes before 𝑦 in 𝑒, no other symbol of the form (𝑖, (𝑐′ , π‘ž β€² )), for
any 𝑐′ , π‘ž β€² , appears in between them and 𝑐 βˆ•= 𝑛𝑒π‘₯𝑑 π‘£π‘Žπ‘™(𝑖, (𝑏, π‘ž)). Let 𝑒′ be the smallest
prefix of 𝑒 that violates condition (i) or (ii). We show that π‘žπ‘Ÿπ’ž is reachable from (𝑗, π‘Ž)
on input 𝑒′ by a sequence of transitions of π’žπœŽ . The lower bound on the probability follows since probability of each of the transitions is at least 21 . Assume that 𝑒′ violates
condition (i). Then, 𝑒′ = 𝑒′′ π‘₯𝑦. The state π‘₯ is reachable from (𝑗, π‘Ž) on input 𝑒′′ π‘₯ and
there is a transition from state π‘₯ to π‘žπ‘Ÿπ’ž on input 𝑦 and hence π‘žπ‘Ÿπ’ž is reachable from (𝑗, π‘Ž).
Now assume that 𝑒′ violates condition (ii). In this case 𝑒′ = 𝑣π‘₯𝑀𝑦 where 𝑣, 𝑀 are input
sequences and π‘₯, 𝑦 are input symbols as given in (ii). It should be easy to see that the
states π‘₯, (𝑖, 𝑛𝑒π‘₯𝑑 π‘£π‘Žπ‘™(π‘₯)), respectively, are reachable from (𝑗, π‘Ž) on the input sequences
𝑣π‘₯, 𝑣π‘₯𝑀. From this, we see that π‘žπ‘Ÿπ’ž is reachable from (𝑗, π‘Ž) on input 𝑒′ since there is a
transition from (𝑖, 𝑛𝑒π‘₯𝑑 π‘£π‘Žπ‘™(π‘₯)) on the input symbol 𝑦 to π‘žπ‘Ÿπ’ž , as 𝑐 βˆ•= 𝑛𝑒π‘₯𝑑 π‘£π‘Žπ‘™(π‘₯).
C. Let 𝑠0 be the initial configuration, i.e., 𝑠0 = (𝜎1 , π‘ž0 ), 𝜎2 , ..., πœŽπ‘› . Let 𝑒 ∈ Ξ£βˆ—π‘› be such
that it is not valid from 𝑠0 . Then, the finite string 𝜏 𝑒 is rejected by π’žπœŽ with probability
greater than or equal to ( 21 )βˆ£π‘’βˆ£ .
We will now show that our construction of π’žπœŽ satisfies the following property. If 𝜌 is the
πœ”
accepting computation of 𝑀 on 𝜎 then πœ‡π‘Žπ‘π‘
π’žπœŽ , 𝛼 = 1, where 𝛼 = (𝜏 π‘ π‘‘π‘Ÿπ‘–π‘(𝜌)) . On the other
πœ”
hand, if 𝑀 does not accept 𝜎 then πœ‡π‘Ÿπ‘’π‘—
π’žπœŽ , 𝛼 = 1 for every 𝛼 ∈ Ξ£π’ž . Based on this property,
ℛ≀0 (π’žπœŽ ) βˆ•= βˆ… and β„›<1 (π’žπœŽ ) βˆ•= βˆ… iff 𝑀 accepts 𝜎, which proves the PSPACE-hardness of
the non-emptiness problem. We now prove that our claim holds.
ACM Journal Name, Vol. V, No. N, Month 20YY.
32
β‹…
Let 𝜌 be the accepting computation of 𝑀 on 𝜎. Observe that on input (𝑖, (𝑏, π‘žπ‘Ž )), π’žπœŽ
goes to the initial state π‘žπ‘ π’ž with probability 1 from every state except the reject state π‘žπ‘Ÿπ’ž .
This coupled with property A above, ensures that π›Ώπ‘’π’ž (π‘žπ‘ π’ž , π‘žπ‘ π’ž ) = 1, where 𝑒 = 𝜏 π‘ π‘‘π‘Ÿπ‘–π‘(𝜌).
Thus, π‘’πœ” is accepted with probability 1 by π’žπœŽ .
Now we prove the more difficult part of the claim, namely, that if 𝑀 rejects 𝜎, π’žπœŽ rejects
every input sequence with probability 1. The proof is by cases on the form of the input
word 𝛼 to π’žπœŽ . Observe that if 𝛼 is not of the right form, i.e., does not begin with 𝜏 or does
not have a 𝜏 immediately following a symbol of the form (𝑖, (𝑏, π‘žπ‘Ž )) or every 𝜏 (except
the first one) is not preceded by a symbol of the form (𝑖, (𝑏, π‘žπ‘Ž )) then 𝛼 is rejected with
probability 1. Next if 𝛼 contains any symbol of the form (𝑖, (𝑏, π‘žπ‘Ÿ )) then also 𝛼 is rejected
with probability 1.
Let us now consider the case when 𝛼 has infinitely many symbols of the form (𝑖, (𝑏, π‘žπ‘Ž )).
Since π’žπœŽ will reject any input in which such symbols are not immediately followed by 𝜏 ,
we can assume without loss of generality that 𝛼 = 𝜏 𝑒1 𝜏 𝑒2 𝜏 β‹… β‹… β‹… , where 𝑒𝑖 ∈ Ξ£βˆ—π‘› and ends
with a symbol of the form (𝑖, (𝑏, π‘žπ‘Ž )). Now, since 𝜎 is rejected by 𝑀 , for every 𝑖 β‰₯ 1, we
have the following properties. The sequence 𝑒𝑖 is not valid from the initial configuration.
Hence from property C, π’žπœŽ , on input 𝜏 𝑒𝑖 , reaches the reject state with probability at least
( 21 )βˆ£π‘’π‘– ∣ . From the simplifying assumption 2, we have βˆ£π‘’π‘– ∣ ≀ π‘˜, and hence the probability
of rejection of 𝜏 𝑒𝑖 is at least ( 12 )π‘˜ . Hence, πœ‡π‘Ÿπ‘’π‘—
π’žπœŽ , 𝛼 = 1.
Finally, suppose 𝛼 has only finitely many symbols of the form (𝑖, (𝑏, π‘žπ‘Ž )) (each of which
is followed by 𝜏 ) and no symbols of the form (𝑖, (𝑏, π‘žπ‘Ÿ )). Observe that we may also assume
that every 𝜏 symbol (except the first) is immediately preceded by a symbol of the form
(𝑖, (𝑏, π‘žπ‘Ž )) (as otherwise 𝛼 will be rejected with probability 1). Thus 𝛼 = 𝑒′ 𝜏 𝛽, where
𝛽 ∈ Ξ£πœ”
𝑛 and does not contain any symbol of the form (𝑖, (𝑏, π‘žπ‘Ž )) or (𝑖, (𝑏, π‘žπ‘Ÿ )). Let us
divide 𝛽 into sequences of length π‘˜, i.e., 𝛽 = 𝑒1 𝑒2 β‹… β‹… β‹… , where βˆ£π‘’π‘– ∣ = π‘˜. Based on the
simplifying assumption 2, made about 𝑀 , we can conclude that each 𝑒𝑖 is not valid (from
any configuration). Let 𝑆0 be the set of states of π’žπœŽ reached after the input sequence 𝑒′ 𝜏 ,
and for 𝑗 β‰₯ 1, let 𝑆𝑗 be the set of states of π’žπœŽ reached after the input sequence 𝑒′ 𝜏 𝑒1 ...𝑒𝑗 .
From the property B, we see that for 𝑗 β‰₯ 1, from every state 𝑝′ in π‘†π‘—βˆ’1 , the automaton
state π‘žπ‘Ÿπ’ž is reachable on the input sequence 𝑒𝑗 with probability at least 21π‘˜ . Hence we see
that 𝛼 is rejected with probability 1.
M SC: We will show that the emptiness problem for M SC is co-R.E.-hard. The proof
will rely on co-R.E.-hardness of the emptiness problem for Probabilistic Finite Automata
(PFA). Therefore, before presenting our proof, we recall the basic definitions associated
with such automata. Formally, a PFA over alphabet Ξ£ is β„³ = (𝑄, π‘žπ‘  , 𝐹, 𝛿), where 𝑄
is a finite set of states, π‘žπ‘  ∈ 𝑄 is the initial state, 𝐹 βŠ† 𝑄 are the final states, and 𝛿 :
𝑄 × Ξ£ × π‘„ β†’ [0, 1] is the probabilistic transition function that satisfies
the same properties
βˆ‘
as the one for FPMs. Given π‘₯ ∈ [0, 1], β„’>π‘₯ (β„³) = {𝑒 ∈ Ξ£βˆ— ∣ π‘žβˆˆπΉ 𝛿𝑒 (π‘žπ‘  , π‘ž) > π‘₯}. The
main result that we will use is the following.
T HEOREM 6.7 C ONDON -L IPTON [C ONDON AND L IPTON 1989]. Given a PFA β„³ over
alphabet Ξ£ the problem of determining if β„’> 12 (β„³) = βˆ… is co-R.E.-complete.
Using this result we can show,
T HEOREM 6.8. For a FPM β„³ over an alphabet Ξ£, and rational π‘₯ ∈ (0, 1) the problem
of determining if β„›<π‘₯ (β„³) = βˆ… is co-R.E.-hard.
ACM Journal Name, Vol. V, No. N, Month 20YY.
β‹…
33
P ROOF. We will actually prove this result for the case when π‘₯ = 12 ; Lemma 4.10 will
then allow us to conclude for any π‘₯ ∈ (0, 1). The proof of co-R.E.-hardness relies on a
reduction from the emptiness problem of PFAs. Let β„³ = (𝑄, π‘žπ‘  , 𝐹, 𝛿) be a PFA over the
alphabet Ξ£. We will construct a FPM β„³β€² such that β„’> 12 (β„³) = βˆ… iff β„›< 21 (β„³β€² ) = βˆ….
Pick a new symbol 𝜏 βˆ•βˆˆ Ξ£ and let Ξ£β€² = Ξ£ βˆͺ {𝜏 }. Formally β„³β€² = (𝑄′ , π‘žπ‘  , π‘žπ‘Ÿ , 𝛿 β€² ) will be
a FPM over alphabet Ξ£β€² . The set of states 𝑄′ = 𝑄 βˆͺ {π‘žπ‘Ž , π‘žπ‘Ÿ }, where π‘žπ‘Ž , π‘žπ‘Ÿ will be assumed
to be new states not in 𝑄. 𝛿 β€² will be defined as follows. First we describe transitions out
of the new states π‘žπ‘Ž and π‘žπ‘Ÿ : for every π‘Ž ∈ Ξ£β€² , 𝛿 β€² (π‘žπ‘Ž , π‘Ž, π‘žπ‘Ž ) = 𝛿 β€² (π‘žπ‘Ÿ , π‘Ž, π‘žπ‘Ÿ ) = 1. Next
we describe the transitions on the new symbol 𝜏 : if π‘ž ∈ 𝐹 then 𝛿 β€² (π‘ž, 𝜏, π‘žπ‘Ž ) = 1 and if
π‘ž ∈ 𝑄 βˆ– 𝐹 then 𝛿(π‘ž, 𝜏, π‘žπ‘Ÿ ) = 1. Finally, for all the old states π‘ž ∈ 𝑄, on all the input
symbols π‘Ž ∈ Ξ£, we will define transitions as follows:
{1
if π‘ž β€² = π‘žπ‘Ž or π‘ž β€² = π‘žπ‘Ÿ
β€²
β€²
𝛿 (π‘ž, π‘Ž, π‘ž ) = 31
β€²
β€²
3 𝛿(π‘ž, π‘Ž, π‘ž ) if π‘ž ∈ 𝑄
We will now prove the correctness of the above reduction. On
any string 𝛼 ∈ Ξ£πœ”
βˆ‘βˆž
1
1 𝑖
(i.e., when 𝛼 does not have any 𝜏 symbols), we have πœ‡π‘Ÿπ‘’π‘—
=
β„³β€² , 𝛼
𝑖=1 ( 3 ) = 2 . Thus,
β„›< 12 (β„³β€² ) ∩ Ξ£πœ” = βˆ…. Let us now consider 𝛼 ∈ (Ξ£β€² )πœ” βˆ– Ξ£πœ” . Such a word can be written
βˆ‘
as: 𝛼 = π‘’πœ 𝛼′ , where 𝑒 ∈ Ξ£βˆ— . Let 𝜌 = π‘žβˆˆπΉ 𝛿𝑒 (π‘žπ‘  , π‘ž), i.e., the acceptance probability of
𝑒 in β„³. Now, suppose 𝜌 > 12 . Then
βˆ‘βˆ£π‘’βˆ£ 1 𝑖
1 βˆ£π‘’βˆ£
πœ‡π‘Žπ‘π‘
β„³β€² , 𝛼 β‰₯ (
𝑖=1 ( 3 ) ) + ( 3 ) 𝜌
= 12 (1 βˆ’ ( 13 )βˆ£π‘’βˆ£ ) + ( 13 )βˆ£π‘’βˆ£ 𝜌 > 12
1
β€²
By a symmetric argument, if 𝜌 ≀ 12 , then πœ‡π‘Ÿπ‘’π‘—
β„³β€² , 𝛼 β‰₯ 2 . Thus, a word of the form π‘’πœ 𝛼 is in
β€²
β€²
β„›< 21 (β„³ ) iff 𝑒 ∈ β„’> 12 (β„³). Hence, β„›< 21 (β„³ ) = βˆ… iff β„’> 21 (β„³) = βˆ….
M NC: We will show that the emptiness problem for M NC is R.E.-hard. The proof will
be a highly non-trivial modification of the proof of co-R.E.-hardness of emptiness of PFA
[Condon and Lipton 1989].
T HEOREM 6.9. For a FPM β„³ and rational π‘₯ ∈ (0, 1) the problem of determining if
ℛ≀π‘₯ (β„³) = βˆ… is R.E.-hard.
P ROOF. It suffices to show that the problem of determining whether ℛ≀ 21 (β„³) is nonempty is co-R.E.-hard. This is exhibited by a reduction from the problem of non-termination
of a deterministic two-counter machine on an empty input. The reduction is carried in two
steps.
The first step of the construction is a modification of the PFA used in proof of co-R.E.hardness of emptiness of PFA. Given a deterministic 2-counter machine π’ž we construct a
monitor β„³ as follows. The monitor β„³ has an absorbing accept state π‘žπ‘Ž and an absorbing
reject state π‘žπ‘Ÿ (by an absorbing state π‘ž, we mean that probability of transitioning from π‘ž to
π‘ž is 1 for every input symbol). The input alphabet of β„³ is the set of control states of π’ž, left
bracket (, right bracket ), 0, 1, π‘Ž and 𝑏. The constructed monitor checks whether a given
sequence of inputs determine a valid computation of π’ž on empty input. The computation
of π’ž is represented as a sequence of consecutive configurations of π’ž. A configuration of
π’ž represented by the tuple (π‘ž, 𝑖, 𝑖′ ) is input as left bracket (; followed by a control state
π‘ž; followed by two bits which indicate whether the two counters are zero or not (the bit
0 a counter value of 0 and the bit 1 represents a non-zero counter value); followed by
ACM Journal Name, Vol. V, No. N, Month 20YY.
34
β‹…
β€²
the input sequence π‘Žπ‘– 𝑏𝑖 which represent the counter values in unary; and ending in right
bracket ). If π‘žπ‘  is the initial state of β„³, the construction will ensure that for any word
𝛼 and 𝑗 ∈ β„•, 𝛿𝛼[1:𝑗] (π‘žπ‘  , π‘žπ‘Ÿ ) β‰₯ 𝛿𝛼[1:𝑗] (π‘žπ‘  , π‘žπ‘Ž ). If a word 𝛼 represents a valid infinite
computation then 𝛿𝛼[1:𝑗] (π‘žπ‘  , π‘žπ‘Ÿ ) = 𝛿𝛼[1:𝑗] (π‘žπ‘  , π‘žπ‘Ž ) for all 𝑗 β‰₯ 1 such that 𝛼(𝑗) =). If a
word 𝛼 does not represent a valid infinite computation then there would be a 𝑗0 such that
𝛿𝛼[1:𝑗] (π‘žπ‘  , π‘žπ‘Ÿ ) > 𝛿𝛼[1:𝑗] (π‘žπ‘  , π‘žπ‘Ž ) for all 𝑗 β‰₯ 𝑗0 .
The machine β„³ checks if in the first input configuration, the control state is the start
state of π’ž and both the counter values are 0. Otherwise, it rejects the input with probability
1 (i.e., makes a transition to π‘žπ‘Ÿ with probability 1). Similarly, if ever the monitor β„³
receives an input symbol of the wrong kind (for example, if the monitor receives a state π‘ž
when it is expecting π‘Ž or 𝑏) then β„³ rejects the rest of the input with probability 1.
The monitor β„³ also has to check that consecutive input configurations, say (π‘ž, 𝑖, 𝑖′ ) and
β€²
(π‘ž , 𝑗, 𝑗 β€² ), are in accordance with the transition function of the 2-counter automaton. If
there is no transition from π‘ž to π‘ž β€² in π’ž or if one of the counter values 𝑗, 𝑗 β€² is zero (or, nonzero) when it is not supposed to be, then the rest of the input is rejected with probability 1.
The main challenge is in checking the counter values across the transition using only finite
number of states. This problem reduces to checking whether two strings have equal length
using only finite memory of the monitors. For the case of PFA’s, this is accomplished by a
weak equality test described in [Condon and Lipton 1989; Freivalds 1981] as follows. We
recall the equality test described there. Suppose we want to check that for two strings π‘Žπ‘–
and π‘Žπ‘— , 𝑖 = 𝑗. Then while processing π‘Žπ‘–
(1a). Toss 2𝑖 fair coins and note if all of them turned heads.
(2a). Toss a separate set of 𝑖 fair coins and note if all of them turned heads.
(3a). Toss yet another set of 𝑖 fair coins and note if all of them turned heads.
While processing π‘Žπ‘—
(1b). Toss 2𝑗 fair coins and note if all of them turned heads.
(2b). Toss a separate set of 𝑗 fair coins and note if all of them turned heads.
(3b). Toss yet another set of 𝑗 fair coins and note if all of them turned heads.
As in [Condon and Lipton 1989], we define event 𝐴 as either all coins turn up heads in (1a)
or all coins turn up heads in (1b). We define event 𝐡 as either all coins turn up heads in
(2a) as well as (2b) or all coins turn up heads in (3a) as well as (3b). We reject (that is make
a transition to π‘žπ‘Ÿ with probability 1) if event 𝐴 is true and 𝐡 is not true and accept (that
is make a transition to π‘žπ‘Ž with probability 1) if 𝐡 is true and 𝐴 is not true. If 𝑖 = 𝑗 then
as explained in [Condon and Lipton 1989], the probability of acceptance and rejection
is equal (note each of them may be less than 21 ), otherwise probability of transitioning
to reject state is strictly larger than probability of acceptance. We shall slightly modify
this test. The main problem in using this test directly is that the input configuration may
have an unbounded number of π‘Žβ€™s and in that case we never make a transition to either
π‘žπ‘Ž or π‘žπ‘Ÿ . Hence, in this case, we will not be able to guarantee that there is a 𝑗0 such that
𝛿𝛼[1:𝑗] (π‘žπ‘  , π‘žπ‘Ÿ ) > 𝛿𝛼[1:𝑗] (π‘žπ‘  , π‘žπ‘Ž ) for each 𝑗 > 𝑗0 .
We modify the weak equality test as follows. We will still conduct the experiments (1a),
(2a), (3a), as above. Let 𝐴0 be the event such that all coins turn up heads in (1a). Now,
when we process π‘Žπ‘— we will still conduct experiments (1b), (2b) and (3b) but take certain
extra actions while scanning the input as described below.
ACM Journal Name, Vol. V, No. N, Month 20YY.
β‹…
35
β€”Assume first the case that event 𝐴0 is true. Now, while scanning π‘Žπ‘— , we check if both of
the following events happen- at least one coin turns up tails in (2a) or (2b), and at least
one coin turns up tails in (3a) or (3b). If both of the above events are true then we reject
the input. Note that if 𝑗 is unbounded, this rejection will happen with probability 1 given
that 𝐴0 is true. Also note that if 𝑗 is bounded and if both the above events happened,
then the input would have been rejected anyways in the original weak equality test. If
𝑗 is bounded and we have not rejected the input, then at the end of scanning of π‘Žπ‘— we
check for events 𝐴 and 𝐡 as above. If 𝐴 is true and 𝐡 is false, we reject the input. If 𝐴
is false and 𝐡 is true, then we accept the input. Otherwise we continue processing the
rest of the input.
β€”Assume now that 𝐴0 is false. Now, while scanning π‘Žπ‘— , check if all three of the following
events happen- at least one coin turns up tails in (1b), at least one coin turns up tails
in (2a) or (2b), and at least one coin turns up tails in (3a) or (3b). If all three of the
above events are true then we start accepting (that is transiting to π‘žπ‘Ž ) and rejecting (that
is transiting to π‘žπ‘Ÿ ) the succeeding input with probability 31 each until we detect the end
of π‘Žπ‘— . Note if 𝑗 is unbounded, then with probability 1 all three events will happen and
asymptotically we will accept and reject with probability 12 . If 𝑗 is bounded, then at the
end of scanning of π‘Žπ‘— we check for events 𝐴 and 𝐡 as above. (note if the above three
events happen at some point while scanning π‘Žπ‘— then both 𝐴 and 𝐡 are going to be false).
If 𝐴 is true and 𝐡 is false, we reject the input. If 𝐴 is false and 𝐡 is true, then we accept
the input. Otherwise we continue processing the rest of the input.
These tests ensure that if 𝑗 is unbounded, then the probability of transitioning to the
reject state is > 12 . In the case 𝑗 is bounded and 𝑖 = 𝑗 then probability of transitioning to
accept state π‘žπ‘Ž is exactly equal to the probability of transitioning to reject state π‘žπ‘Ÿ . If 𝑗 is
bounded and 𝑖 βˆ•= 𝑗 then probability of transitioning to accept state π‘žπ‘Ž is strictly less than
the probability of transitioning to reject state π‘žπ‘Ÿ .
Finally, while checking the input, the monitor β„³ rejects if the state of the current configuration is a halting state. Let π‘žπ‘  be the start state of the monitor β„³ and 𝛿 the transition function of β„³. For 𝛼, let 𝛿𝛼 (π‘žπ‘  , π‘žπ‘Ž ) = limπ‘—β†’βˆž 𝛿𝛼[1:𝑗] (π‘žπ‘  , π‘žπ‘Ž ) and 𝛿𝛼 (π‘žπ‘  , π‘žπ‘Ÿ ) =
limπ‘—β†’βˆž 𝛿𝛼[1:𝑗] (π‘žπ‘  , π‘žπ‘Ÿ ). It is easy to see that for the monitor β„³, a finite word 𝑒 and an
infinite word 𝛼, the following facts are true–
(1) 𝛿𝑒 (π‘žπ‘  , π‘žπ‘Ÿ ) β‰₯ 𝛿𝑒 (π‘žπ‘  , π‘žπ‘Ž ).
(2) If 𝑒 represents a valid finite computation of the counter machine π’ž, 𝑒 does not contain
the halting state and 𝑒 ends in the symbol ) then 𝛿𝑒 (π‘žπ‘  , π‘žπ‘Ÿ ) = 𝛿𝑒 (π‘žπ‘  , π‘žπ‘Ž ) < 21 .
(3) If 𝑒 contains a halting state then 𝛿𝑒 (π‘žπ‘  , π‘žπ‘Ÿ ) > 12 .
(4) If the input 𝛼 does not represent a valid infinite computation then there is some 𝑗0 such
that 𝛿𝛼[1:𝑗] (π‘žπ‘  , π‘žπ‘Ÿ ) > 𝛿𝛼[1:𝑗] (π‘žπ‘  , π‘žπ‘Ž ) for all 𝑗 > 𝑗0 .
(5) If there is some unbounded counter in some input configuration, then 𝛿𝛼 (π‘žπ‘  , π‘žπ‘Ÿ ) > 21 .
In particular, if 𝛼 does not contain an infinite number of states of the counter machine
π’ž then 𝛿𝛼 (π‘žπ‘  , π‘žπ‘Ÿ ) > 12 . Furthermore, if word 𝛼 does not contain an infinite number of
states of the counter machine then 𝛿𝛼 (π‘žπ‘  , π‘žπ‘Ž ) + 𝛿𝛼 (π‘žπ‘  , π‘žπ‘Ÿ ) = 1.
(6) If the input 𝛼 represents a valid infinite computation then 𝛿𝛼 (π‘žπ‘  , π‘žπ‘Ÿ ) = 𝛿𝛼 (π‘žπ‘  , π‘žπ‘Ž ).
Furthermore, if 𝛼(𝑗) =) then 𝛿𝛼[1:𝑗] (π‘žπ‘  , π‘žπ‘Ÿ ) = 𝛿𝛼[1:𝑗] (π‘žπ‘  , π‘žπ‘Ž ).
Now, we obtain β„³1 by modifying β„³ as follows. Whenever we process the control state
in a new input configuration, we accept (that is make a transition to π‘žπ‘Ž ) and reject (that is
ACM Journal Name, Vol. V, No. N, Month 20YY.
36
β‹…
make a transition to π‘žπ‘Ÿ ) with probability 31 . It is easy to see that for β„³1 and word 𝛼, we
have that
1
(1) If 𝛼 contains a halting state or represents an invalid computation then πœ‡π‘Ÿπ‘’π‘—
β„³1 , 𝛼 > 2 .
1
(2) If the input 𝛼 represents a valid infinite computation then πœ‡π‘Ÿπ‘’π‘—
β„³1 , 𝛼 = 2 .
Thus, ℛ≀ 12 (β„³1 ) is non-empty iff π’ž has an infinite computation.
6.3
Universality Problem: Upper Bounds
In this section, we will establish upper bounds for the universality problem of RatFPM’s.
M SA: The universality problem for M SA is easily seen to be in NL.
T HEOREM 6.10. For a RatFPM β„³ on alphabet Ξ£, the problem of checking the universality of ℛ≀0 (β„³) is in NL.
P ROOF. Let β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿) and let Ξ£ be the alphabet. Consider the direct graph
G = (𝑉, 𝐸) constructed (in log-space) as follows. The set of vertices 𝑉 is 𝑄 and (π‘ž1 , π‘ž2 ) ∈
𝐸 iff there exists an π‘Ž ∈ Ξ£ such that 𝛿(π‘ž1 , π‘Ž, π‘ž2 ) > 0. It is easy to see that ℛ≀0 (β„³) is not
universal iff there is a directed path from π‘žπ‘  to π‘žπ‘Ÿ in G. The result follows from the fact that
the latter problem is known to be in NL, and NL=co-NL [Szelepcsenyi 1987; Immerman
1988].
M WA: We will show that the universality problem for M WA is in PSPACE. The proof
depends on showing that the set β„›=1 (β„³) = {𝛼 ∈ Ξ£πœ” βˆ£πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 = 1} contains an ultimately
periodic word.
L EMMA 6.11. Given a FPM β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿), a state π‘ž ∈ 𝑄 and a finite word 𝑒 ∈
Ξ£+ , let post(π‘ž, 𝑒) = {π‘ž β€² ∈ 𝑄 ∣ 𝛿𝑒 (π‘ž, π‘ž β€² ) > 0}. The set β„›=1 (β„³) = {𝛼 ∈ Ξ£πœ” βˆ£πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 = 1}
is non-empty iff there are 𝑒, 𝑣 ∈ Ξ£+ such that the following conditions hold–
β€”post(π‘žπ‘  , 𝑒) = post(π‘žπ‘  , 𝑒𝑣)
β€”For each π‘ž ∈ post(π‘žπ‘  , 𝑒), π‘žπ‘Ÿ ∈ post(π‘ž, 𝑣).
P ROOF. (β‡’). Fix 𝛼 such that πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 = 1. For each integer 𝑗 > 0, let 𝑄𝑗 = post(π‘žπ‘  , 𝛼[1 :
𝑗]). Now since 𝑄𝑗 βŠ† 𝑄 and 𝑄 is a finite set, there exists an infinite sequence of natural
numbers 1 < 𝑗1 < 𝑗2 < 𝑗3 , . . . such π‘„π‘—π‘Ÿ = 𝑄𝑗𝑠 for all π‘Ÿ, 𝑠 ∈ β„•. Let 𝑒 = 𝛼[1 : 𝑗1 ]. As
πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 = 1, it must be the case that for each π‘ž ∈ post(π‘žπ‘  , 𝑒) there is some π‘˜π‘ž β‰₯ 1 such that
𝛿𝛼[𝑗1 +1,𝑗1 +π‘˜π‘ž ] (π‘ž, π‘žπ‘Ÿ ) > 0. Pick π‘—π‘Ÿ such that π‘—π‘Ÿ β‰₯ 𝑗1 + π‘˜π‘ž for each π‘ž ∈ post(π‘žπ‘  , 𝑒). Let
𝑣 = 𝛼[𝑗1 + 1, π‘—π‘Ÿ ]. Clearly 𝑒, 𝑣 are the required words.
(⇐). Suppose that 𝑒, 𝑣 are such that post(π‘žπ‘  , 𝑒) = post(π‘žπ‘  , 𝑒𝑣) and for each π‘ž ∈
post(π‘žπ‘  , 𝑒), π‘žπ‘Ÿ ∈ post(π‘ž, 𝑣). From post(π‘žπ‘  , 𝑒) = post(π‘žπ‘  , 𝑒𝑣), we have that post(π‘žπ‘  , 𝑒) =
post(π‘žπ‘  , 𝑒𝑣 𝑗 ) for all 𝑗 ∈ β„•. Let 𝑄0 = post(π‘žπ‘  , 𝑒) = post(π‘žπ‘  , 𝑒𝑣 𝑗 ).
Consider the word 𝛼 = 𝑒𝑣 πœ” . We show that 𝑒𝑣 πœ” ∈ β„›=1 (β„³). Note that we have
π‘Ÿπ‘’π‘—
πœ‡β„³, 𝛼 = limπ‘—β†’βˆž 𝛿𝑒𝑣𝑗 (π‘žπ‘  , π‘žπ‘Ÿ ) = 1 βˆ’ limπ‘—β†’βˆž 𝛿𝑒𝑣𝑗 (π‘žπ‘  , 𝑄0 βˆ– {π‘žπ‘Ÿ }). Thus, it suffices to
show that limπ‘—β†’βˆž 𝛿𝑒𝑣𝑗 (π‘žπ‘  , 𝑄0 βˆ– {π‘žπ‘Ÿ }) = 0. Observe that–
(1) 𝛿𝑒 (π‘žπ‘  , 𝑄0 βˆ– {π‘žπ‘Ÿ }) ≀ 1.
(2) Let π‘₯ = minπ‘žβˆˆπ‘„0 (𝛿𝑣 (π‘ž, π‘žπ‘Ÿ )). We have that π‘₯ > 0. It is easy to see that 𝛿𝑒𝑣𝑗+1 (π‘žπ‘  , 𝑄0 βˆ–
{π‘žπ‘Ÿ }) ≀ (1 βˆ’ π‘₯)𝛿𝑒𝑣𝑗 (π‘žπ‘  , 𝑄0 βˆ– {π‘žπ‘Ÿ }).
ACM Journal Name, Vol. V, No. N, Month 20YY.
β‹…
37
Thus, by induction 𝛿𝑒𝑣𝑗 (π‘žπ‘  , 𝑄0 βˆ– {π‘žπ‘Ÿ }) ≀ (1 βˆ’ π‘₯)𝑗 . As π‘₯ > 0, we get that
lim 𝛿𝑒𝑣𝑗 (π‘žπ‘  , 𝑄0 βˆ– {π‘žπ‘Ÿ }) = 0.
π‘—β†’βˆž
We get as an immediate corollary that there is an ultimately periodic word in β„›=1 (β„³) =
{𝛼 ∈ Ξ£πœ” βˆ£πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 = 1}.
C OROLLARY 6.12. Let β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿) be a FPM on an alphabet Ξ£. Then β„›=1 (β„³) =
+
πœ”
{𝛼 ∈ Ξ£πœ” βˆ£πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 = 1} is non-empty iff there are 𝑒, 𝑣 ∈ Ξ£ such that 𝑒𝑣 ∈ β„›=1 (β„³).
T HEOREM 6.13. For a RatFPM β„³ on alphabet Ξ£, the problem of checking the universality of β„›<1 (β„³) is in PSPACE.
P ROOF. Let β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿). The PSPACE algorithm actually checks the nonuniversality for β„›<1 (β„³) by appealing to Lemma 6.11. The algorithm proceeds by first
guessing 𝑒 incrementally and storing the β€œcurrent” value of post(π‘žπ‘  , 𝑒). After the guess is
complete, it stores post(π‘žπ‘  , 𝑒) in its memory and starts guessing 𝑣 incrementally. While
guessing 𝑣 incrementally, it stores post(π‘ž, 𝑣) for each π‘ž ∈ post(π‘žπ‘  , 𝑒). After its stops
guessing 𝑣 it checks that a) π‘žπ‘Ÿ ∈ post(π‘ž, 𝑣) for each π‘ž ∈ post(π‘žπ‘  , 𝑒) and b) post(π‘žπ‘  , 𝑒) =
βˆͺπ‘žβˆˆpost(π‘žπ‘  ,𝑒) (post(π‘ž, 𝑣)) (note that post(π‘žπ‘  , 𝑒𝑣) = βˆͺπ‘žβˆˆpost(π‘žπ‘  ,𝑒) (post(π‘ž, 𝑣))).
M NC: The universality problem for M NC is easily seen to be in co-R.E..
T HEOREM 6.14. For a RatFPM β„³ on alphabet Ξ£ and rational π‘₯ ∈ (0, 1), the problem
of checking the universality of ℛ≀π‘₯ (β„³) is in co-R.E..
P ROOF. Let β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿). Now ℛ≀π‘₯ (β„³) is not universal iff there is a word
βˆ—
𝛼 such that πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 > π‘₯. The latter is true iff there is a finite word 𝑒 ∈ Ξ£ such that
𝛿𝑒 (π‘žπ‘  , π‘žπ‘Ÿ ) > π‘₯. The result now follows.
M SC: The universality problem for M SC is in Ξ 11 .
T HEOREM 6.15. For a RatFPM β„³ on alphabet Ξ£ and rational π‘₯ ∈ (0, 1), the problem
of checking the universality of β„›<π‘₯ (β„³) is in Ξ 11 .
P ROOF. Let β„³ = (𝑄, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿). Now β„›<π‘₯ (β„³) is not universal iff there is a word
𝛼 ∈ Ξ£πœ” such that πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 β‰₯ π‘₯. Now,
(πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 β‰₯ π‘₯) ⇔ βˆ€π‘› > 0.βˆƒπ‘˜ > 0.(𝛿𝛼[1:π‘˜] (π‘žπ‘  , π‘žπ‘Ÿ ) > π‘₯ βˆ’ 1/𝑛).
Thus, we get
β„›<π‘₯ (β„³) = Ξ£πœ” ⇔ βˆ€π›Ό.βˆƒπ‘› > 0.βˆ€π‘˜ > 0.(𝛿𝛼[1:π‘˜] (π‘žπ‘  , π‘žπ‘Ÿ ) ≀ π‘₯ βˆ’ 1/𝑛).
From this, it is easy to see that the problem of checking the universality of β„›<π‘₯ (β„³) is in
Ξ 11 .
6.4
Universality Problem: Lower Bounds
In this section, we will show that the upper bounds proved in Section 6.3 for the various
classes of monitors are tight.
M SA: The NL-hardness of the universality problem for M SA is proved by a reduction from
graph reachability problem.
ACM Journal Name, Vol. V, No. N, Month 20YY.
38
β‹…
T HEOREM 6.16. For a RatFPM β„³, the problem of checking the universality of ℛ≀0 (β„³)
is NL-hard.
P ROOF. We will reduce the reachability problem in directed graphs to the non-universality
problem for M SA. Since reachability is NL-complete, and NL=co-NL [Szelepcsenyi 1987;
Immerman 1988], the hardness of universality follows.
Let G = (𝑉, 𝐸) be a directed graph with 𝑉 as the set of vertices and 𝐸 as the set of
edges. Given 𝑣1 , 𝑣2 ∈ 𝑉 the reachability problem is the problem of determining whether
there is a directed path from 𝑣1 to 𝑣2 . For the reachability problem, we can assume that for
any 𝑣 ∈ 𝑉 , the set 𝐸𝑣 = {𝑣 β€² ∈ 𝑉 ∣ (𝑣, 𝑣 β€² ) ∈ 𝐸} is non-empty.
We reduce (in log-space) the reachability problem to the universality problem of M SA as
follows. We pick a symbol π‘Ž and let Ξ£ = {π‘Ž}. We construct a monitor β„³ = (𝑉, 𝑣1 , 𝑣2 , 𝛿)
where 𝛿 is defined as follows.
β€²
𝛿(𝑣, π‘Ž, 𝑣 ) =
⎧
⎨ 1
1
βˆ£πΈπ‘£ ∣
⎩
0
if 𝑣 = 𝑣 β€² = 𝑣2
if (𝑣, 𝑣 β€² ) ∈ 𝐸
otherwise
It is easy to see that ℛ≀0 (β„³) = Ξ£πœ” iff there is no directed path from 𝑣1 to 𝑣2 in G.
M WA: The PSPACE-hardness of the universality problem for M WA is proved by a reduction from the universality problem of Finite State Machines.
T HEOREM 6.17. For a RatFPM β„³, the problem of checking the universality of β„›<1 (β„³)
is PSPACE-hard.
P ROOF. We reduce the problem of universality of Finite State Machines to the universality of β„›<1 (β„³). Given a finite state machine π’œ = (𝑄, Ξ”, π‘žπ‘  , 𝐹 ) over the alphabet Ξ£,
π‘ž ∈ 𝑄 and π‘Ž ∈ Ξ£, let Ξ”π‘ž,π‘Ž = {π‘ž β€² ∣ 𝛿(π‘ž, π‘Ž, π‘ž β€² ) ∈ Ξ”}. Please note that for universality
problem, we can assume that Ξ”π‘ž,π‘Ž is non-empty, i.e., βˆ£Ξ”π‘ž,π‘Ž ∣ > 0.
We reduce (in polynomial-time) the universality problem of π’œ to the universality problem of M WA as follows. Pick a new symbol 𝜏 ∈
/ Ξ£ and two new states π‘žπ‘Ž , π‘žπ‘Ÿ ∈
/ 𝑄, and
construct a RatFPM β„³ = (𝑄 βˆͺ {π‘žπ‘Ž , π‘žπ‘Ÿ }, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿) over Ξ£ βˆͺ {𝜏 } where 𝛿 is defined as
follows–
𝛿(π‘ž, π‘Ž, π‘ž β€² ) =
⎧




⎨




⎩
1
1
1
1
βˆ£Ξ”π‘ž,π‘Ž ∣
0
if π‘ž = π‘ž β€² , π‘ž ∈ {π‘žπ‘Ž , π‘žπ‘Ÿ } and π‘Ž ∈ Ξ£ βˆͺ {𝜏 }
if π‘ž ∈ 𝐹, π‘ž β€² = π‘žπ‘Ž and π‘Ž = 𝜏
if π‘ž ∈ 𝑄 βˆ– 𝐹, π‘ž β€² = π‘žπ‘Ÿ and π‘Ž = 𝜏
if π‘ž, π‘ž β€² ∈ 𝑄 and (π‘ž, π‘Ž, π‘ž β€² ) ∈ Ξ”
otherwise
For any word 𝛼 over the alphabet Ξ£ βˆͺ {𝜏 }, the following are easy to check–
(1) If 𝛼 does not contain 𝜏 then πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 = 0.
(2) If 𝛼 = π‘’πœ 𝛽 and 𝑒 does not contain 𝜏 , then πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 = 1 iff 𝑒 is not accepted by π’œ.
Thus π’œ is universal iff β„›<1 (β„³) is universal. The result now follows.
M NC: The co-R.E.-hardness of determining the emptiness of β„’> 12 (β„³) yields the coR.E.-hardness of the universality problem for M NC.
ACM Journal Name, Vol. V, No. N, Month 20YY.
β‹…
39
T HEOREM 6.18. For a RatFPM β„³ on an alphabet Ξ£ and π‘₯ ∈ (0, 1), the problem of
checking the universality of ℛ≀π‘₯ (β„³) is co-R.E.-hard.
P ROOF. We can assume without loss of generality that π‘₯ = 21 . Given a PFA β„³β€² =
(𝑄, π‘žπ‘  , 𝐹, 𝛿) over the alphabet Ξ£, pick two new states π‘žπ‘Ž , π‘žπ‘Ÿ ∈
/ 𝑄 and a new symbol 𝜏 ∈
/ Ξ£.
Now, construct a monitor β„³ = {𝑄 βˆͺ {π‘žπ‘Ž , π‘žπ‘Ÿ }, π‘žπ‘  , π‘žπ‘Ÿ , 𝛿 β€² } over Ξ£ βˆͺ {𝜏 } where 𝛿 β€² is defined
as follows–
⎧


⎨
1
1
β€²
β€²
𝛿 (π‘ž, π‘Ž, π‘ž ) =
1


⎩
𝛿(π‘ž, π‘Ž, π‘ž β€² )
if π‘ž = π‘ž β€² , π‘ž ∈ {π‘žπ‘Ž , π‘žπ‘Ÿ } and π‘Ž ∈ Ξ£ βˆͺ {𝜏 }
if π‘ž ∈ 𝐹, π‘ž β€² = π‘žπ‘Ÿ and π‘Ž = 𝜏
if π‘ž ∈ 𝑄 βˆ– 𝐹, π‘ž β€² = π‘žπ‘Ž and π‘Ž = 𝜏
otherwise
For any word 𝛼 over the alphabet Ξ£ βˆͺ {𝜏 }, the following are easy to check–
(1) If 𝛼 does not contain 𝜏 then πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 = 0.
(2) If 𝛼 = π‘’πœ 𝛽 and 𝑒 does not contain 𝜏 , then πœ‡π‘Ÿπ‘’π‘—
β„³, 𝛼 =
βˆ‘
π‘ž β€² ∈𝐹
𝛿𝑒 (π‘žπ‘  , π‘ž β€² ).
Thus, the language β„’> 21 (β„³β€² ) is empty iff ℛ≀ 12 (β„³) is universal. The result follows.
M SC: We now show that the universality problem for M SC is Ξ 11 -hard.
T HEOREM 6.19. For a RatFPM β„³ on alphabet Ξ£ and π‘₯ ∈ (0, 1), the problem of
checking the universality of β„›<π‘₯ (β„³) is Ξ 11 -hard.
P ROOF. The following problem is known to be Ξ 11 -complete.
Problem: Given a non-deterministic two-counter machine π’ž and a control state π‘ž of π’ž,
check whether all computations of π’ž visit π‘ž only a finite number of times.
Given a non-deterministic two-counter machine π’ž and a state π‘ž of π’ž, we will construct a
RatFPM such that β„›< 21 (β„³) is universal iff computations of π’ž visit π‘ž only a finite number
of times. This monitor is constructed in two steps. For the first step, we construct a monitor
which is a small modification of the monitor β„³1 constructed in the proof of co-R.E.hardness of emptiness of ℛ≀ 12 (see Theorem 6.9). Observe that in that construction, given
a deterministic two-counter machine π’ž 1 we constructed a monitor β„³1 = (𝑄1 , π‘žπ‘  , π‘žπ‘Ÿ , 𝛿 1 )
with the following properties–
(1) The alphabet Ξ£ of β„³1 consists of (, ), the states of π’ž 1 , 0, 1, π‘Ž and 𝑏.
(2) β„³1 has two absorbing states – an absorbing accept state π‘žπ‘Ž and an absorbing reject
state π‘žπ‘Ÿ .
(3) For all finite strings 𝑒 on Ξ£, 𝛿𝑒1 (π‘žπ‘  , π‘žπ‘Ž ) < 21 .
1
(4) For any infinite word 𝛼, limπ‘—β†’βˆž 𝛿𝛼[1:𝑗]
(π‘žπ‘  , π‘žπ‘Ž ) = 12 iff 𝛼 represents an infinite valid
1
computation of π’ž . The infinite computation is represented as a sequence of configurations (π‘ž0 , 0, 0)(π‘ž1 , 𝑖1 , 𝑗1 )(π‘ž2 , 𝑖2 , 𝑗2 ) . . . .
Now, given a non-deterministic two-counter machine π’ž, let 𝑑1 , 𝑑2 , . . . π‘‘π‘˜ be the set of all
the possible transitions of π’ž. We choose new symbols 𝜏 𝑖 for each 𝑑𝑖 . The modified monitor β„³2 has as an alphabet Ξ£new = Ξ£ βˆͺ {𝜏 1 , 𝜏 2 , . . . , 𝜏 π‘˜ }. β„³2 works almost exactly
as β„³1 except that it has to learn which transition is being used to go from (π‘žπ‘™ , 𝑖𝑙 , 𝑗𝑙 )
to (π‘žπ‘™+1 , 𝑖𝑙+1 , 𝑗𝑙+1 ). This is done by assuming that the input computation is given in the
ACM Journal Name, Vol. V, No. N, Month 20YY.
40
β‹…
form (π‘ž0 , 0, 0)𝜏0 (π‘ž1 , 𝑖1 , 𝑗1 )𝜏1 (π‘ž2 , 𝑖2 , 𝑗2 ) . . . . Here πœπ‘™ ∈ {𝜏 1 , 𝜏 2 , . . . 𝜏 π‘˜ } and β€œinforms” β„³2
which transition to check while processing the new configuration. Of course, if in between
configurations, β„³2 does not receive such a symbol, β„³2 rejects the rest of the input with
probability 1. It is easy to see that β„³2 = (𝑄2 , π‘žπ‘  , π‘žπ‘Ÿ , 𝛿 2 ) satisfies the following properties–
(1) β„³2 has two absorbing states – an absorbing accept state π‘žπ‘Ž and and an absorbing
reject state π‘žπ‘Ÿ .
(2) For all finite strings 𝑒 on Ξ£, 𝛿𝑒2 (π‘žπ‘  , π‘žπ‘Ž ) < 12 .
2
(3) For any infinite word 𝛼, limπ‘—β†’βˆž 𝛿𝛼[1:𝑗]
(π‘žπ‘  , π‘žπ‘Ž ) =
computation of π’ž.
1
2
iff 𝛼 represents an infinite valid
Now, we construct β„³ as follows. The alphabet of β„³ will be Ξ£new . For the states,
we will pick a new state π‘žnew ∈
/ 𝑄2 and set 𝑄 = 𝑄2 βˆͺ π‘žnew . The state π‘žnew will be the
reject state of β„³. The state π‘žπ‘  is the start state of β„³. The transition function 𝛿 of β„³ is
obtained by modifying 𝛿 2 as follows. The accept state π‘žπ‘Ž of β„³2 is no longer absorbing.
From π‘žπ‘Ž we will make a transition to π‘žnew with probability 12 whenever we see the input
symbol π‘ž (which is the given state in the Ξ 11 -hard problem). With probability 21 we will
remain in π‘žπ‘Ž on the input symbol π‘ž. In other words 𝛿(π‘žπ‘Ž , π‘ž, π‘žnew ) = 𝛿(π‘žπ‘Ž , π‘ž, π‘žπ‘Ž ) = 21 .
𝛿(π‘ž2 , 𝑐, π‘ž2β€² ) = 𝛿 2 (π‘ž2 , 𝑐, π‘ž2β€² ) for all π‘ž2 , π‘ž2β€² ∈ 𝑄2 , 𝑐 ∈ Ξ£new except when π‘ž2 is π‘žπ‘Ž and 𝑐 is the
input symbol π‘ž. Also, 𝛿(π‘žnew , 𝑐, π‘žnew ) = 1 for all 𝑐 ∈ Ξ£new . For all other possible states
and symbols, the transition probability is 0.
It is easy to see that for any word 𝛼, lim𝑗→inf 𝛿𝛼[1:𝑗] (π‘žπ‘  , π‘žnew ) ≀ 21 . Furthermore,
lim𝑗→inf 𝛿𝛼[1:𝑗] (π‘žπ‘  , π‘žnew ) = 12 iff 𝛼 represents a valid infinite computation of π’ž and visits
π‘ž infinitely often. Thus β„›< 21 (β„³) is universal iff all computations of π’ž visit π‘ž only finitely
many times.
7.
CONCLUSIONS
In this paper, we investigated the power of randomization in finite state monitors. We have
classified the languages defined by FPMs based on the rejection probability and proved a
number of results characterizing these classes. Interestingly, some of these classes allow us
to go beyond safety and πœ”-regularity, but be within almost safety. We have also presented
complexity results on the problem of checking emptiness and universality of languages defined by FPMs. In the future, we would like to explore applying the techniques developed
here for practical monitoring and verification needs.
7.1
Acknowledgments
Rohit Chadha was supported in part by NSF grants CCF04-29639 and NSF CCF04-48178.
A. Prasad Sistla was supported in part by NSF CCF-0742686. Mahesh Viswanathan was
supported in part by NSF CCF04-48178 and NSF CCF05-09321.
REFERENCES
1997. Time rover. http://www.time-rover.com.
1999–2008. Proceedings of the Workshop in Runtime Verification. Electronic Notes in Theoretical Computer
Science.
A LPERN , B. AND S CHNEIDER , F. 1985. Defining liveness. Information Processing Letters 21, 181–185.
A MORIUM , M. AND ROSU , G. 2005. Efficient monitoring of omega-languages. In Proceedings of the International Conference on Computer Aided Verification’. 364–378.
ACM Journal Name, Vol. V, No. N, Month 20YY.
β‹…
41
BAIER , C., B ERTRAND , N., AND G R ÖSSER , M. 2008. On decision problems for probabilistic büchi automata.
In 11th International Conference on Foundations of Software Science and Computational Structures, FoSSaCS. 287–301.
BAIER , C. AND G R OΜˆπ›½ ER , M. 2005. Recognizing πœ”-regular languages with probabilistic automata. In Proceedings of the IEEE Symposium on Login in Computer Science. 137–146.
BAUER , A., L EUCKER , M., AND S CHALLHART, C. 2006. Monitoring of real-time properties. In Proceedings
of the 26th Conference on Foundations of Software Technology and Theoretical Computer Science. 260–272.
C HADHA , R., S ISTLA , A. P., AND V ISWANATHAN , M. 2008. On the expressiveness and complexity of randomization in finite state monitors. In LICS 2008- 23rd Annual IEEE Symposium on Logic in Computer Science.
IEEE Computer Society, 18–29.
C HEN , F. AND ROSU , G. 2007. MOP: An efficient and generic runtime verification framework. In Proceedings
of the ACM International Conference on Object-Oriented Programming, Systems, Languages, and Applications. 569–588.
C ONDON , A. AND L IPTON , R. J. 1989. On the complexity of space bounded interactive proofs (extended
abstract). In 30th Annual Symposium on Foundations of Computer Science. 462–467.
D IAZ , M., J UANOLE , G., AND C OURTIAT, J. P. 1994. Observer β€” a concept for formal on-line validation of
distributed systems. IEEE Transactions on Software Engineering 20, 12, 900–913.
F REIVALDS , R. 1981. Probabilistic two-way machines. In Mathematical Foundations of Computer Science.
33–45.
G ATES , A. AND ROACH , S. 2001. Dynamics: Comprehensive support for run-time monitoring. Vol. 55. Elsevier
Publishing.
G ONDI , K., PATEL , Y., AND S ISTLA , A. P. 2009. Monitoring the full range of omega-regular properties of
stochastic systems. In Proceedings of International Conference on Verification, Model Checking and Abstract
Interpretation. Lecture Notes in Computer Science, vol. 5403. Springer, 105–119.
G ROUP, N. 2001. Intrusion detection systems β€” Group Test.
H AMLEN , K. W., M ORRISETT, G., AND S CHNEIDER , F. 2006. Computability classes for enforcement mechanisms. ACM Trans. Program. Lang. Syst. 28, 1, 175–205.
H AVELUND , K. AND ROSU , G. 2001. Monitoring Java Programs with JavaPathExplorer. Vol. 55. Elsevier
Publishing.
I MMERMAN , N. 1988. Nondeterministic Space is Closed under Complementation. SIAM Journal of Computing 17, 935–938.
J EFFERY, C., Z HOU , W., T EMPLER , K., AND B RAZELL , M. 1998. A lightweight architechture for program
execution monitoring. In ACM Workshop on Program Analysis for Software Tools and Engineering.
K EMENY, J. AND S NELL , J. 1976. Denumerable Markov Chains. Springer-Verlag.
K IM , M., V ISWANATHAN , M., B.-A BDULLAH , H., K ANNAN , S., L EE , I., AND S OKOLSKY, O. 1999. Formally
specified monitoring of temporal properties. In Proceedings of the IEEE Euromicro Conference on Real Time
Systems. 114–122.
KORTENKAMP, D., M ILAM , T., S IMMONS , R., AND F ERNANDEZ , J. L. 2001. Collecting and Analyzing Data
from Distributed Control Programs. Vol. 55. Elsevier Publishing.
L AMPORT, L. 1985. Logical foundation, distributed systems- methods and tools for specification. SpringerVerlag Lecture Notes in Computer Science 190.
L IGATTI , J. 2006. Policy enforcement via program monitoring. Ph.D. thesis, Princeton University.
L IGATTI , J., BAUER , L., AND WALKER , D. 2005. Edit automata: Enforcement mechanisms for run-time security policies. International Journal of Information Security 4, 1–2 (Feb.), 2–16.
L IGATTI , J., BAUER , L., AND WALKER , D. 2009. Run-Time Enforcement of Nonsafety Policy. ACM Transactions on Information and System Security 12, 3, 1–41.
M ANSOURI -S AMANI , M. AND S LOMAN , M. 1992. Monitoring Distributed Systems (A Survey). Research
Report DOC92/93, Imperial College, London.
M ARGARIA , T., S ISTLA , A. P., S TEFFEN , B., AND Z UCK , L. D. 2005. Taming interface specifications. In
Proceedings of 16th International Conference on Concurrency Theory (CONCUR). 548–561.
NASU , M. AND H ONDA , N. 1968. Fuzzy events realized by finite probabilistic automata. Information and
Control 12, 4, 284–303.
ACM Journal Name, Vol. V, No. N, Month 20YY.
42
β‹…
PAPOULIS , A. AND P ILLAI , S. U. 2002. Probability, Random Variables and Stochastic Processes. McGraw
Hill, New York.
PAXSON , V. 1997. Automated packet trace analysis of TCPimplementations. Computer Communication Review 27, 4.
PAZ , A. 1971. Introduction to Probabilistic Automata. Academic Press.
P ERRIN , D. AND P IN , J.-E. 2004. Infinite Words:Automata, Semigroups, Logic and Games. Elseiver.
P LATTNER , B. AND N IEVERGELT, J. 1981. Monitoring program execution: A survey. IEEE Computer, 76–93.
P NUELI , A. AND Z AKS , A. 2006. Psl model checking and run-time verification via testers. In Proceedings of
the 14th International Symposium on Formal Methods. 573–586.
R ABIN , M. O. 1963. Probabilitic automata. Information and Control 6, 3, 230–245.
R ANUM , M. J., L ANDFIELD , K., S TOLARCHUK , M., S IENKIEWICZ , M., L AMBETH , A., AND WALL , E.
1997. Implementing a generalized tool for network monitoring. In Proceedings of the Systems Administration
Conference. 1–8.
S ALOMAA , A. 1973. Formal Languages. Academic Press.
S AMMAPUN , U., L EE , I., S OKOLSKY, O., AND R EGEHR , J. 2007. Statistical runtime checking of probabilistic
properties. In Proceedings of the 7th International Workshop on Runtime Verification. 164–175.
S CHNEIDER , F. B. 2000. Enforceable security policies. ACM Transactions on Information Systems Security 3, 1,
30–50.
S CHROEDER , B. A. 1995. On-line monitoring: A Tutorial. IEEE Computer, 72–78.
S ISTLA , A. P. 1985. On characterization of safety and liveness properties in temporal logic. In Proceedings of
the ACM Symposium on Principle of Distributed Computing.
S ISTLA , A. P. AND S RINIVAS , A. R. 2008. Monitoring temporal properties of stochastic systems. In Proceedings of International Conference on Verification, Model Checking and Abstract Interpretation. Lecture Notes
in Computer Science, vol. 4905. Springer, 294–308.
S ZELEPCSENYI , R. 1987. The method of forcing for nondeterministic automata. Bulletin of the EATCS 33,
96–100.
T HOMAS , W. 1990. Automata on infinite objects. In Handbook of Theoretical Computer Science. Vol. B.
133–192.
VARDI , M. 1985. Automatic verification of probabilistic concurrent systems. In 26th annual Symposium on
Foundations of Computer Science. IEEE Computer Society Press, 327–338.
V ISWANATHAN , M. 2000. Foundations for the run-time analysis of software systems. Ph.D. thesis, University
of Pennsylvania.
ACM Journal Name, Vol. V, No. N, Month 20YY.