Question: [Python and Sage Question] All computations should use the SageMath 9.0 kernel. However, you are free to mix Python and Sage functionality in your code.

[Python and Sage Question]

All computations should use the SageMath 9.0 kernel. However, you are free to mix Python and Sage functionality in your code.

[Python and Sage Question] All computations should use the SageMath 9.0 kernel.However, you are free to mix Python and Sage functionality in your

Problem 3: Connectivity in an electrical network Grading criteria: code correctness. This problem is based on a dataset derived from an electrical power network in 1985. Source: the SuiteSparse Matrix Collection. a. Read the data from "1138_bus.mtx" and convert it into a Sage graph. The file is formatted as follows: The first few lines, which begin with "%", are comments that you can ignore. The next line is "1138 1138 2596", indicating a graph with 1138 vertices and 2596 edges. Each subsequent line consists of three numbers: two integers denoting the endpoints of an edge, and a float which you should treat as a label. In this dataset there are some self-loops (where the two endpoints of the edge are same); you should omit these.) In [ ]: b. Check that the resulting graph G is connected, and compute its diameter. In [ ]: C. Find the number of ways to remove one edge from G in such a way that the resulting graph is no longer connected. (Hint: such edges are called bridges of G.) In [ ]: d. Find a minimal spanning tree of G according to the edge labels, and compute its diameter. (Aside: this is not physically meaningful.) In [ ]: 32 Problem 3: Connectivity in an electrical network Grading criteria: code correctness. This problem is based on a dataset derived from an electrical power network in 1985. Source: the SuiteSparse Matrix Collection. a. Read the data from "1138_bus.mtx" and convert it into a Sage graph. The file is formatted as follows: The first few lines, which begin with "%", are comments that you can ignore. The next line is "1138 1138 2596", indicating a graph with 1138 vertices and 2596 edges. Each subsequent line consists of three numbers: two integers denoting the endpoints of an edge, and a float which you should treat as a label. In this dataset there are some self-loops (where the two endpoints of the edge are same); you should omit these.) In [ ]: b. Check that the resulting graph G is connected, and compute its diameter. In [ ]: C. Find the number of ways to remove one edge from G in such a way that the resulting graph is no longer connected. (Hint: such edges are called bridges of G.) In [ ]: d. Find a minimal spanning tree of G according to the edge labels, and compute its diameter. (Aside: this is not physically meaningful.) In [ ]: 32

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!