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.
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...
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
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 3 images
Recommended textbooks for you
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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
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
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY