Question: Suppose that you have a connected, undirected graph G=(V, E) where each edge is colored either red or blue. Given a number k, you

Suppose that you have a connected, undirected graph G=(V, E) where each 

Suppose that you have a connected, undirected graph G=(V, E) where each edge is colored either red or blue. Given a number k, you are interested in determining whether there is some spanning tree of G that contains exactly k blue edges. Design a polynomial-time algorithm that finds a spanning tree of G containing the minimum possible number of blue edges. Then: Describe your algorithm. Prove that your algorithm finds a spanning tree of G containing the minimum possible number of blue edges. Prove that your algorithm runs in polynomial time. Design an algorithm that finds a spanning tree of G containing the maximum possible number of blue edges. Then: Describe your algorithm. Prove that your algorithm finds a spanning tree of G containing the maximum possible number of blue edges. Prove that your algorithm runs in polynomial time. 111. Suppose 7 and 72 are spanning trees of G where T contains ki blue edges and T2 contains k2 >k: blue edges. Prove there must be some spanning tree T of G con- taining exactly ki + 1 blue edges. iv. i Design an algorithm that, given a number k, determines whether there is a span- ning tree of G that contains exactly k blue edges. Note that you don't need to find such a spanning tree, you just need to determine whether one exists. Your algorithm should run in time polynomial in n and m (the number of nodes and edges in G), but not in k. Then: Describe your algorithm. Briefly justify why your algorithm determines whether there is a spanning tree of G containing exactly k blue edges. You don't need to write a formal proof here, but should give a one-paragraph justification as to why your algorithm works. Briefly justify why your algorithm runs in time polynomial in n and m.

Step by Step Solution

3.48 Rating (181 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Answer i To find a spanning tree of G containing the minimum possible number of blue edges we can use a modified version of Prims algorithm The algorithm can be described as follows 1 Start with an ar... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Engineering Questions!