Starting from:

$29

Homework #3: Spanning Tree Algorithm

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 100x100
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.
2. Node “1” is root.
3. 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 2 3 4
1 2 3 4
t=
1 2 3 4
1 2 3 4
A=
2
1 3
4

More products