unique please Your task for this assignment is to identify a spanning tree in one connected undirected weighted graph using C++. Implement a spanning tree algorithm using C++. A spanning tree is a subset of the edges of a connected undirected weighted graph that connects all the vertices together, without any cycles. The program is interactive. Graph edges with respective weights (i.e., v1 v2 w) are entered at the command line and results are displayed on the console. 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 9 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 process begins. Use an adjacency matrix for recording input edges and show all code used to determine the spanning tree. The input data can be assumed to be valid, so is no need to perform data validation on the input data. After the edges of the spanning tree are determined, the tree edges are displayed on the console, one edge per output line, following the message: “Spanning tree:”. Each output line representing a tree edge contains two integers separated by space. These integers are the two vertices representing the edge. Sample input transactions are as follows: 1 3 51 3 2 62 1 2 73 end-of-file Sample output expected after processing the above input will be as follows: Spanning tree: 13 32 1 Extra credit of 33/100 points will be awarded if the following features are implemented: input graph edges are read from a text data file; output graph edges are written to a text data file; input and output file names are provided as command line parameters. Additional extra credit of 33/100 points will be awarded if Prim’s algorithm is used to find a minimum spanning tree (MST) in the input graph. Use an adjacency matrix for recording input edges and weights and show all code used to determine the MST.

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
100%

unique please

Your task for this assignment is to identify a spanning tree in one connected undirected weighted graph using C++.

  1. Implement a spanning tree algorithm using C++. A spanning tree is a subset of the edges of a connected undirected weighted graph that connects all the vertices together, without any cycles. The program is interactive. Graph edges with respective weights (i.e., v1 v2 w) are entered at the command line and results are displayed on the console.

  2. 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 9 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 process begins. Use an adjacency matrix for recording input edges and show all code used to determine the spanning tree. The input data can be assumed to be valid, so is no need to perform data validation on the input data.

  3. After the edges of the spanning tree are determined, the tree edges are displayed on the console, one edge per output line, following the message: “Spanning tree:”. Each output line representing a tree edge contains two integers separated by space. These integers are the two vertices representing the edge.

    Sample input transactions are as follows:

    1 3 51
    3 2 62
    1 2 73 end-of-file

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

    Spanning tree: 13
    32

1

  1. Extra credit of 33/100 points will be awarded if the following features are implemented:

    1. input graph edges are read from a text data file;

    2. output graph edges are written to a text data file;

    3. input and output file names are provided as command line parameters.

  2. Additional extra credit of 33/100 points will be awarded if Prim’s algorithm is used to find a minimum spanning tree (MST) in the input graph. Use an adjacency matrix for recording input edges and weights and show all code used to determine the MST.

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 7 steps with 5 images

Blurred answer
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