Question: Python - Question 2 and 3 please The purpose of this task is to get you used to working with the networkx package in the

Python - Question 2 and 3 please

The purpose of this task is to get you used to working with the networkx package in the jupyter notebook environment.

1. Define a new (simple) graph G on the vertex set ={0,1,2,3,4,5,6,7} with edges 01, 02, 12, 13, 23, 24, 34, 35, 45, 46, 56, 557, 67, 60, 70 and 71. Draw the graph. Hence or otherwise determine its order (the number of nodes) and its size (the number of links)

2. Find the adjacency matrix A of the graph G. Then compute its square A^2. What do the entries of A^2 tell us about the graph G?

3. Transform the matrix A^2 this into the adjacency matrix of a graph and draw the corresponding graph G2. You should get a complete graph on 88 vertices. How do you explain this in terms of paths in the graph G2?

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 Databases Questions!