where
Note that if the removal of any edge in the graph disconnects a pair of vertices, the robustness of that pair of vertices is defined as positive infinity. The robustness of a connection is essentially a measure of the multiplicative factor by which the length of that connection increases on average if any individual link in the network goes down.
Write and document a Python program that, given an adjacency-list description of an undirected graph specified in a file that is input as a command-line argument, computes and displays the robustness of the connection between every pair of vertices in that graph. You have been given Python files myNRCClasses.py and NRC.py and you need to fill in the function definitions in file myNRCFunctions.template according to the computation described above create a file myNCRFunctions.py such that NCR.py (when run relative to given problem-description files net1.txt, net2.txt, net3.txt, net4.txt, net5.txt, net6.txt, and net7.txt using python3 on the CS departmental LabNet systems) can exactly reproduce the outputs in script file out.script.
You are not allowed to modify any of the code in provided files NRC.py and myNRCClasses.py. When modifying file myNRCFunctions.template to create myNRCFunctions.py, you cannot:
Violations of any of these constraints will result in severe mark deductions (see assignment evaluation scheme below).
When debugging your code, you may find it useful to look at the debugging version of the output given in script file out.debug.script.
Your program need not use an algorithm that computes shortest paths only in terms of number of edges.
######################################################### ## CS 3600 (Winter 2025), Assignment #3 ## ## Script File Name: NRC.py ## ## Student Name: Todd Wareham ## ## Login Name: harold ## ## MUN #: 8008765 ## #########################################################You do not have to develop your code on our CS departmental systems. However, as your code will be compiled and tested on our CS departmental systems as part of the assignment marking process, you should ensure that your code compiles and runs correctly on at least one of these systems.
Created: February 5, 2025
Last Modified: February 5, 2025