{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw7solution

# hw7solution - 6{2 4 1 3 5 6 3 2-1 3 2-3 2 2-4 3 2-4-5 5...

This preview shows pages 1–2. Sign up to view the full content.

12.1 Consider a packet-switching network of N nodes, connected by the following topologies: a. Star: one central node with no attached station: all other nodes attach to the central node. b. Loop: each node connects to two other nodes to form a closed loop. c. Fully connected: each node is directly connected to all other nodes. a. 2 b. If N is odd: (N+1)/4; if N is even: N*N/4(N-1) c. 1 12.7 Using Dijkstra’s algorithm, generate a least-cost route to all other nodes for nodes 2 of Figure 12.2. Display the results as in Table 12.2a. M L(1) Path L(3) Path L(4) Path L(5) Path L(6) Path 1 {2} 3 2-1 3 2-3 2 2-4 2 {2, 4} 3 2-1 3 2-3 2 2-4 3 2-4-5 3 {2, 4, 1} 3 2-1 3 2-3 2 2-4 3 2-4-5 4 {2, 4, 1, 3} 3 2-1 3 2-3 2 2-4 3 2-4-5 8 2-3-6 5 {2, 4, 1, 3, 5} 3 2-1 3 2-3 2 2-4 3 2-4-5 5 2-4-5-6

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 6 {2, 4, 1, 3, 5, 6} 3 2-1 3 2-3 2 2-4 3 2-4-5 5 2-4-5-6 12.8 Repeat Problem 12.7 using the Bellman-Ford algorithm. h L h (1) Path L h (3) Path L h (4) Path L h (5) Path L h (6) Path 0 ∞ — ∞ — ∞ — ∞ — ∞ — 1 3 2-1 3 2-3 2 2-4 ∞ — ∞ — 2 3 2-1 3 2-3 2 2-4 3 2-4-5 8 2-3-6 3 3 2-1 3 2-3 2 2-4 3 2-4-5 5 2-4-5-6 4 3 2-1 3 2-3 2 2-4 3 2-4-5 5 2-4-5-6 12.11 Will Dijkstra’s algorithm and the Bellman-Ford algorithm always yield the same solutions? Why or why not? If there is a unique least-cost path, the two algorithms will yield the same result because they are both guaranteed to find the least-cost path. If there are two or more equal least-cost paths, the two algorithms may find different least-cost paths, depending on the order in which alternatives are explored....
View Full Document

{[ snackBarMessage ]}