4 Markov Chains

Simulation and Modeling ยท Unit 4 ยท 2 hrs

Markov Chains

Exam-focused notes for Markov Chains (Simulation and Modeling, CSC328): what the TU syllabus asks and how it has actually been tested, with 5 solved past questions from this unit.

Markov Chains in short

Many of the arrival and service processes used in simulation, and the queuing formulas of the previous chapter, rest on a single underlying idea: that a system's future depends only on its present state, not on the path it took to get there. That idea is formalized as a Markov chain.

Markov Chains: notes

Features

A Markov chain is a sequence of random variables $X_1, X_2, X_3, \ldots$ that undergoes transitions between a finite or countable number of possible states, with the defining Markov property that, given the present state, the future is independent of the past: $$P(X_{n+1}=x \mid X_1=x_1, X_2=x_2, \ldots, X_n=x_n) = P(X_{n+1}=x \mid X_n = x_n).$$ This is what makes the chain memoryless: the next state depends only on the current state, not on the sequence of states visited before it. Three features characterize every Markov chain. The outcome of each experiment is one of a set of discrete states. The outcome depends only on the present state, never on any earlier one. The transition probabilities, the probabilities of moving from one state to another, remain constant from one step to the next; collected into a matrix, they form the chain's transition matrix, in which every row sums to $1$.

What this unit covers

  • Features
  • Process Examples
  • Applications

Features

2082 ยท 5 marks

Define Markov Chain. Explain with suitable example. [5]

Show solved answer

Markov Chain: Definition and Explanation

Definition

A Markov Chain is a sequence of random variables Xโ‚, Xโ‚‚, Xโ‚ƒ, ... with the Markov property, namely that, given the present state, the future and past states are independent.

Formally, this can be written as:

P(Xโ‚™โ‚Šโ‚ = xโ‚™โ‚Šโ‚ | Xโ‚ = xโ‚, Xโ‚‚ = xโ‚‚, ..., Xโ‚™ = xโ‚™) = P(Xโ‚™โ‚Šโ‚ = xโ‚™โ‚Šโ‚ | Xโ‚™ = xโ‚™)

This property is called the "memoryless" property - the next state depends only on the current state, not on the sequence of states that preceded it.


Key Concepts

TermMeaning
StateA possible condition the system can be in
TransitionMovement from one state to another
Transition ProbabilityProbability of moving from state i to state j
Transition MatrixMatrix containing all transition probabilities

Example: Weather Prediction

Consider a simple weather model with two states:

  • State 1: Sunny (S)
  • State 2: Rainy (R)

Transition Probabilities

Suppose:

  • If today is Sunny, probability of Sunny tomorrow = 0.8, Rainy = 0.2
  • If today is Rainy, probability of Sunny tomorrow = 0.4, Rainy = 0.6

Transition Matrix

$$P = \begin{pmatrix} 0.8 & 0.2 \ 0.4 & 0.6 \end{pmatrix}$$

Where rows represent the current state and columns represent the next state.

State Diagram

        0.8                  0.6
    [Sunny] โ†โ†’ 0.2 โ†’โ†’ [Rainy]
        โ†‘                    โ†‘
        โ†โ†โ†โ† 0.4 โ†โ†โ†โ†โ†โ†โ†โ†โ†โ†

Applying the Markov Property

If today is Sunny, the probability that it will be Rainy after 2 days is:

  • Sunny โ†’ Sunny โ†’ Rainy = 0.8 ร— 0.2 = 0.16
  • Sunny โ†’ Rainy โ†’ Rainy = 0.2 ร— 0.6 = 0.12
  • Total = 0.16 + 0.12 = 0.28

This calculation depends only on today's state (Sunny), not on what the weather was yesterday. This demonstrates the Markov property.


Application in Queuing Systems

Markov Chains are widely used in queuing models. For example, a single-server queue can be modeled as a continuous time Markov chain with transition matrix:

$$Q = \begin{pmatrix} -\lambda & \lambda \ \mu & -\mu \end{pmatrix}$$

The system is stable only if the utilization factor P = ฮป/ฮผ < 1, meaning the arrival rate must be less than the service rate.


Summary

  • Markov Chain models systems that transition between states over time.
  • The key assumption is that the future depends only on the present, not the past.
  • It is widely used in simulation, queuing theory, weather forecasting, and network modeling.
Open this answer on its own page โ†’

2081 ยท 5 marks

Explain markov chain with suitable example. What are diffrent application areas of markov chain? [5]

Formal Definition: A Markov chain is a sequence of random variables Xโ‚, Xโ‚‚, Xโ‚ƒ, ... with the Markov property, namely that, given the present state, the future and past states are independent. This property can be expressed mathematically as: P(Xโ‚™โ‚Šโ‚ = xโ‚™โ‚Šโ‚ Xโ‚ = xโ‚, Xโ‚‚ = xโ‚‚, ..., Xโ‚™ = xโ‚™) = P(Xโ‚™โ‚Šโ‚ ...

Open this answer on its own page โ†’

2080 ยท 5 marks

Explain Markov chain with suitable example. [5]

A Markov chain is a sequence of random variables Xโ‚, Xโ‚‚, Xโ‚ƒ, ... with the Markov property, namely that, given the present state, the future and past states are independent. Mathematically: P(Xโ‚™โ‚Šโ‚ = xโ‚™โ‚Šโ‚ Xโ‚ = xโ‚, Xโ‚‚ = xโ‚‚, ..., Xโ‚™ = xโ‚™) = P(Xโ‚™โ‚Šโ‚ = xโ‚™โ‚Šโ‚ Xโ‚™ = xโ‚™) This means the next state depends onl...

Open this answer on its own page โ†’

Process Examples

2079 ยท 5 marks

What is markov chain? Explain with example. [5]

A Markov Chain is a sequence of random variables Xโ‚, Xโ‚‚, Xโ‚ƒ, ... with the Markov property, namely that, given the present state, the future and past states are independent. Mathematically, this property is expressed as: P(Xโ‚™โ‚Šโ‚ = xโ‚™โ‚Šโ‚ Xโ‚ = xโ‚, Xโ‚‚ = xโ‚‚, ..., Xโ‚™ = xโ‚™) = P(Xโ‚™โ‚Šโ‚ = xโ‚™โ‚Šโ‚ Xโ‚™ = xโ‚™) This m...

Open this answer on its own page โ†’

2076 ยท 5 marks

Explain Markov's chain with a suitable example. [5]

A Markov chain is a sequence of random variables Xโ‚, Xโ‚‚, Xโ‚ƒ, ... with the Markov property, namely that, given the present state, the future and past states are independent. Mathematically, this is expressed as: P(Xโ‚™โ‚Šโ‚ = xโ‚™โ‚Šโ‚ Xโ‚ = xโ‚, Xโ‚‚ = xโ‚‚, ..., Xโ‚™ = xโ‚™) = P(Xโ‚™โ‚Šโ‚ = xโ‚™โ‚Šโ‚ Xโ‚™ = xโ‚™) This is called ...

Open this answer on its own page โ†’