Question: ( a ) For a graph G , consider two edge - weight functions w 1 and w 2 such that w 1 ( e
a For a graph consider two edgeweight functions and such that
for all edges inE. Show that is an MST wrt iff it is an MST wrt In other words, only the sorted order of the edges matters for the MST
b Suppose graph has integer weights in the range cdotsW where Let be the edges of weight at most and be the number of components in Then show that the MST in has weight exactly
c Show that if the edge weights are all distinct, there is a unique MST
a Show how to implement the "contract" subroutine in time. This algorithm takes as input a graph with some edges colored blue, and outputs a new graph in which vertices correspond to blue connected components in there are no selfloops, and there is a single edge if there exists some edge between the corresponding components in and the weight of edge is given by
b We proved in class that Boruvka reduces the number of nodes by a constant factor in each round, but what about the number of edges? Show an example of a graph with nodes and edges where the number of edges in remains for rounds, even after cleaning up
c Design an time algorithm to find MST using algorithmsdatastructures you have seen in the lectures.
We will design yet another time MST algorithm, but without using any fancy datastructures: in Boruvka's algorithm we scan all the edges in the graph in each pass, and we should avoid this repetition. Assume that is a connected simple graph, and edge weights are distinct.
a Suppose for each vertex, the edges adjacent to that vertex are stored in increasing order of weights. Show a slight variant of Boruvka's algorithm with runtime
bpartial sorting Given a parameter and a list of numbers, give an time algorithm that partitions this list into groups cdots, each of size at most ~~ so that all elements in are smaller than those in for each
c Adapt your algorithm from part a to handle the case where the edges adjacent to each vertex are not completely sorted but only partiallysorted. Ideally, your runtime should be
d Use the two parts above setting preceded by some additional rounds of Boruvka, to give an time MST algorithm.
Recall that Dijkstra's algorithm computes the singlesource shortestpath SSSP correctly for directed graphs with nonnegative edgelengths. For graphs with negativelength edges, we use typically the BellmanFord or FloydWarshall algorithms. Let us explore what happens if we use Dijkstra's algorithm instead. Assume that the graph does not have negativelength cycles.
a Show an example of a graph with negative edgelengths where Dijkstra's algorithm returns the wrong shortestpath distance from the source For your reference, we give Dijkstra's algorithm in algorithm
unmark all nodes while not all vertices marked do u leftarrow unmarked vertex with least label Du mark u for all give a solution by giving examples and by making graph mathematically in depth
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
