Question: please explain with comments for each below: 11. [10 Points] Programming assignment In this assignment (lab 15.6), we store digraphs as text files whose lines
please explain with comments for each below:
![please explain with comments for each below: 11. [10 Points] Programming assignment](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/10/670f9d757dbe9_597670f9d75602f5.jpg)

11. [10 Points] Programming assignment In this assignment (lab 15.6), we store digraphs as text files whose lines consist of two nonnegative integers. Such a file has the form m n U1 v1 U2 V2 U3 V3 . . . . . . Um Um where the first line (line 0) includes the number m of edges and the number n of vertices of the digraph. Lines 1 through m list for each edge e; its tail ui and head vi. For simplicity it is always assumed that the vertex set is V = {1, 2, ...,n} and the edge set is E = {e1, ez, . .., emj. For example, the lab includes a file digraph1.txt whose content ise2 5 6 4 4 3 e8 4 el e6 es corresponding to the digraph N 6 e3 In this assignment you will write a function digraph degrees (file name) that takes as parameter the name of a file (stored in the same folder as your function) and returns a tuple (min in, max in, min_out, max_out) consisting of the minimum and maximum in-degrees and the minimum and maximum out-degrees of the digraph stored in the file. For example, a call digraph degrees ("digraph1. txt") should return the tuple (0, 2, 0, 3)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
