2c please

2. Recall that given a connected, weighted, undirected graph G = (V, E, W: E + N), a spanning tree T of G is a connected tree containing every vertex in G. The weight w(T) of T is defined as onwe). Further, T is a minimum spanning tree of G if for all spanning trees T of G, w(T) < W(T). (b) Sun (a) T is a maximum spanning tree of G if for all spanning trees T of G, W(T) > Write a polynomial time algorithm that computes a maximum spanning tree of G. Prove the running time and correctness of your algorithm. Suppose we are given a weighted, connected, undirected graph G = (V, E, W: E → N) where the vertices represent islands and the edges represent potential bridges that can be built. If (u, v) E E, then w(e) is the distance between islands u and v. However, longer bridges cost more to construct. A bridge of length d costs d? dollars to build. We want to connect all of the islands together with minimum cost, so we want to find a spanning tree T such that Leat w(e) is minimized. Show that T is a minimum spanning tree if and only if T minimizes Leer w(e)2. (c) Suppose we are given a weighted, connected, undirected graph G = (V, E,W : E + N) where the vertices represent routers in a computer network and edge represent potential network connections. Oftentimes, we want to separate part of the network for security reasons. Let S CV denote a secure subset of the routers. We will say that a spanning tree T of G is secure if and only if for all u, v ES, the simple path Put in T starting at u ES and ending at v ES only passes through secure vertices in S. That is to say, T is secure if and only if all pairs of secure routers in the network are connected in T only by other secure routers. Write a polynomial time algorithm that on input G and S, outputs a secure spanning tree T such that meet w(e) is minimized over all possible secure spanning trees of G. Prove the running time and correctness of your algorithm.