Question: Please write the whole code, and also you have to use this code: #include using namespace std; #include GRAPH.h void main() { char vertex[] =

Please write the whole code, and also you have to use this code:
#include
void main() { char vertex[] = {'S', 'R', 'G', 'B', 'O', 'T', 'V'}; int numVertices = sizeof(vertex)/sizeof(char); GRAPH
g.setEdge('S', 'R', 10); g.setEdge('S', 'T', 120); g.setEdge('R', 'O', 60); g.setEdge('R', 'T', 90); g.setEdge('R', 'V', 120); g.setEdge('G', 'B', 30); g.setEdge('O', 'T', 20); g.setEdge('T', 'V', 30);
cout The file UndirectedGraph.cpp contains the code for defining the vertices of an undirected graph. Use this file to write a program that will put the weights of the edges to be the absolute values of the differences between the values of the vertices. If a number is repeated, it should not be included in the graph. From the thus obtained undirected graph create a minimum spanning tree according to the Kruscal's algorithm. Print the tree. Then, find the edge that has the lowest value (weight) and print the vertices connected with that edge, as well as the edge weight
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
