## Computing the Shortest Path Using Modified Dijkstra’s Algorithm

**Question**

** Task :** By week 6 you should be in a group. To complete this task, you and your group will need to do the following:

- Finalise your choice of topic
- Search for relevant literature and related work and write a literature review.
- Decide on a research method and design the project (e.g. explain which case study you have chosen or describe how the experiments or surveys will be run).
- Identify ethical and professional considerations and management thereof (e.g. do you require ethics approval? How does it fit with the ACS Code of Ethics? How will you store data? Etc.).
- Develop a time plan for your project. Identify stakeholders and include communication/interaction steps in your plan (e.g. workshops, meetings, conferences).
- Identify key constraints for your project: these could include costs, time, quality, risks etc. While a complete costing is not required, attention should be paid to the cost of equipment, surveys, etc. A mitigation plan for significant risks should be included

**Answer**

**Introduction:** In graph theory, the problem is used to find the path between source vertices and destination vertices (or nodes) in a graph such that the sum of the weights of its constituent edges is minimized. A graph G is a collection of two sets V & E where V is the collection of vertices vR0,

RvR1,................In-1 Ralso called nodes, and E is the collection of edges eR1,ReR2,...............ReRnR where an
edge is an arc which connects two nodes.

This can be represented as :

G=(V,E)

V(G) = (vR0,RvR1,.........RvRnR) or set of vertices

E(G) = (eR1,ReR2,..........ReRnR) or set of edges

A graph has only two main components called edges and nodes. The graph is a non-linear data structure, and the designers have to deal with these two components in this data structure. A graph can be represented in computer memory in two ways. Those two ways are linked list and sequential representation. The information of the nodes adjacent to each other is kept with the help of adjacency matrix. The adjacency matrix is sometimes called as connection matrix. With the help of adjacency matrix, we can check whether a node is adjacent to another node (Jiang et al. 2014). The representation of a graph can be better with the help of adjacency link list if the graph has sparse adjacency matrix.

We have to use two lists when we represent a graph using adjacency link list. One list is to store information of every node of the graph. Another list is to store information of the adjacent nodes. We require knowing the minimal path between a source node and a destination node. The technique of finding the minimal or shortest path is also used in water supply and electricity distribution system. This technique is also applied in setting tracks in the railway system. Our life aims to execute an activity efficiently and accurately with investing minimum time. Similarly, if one person has to travel from one place to another, he will better choose the shortest path to reach the destination within the shorter period (Gao et al. 2015). The same logic is applied in the railway tracking system. The shortest path technique is also effectively used in computer network system for routing.

We may have various options to reach a node from a node whereas, it is better to reach the destination node through the shortest path. The shortest path is the one along which we will have the minimum sum of the edge weights. The experts have provided many different algorithms to find out the shortest path between two nodes, and the Dijkstra's algorithm is one of the famous and useful shortest path determining algorithms. The Dijkstra's algorithm will be described in this study taking a graph and finding the minimal path between the source node and the destination node. The Dijkstra's algorithm will guide us to choose the shortest path from the various paths from one node to another. This algorithm is being used in many fields as this algorithm is easier to use and requires simple calculation.

**Research Aim:** The research aims to suggest a modified version of the Dijkstra's algorithm that will reduce the traversal time with the removal of out-of-ranged nodes.

**Literature Review and Background of the research****Dijkstra’s Shortest Path Algorithm:** The Dijkstra's algorithm is considered as the parent algorithm of the ample number of current shortest path finding algorithms and techniques. It is also the general form the BFS algorithm (Breadth-First-Search algorithm). In the Dijkstra's algorithm technique, we assign a cost value to the edges connected with each adjacent vertex starting from the source node or source vertex. The node is also called a vertex. At the first step, only cost assigning is done and in the next step, we traverse the vertices having the minimum accumulated weight or cost value. Then we have to add the accumulated cost of the node and the edge cost and assigned the calculated value to each of the adjacent nodes. We have to continue this process until the traversal of all the vertices of the graph (Arya et al. 2018). During the process, we come across an already visited node with higher cost, and then we will reassign that node with the new cost value. The algorithm will provide us the scope to find out the minimal path between each pair of the nodes. Not only that, we will be able to get the distance of any vertex from the source vertex. This algorithm is the most used algorithm to find out the solution for shortest path problem. A graph is mathematically represented in the form of G (V, E) where V represents the number of vertices and E represents the number edges present in that graph. The processing time of the nodes and finding out the distance between two nodes is completely dependent on the data structure that is being used. The processing or the running time varies with the use of different data structures. There are several data structures like Fibonacci heap and binary heap that can be used in the implantation of the Dijkstra’s algorithm. The main purpose is to have the outcome of having the minimum time complexity. The use of Fibonacci heap leads the time complexity to O(V*log (V)). We will use binary heal in this project for implementing the Dijkstra’s algorithm.

**Time Complexity:** The begin for loop involves the processing time in term of O (V), and we have to find out the Min of the heap that is logV for each execution of the while loop. As the for loop that is the deepest inner is executed for the times that is equal to the number of the neighbouring nodes of the present node. Hence the total processing time for the deepest for loop is O (E). Hence now we can calculate the time complexity of the Dijkstra's algorithm as O ((V+E)*log (V) =O (E*log (V)). The execution time of the algorithm is dependent on the number of the nodes present in the graph. The processing time becomes longer with the increase in the number of the nodes in the graph (Broumi et al. 2016). Due to this reason, the existing Dijkstra's algorithm takes a very long time when it is implemented to find out the shortest path in case of the road network in a city as a city generally has about 10^4 number of nodes in the network.

**Proposed Algorithm:** We mainly need to find out the shortest path in case of road network as the roads are the essential part of our daily life activities. We become able to perform more activities if we do not have to travel to go to school or to office. Hence this is a field where we need to apply the shortest path finding technique mostly. People need to reach to their destination as quickly as possible in their busy lives. The travel and tourism sector is also giving effort in the research of finding the shortest path to reach to the destination places. People also need to get their ordered products quickly, and all these kinds of requirement from the consumers' side are leading the business sector to focus on or to invest effort on the research of finding an appropriate algorithm to solve this real-life problem (Yahya et al. 2015). As the number of professional people is increasing day by day, the traffics also have to stand for considerable amount of time due to the overflow of the vehicles. At that moment, people also need to search for options to use another way and that way must not be lengthy. Thus the requirement for the shortest path finding algorithm is mandatory to provide modern solutions to the real-life problem of the people. The smart cities are giving a sincere attention in the research and investigation of the developing modern and more efficient algorithms that will overcome the limitation of the already existing algorithms like high time complexity and limitation to deal with more number of nodes (Gao et al. 2015). Finding out the shortest path between the places is still a difficult task and thus researchers have developed many algorithms like Dijkstra's algorithm, A* search and Bellman-Ford and Johnson's algorithms. Among those various shortest path algorithms, the Dijkstra's algorithm has been found out as the best algorithm, but this algorithm is not efficient to manage a huge number of nodes. Thus we need to modify this algorithm so that it can produce accurate and efficient result irrespective of the number of nodes. In this paper, we will propose a modified version of the Dijkstra's algorithm with constraint(MDSC) where we will limit the number of loop execution. We will mainly focus on solving the problem of satisfying the conditions by more than one node for the next step in the Dijkstra's algorithm. The proposed algorithm will help us to reduce the number of iteration of the loops in the next step of the algorithm. The number of the iterations of the loops will be lesser than the number of the nodes present in the graph. The only limitation of the Dijkstra's algorithm was there were a huge number of iterations which cannot be tackled when the number of nodes is increasing rapidly. The modified version of the algorithm will overcome this problem by reducing the number of loop executions with using some constraints. The Quantum Dijkstra's algorithm (QDA) is used to reduce the computational time in computers and it is more efficient than the Dijkstra's algorithm whereas, the QDA also uses some additional iterations to find out the best outcome. Hence QDA is also not suitable for road mapping (Yahya et al. 2015). The proposed algorithm will make some modifications will lead the algorithm to have lesser number of loop executions than the number of total vertices in the graph.

**Research Plan****Research Scope**

- Execution of Dijkstra's figuring
- Emulate the two estimations on the same enlightening list
- Relationship of results

**Research Question**

- How to enhance the execution of the Dijkstra's algorithm to figure in a limited way?

**Research Methodology****Research Problem:** Prior masters bring performed different activities looking into Dijkstra's check will decide the majority that compelled the way between the focus focuses what is more bring the superior brings about their investigates for those predefined number for focal point focuses. By the comes about was obliged of the amount for focal point focuses settled toward those run through same time declaring those cross of the information structure (Arya et al. , 2018). That structure indicates the conventional structure for Dijkstra algorithm on detail furthermore depicts the gainful technique from claiming utilisation of that check and drawbacks of the estimation: it delineates that contiguous focus computation, which is a predominant improvement, figuring on light about Dijkstra figuring.

This estimation makes that affiliation with every focal point purpose in the specific schema topology and information, what is more, abstains from the utilisation of the co-related structure that holds gigantic, colossal regard, Furthermore settling on it a greater amount solid and sensible examination of the system to impostor information. It will be exhibited that this figuring could save an enormous sum of memory space, what is more, will be stronger of the skeleton with enormous nodes, be that as in this investigation, it will be discovered that Similarly as focus purpose made more terrific this methodology gets immediate to gazing hubs (Bhuiyan et al. , 2015). Quantum computers usually use quantum mechanical properties to quicken those strategies, abatements number time, also after effect sorted out arranging breaking points remained crazy starting with central enrolling. Researchers would accept that this examination utilised stack sad for unvisited centres on geology skeleton, which will move forward the ability that shows the fearless nature of Dijkstra calculation. At any rate the calculation once more it is fundamental on each chance to coordinate that heap (sorting). At the centre, side of the point will be introduced in the way this examination may be beside immediate same time embeddings focus perspective for a store.

In the paper of Kanagasingam Also Kotagiri (2015), it needs to have been presented that the Dijkstra calculation in detail and depicts the trouble from claiming execution of the figuring. They cohered rely on that guided weighted graph should figure that. The greater part tend to brief way the middle of the two focus points, they handled non-negative focal point points, in this paper, they in a way to take a gander at around how they can enhance Dijkstra estimation on wording to pick a course. Likewise, it showed toward weight in perusing extending a percentage number from claiming centres. Choose this issue what more will provide for those best reaction for extending number about centres we will supplant that information structure with the require transport interface rundown having the ability with a store that core focuses for several for prerequisites holding that estimation of the predecessor, status and separation.

**Research constraints:** An examination contemplates that can assistance to getting postponed results of the worried subject will be permitted with experience once-over of confinements that need aid both avoidable and non-avoidable done way (Gao et al., 2015). Masters need to be commented that imperatives inside an examination liable are general that in like way portrays that area for confined level also cut off points. In the specific Scrutinize work zones encountered with exploring confinements need aid enrolled as takes after.

**Reliability:** Respondents drew clinched alongside with that method were not related to weight or impact. Clinched alongside at whatever case, clients also chiefs of Primark might have a chance to be uneven towards that alliance that might influence those disclosures of the examination theme (Jiang et al., 2014). Therefore, issues identified with fearless nature need aid approachable in the examination.

**Time-constraint:** Due to cross-sectional nature of the examination, the analyst needed occasion when a block that incited examination of the worth of effort inside a short cross. Different noteworthy purposes of the energy of the examination were not broke down because of the cross-sectional examination that also radiated similarly as an illustration behind asking regarding confinements for a concentrate that affiliation, Primark.

**Budget-constraint:** For a confined investing design, those mastered remained dependent upon the few of obstacles in the examination of the examination purpose (Arya et al., 2018). Nonattendance from claiming store urged the use from claiming SPSS modifying that Might bring improved the personal satisfaction examination for exceptional quantifiable instrument flying provisions.

**Time plan and budget:** At whatever examination topics need aid whichever longitudinal alternately cross-sectional for nature, reliant upon that occasion when work recognised to asking around to a specific subject. In the introduce research, those cross-sectional examination is grasped that need obliged day, and the use of Gantt design is acknowledged to direct satisfaction of the examination worth of effort (Mayr Also Räcke, 2018). Powers need to be communicated that Gantt outline serves done disconnecting the way errands as for every those structure of the examination what is more co-partners on the exceptional satisfaction of the side of the point.

Table 1: Gantt chart

(Source: Created by the author)

As laid out in those over the table, the analyst will apply Gantt outline inconsistent intervals with that destination that the status similarly as shown by commonplace breaks could be investigated.

**Research Ethics:** A circumstance, where the driver is late and requirements to pick whether to skip a movement and be on time or take the arranged transport and be late for elevate deliveries. From one's up close and personal inclusion, the driver knows the most concise way, which is not the same as what estimation shows up.

**Conclusion:** The outcome of the trial is depended upon to add to the progress of most short way affirmation researches. The tenability of the proposals need to discover an enhanced sort of the estimation that makes just two calls of the substitution routes subroutine then afterward every new manner may be discovered. Beginning during now, those watched algorithm used to compelling reason with a line for connecting rundown with several of constraints, regardless particular case Dijkstra bring. This change ought to further bolster overhaul the running time from claiming our estimation by around 40%.

**Further Work:** It is noticed that modified version of Dijkstra algorithm is the Bellman-Ford Algorithm. It is generally used in the case of negative weight edges that presented in the graph. Therefore, in the future, research based on the runtime error of the new algorithm can be conducted.

**Reference list**

Arya, R., Yadav, R., Agarwal, R. and Swathika, O.G., 2018. Dijkstra's Algorithm for Shortest Path Identification in Reconfigurable Microgrid. Journal of Engineering and Applied Sciences, 13(3), pp.717-720.

Arya, R., Yadav, R., Agarwal, R. and Swathika, O.G., 2018. Dijkstra's Algorithm for Shortest Path Identification in Reconfigurable Microgrid. Journal of Engineering and Applied Sciences, 13(3), pp.717-720.

Bhuiyan, A., Roy, P., Hussain, A., Lee, K., Lamoureux, E.L., Wong, T.Y., Storey, E., Kanagasingam, Y. and Kotagiri, R., 2015. Inter-and Intra-observer agreement of Newly Developed Software for Retinal Arteriolar Focal Narrowing Quantification. Investigative Ophthalmology & Visual Science, 56(7), pp.5247-5247.

Broumi, S., Bakal, A., Talea, M., Smarandache, F. and Vladareanu, L., 2016, November. Applying Dijkstra algorithm for solving neutrosophic shortest path problem. In Advanced Mechatronic Systems (ICAMechS), 2016 International Conference on (pp. 412-416). IEEE.

Gao, J., Zhao, Q., Ren, W., Swami, A., Ramanathan, R. and Bar-Noy, A., 2015. Dynamic shortest path algorithms for hypergraphs. IEEE/ACM Transactions on Networking, 23(6), pp.1805-1817.

Gao, J., Zhao, Q., Ren, W., Swami, A., Ramanathan, R. and Bar-Noy, A., 2015. Dynamic shortest path algorithms for hypergraphs. IEEE/ACM Transactions on Networking, 23(6), pp.1805-1817.

Jiang, J.R., Huang, H.W., Liao, J.H. and Chen, S.Y., 2014, September. Extending Dijkstra's shortest path algorithm for software-defined networking. In Network Operations and Management Symposium (APNOMS), 2014 16th Asia-Pacific(pp. 1-4). IEEE.

Jiang, J.R., Huang, H.W., Liao, J.H. and Chen, S.Y., 2014, September. Extending Dijkstra's shortest path algorithm for software-defined networking. In Network Operations and Management Symposium (APNOMS), 2014 16th Asia-Pacific(pp. 1-4). IEEE.

Mayr, E. and Räcke, H., 2018. Dijkstra’s Shortest Path Algorithm.

Yahya, W., Basuki, A. and Jiang, J.R., 2015. The extended Dijkstra's-based load balancing for OpenFlow network. International Journal of Electrical and Computer Engineering, 5(2), p.289-192.