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[]](https://s3.amazonaws.com/si.experts.images/answers/2024/09/66dc6c421ffe6_66566dc6c4184201.jpg)
#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
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
Get step-by-step solutions from verified subject matter experts
