Spanning Tree Algorithm Solution

$35.00 $29.00

In this homework, you are asked to write a MATLAB program to find the adjacency matrix of the spanning tree via the spanning tree 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…

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 adjacency matrix of the spanning tree via the spanning tree 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 and 0 otherwise.

  1. Node “1” is root.

  1. Please use matrix A to find the adjacency matrix tree (t) of the spanning tree via the spanning tree algorithm in the lecture notes.

    • matrix tree (t) is the adjacency matrix of the spanning tree and tree(i,j)=1 if there is an edge between nodes i and j in the tree and 0 otherwise.

Examples:

1

1

2 3

4

1

A=2

2

4

3

4

3

1

t= 23 4

1234

Note

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

spanning tree matrix named tree”.

Other requirement:

  • You should use “load” to get inputdata (network_A.mat).

  • Programs should have comments.

Spanning Tree Algorithm Solution
$35.00 $29.00