Question: 2. (a) Type adj dat in MATLAB to get the matrix A above, then type A2 , A^ 3 and record the results 10100 1

2. (a) Type adj dat in MATLAB to get the matrix A above, then type A"2 , A^ 3 and record the results 10100 1 030210 102012 020311 01 1121 102113 0 3 0 21 0 3 0 5 1 26 0 5 0 5 2 1 1 22 42 4 (b) (hand) Note that the (1,2) entry of A is zero, so there are no paths of length two from node 1 to node 2 Verify this by studying the graph. Similarly, notice that the (6,6) entry of A is two, so there are two paths of length three from node 6 to itself; study the graph to see that they are 6--4--5--6 and 6--5--4--6 In the same way, study the matrices and the graph and answer the following questions What are the paths of length two from node 2 to itself? What are the paths of length three from node 3 to node 4? 2. (a) Type adj dat in MATLAB to get the matrix A above, then type A"2 , A^ 3 and record the results 10100 1 030210 102012 020311 01 1121 102113 0 3 0 21 0 3 0 5 1 26 0 5 0 5 2 1 1 22 42 4 (b) (hand) Note that the (1,2) entry of A is zero, so there are no paths of length two from node 1 to node 2 Verify this by studying the graph. Similarly, notice that the (6,6) entry of A is two, so there are two paths of length three from node 6 to itself; study the graph to see that they are 6--4--5--6 and 6--5--4--6 In the same way, study the matrices and the graph and answer the following questions What are the paths of length two from node 2 to itself? What are the paths of length three from node 3 to node 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
