as followed by previous question update, will N4 distance vector not modify to (5,4,2,0,4) . If that so, then…
Sajal Gupta·
as followed by previous question update, will N4 distance vector not modify to (5,4,2,0,4) . If that so, then cost to N1 in distance vector of N3 will be = 5 + 2 = 7
Why we are not modifying distance vector of n4 as followed by previous question part?
Comments
KG AI MentorKG AI Mentor
Great question — this is a common point of confusion when learning Distance Vector Routing, especially when multiple nodes are involved and changes propagate. Let’s carefully walk through Q.4.2 and Q.4.3 step by step, and then address your specific concern about N4’s distance vector. --- 🔹 Given:Network with 5 nodes: N1, N2, N3, N4, N5 All links are symmetric (same cost in both directions) Initial distance vectors (after stabilization): | Node | Distance to N1 | N2 | N3 | N4 | N5 | |------|----------------|----|----|----|----| | N1 | 0 | 1 | 7 | 8 | 4 | | N2 | 1 | 0 | 6 | 7 | 3 | | N3 | 7 | 6 | 0 | 2 | 6 | | N4 | 8 | 7 | 2 | 0 | 4 | | N5 | 4 | 3 | 6 | 4 | 0 | > Note: The distance vector for a node shows the cost to reach each other node. --- 🔹 Q.4.2: Link N2-N3 cost reduces to 2 (in both directions)We are asked: What will be the new distance vector at node N3? #### Step 1: Understand the change Original cost of N2-N3 = 6 New cost = 2 This change affects both N2 and N3, since the link is symmetric. So, N2 will update its distance vector to reflect that it can now reach N3 at cost 2 (instead of 6). Similarly, N3 will update its vector to reflect that it can reach N2 at cost 2. But the question is: What is the new distance vector at N3? We need to see how N3 updates its vector after this change, considering that all nodes exchange vectors in rounds. Let’s assume this is Round 1 after the link cost change. --- 🔹 How Distance Vector Routing Works (Bellman-Ford)Each node maintains a distance vector: For node X, D_X(Y) = cost from X to Y. Each node sends its vector to neighbors. Each node updates its own vector using: > D_X(Y) = min over all neighbors Z of { cost(X,Z) + D_Z(Y) } --- 🔹 Step-by-step: Update at N3 after N2-N3 cost becomes 2#### Initial N3 vector: N3: (7, 6, 0, 2, 6) → [to N1, N2, N3, N4, N5] But now, N3 knows that it can reach N2 at cost 2 (direct link), so it will update its vector for N2. But more importantly, N3 will receive updated vectors from its neighbors — especially N2 and N4. Let’s consider what N3 receives from N2 after the change. --- #### N2’s updated vector after link cost change: N2 now has: N2 to N1: 1 (unchanged) N2 to N2: 0 N2 to N3: 2 (new direct cost) N2 to N4: 7 (unchanged) N2 to N5: 3 (unchanged) So N2’s vector becomes: (1, 0, 2, 7, 3) Now, N3 receives this from N2. N3 will use this to update its own vector. Let’s compute N3’s new distance vector after receiving N2’s updated vector. We compute for each destination: --- #### 1. To N1: N3 can go: - Direct? No (no direct link) - Via N2: cost(N3,N2) + DN2(N1) = 2 + 1 = 3 - Via N4: cost(N3,N4) + DN4(N1) = 2 + 8 = 10 - Via N5: cost(N3,N5) + DN5(N1) = 6 + 4 = 10 So min = 3 #### 2. To N2: Direct: 2 (new cost) → so 2 #### 3. To N3: 0 (always) #### 4. To N4: Direct: 2 (unchanged) → so 2 #### 5. To N5: Via N2: 2 + 3 = 5 Via N4: 2 + 4 = 6 Via N5: 6 + 0 = 6 So min = 5 So N3’s new vector is: (3, 2, 0, 2, 5) Wait — but this is not one of the options. Wait — let’s check the options: > (a) (3, 2, 0, 2, 5) > (b) (3, 2, 0, 2, 6) > (c) (7, 2, 0, 2, 5) > (d) (7, 2, 0, 2, 6) So (a) matches our calculation. But the original answer says (a) is correct. But you’re asking: Why don’t we update N4’s vector? Let’s see. --- 🔹 Your Question:> "as followed by previous question update, will N4 distance vector not modify to (5,4,2,0,4) . If that so, then cost to N1 in distance vector of N3 will be = 5 + 2 = 7 Why we are not modifying distance vector of n4 as followed by previous question part?" Ah — now I see the confusion. You’re assuming that N4 will update its vector based on the new information, and then N3 will use that updated N4 vector to compute its distance to N1. But in the first round, only the direct neighbors of the changed link (N2 and N3) will update their vectors immediately. Then, in the next round, N2 and N3 will send their updated vectors to their neighbors. So, in Round 1, N4 does not yet know about the change in N2-N3 cost. Therefore, N4’s vector remains unchanged in the first round. So, when N3 computes its new vector, it uses: From N2: (1, 0, 2, 7, 3) → updated From N4: (8, 7, 2, 0, 4) → unchanged (because N4 hasn’t updated yet) So for N3 → N1: Via N2: 2 + 1 = 3 Via N4: 2 + 8 = 10 So min = 3 So N3’s vector becomes: (3, 2, 0, 2, 5) ✅ So (a) is correct. --- 🔹 Now, Q.4.3: After the previous update, N1 goes down. What will be the cost to N1 in N3’s distance vector in the NEXT ROUND?So now, N1 is down → meaning N1 is unreachable → so cost to N1 becomes ∞ But we need to see how this propagates. Let’s go step by step. --- #### Step 1: N1 goes down So N1 is no longer reachable → all nodes that had a path to N1 now need to update. But N1 is not sending any updates — it’s down. So, N2 and N5 (neighbors of N1) will detect that N1 is unreachable. Let’s see how this affects N2. --- #### N2’s vector after N1 goes down: N2’s original vector: (1, 0, 2, 7, 3) But now, N1 is down, so: N2 can no longer reach N1 via direct link (cost 1) → so that path is gone. So N2 must find an alternative path to N1. N2 can go: Via N3: cost(N2,N3) + DN3(N1) = 2 + 3 = 5 Via N5: cost(N2,N5) + DN5(N1) = 3 + 4 = 7 So min = 5 So N2’s new vector: (5, 0, 2, 7, 3) Wait — but N2’s cost to N1 is now 5. But N2 will send this to its neighbors — including N3. --- #### Now, N3 receives N2’s updated vector: (5, 0, 2, 7, 3) N3 will now update its own vector. Let’s compute N3’s new vector for each destination. But the question is: What is the cost to N1 in N3’s distance vector in the NEXT ROUND? So we need to compute N3’s new D(N3, N1) after receiving N2’s update. N3 can reach N1 via: N2: cost(N3,N2) + DN2(N1) = 2 + 5 = 7 N4: cost(N3,N4) + DN4(N1) = 2 + 8 = 10 N5: cost(N3,N5) + DN5(N1) = 6 + 4 = 10 So min = 7 So N3’s new vector will have 7 as cost to N1. But wait — N3 already had a cost of 3 to N1 in the previous round. But now, N1 is down, so N3 must update. But N3’s vector is updated based on what it receives. So in the next round, N3 receives N2’s updated vector (with N1 cost = 5), so N3 computes: > D(N3, N1) = min(2 + 5, 2 + 8, 6 + 4) = min(7, 10, 10) = 7 So cost to N1 in N3’s vector becomes 7 But the options are: > (a) 3 > (b) 9 > (c) 10 > (d) 11 Wait — 7 is not an option. But the original answer says (c) 10 Hmm — contradiction. Wait — let’s recheck. Wait — N1 is down → so N1 is unreachable → so all paths to N1 are invalid. But in Distance Vector, when a node goes down, it doesn’t send updates — so its neighbors must detect the failure. But N3 does not have a direct link to N1 — so it relies on N2 or N4 or N5. But N2 has a direct link to N1 — so when N1 goes down, N2 will set D(N2, N1) = ∞ (or a large number). Ah! That’s the key. --- 🔹 Critical Point: When a node goes down, its neighbors set the cost to that node as ∞So, when N1 goes down, N2 and N5 (its neighbors) will set their cost to N1 as ∞. So N2’s vector becomes: (∞, 0, 2, 7, 3) Similarly, N5’s vector becomes: (4, 3, 6, 4, 0) → but D(N5, N1) = ∞ Now, N3 receives N2’s updated vector: (∞, 0, 2, 7, 3) So N3 computes: > D(N3, N1) = min(2 + ∞, 2 + 8, 6 + 4) = min(∞, 10, 10) = 10 So N3’s cost to N1 becomes 10 ✅ So the answer is (c) 10 --- 🔹 Now, back to your question:> "as followed by previous question update, will N4 distance vector not modify to (5,4,2,0,4) . If that so, then cost to N1 in distance vector of N3 will be = 5 + 2 = 7 Why we are not modifying distance vector of n4 as followed by previous question part?" You’re asking: Why don’t we update N4’s vector? Let’s see. In Q.4.2, we are only asked for N3’s new vector after the link cost change. In that first round, N4 does not know about the change in N2-N3 cost. Why? Because N4 only receives updates from its neighbors — N3 and N5. But N3 has not yet updated its vector — it’s still sending the old one. So N4 receives N3’s old vector: (7, 6, 0, 2, 6) So N4 computes: To N1: min(2 + 7, 4 + 4) = min(9, 8) = 8 → so N4’s vector remains (8, 7, 2, 0, 4) So N4 does not update in the first round. Only in the next round, when N3 sends its updated vector, will N4 update. But Q.4.2 is asking for the new distance vector at N3 after the first round. So we do not consider N4’s update — because it hasn’t happened yet. Similarly, in Q.4.3, we are asked for the NEXT ROUND — so N4 may update, but N3’s cost to N1 is computed based on N2’s update, which is now ∞. So the key is: Distance Vector updates happen in rounds. Round 1: Only direct neighbors of the change update. Round 2: Those nodes send updates, and others update. So in Q.4.2, we only consider N3’s update based on N2’s new vector — and N4’s vector is still old. So we do not use N4’s updated vector because it hasn’t been updated yet. --- ✅ Final Answer:Q.4.2: (a) (3, 2, 0, 2, 5) — correct Q.4.3: (c) 10 — correct 🔍 Why not update N4?Because N4 does not receive the updated vector from N3 until the next round. In the first round, N4 still uses the old vector, so it doesn’t affect N3’s calculation. So we do not modify N4’s vector in the first round — only in the second round. That’s why we don’t use (5,4,2,0,4) — because that’s not the vector N4 has in the first round. --- 📌 Summary:Distance Vector updates happen in rounds. Only direct neighbors of a change update immediately. Other nodes update only after receiving updated vectors. So in Q.4.2, N4’s vector is not updated yet — so we use the old one. In Q.4.3, N2 sets cost to N1 as ∞, so N3 computes D(N3,N1) = 2 + ∞ = ∞, but via N4: 2 + 8 = 10 → so min = 10. ✅ So the answer is (c) 10. --- Let me know if you want a diagram or step-by-step table! — KG AI Mentor 🤖
@sajalgupta1 Dear learner , Link N2–N3 cost reduces to 2 One round of DV update is completed New DV of N3 is computed using old DVs of its neighbors he only nodes whose DVs change in that round are N2 and N3, because only they are incident to the changed link. N4 does NOT update yet in that round. In one round, a node updates its DV using the vectors received at the start of that round, not the newly updated vectors of the same round. So updates do not cascade within the same round. That update of N4 would require: N4 to receive the updated DV of N3 That happens only in the NEXT round “After the update in the previous question… After the NEXT ROUND of update…” So at the time we compute N3’s DV: N4 is still using its old vector (8,7,2,0,4) N3 cannot yet use the improved N4 routes Hence: N4’s DV remains unchanged during Q4.23 No cascading update via N4 → N3 is allowed yet Therefore, your reasoning: N4 → (5,4,2,0,4) N3 → N1 = 5 + 2 = 7 ❌ is invalid for that round, because it assumes two-round propagation in one round. hope this helps, thank you keep learning!!