# Q5(a) Hotel guest movement (Markov chain) [10]

Subject: Intelligent Systems II

Exam: TEE

Reader: https://deep-learning-study-room.vercel.app/is2/#tee/mocks/paper-final-2025/q5a

Canonical: https://deep-learning-study-room.vercel.app/read/is2/tee/mocks/paper-final-2025--q5a/

100-mark timed practice using the actual Final 2025 paper. Q1 compulsory; any four of Q2–Q7. Worked solutions are below the questions.

**Question. A hotel chain has properties in Paris (P), London (L) and Rome (R). Of guests in Paris, 60% stay, 25% go to London, 15% to Rome; in London 30% go to Paris, 50% stay, 20% go to Rome; in Rome 20% go to Paris, 30% to London, 50% stay. 1. Construct the transition matrix. 2. Explain the diagonal and off-diagonal entries. 3. Draw the state diagram. 4. Today's counts are [50, 30, 20]; find tomorrow's expected counts. 5. Which city gains or loses guests in the long run?** [10 marks]

### Answer

#### Given

All transition values are given in the full question. State order: P, L, R. Initial vector [50, 30, 20].

#### To find

The matrix, diagram, next-step vector and long-run comparison.

#### Formula and why it applies

Rows mean current state; columns mean next state. For each destination, multiply each origin amount by its transition probability, then add.



$$
x_{next}=x_{now}P\qquad\pi=\pi P,\quad\sum_i\pi_i=1
$$



#### Solution

##### Step 1. Convert every origin row to probabilities

| From / To | P | L | R |
| --- | --- | --- | --- |
| P | 0.6 | 0.25 | 0.15 |
| L | 0.3 | 0.5 | 0.2 |
| R | 0.2 | 0.3 | 0.5 |

Each row sums to 1 because it lists all possible destinations for that origin. A percentage is divided by 100: 25%=.25.

##### Step 2. Interpret entries and draw the transitions

Diagonal entries are the fractions staying at their current state; off-diagonal entries are fractions moving to a different state. Each arrow uses its origin row and destination column. These fractions have different origin populations, so adding raw column probabilities does not give the number arriving.

Swipe across the diagram to read its labels ↔

![Each arrow is labelled with the probability of that transition.](https://deep-learning-study-room.vercel.app/is2/fig/mk_hotel.55f5204329.svg)

Diagram: Each arrow is labelled with the probability of that transition.. Labels: Daily guest movement: Paris, London, Rome | 0.25 | 0.15 | 0.3 | 0.2 | 0.2 | 0.3 | 0.6 | 0.5 | 0.5 | P | L | R

Each arrow is labelled with the probability of that transition.

##### Step 3. Next step: collect all contributions to P

| Origin | Current count/share | Transition to P | Contribution |
| --- | --- | --- | --- |
| P | 50 | 0.6 | 50 × 0.6 = 30 |
| L | 30 | 0.3 | 30 × 0.3 = 9 |
| R | 20 | 0.2 | 20 × 0.2 = 4 |



$$
P_{new}=30+9+4=43
$$



##### Step 4. Next step: collect all contributions to L

| Origin | Current count/share | Transition to L | Contribution |
| --- | --- | --- | --- |
| P | 50 | 0.25 | 50 × 0.25 = 12.5 |
| L | 30 | 0.5 | 30 × 0.5 = 15 |
| R | 20 | 0.3 | 20 × 0.3 = 6 |



$$
L_{new}=12.5+15+6=33.5
$$



##### Step 5. Next step: collect all contributions to R

| Origin | Current count/share | Transition to R | Contribution |
| --- | --- | --- | --- |
| P | 50 | 0.15 | 50 × 0.15 = 7.5 |
| L | 30 | 0.2 | 30 × 0.2 = 6 |
| R | 20 | 0.5 | 20 × 0.5 = 10 |



$$
R_{new}=7.5+6+10=23.5
$$



##### Step 6. Stationarity: write the Paris equation



$$
p=0.6p+0.3l+0.2r
$$





$$
0.4p=0.3l+0.2r
$$



Divide every term by .4.



$$
p=0.75l+0.5r
$$



##### Step 7. Write the London equation and substitute p



$$
l=0.25p+0.5l+0.3r
$$





$$
0.5l=0.25(0.75l+0.5r)+0.3r
$$





$$
0.5l=0.1875l+0.125r+0.3r
$$



##### Step 8. Collect like terms



$$
(0.5-0.1875)l=(0.125+0.3)r
$$





$$
0.3125l=0.425r\quad\Rightarrow\quad l=1.36r
$$





$$
p=0.75(1.36r)+0.5r=1.52r
$$



##### Step 9. Use total probability to get all three shares



$$
p+l+r=1\quad\Rightarrow\quad1.52r+1.36r+r=1
$$





$$
3.88r=1\quad r=1/3.88=25/97
$$





$$
l=1.36(25/97)=34/97\quad p=1.52(25/97)=38/97
$$



##### Step 10. Compare the stationary shares with the initial shares

| State | Initial share | Stationary share | Change in share | Conclusion |
| --- | --- | --- | --- | --- |
| P | 0.5 | 0.391752577 | -0.108247423 | Loses |
| L | 0.3 | 0.350515464 | 0.050515464 | Gains |
| R | 0.2 | 0.257731959 | 0.057731959 | Gains |

Compare like with like: divide counts by their total before comparing with stationary probabilities. “Stationary” means one more step leaves the shares unchanged.

**Final answer.** Next-step vector [43.0, 33.5, 23.5]. Stationary shares ≈ [0.391752577, 0.350515464, 0.257731959]. P loses, L gains, R gains.
