Homework Assignment 10


Due: Apr. 20 before class starts


Assignment

  1. (40 points) A graph G is bipartite if its vertices can be partitioned into two sets X and Y such that every edge in G has one end vertex in X and the other in Y. Design and analyze an efficient algorithm for determining if an undirected graph G is bipartite (without knowing the sets X and Y in advance).
    1. Provide and explain pseudocode
    2. Statement and proof of time complexity
    3. Statement and proof of memory complexity
  2. (30 points) Show that if all the weights in a connected weighted graph G are distinct, then there is exactly one minimum spanning tree for G. Provide a statement and proof. Hint: Use proof by contradiction.
  3. (30 points) NASA wants to link n stations spread over the country using communication channels. Each pair of stations has a different bandwidth available, which is known a priori. NASA wants to select n - 1 channels (the minimum possible) in such a way that all the stations are linked by the channels and the total bandwidth (defined as the sum of the individual bandwidths of the channels) is maximum. Give an efficient algorithm for this problem and analyze its worse-case performance. Consider the weighted graph G = (V, E), where V is the set of stations and E is the set of channels between the stations. Define the weight w(e) of an edge e in E as the bandwidth of the corresponding channel.
    1. Provide and explain pseudocode
    2. Statement and proof of time complexity
    3. Statement and proof of memory complexity
  4. Bonus. (10 points) An old MST method, called Barůvka's algorithm, works as follows on a graph G having n vertices and m edges with distinct weights:
        Let T be a subgraph of G initially containing just the vertices in V.
        while T has fewer than n - 1 edges do
             for each connected component Ci of T do
                 Find the lowest-weight edge (v, u) in E with v in Ci and u not in Ci.
                 Add (v, u) to T (unless it is already in T).
         return T
    Argue why this algorithm is correct and why it runs in O(m log n) time.


General Instructions, Turning in assignments, and Grading

General Instructions

Turn in Instructions

Each assignment will be turned in in class (hard copy). Assignments are due BEFORE, let me repeat, before class starts. This does not mean five minutes after class starts. Details:

Points