6.5 Analyzing Markov Chains: Using PRISM 255
P=? [F[1,2] (b=0) & (a=0)]
This requests the probability that, at some point between t =1 and t =2, the state
of the chain is a =b =0.
Another useful path property to check properties of Markov chains is U, which
stands for “Until”. Unlike F and G it operates on two states, a left state L and a right
state R. It formulates the probability that L is always true until the chain enters the
state R; the truth of the statement does not depend on whether the system remains
in R or not. Note that, one way to make this true is to have R as an initial condition.
If at time t =0 the system is compatible with R then a query specified with U will
always be true.
The general syntax of requests involving the U path property is P=?[L U R].
An interesting special case that will be of practical use is when the left state is
specified as true, which means that any state satisfies the condition. The path
property U can also take a time specification. So, the property P=?[L U[1,2]
R] asks for the probability that between the time t =1 and t =2 the chain is first in
state L, and then in state R; once R has been entered, it does not matter what comes
thereafter and the system may leave R without affecting the truth of the query. A few
examples will clarify this.
As a first example, let us ask for the probability that our initial state is followed
by the state a =0 and b =1.
P=? [(a=0) & (b=0) U (a=0) & (b=1)]
PRISM returns as an answer that this is true with probability 1. This means that
there is only one possible transition from our initial condition, namely to increase
b by one. Taking a look at the definition of the Markov chain confirms that this is
correct. The only transition that is compatible with the initial condition is the line
labeled uboundb stipulating that b be incremented by 1.
The states L and R can be sets of states. The next example asks for the proba-
bility that
a always remains zero until b reaches 10. Note that the L state must be
compatible with the initial conditions as specified in the model file. The reader is
encourage to check that this is indeed the case in the following example:
P=? [(a=0) U (a=0) & (b=10)]
In this case the left state specification L is compatible with several states; in fact,
it is completely independent of the value of the state variable b. The result of this
query turns out to be very low (≈0.014). If we wish to restrict the time, then we
could instead ask the question,
P=? [(a=0) U[10,20] (a=0) & (b=10)]
which queries the probability that between t = 10 and t = 20 the state variable b
reaches the value 10, and a has always remained 0 until b reached its value.
PRISM allows the user to specify initial conditions in the property specification,
which is convenient because it means that the user who wishes to change the ini-
tial conditions of her problem does not need to revise the model specification file.
This can be done by simply adding the initial conditions in curly brackets before