Your task for this assignment is to identify a minimum spanning tree (MST) in an undirected connected weighted graph using C++. This will be accomplished utilizing the Prim MST algorithm discussed in the Malik text book. Implement a minimum spanning tree (MST) algorithm using C++. An MST (also minimum weight spanning tree) is a subset of the edges of a connected, edge- weighted, undirected graph that connects all the vertices together, without any cycles and with the minimum total edge weight. The program is interactive. Graph edges with respective weights are entered at the command line and results are displayed on the console. 1. Each input transaction represents an undirected edge of a connected weighted graph. The edge consists of two unequal non-negative integers in the range 0 to 99 representing graph vertices that the edge connects. Each edge has an assigned weight. The edge weight is a positive integer in the range 1 to 99. The three integers on each input transaction are separated by space. An input transaction containing the string "end-of-file" signals the end of the graph edge input. After the edge information is read, the MST process begins. Use an array with a capacity of 100 for recording input edges. The input data can be assumed to be valid, so is no need to perform data validation on the input data. 2. After the edges of the MST are determined, the MST edges are displayed on the console, one edge per output line, following the message: "Minimum spanning tree:". Each output line representing an MST edge contains three integers separated by space. The first two integers are the two vertices representing the edge and the 3. third integer represents the weight of the edge.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Sample input transactions are as follows:

1  3 5
3 2 6
1  2 7

end-of-file

Sample output expected after processing the above input will be as follows:

Minimum spanning tree:

1 3 5
3 2 6
Edge weight total: 11

Your task for this assignment is to identify a minimum spanning tree (MST) in an
undirected connected weighted graph using C++. This will be accomplished utilizing the
Prim MST algorithm discussed in the Malik text book.
Implement a minimum spanning tree (MST) algorithm using C++. An MST (also
minimum weight spanning tree) is a subset of the edges of a connected, edge-
weighted, undirected graph that connects all the vertices together, without any
cycles and with the minimum total edge weight. The program is interactive. Graph
edges with respective weights are entered at the command line and results are
displayed on the console.
1.
Each input transaction represents an undirected edge of a connected weighted
graph. The edge consists of two unequal non-negative integers in the range 0 to 99
representing graph vertices that the edge connects. Each edge has an assigned
weight. The edge weight is a positive integer in the range 1 to 99. The three integers
on each input transaction are separated by space. An input transaction containing
the string "end-of-file" signals the end of the graph edge input. After the edge
information is read, the MST process begins. Use an array with a capacity of 100 for
recording input edges. The input data can be assumed to be valid, so is no need to
perform data validation on the input data.
2.
After the edges of the MST are determined, the MST edges are displayed on the
console, one edge per output line, following the message: "Minimum spanning
tree:". Each output line representing an MST edge contains three integers separated
by space. The first two integers are the two vertices representing the edge and the
third integer represents the weight of the edge.
3.
Transcribed Image Text:Your task for this assignment is to identify a minimum spanning tree (MST) in an undirected connected weighted graph using C++. This will be accomplished utilizing the Prim MST algorithm discussed in the Malik text book. Implement a minimum spanning tree (MST) algorithm using C++. An MST (also minimum weight spanning tree) is a subset of the edges of a connected, edge- weighted, undirected graph that connects all the vertices together, without any cycles and with the minimum total edge weight. The program is interactive. Graph edges with respective weights are entered at the command line and results are displayed on the console. 1. Each input transaction represents an undirected edge of a connected weighted graph. The edge consists of two unequal non-negative integers in the range 0 to 99 representing graph vertices that the edge connects. Each edge has an assigned weight. The edge weight is a positive integer in the range 1 to 99. The three integers on each input transaction are separated by space. An input transaction containing the string "end-of-file" signals the end of the graph edge input. After the edge information is read, the MST process begins. Use an array with a capacity of 100 for recording input edges. The input data can be assumed to be valid, so is no need to perform data validation on the input data. 2. After the edges of the MST are determined, the MST edges are displayed on the console, one edge per output line, following the message: "Minimum spanning tree:". Each output line representing an MST edge contains three integers separated by space. The first two integers are the two vertices representing the edge and the third integer represents the weight of the edge. 3.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY