Question: #include using namespace std; #include GRAPH.h void main() { char vertex[] = {'S', 'R', 'G', 'B', 'O', 'T', 'V'}; int numVertices = sizeof(vertex)/sizeof(char); GRAPH g(vertex,

 #include using namespace std; #include "GRAPH.h" void main() { char vertex[]

#include using namespace std; #include "GRAPH.h"

void main() { char vertex[] = {'S', 'R', 'G', 'B', 'O', 'T', 'V'}; int numVertices = sizeof(vertex)/sizeof(char); GRAPH g(vertex, numVertices);

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

Please, it's urgent

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. 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

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!