Coursework on the Shortest-Path ProblemIt is worth 13 marks. Task ListFor this coursework, you need to design and implement a Java program that solves the followingtwo shortest-path problems given a graph G, AND provide a short description on yourimplemented algorithm and its complexity analysis (MUST be less than 2 pages, Font12.).Task 1: Given a selected starting node, find the shortest path from the selected node to everyother node.Task 2: Among all the nodes, choose the one with the smallest summation of shortest distancesto all other nodes. E.g. The shortest distances of Node 0 to all other nodes are: d0,1, d0,2, ..., d0,n,then the summation for Node 0 is: d0=d0,1+d0,2+...+d0,n. You should find the node with smallestsummation, e.g. imin = argmin di.Problem DescriptionWe may often encounter many shortest path problems in life, e.g., to find the optimal drivingpath from one place to another across the city; to route a packet through the internet from yourPC to the server. In this coursework, we will practice how to find the optimal path from one cityto another given a graph. An example graph (map) is shown in Fig. 1. 10 cities from China are chosen and they are interconnected by road. Cities are indexed with anumber from 0 to 9, e.g. Beijing’s index is 0 and Dalian’s index is 9. The distance from one cityto another is shown on the edges.Fig. 1: An example graph that interconnects 10 cities in China. The nodes represent the cities andthe edges represent the distance between two cities.Task Description and GuidelinesTask 1: Given a selected starting node, find the shortest-path from the selected node to allother nodes. Objectives: This is to simulate that when there is one logistic center (the selected starting city),how far the other cities are apart from this city. This is a standard single-source shortest pathproblem.Selecting Starting City: Use your student ID to select the starting city, e.g. If your student ID is6543210, the last digit 0 is chosen. So the starting city is Beijing (index 0).Output: You should write the following into a file named “Task1Result.txt”. For example, ifyour source city is Beijing:[Student Name],[Student ID]Source City:BeijingTo Tianjin:125km,Beijing,Tianjin.To Chengde:226km,Beijing,Chengde....To Dalian:916km,Beijing,Tianjin,Dalian.The sum of the shortest distances:****kmThe first line is your name and your student ID, separated by ‘,’.The second line is your source city.The third to eleventh lines are the shortest distances from your source city to the destinationcities, and the optimal/shortest paths. The last line is the sum of all the shortest distances.Task 2: Among all the nodes, choose the one with the smallest summation of distances to allother nodes. E.g. The shortest distance of Node 0 to all other nodes are: d0,1, d0,2, ..., d0,n, then thesummation for Node 0 is: d0=d0,1+d0,2+...+d0,n. You should find the node with smallestsummation, e.g. imin = argmin di.Objectives: This is to find the city with the shortest summation of distances to other cities. Thiscity will be a good choice for logistic center.NOTE: Remove the city you used as the starting city in Task 1, e.g. If your student ID is6543210, then in Task 1 the starting city is Beijing, and you should remove Beijing from thegraph and its associated edges for Task 2. For the remaining 9 cities, find the one with thesmallest summation of distances to other cities.Output: You should write the following into a file named “Task2Result.txt”.[Student Name],[Student ID][City 0],[SummationOfDistanceToCity0]...[City 9],[SummationOfDistanceToCity9]The chosen logistic center is [City Name]. Summation of distances is: ****km.The first line is student name and student ID. The second to tenth lines are: the name of remaining 9 cities, and its summation of distances toall cities.The 11th line is: the chosen logistic center and its summation of distances to all cities.Requirements You may design your own algorithm to solve this problem, but your algorithm MUST obtainthe globally optimal solution. You MUST implement your solution in Java. Your program should load the graph from a text file. You may define your own format for thetext file. You may use adjacency matrix, adjacency list, adjacency map or edge list toimplement the graph.How to submitYou should zip all the java files, your text file for the graph, the result files and the PDF file forthe explanation of your algorithm and its complexity analysis in ONE zipped file. 本团队核心人员组成主要包括BAT一线工程师,精通德英语!我们主要业务范围是代做编程大作业、课程设计等等。我们的方向领域:window编程 数值算法 AI人工智能 金融统计 计量分析 大数据 网络编程 WEB编程 通讯编程 游戏编程多媒体linux 外挂编程 程序API图像处理 嵌入式/单片机 数据库编程 控制台 进程与线程 网络安全 汇编语言 硬件编程 软件设计 工程标准规等。其中代写编程、代写程序、代写留学生程序作业语言或工具包括但不限于以下范围:C/C++/C#代写Java代写IT代写Python代写辅导编程作业Matlab代写Haskell代写Processing代写Linux环境搭建Rust代写Data Structure Assginment 数据结构代写MIPS代写Machine Learning 作业 代写Oracle/SQL/PostgreSQL/Pig 数据库代写/代做/辅导Web开发、网站开发、网站作业ASP.NET网站开发Finance Insurace Statistics统计、回归、迭代Prolog代写Computer Computational method代做因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:[email protected] 微信:codehelp