Homework #4: Shortest Path Routing Solution

$30.00 $24.00

In this homework, you are asked to write a MATLAB program to find the distance matrix via the short path routing algorithm in the lecture notes. Please download the adjacency matrix of network A (network_A.mat that contains a 100×100 matrix named “A”) on ILMS. The matrix A is the adjacency matrix of a network with…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Description

5/5 – (2 votes)

In this homework, you are asked to write a MATLAB program to find the distance matrix via the short path routing algorithm in the lecture notes. Please download the adjacency matrix of network A (network_A.mat that contains a 100×100 matrix named “A”) on ILMS.

  1. The matrix A is the adjacency matrix of a network with 100 nodes.

    • A(i,j)=1, if there is an edge between nodes i and j.

    • A(i,j)=0, otherwise.

  1. Please use matrix A to find the final distance matrix d (Global View).

    • d(i,j) is the distance (of the shortest path) from node i to j.

Upload two files to ILMS.(Please code by matlab.)

  1. source code file named “code.m”

  1. result data file named “result.mat” that contains the following

distance matrix named “d”.

  • You should use “load” to get inputdata.

  • Programs should have comments.

Example:

1

1

2 3

4

1

2

2

4

A=3

4

3

1

1234

d=2

3

Homework #4: Shortest Path Routing Solution
$30.00 $24.00