Question: Problem 3 . Let G = ( V , E ) be a connected, undirected graph. We start with coins placed on arbitrarily chosen vertices
Problem Let GVE be a connected, undirected graph. We start with coins placed on arbitrarily chosen vertices of G and each coin can move to an adjacent vertex at every step. The objective is to determine if it is possible to bring all coins to the same vertex, and if so compute the minimum number of moves required.
a Suppose there are two coins placed on two given vertices uv in V which may or may not be distinct. Describe and analyze an algorithm to compute the minimum number of steps to reach a configuration where both coins are on the same vertex, or to report correctly that no such configuration is possible. The input to your algorithm consists of the graph GVE and the initial vertices u and v
b Now suppose there are three coins placed on three given vertices of G Describe and analyze an algorithm to compute the minimum number of steps to reach a configuration where all three coins are on the same vertex, or to report correctly that no such configuration is possible.
c Finally, suppose there are fortytwo coins placed on fortytwo given vertices of G Describe and analyze an algorithm to determine whether it is possible to move all coins to the same vertex. For full credit, your algorithm should run in OVE time.
Prove the correctness of your algorithms and analyze their running time or any other efficiency measure asked in the question Solve the question in detail. Show each and every step.
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
