首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
代写 2XC3、代做 Python 设计编程
项目预算:
开发周期:
发布时间:
要求地区:
Computer Science 2XC3: Final Project
This project will include a final report and your code. Your final report will have the following. You will
be submitting .py (NOT *.ipynb) files for this final project.
• Title page
• Table of Content
• Table of Figures
• An executive summary highlighting some of the main takeaways of your experiments/analysis
• An appendix explaining to the TA how to navigate your code.
For each experiment, include a clear section in your lab report which pertains to that experiment. The report should look professional and readable.
PLEASE NOTE: This is the complete Part I and II. Complete Parts 1 – 5 in group. Part 6 needs to be completed individual. Please refer to the plagiarism policy in Syllabus.
Part 1 : Single source shortest path algorithms
Part 1.1: In this part you will implement variation of Dijkstra’s algorithm. It is a popular shortest path algorithm where the current known shortest path to each node is updated once new path is identified. This updating is called relaxing and in a graph with 𝑛 nodes it can occur at most 𝑛 − 1 times. In this part implement a function dijkstra (graph, source, k) which takes the graph and source as an input and where each node can be relaxed on only k times where, 0 < 𝑘 < 𝑁 − 1. This function returns a distance and path dictionary which maps a node (which is an integer) to the distance and the path (sequence of nodes).
Part 1.2: Consider the same restriction as previous and implement a variation of Bellman Ford’s algorithm. This means implement a function bellman_ford(graph, source, k) which take the graph and source as an input and finds the path where each node can be relaxed only k times, where, 0 < 𝑘 < 𝑁 − 1. This function also returns a distance and path dictionary which maps a node (which is an integer) to the distance and the path (sequence of nodes).
Part 1.3: Design an experiment to analyze the performance of functions written in Part 1.1 and 1.2. You should consider factors like graph size, graph. density and value of k, that impact the algorithm performance in terms of its accuracy, time and space complexity.
Part 2: All-pair shortest path algorithm
Dijkstra’s and Bellman Ford’s are single source shortest path algorithms. However, many times we are faced with problems that require us to solve shortest path between all pairs. This means that the algorithm needs to find the shortest path from every possible source to every possible destination. For every pair of vertices u and v, we want to compute shortest path 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒(𝑢, 𝑣) and the second-to-last vertex on the shortest path 𝑝𝑟𝑒𝑣𝑖𝑜𝑢𝑠(𝑢, 𝑣). How would you design an all-pair shortest path algorithm for both positive edge weights and negative edge weights? Implement a function that can address this. Dijkstra has complexity Ɵ(𝐸 + 𝑉𝑙𝑜𝑔𝑉), or Ɵ (𝑉2) if the graph is dense and Bellman-Ford has complexity Ɵ (𝑉𝐸) , or Ɵ(𝑉3) if the graph is dense. Knowing this, what would you conclude the complexity of your two algorithms to be for dense graphs? Explain your conclusion in your report. You do not need to verify this empirically.
Part 3: A* algorithm
In this part, you will analyze and experiment with a modification of Dijkstra’s algorithm called the A* (we will cover this algorithm in next lecture, but you are free to do your own research if you want to get started on it). The algorithm essentially, is an “informed” search algorithm or “best-first search”, and is helpful to find best path between two given nodes. Best path can be defined by shortest path, best time, or least cost. The most important feature of A* is a heuristic function that can control it’s behavior.
Part 3.1: Write a function A_Star (graph, source, destination, heuristic) which takes in a directed weighted graph, a sources node, a destination node , and a heuristic “function”. Assume h is a dictionary which takes in a node (an integer), and returns a float. Your method should return a 2-tuple where the first element is a predecessor dictionary, and the second element is the shortest path the algorithm determines from source to destination. This implementation should be using priority queue.
Part 3.2: In your report explain the following:
• What issues with Dijkstra’s algorithm is A* trying to address?
• How would you empirically test Dijkstra’s vs A*?
• If you generated an arbitrary heuristic function (like randomly generating weights), how would
Dijkstra’s algorithm compare to A*?
• What applications would you use A* instead of Dijkstra’s?
Part 4: Compare Shortest Path Algorithms
In this part, you will compare the performance of Dijkstra’s and A* algorithm. While generating random graphs can give some insights about how algorithms might be performing, not all algorithms can be assessed using randomly generated graphs, especially for A* algorithm where heuristic function is important. In this part you will compare the performance of the two algorithms on a real-world data set. Enclosed are a set of data files that contain data on London Subway system. The data describes the subway network with about 300 stations, and the lines represent the connections between them. Represent each station as a node in a graph, and the edge between stations should exists if two stations are connected. To find weights of different edges, you can use latitude and longitude for each station to find the distance travelled between the two stations This distance can serve as the weight for a given edge. Finally, to compute the heuristic function, you can use the physical direct distance (NOT the driving distance) between the source and a given station. Therefore, you can create a hashmap or a function, which serves as a heuristic function for A*, takes the input as a given station and returns the distance between source and the given station.
Once you have generated the weighted graph and the heuristic function, use it as an input to both A* and Dijkstra’s algorithm to compare their performance. It might be useful to check all pairs shortest paths, and compute the time taken by each algorithm for all combination of stations. Using the experiment design, answer the following questions:
• When does A* outperform Dijkstra? When are they comparable? Explain your observation why you might be seeing these results.
• What do you observe about stations which are 1) on the same lines, 2) on the adjacent lines, and 3) on the line which require several transfers?
• Using the “line” information provided in the dataset, compute how many lines the shortest path uses in your results/discussion?
Figure 1: London Subway Map
Part 5: Organize your code as per UML diagram
Organize you code as per the below Unified Modelling Language (UML) diagram in Figure 2. Furthermore, consider the points listed below and discuss these points in a section labelled Part 4 in your report (where appropriate).
• Instead of re-writing A* algorithm for this part, treat the class from UML as an “adapter”.
• Discuss what design principles and patterns are being used in the diagram.
• The UML is limited in the sense that graph nodes are represented by the integers. How would you
alter the UML diagram to accommodate various needs such as nodes being represented Strings or carrying more information than their names.? Explain how you would change the design in Figure 2 to be robust to these potential changes.
• Discuss what other types of graphs we could have implement “Graph”. What other implementations exist?
Figure 2: UML Diagram
Part 6: Unknown Algorithm (To work on Individually)
In the code posted with this document, you will find a 𝑢𝑛𝑘𝑛𝑜𝑤𝑛() function. It takes a graph as input. Do some reverse engineering. Try to figure out what exactly this function is accomplishing. You should explore the possibility of testing it on graphs with negative edge weights (create some small graphs manually for this). Determine the complexity of this function by running some experiments as well as inspecting the code. Given what this code does, is the complexity surprising? Why or why not?
Grade Breakup:
Part 1: Single source shortest path algorithms Part 2: All-pair shortest path algorithm
Part 3: A* algorithm
Part 4: Compare Shortest Path Algorithms
Part 5: Organize your code as per UML diagram Part 6: Unknown Algorithm
Group 25 Group 15 Group 20 Group 30 Group 10
Individual 50
Part
Submission Type
Points
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
data程序代写、代做c/c++编程语...
2024-05-17
data程序代写、代做python编程...
2024-05-17
program代做、c/c++,python程...
2024-05-17
代写math 3333 3.0 - winter 2...
2024-05-17
代做seng6110 programming ass...
2024-05-17
代写seng6110 object oriented...
2024-05-17
代写comp828: statistical pro...
2024-05-17
代做culture and society调试数...
2024-05-17
代做comp 4911 winter 2024 as...
2024-05-17
代做lh physical iiib / 03 33...
2024-05-17
代做3032ict big data analyti...
2024-05-17
代写comp4702 report代写留学生...
2024-05-17
代写fin2020 hw6代写c/c++编程
2024-05-17
热点标签
fit2004
fit3152
mec208
econ20120
cpt304
econ2101
econ0051
engi4547
econ1048
eengm2510
fit1008
7033mkt
ec2066
cct380h5f
man00019m
mech265001
fin2020
fit9137
n1542
csc4140
math6119
comp1710
fina864
csys5020
busi4412
math5007
2702ict
dts204tc
comp2003j
cosc2673
ecmt2150
bff3121–
comu7000
stat6118
comp814
acc202
ematm0067
bit233
ecs776p
600543
bpln0025
comp3400
econ7030
159.342 ‐ operating
mang6134
math1005/math6005
geog5404m
comp1710/6780
infs 2042
inf6028
bman30702
math0002
msci242l
mgt11001
com00177m
bman71282
fit2001
cpt210
159.341
econ7310
comp3221
comp10002
cpt206
ecmt1010
finm081
econ2005
cpt202
fit3094
socs0030
data7201
data2x01
mn-3507
mat246h1
ib2d90
ib3j80
acc207
comp90007
compx518-24a
fit1050
info1111
acct2201
buad801
compsci369
cse 332s
info1110
math1033
scie1000
eeee2057
math4063
cmt219
econ5074
eng5009
csse2310/csse7231
ec333
econ0001
cpt204
elec4630
ma117
dts104tc
comp2017
640481
csit128
eco000109m
finc5090
ggr202h5f
nbs8295
4ssmn902
chc6171
dsa1002
ebu6304
comp1021
csci-ua.202
com6511
ma416
mec206
iom209
bism7202
idepg001
cpt106
comp1212
ecom209
math1062
mn-3526
fnce3000
fmhu5002
psyc10003
fina2222
be631-6-sp/1
finc2011
37989
5aaob204
citx1401
econ0028
bsan3204
comp9123
cmt218
itp122
qbus6820
ecmt1020
bus0117
soft3202/comp9202
basc0057
mecm30013
aem4060
acb1120
comp2123
econ2151
ecmt6006
inmr77
com 5140
ocmp5328
comp1039
had7002h
cmt309
asb-3715
elec373
cpt204-2324
be631-6-sp
econ3016
mast10007
buss6002
comp4403
comp30023
finm1416
csc-30002
6qqmn971
fin668
mnfg309
inft2031
cits1402
comp2011
eecs 3221
ebu4201
ct60a9600
com336
8pro102
econ7300
comp3425
comp8410
comp222
finm8007
comp2006
comp26020
comp1721
eeen3007j
cis432
csci251
comp5125m
com398sust
finm7405
econ7021
fin600
infs4205/7205
mktg2510-
32022
mth6158
comp328
finn41615
2024
mec302
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!