CS 671 Extra Homework Problems 1. For n 2k let G[n, k] denote the disjointness graph of the k–element subsets of {1,…,n}. That is, the vertices are the k–element subsets of {1,…,n}, and two vertices are adjacent iff they are disjoint subsets. For example, the Petersen graph is G[5, 2]. Prove that (G[n, k]) n–2k+2 by covering the vertices with n–2k+2 independent sets. Also prove that this bound is optimal when n = 2k and when n = 2k+1. 2. Suppose you are given lists I1, I2, …, In and O1, O2, …, On. Design an efficient algorithm that either constructs a simple directed n–vertex graph such that the jth vertex has indegree Ij and outdegree Oj, for 1 j n, or determines that such a digraph does not exist. 3. Suppose that each of modules M1, M2, …, Mk is to be assigned to either processor P1 or P2. Each module Mi would require Tij execution time if assigned to processor Pj. Furthermore, a communication cost Cij is incurred iff modules Mi and Mj are assigned to different processors. Describe how to minimize the total of the execution times and incurred communication costs. [Hint: think mincut.] 4. Suppose you are given a network N = (V, E) with source s, sink t, a capacity function c: E R0, and a flow function f: E R0. Describe an O(V+E)–time algorithm that determines whether or not f is a maxflow. 5. Given a graph G and an integer k, the degree-constrained subgraph problem asks for a subgraph H with the largest possible number of edges such that each vertex has degree at most k in H. Design an efficient algorithm to solve the degree-constrained subgraph problem. [Hint: first consider the case when k=1.] 6. Describe an O(V)–time algorithm to compute the nearest common ancestor of two given vertices u and v in a tree. 7. A mixed graph can have both undirected and directed edges. Describe an efficient algorithm for the Eulerian circuit problem on mixed graphs. [Hint: first solve a maxflow problem, then use undirected Eulerian circuit.] 8. Suppose students at the University of Alabama could preregister for classes before class meeting times are assigned. After preregistration ends, the administration must schedule class meeting times such that no student has any time conflict. Assume there are nine possible class times on Monday/Wednesday/Friday, and six on Tuesday/Thursday. First describe how to model this situation as a well-known graph problem. Next consider additional constraints relating to number of classrooms, room sizes, faculty schedules, etc., and discuss how to incorporate these constraints into the graph problem. 9. Let k denote a fixed positive integer. Describe an O(V+E)–time algorithm that determines whether or not a given graph G=(V,E) has a vertex cover with at most k vertices. [Hint: first consider vertices with degree larger than k.] 10. Consider the following greedy heuristic for the vertex cover problem. Begin with an empty vertex cover. Select a vertex v of largest degree and add it to the vertex cover, then remove v and its incident edges from the graph. Repeat until the graph contains no more edges. Construct a graph such that this greedy heuristic produces a vertex cover which is more than twice the size of a minimum vertex cover. 11. Suppose the vertices of a graph have weights. Describe efficient algorithms for each of these problems: maximum weighted clique in a chordal graph, maximum weighted independent set in a chordal graph, and maximum weighted clique in a comparability graphs. [Note: for extra credit, you may wish to also try maximum weighted independent set in a comparability graph, but beware it is more difficult.] 12. Describe an O(V)–time algorithm for maximum weighted matching on series-parallel graphs. 13. Describe an O(V)–time algorithm that colors the vertices of a series–parallel graph using at most 3 colors. 14. Prove that every outerplanar graph is series-parallel, and that every series-parallel graph is planar. 15. Perform analyses that show each of these problems can be solved in the given running time: maximum bipartite cardinality matching in O(V1/2 E) time, vertex connectivity in O(V1/2 E2) time, and edge connectivity in O(V5/3 E) time. 16. Recall that the Hopcroft–Tarjan planarity algorithm computes parameters LOW(v) and LOW2(v). Provide an algorithm that computes both these parameters in O(V+E) time for all vertices v. 17. Construct all planar self–dual self–complementary simple graphs, and prove that your answer is complete. 18. Let A be the adjacency matrix of G, an undirected unweighted n–vertex connected graph. Prove that this algorithm correctly solves the all–pairs shortest paths problem: allPairsShortestPaths(A) { // A, Z, B, T, X, D are n–by–n matrices Z = matrixMultiply(A,A); for all i,j do B[i][j] = (i!=j) && (A[i][j] || Z[i][j]>0); if B[i][j] for all i!=j then return 2*B–A; T = allPairsShortestPaths(B); X = matrixMultiply(T,A); D = 2*T; for all i,j do if X[i][j]<T[i][j]*degreeG[j] then D[i][j]––; return D; }