(1) MST using KRUSKAL's Algorithm :
Arrange all the edges in increasing order (in an array )according to their weight :
8, 9, 10, 11, 24, 25, 28, 30, 33, 36
now, pick at each step pop the lowest weighted edge from the array.
next check whether nodes in the edge are traversed or not.
if not traversed then add the edge to the MST.
repeat until all nodes in the graph are traversed.
Addition of edge B-----D forms a cycle, so we pick next edge in the array
Since all the nodes in the graph are traversed. Hence the above mentioned tree is our required MST.
(2) MST using Prim's Algorithm
Steps 0: Pick any node as a start node in the MST abitrary.
step 1: arrange all edges which are connected to the current MST in increasing order.
Choose the lowest weighted edge
if the node doesn't form a cycle then add it into the MST & mark the added node as traversed.
repeat from step 1 untill all the nodes are traversed.
Since all the nodes in the graph are traversed. Hence the above mentioned tree is our required MST.
(3)
There is an Eulerian path exist if we traversed as follows :
A --- E --- B --- A --- D --- C --- B --- D --- E --- C --- A (each edge is traversed only once)
The above mentioned path is a Eulerian Cycle since the starting node and the end node are the same.
(4)
There is an Hamiltonian path exist if we traversed as follows :
A --- B --- C --- D --- E --- A (each node is traversed only once)
The above mentioned path is a Hamiltonian Cycle since the starting node and the end node are the same.
length of the hamiltonian cycle = 24 + 9 + 8 + 28 + 10 = 79
#4. TSP a) Solve with 2 MST approx. algorithm. Note: you can assume weights of edges:...
#4. TSP b) Solve with Christofides approx. algorithm. Note: you can assume weights of edges: w(C,E) = 36 and w(CA)=33 1) Find MST A B 2) Find min-cost perfect matching 24 3) Find Eulerian cycle 9 4) Do shortcuts (show steps here) lol 25 с 30 8 28 Report the resulting Hamiltonian cycle and its length:
a) Solve with 2 MST approx. algorithm. Note: you can assume weights of edges: w(C,E) = 36 and w(C,A)=33 A B 24 1) Find MST 2) Double MST 3) Find Eulerian cycle 4) Do shortcuts (show steps here) 9 lol 11 30 25 8 E 28 Report the resulting Hamiltonian cycle and its length:
b) Solve with Christofides approx. algorithm. Note: you can assume weights of edges: w(C,E) = 36 and w(C,A)=33 A 24 1) Find MST 2) Find min-cost perfect matching 3) Find Eulerian cycle 4) Do shortcuts (show steps here] 9 Il C 30 25 8 E 28 Report the resulting Hamiltonian cycle and its length:
5. (10 points) Solve TSP (Travelling Salesman Problem) for the following graph using 2-MST (Minimum Spanning Tree) algorithm. 18 12 15 15 13 10 15 Answer: a) the MST consists of edges its length is b) the Eulerian cycle is c) the Hamiltonian cycle is its length is