hw3 - O ( n + m ) to decide i the nodes o the graph can...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
AMS/MBA 546 (Fall 2010) Estie Arkin Network Flows Homework Set # 3 Due Tuesday, September 28, 2010. 1). Recall the weighted max acyclic subgraph problem : Given a directed graph D = ( N,A ), with weights on the arcs w ij 0, fnd a subset o± the arcs a A such that D = ( N,A ) is acyclic, and the weight A , w ( A ), is as large as possible. Consider the ±ollowing greedy algorithm: Sort the arcs by weight, ±rom largest to smallest, consider the arcs in this order, and insert an arc into A as long as it does not create a directed cycle with the arcs already in A . (At the start A is empty.) Clearly this algorithm yields a ±easible solution, however, the weight o± A can be much less than opt , the weight o± an optimal solution. Describe a ±amily o± directed graphs ±or which w ( A ) /opt c/n , where c is some constant (that does not depend on n ) and n is the number o± nodes in your graph. 2). We are given a graph G = ( N,E ) where some o± the edges are red R and the remaining edges are black B ( E = R B and R B = ). Describe an algorithm whose running time is
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: O ( n + m ) to decide i the nodes o the graph can partition into two sets N 1 and N 2 ( N = N 1 N 2 and N 1 N 2 = ) so that every red edge connects a node rom N 1 with a node o N 2 , and every black edge connects two nodes within the same set (both nodes in N 1 or both nodes in N 2 ). 3). Given an undirected graph G = ( N,E ) a vertex cover C is a subset o the nodes C N such that or each edge ( i,j ) E either i C or j C or both. (a). Let L be the set o leaves in a DFS tree o G . (recall, a lea is a node with no children). Prove that C = N \ L is a vertex cover. This result is used to show that one can approximate a vertex cover with a set that is at most twice the size o the optimal size o a set cover. (You need not show this.) (b). Now let L be the set o leaves in a BFS tree o G . Give an example in which C = N \ L is not a vertex cover....
View Full Document

Ask a homework question - tutors are online