Question: Chapter 5 TP Routing Algorithms 5 . 1 Subject We model a computer network with a directed graph where we are only concerned whether there

Chapter 5
TP Routing Algorithms
5.1 Subject
We model a computer network with a directed graph where we are only concerned whether there is at least one link from a data center to another data center. We use a binary matrix A (composed of 0 and 1) of size n n where the indices of rows and columns correspond to different numbers of data centers encountered. A 1 at the location (i, j) of the matrix means that there is a link from data center i to the data center j. If there is no link between these two data centers, then A(i, j)=0. Adjacency matrix A may be read in a file as given below :
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
Table 5.1: Adjacency Matrix
1. Imagine there are communication costs to transmit data from one data center to another one. Our first objective is to construct a routing table for each data center such that the transmission costs between any pair of centers is minimized. Costs are given by a cost matrix C as given below. Program and apply an algorithm (which one?) to find (if exists) shortest path between any pairs of data centers.
2. Imagine that you need to install cable between data centers to transmit data from on center to another one (do not consider the direction of the transmission for this question). The installation cost (if cable installation is possible) between any data centers is given
0
1
5
0
0
0
0
0
0
0
0
0
0
0
0
0
1
4
0
0
0
0
0
0
0
0
0
1
0
2
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
4
0
0
0
0
0
0
0
0
0
0
2
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
3
0
3
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
6
0
0
0
0
0
0
0
0
0
0
0
0
0
7
0
0
0
0
0
0
0
<

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!