# Q4(a) · Distance vector at z

Subject: Computer Networks

Exam: TEE

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q4a

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q4a/

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q4(a). Initially each node knows only neighbor costs. For undirected edges u–v=1, u–y=2, v–x=3, y–x=3, v–z=6, x–z=2, apply distance vector and show distance-table entries at z. [10 marks]

### Answer

### Given

At z, neighbor costs c(z,v)=6 and c(z,x)=2; all original links are stated in the question.

### To find

Distance table at z over synchronous exchanges.

### Formula and why



$$
D_z(d)=\min\{6+D_v(d),\ 2+D_x(d)\}
$$



Add the local link cost to each neighbor’s advertised distance. Round0 below uses the neighbors’ initialized direct-link vectors; next rounds use their previous completed exchange.

### Solution

### Step 1. Evaluate both candidate routes for every destination

| Exchange input round | Destination | Via v | Via x | Minimum |
| --- | --- | --- | --- | --- |
| 0 | u | 7 | ∞ | 7 |
| 0 | v | 6 | 5 | 5 |
| 0 | x | 9 | 2 | 2 |
| 0 | y | ∞ | 5 | 5 |
| 1 | u | 7 | 6 | 6 |
| 1 | v | 6 | 5 | 5 |
| 1 | x | 9 | 2 | 2 |
| 1 | y | 9 | 5 | 5 |
| 2 | u | 7 | 6 | 6 |
| 2 | v | 6 | 5 | 5 |
| 2 | x | 9 | 2 | 2 |
| 2 | y | 9 | 5 | 5 |
| 3 | u | 7 | 6 | 6 |
| 3 | v | 6 | 5 | 5 |
| 3 | x | 9 | 2 | 2 |
| 3 | y | 9 | 5 | 5 |

### Step 2. Read the converged routes

From z: u=6 viax→v→u; v=5 viax→v; x=2 direct; y=5 viax→y; z=0. The route to u throughx→y→u costs7 and is therefore not the minimum.
