- 5.20 (from text)
- Consider an undirected graph
*G*= (*V*,*E*) with*n*= |*V*| and*m*= |*E*|. The degree of a vertex is the number of edges incident on that vertex. Let*d*be the degree of vertex_{i}*v*, Show that_{i}SUM[1.. *n*](*d*) = 2_{i}*m* - In a directed graph, we can talk about in-degree and out-degree, the number of edges, respectively, arriving and leaving a given vertex. Show that the sum of the in-degrees of a graph is equal to the sum of the out-degrees.
- 6.1 (from text).

- (Makefile target:
) Implement a disjoint set system using a tree representation (use references, or a parent array). In particular, you should implement an**prob1**`Initialize()`function that creates*n*one-element sets given an array of*n*things, as well as the functions`Find()`and`Merge()`. Implement the better version of disjoint sets (where smaller sets parent to larger sets and finds implement path compression).You are to provide the file

. The program to run is provided,**set.py**.**test-set.py***Advance warning: You might be asked to use your disjoint set system in your homework two weeks from now.* -
**(Extra Credit – 20%)**(Makefile target:) Implement BFS and DFS.**prob2**Provide some nice graph, 7-10 nodes, fairly dense. We gotta show you guys DOT one of these days. Anyway, just output the transitions, or the adjacency list. Then show us each of the spanning trees.

Provide another target called

`prob2-view`that displays your source code in a pager (like`less) on stdout.`