5 Continuous Markov chains

5.5 Use of the rate matrix

Theorem 5.5.1 (Backward and forward equations).
P(t)=QP(t)=P(t)Q.
Proof.

Differentiate P(α+β)=P(α)P(β) wrt α, so

P(α+β)=P(α)P(β)

and set α=0 and β=t. Similarly differentiate wrt β for the other result. ∎

Theorem 5.5.2 (Rates of change of distributions (useful for determining π(t))).
π(t)=π(t)Q.
Proof.

Differentiate π(t)=π(s)P(t-s) wrt t to get

π(t)=π(s)P(t-s)

and set s=t. ∎

Remark.
  • (a)

    This is often expressed as

    π(t+h)π(t)+hπ(t)Q

    or

    π(t+h)jπ(t)j+hiπ(t)iQij.
  • (b)

    The equations written as π(t)=π(t)Q are simultaneous differential equations which may be solved for the elements π(t)j.

Example 5.5.3.

The two state chain has

Q=(-λλμ-μ).

This only supplies one independent differential equation. However, as π(t) is a distribution, we also have π(t)1+π(t)2=1. The first equation gives

π(t)1=-λπ(t)1+μπ(t)2=-λπ(t)1+μ[1-π(t)1]=-(λ+μ)π(t)1+μ.

To solve this, suppose first that π(t)1 were a constant, c, so that π(t)1=0; then π(t)1=c=μλ+μ.

Next, consider in general that π(t)1 is varying about c so set π(t)1=c+r(t). On substituting, c cancels and

r(t)=-(λ+μ)r(t)drr=-(λ+μ)dt[logr]=[-(λ+μ)t]

which leads to

r(t)=r(0)exp[-(λ+μ)t]π(t)1=μλ+μ+[π(0)1-μλ+μ]exp[-(λ+μ)t].

The solution to this differential equation is therefore

π(t)1 = μλ+μ+[π(0)1-μλ+μ]exp[-(λ+μ)t],
π(t)2 = λλ+μ+[π(0)2-λλ+μ]exp[-(λ+μ)t].

Provided λ+μ>0, (π(t)1,π(t)2)(μλ+μ,λλ+μ).

Exercise 5.5.4 (Based on 2011 B3).

Young Hercules is fighting a two-headed hydra. Consider any small time interval, J of length δt. The probability that Hercules will chop off a head in the interval J, is approximately μδt. If the hydra has just one head then the other head will grow back; the probability that the head will grow back in J is approximately γδt. If the hydra has no heads then it is dead and the fight ends. The hydra’s heads act independently; for each head the probability that it will kill Hercules in J is approximately λδt. If Hercules dies then the fight ends.

  1. (i)

    Write down the rate matrix for the continuous-time Markov chain with the following states; 0) The hydra is dead, 1) the hydra has 1 head, 2) the hydra has 2 heads, 3) Hercules is dead.

  2. (ii)

    Write down a set of four differential equations for the components
    (π0(t),π1(t),π2(t),π3(t)) of π(t).

  3. (iii)

    Assume that Hercules and each hydra head are evenly matched so μ=λ. Set u(t)=π1(t)+π2(t) and v(t)=γπ1(t)-λπ2(t). Show that u(t)=-2λu and find a similar equation for v(t).

  4. (iv)

    As the fight commences the hydra has two heads. Solve the differential equations for u(t) and v(t) and hence show that

    π1(t)=λλ+γ(e-2λt-e-(3λ+γ)t).
  5. (v)

    Hence find π0(t) and show that the probability that Hercules kills the hydra is

    λ6λ+2γ.
  1. (i)
    Q=(0000μ-(μ+λ+γ)γλ0μ-(μ+2λ)2λ0000).
  2. (ii)

    π(t)=π(t)Q so

    π0(t) = μπ1(t)
    π1(t) = -(μ+λ+γ)π1(t)+μπ2(t)
    π2(t) = γπ1(t)-(μ+2λ)π2(t)
    π3(t) = λπ1(t)+2λπ2(t).
  1. (iii)
    u(t) = π1(t)+π2(t)=(-2λ-γ+γ)π1(t)+(λ-3λ)π2(t)=-2λu(t).
    v(t) = -(2λγ+γ2+γλ)π1(t)+(γλ+3λ2)π2(t)=-(γ+3λ)(γπ1(t)-λπ2(t))
    = -(γ+3λ)v(t).
  2. (iv)

    π(0)=(0,0,1,0). Solving the equations in (iii) gives

    u(t)=u(0)e-2λtandv(t)=v(0)e-(3λ+γ)t.

    But u(0)=π1(0)+π2(0)=1 and v(0)=γπ1(0)-λπ2(0)=-λ. Thus

    u(t) = e-2λt,v(t)=-λe-(3λ+γ)t.
    π1(t) = λu(t)+v(t)λ+γ=λλ+γ(e-2λt-e-(3λ+γ)t).
  3. (v)
    π0(t) = λ2λ+γ(e-2λt-e-(3λ+γ)t)

    so

    π0(t) = λ2λ+γ(-12λe-2λt+13λ+γe-(3λ+γ)t+c).

    By the initial condition π0(0)=0,

    π0(t) = λ2λ+γ(-12λ(e-2λt-1)+13λ+γ(e-(3λ+γ)t-1))
    = λ2λ+γ(λ+γ2λ(3λ+γ)-12λe-2λt+13λ+γe-(3λ+γ)t).

    Since state 0 is absorbing the probability the Hercules wins is the probability that the chain is eventually in state 0. Take the limit as t to see this is

    λ2λ+γ×λ+γ2λ(3λ+γ)=λ6λ+2γ.