5 Continuous Markov chains

5.5 Use of the rate matrix

Theorem 5.5.1 (Backward and forward equations).
P′⁢(t)=Q⁢P⁢(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+h⁢∑iπ⁢(t)i⁢Qi⁢j.
  • (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)⇒d⁢rr=-(λ+μ)⁢d⁢t⇒[log⁡r]=[-(λ+μ)⁢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⁢λ⁢t and v⁢(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⁢γ.