合肥生活安徽新闻合肥交通合肥房产生活服务合肥教育合肥招聘合肥旅游文化艺术合肥美食合肥地图合肥社保合肥医院企业服务合肥法律

代写COMP3023、C/C++语言编程代做

时间:2023-12-08  来源:合肥网hfw.cc  作者:hfw.cc 我要纠错


COMP3023 Design and Analysis of Algorithms

Fall 2023

Programming Assignment

Submission by Dec. 6, 2023

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

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

repeatedly ask for an input data file until the user press "CTRL+Z". A sample of console output is given on the

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 4

3 3 4

0 4 3 4

3 2 2

2 5

2

***************

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:

3. 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.

4. 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.

请加QQ:99515681 或邮箱:99515681@qq.com   WX:codehelp

 

扫一扫在手机打开当前页
  • 上一篇:COMP26020代做、代写C++设计程序
  • 下一篇:MA2552编程代写、代做MATLAB程序
  • 无相关信息
    合肥生活资讯

    合肥图文信息
    新能源捕鱼一体电鱼竿好用吗
    新能源捕鱼一体电鱼竿好用吗
    海信罗马假日洗衣机亮相AWE  复古美学与现代科技完美结合
    海信罗马假日洗衣机亮相AWE 复古美学与现代
    合肥机场巴士4号线
    合肥机场巴士4号线
    合肥机场巴士3号线
    合肥机场巴士3号线
    合肥机场巴士2号线
    合肥机场巴士2号线
    合肥机场巴士1号线
    合肥机场巴士1号线
    合肥轨道交通线路图
    合肥轨道交通线路图
    合肥地铁5号线 运营时刻表
    合肥地铁5号线 运营时刻表
  • 币安app官网下载

    关于我们 | 打赏支持 | 广告服务 | 联系我们 | 网站地图 | 免责声明 | 帮助中心 | 友情链接 |

    Copyright © 2024 hfw.cc Inc. All Rights Reserved. 合肥网 版权所有
    ICP备06013414号-3 公安备 42010502001045