1. Homepage
2. Programming
3. COMP3023 Design and Analysis of Algorithms - Programming Assignment: Graph

# COMP3023 Design and Analysis of Algorithms - Programming Assignment: Graph

BNU-HKBU UICCOMP3023Design and Analysis of AlgorithmsC++Depth-First SearchArticulation PointsBiconnected ComponentsMinimum Spanning TreeShortest Path TreeKruskal’s AlgorithmDijkstra’s AlgorithmGraph

COMP3023 Design and Analysis of Algorithms

Fall 2023

Programming Assignment

Instructions:
Write a program that can return any three of the following four artifacts from a given weighted,

undirected graph: (Note each numbered item is considered as one artifact.)

1. A Depth-First Search (DFS) Tree (Lecture06)

2. All its Articulation Points (AP) and Biconnected Components (BC) (Lecture06)

3. A Minimum Spanning Tree (MST), using Kruskal’s Algorithm (Lecture08)

4. The Shortest Path Tree (SPT), using Dijkstra’s Algorithm (Lecture09)

The input to your program is a data file named graph.txt, which specifies 1) the number of vertices (int), 2) the number of edges (int), 3) each edge’s two vertices and its weight (int). A sample input file is shown in Figure 1, along with the actual graph that it represents:

6
8
0, 1, 3 0, 2, 3 0, 3, 4 1, 3, 3 2, 3, 2 3, 4, 4 3, 5, 2 4, 5, 4

14

334 0434 322

25

Figure 1 A sample input file with the graph it represents

Your program shall read the file name from keyboard, read the graph information from the file, run the above-mentioned four algorithms, and display the results on the console. Your program shall repeatedlyaskforaninputdatafileuntiltheuserpress"CTRL+Z". Asampleofconsoleoutputisgivenonthe next page, in Figure 2.

Submission:

1. Please write your program in C or C++.
Put all your code in one single file and name it
PA_#######.cpp, where ####### is your student ID.
Build an executable file and name it
PA_#######.exe.
Pack the .cpp and .exe files into a zip file and name it
PA_#######.zip.

2. Please make sure your program can be executed. An unexecutable program will automatically yield a grade of zero.

1

1. Comment your code when appropriate. Inside the comments, you are responsible of providing a full disclosure of all external reference materials that you have used, such as links to a public webpage, a video tutorial, or even a public repository. Failing to do so may yield a penalty.

2. Reusing another student’s program is strictly prohibited. Plagiarism checking will be conducted prior to grading. Any case of violation of UIC’s honor code will yield a grade of zero and a report to Student Affairs Office.

***************
Input the file name:
graph.txt
***************
1. The following are the edges in the constructed DFS Tree 0--1 1--3 2--3 3--4 4--5

***************
2. The articulation point(s) found in the given graph is/are: Vertex 3
The biconnected component(s) found in the given graph is/are: 0--1 0--2 0--3 1--3 2--3
3--4 3--5 4--5
***************
3. The following are the edges in the constructed MST:
0--1 1--3 2--3 3--4 3--5
***************
4. The following are the edges in the constructed SPT:
0--1 0--2 0--3 3--4 3--5
***************
Input the file name:

Figure 2. Sample console output

## Get in Touch with Our Experts

QQ
WeChat
Whatsapp
BNU-HKBU UIC代写,COMP3023代写,Design and Analysis of Algorithms代写,C++代写,Depth-First Search代写,Articulation Points代写,Biconnected Components代写,Minimum Spanning Tree代写,Shortest Path Tree代写,Kruskal’s Algorithm代写,Dijkstra’s Algorithm代写,Graph代写,BNU-HKBU UIC代编,COMP3023代编,Design and Analysis of Algorithms代编,C++代编,Depth-First Search代编,Articulation Points代编,Biconnected Components代编,Minimum Spanning Tree代编,Shortest Path Tree代编,Kruskal’s Algorithm代编,Dijkstra’s Algorithm代编,Graph代编,BNU-HKBU UIC代考,COMP3023代考,Design and Analysis of Algorithms代考,C++代考,Depth-First Search代考,Articulation Points代考,Biconnected Components代考,Minimum Spanning Tree代考,Shortest Path Tree代考,Kruskal’s Algorithm代考,Dijkstra’s Algorithm代考,Graph代考,BNU-HKBU UIChelp,COMP3023help,Design and Analysis of Algorithmshelp,C++help,Depth-First Searchhelp,Articulation Pointshelp,Biconnected Componentshelp,Minimum Spanning Treehelp,Shortest Path Treehelp,Kruskal’s Algorithmhelp,Dijkstra’s Algorithmhelp,Graphhelp,BNU-HKBU UIC作业代写,COMP3023作业代写,Design and Analysis of Algorithms作业代写,C++作业代写,Depth-First Search作业代写,Articulation Points作业代写,Biconnected Components作业代写,Minimum Spanning Tree作业代写,Shortest Path Tree作业代写,Kruskal’s Algorithm作业代写,Dijkstra’s Algorithm作业代写,Graph作业代写,BNU-HKBU UIC编程代写,COMP3023编程代写,Design and Analysis of Algorithms编程代写,C++编程代写,Depth-First Search编程代写,Articulation Points编程代写,Biconnected Components编程代写,Minimum Spanning Tree编程代写,Shortest Path Tree编程代写,Kruskal’s Algorithm编程代写,Dijkstra’s Algorithm编程代写,Graph编程代写,BNU-HKBU UICprogramming help,COMP3023programming help,Design and Analysis of Algorithmsprogramming help,C++programming help,Depth-First Searchprogramming help,Articulation Pointsprogramming help,Biconnected Componentsprogramming help,Minimum Spanning Treeprogramming help,Shortest Path Treeprogramming help,Kruskal’s Algorithmprogramming help,Dijkstra’s Algorithmprogramming help,Graphprogramming help,BNU-HKBU UICassignment help,COMP3023assignment help,Design and Analysis of Algorithmsassignment help,C++assignment help,Depth-First Searchassignment help,Articulation Pointsassignment help,Biconnected Componentsassignment help,Minimum Spanning Treeassignment help,Shortest Path Treeassignment help,Kruskal’s Algorithmassignment help,Dijkstra’s Algorithmassignment help,Graphassignment help,BNU-HKBU UICsolution,COMP3023solution,Design and Analysis of Algorithmssolution,C++solution,Depth-First Searchsolution,Articulation Pointssolution,Biconnected Componentssolution,Minimum Spanning Treesolution,Shortest Path Treesolution,Kruskal’s Algorithmsolution,Dijkstra’s Algorithmsolution,Graphsolution,