M. Yamuna* et al. /International Journal of Pharmacy & Technology

Similar documents
M. Yamuna* et al. International Journal of Pharmacy & Technology

Modelling with linear programming

School of Advanced Sciences, VIT University, Vellore, India. Received on Accepted on

Review Article AN ANALYSIS ON THE PERFORMANCE OF VARIOUS REPLICA ALLOCATION ALGORITHMS IN CLOUD USING MATLAB

Construction Planning & scheduling. Precedence Networks. Precedence networks

Dijkstra's Algorithm

An Investigation of Dijkstra and Floyd Algorithms in National City Traffic Advisory Procedures

Network Optimization Models. Chapter 10: Hillier and Lieberman Chapter 8: Decision Tools for Agribusiness Dr. Hurley s AGB 328 Course

S.Hrushikesava Raju* et al. International Journal of Pharmacy & Technology

CSE 100: GRAPH ALGORITHMS

Discrete Mathematics, Spring 2004 Homework 8 Sample Solutions

Chapter 6: Activity Planning Part 2

Dependency Table Example. Task ID Name Predecessors 1 A 2 B 3 C 4 D 1 5 E 1;2 6 F 1;2 7 G 5;6 8 H 4;5

Adaptive GPS Algorithms

Network Routing Protocol using Genetic Algorithms

Graphs. The ultimate data structure. graphs 1

General network with four nodes and four activities with triangular fuzzy number as activity times

Shortest Paths. Shortest Path. Applications. CSE 680 Prof. Roger Crawfis. Given a weighted directed graph, one common problem is finding the shortest

YEAR 12 FURTHER MATHS UNIT 4 MODULE 2 NETWORKS AND DECISION MATHEMATICS CRITICAL PATH ANALYSIS

Bijou Detouring - A Dynamic Node Level Routing Algorithm

The Shortest Path Problem

Topological Sort. Here a topological sort would label A with 1, B and C with 2 and 3, and D with 4.

CS350: Data Structures Dijkstra s Shortest Path Alg.

Chapter 10. Fundamental Network Algorithms. M. E. J. Newman. May 6, M. E. J. Newman Chapter 10 May 6, / 33

Chapter 22 Network Layer: Delivery, Forwarding, and Routing 22.1

How Routing Algorithms Work

CMPUT 396 Sliding Tile Puzzle

Subnet Shortest Path Pseudocode based on Dijkstra's Algorithm

Chapter 14. Graphs Pearson Addison-Wesley. All rights reserved 14 A-1

Dynamic-Programming algorithms for shortest path problems: Bellman-Ford (for singlesource) and Floyd-Warshall (for all-pairs).

A NEW METHOD FOR SOLVING TWO VEHICLE COST VARYING FUZZY TRANSPORTATION PROBLEM

Description of The Algorithm

Graph Algorithms. Revised based on the slides by Ruoming Kent State

LECTURES 3 and 4: Flows and Matchings

Wiener index of chemical trees from its subtree

Improving the quantitative testing of fast aspherics surfaces with null screen using Dijkstra algorithm

Lecture 18 Solving Shortest Path Problem: Dijkstra s Algorithm. October 23, 2009

Survey on Reliability Control Using CLR Method with Tour Planning Mechanism in WSN

Institutionen för datavetenskap Department of Computer and Information Science

Different Optimal Solutions in Shared Path Graphs

Research Article AUTOMATED EXCEPTION HANDLING IN SOFTWARE TESTING Dr. Anjaneyulu G.S.G.N*

4. Linear Programming

Available Online through

CHAPTER 3 A TIME-DEPENDENT k-shortest PATH ALGORITHM FOR ATIS APPLICATIONS

Routing. 4. Mar INF-3190: Switching and Routing

1 Non greedy algorithms (which we should have covered

Graphs. The ultimate data structure. graphs 1

CMPSC 250 Analysis of Algorithms Spring 2018 Dr. Aravind Mohan Shortest Paths April 16, 2018

Received on Accepted on

2.3 Optimal paths. Optimal (shortest or longest) paths have a wide range of applications:

Comparison of Dijkstra's Algorithm with other proposed algorithms

Chalmers University of Technology. Network Models. April 11, Birgit Grohe

Network Models - Examples. Network Models. Definition and Terminology. The Minimum Spanning Tree (MST) Problem

Introduction to Parallel & Distributed Computing Parallel Graph Algorithms

Redes de Computadores. Shortest Paths in Networks

Artificial Intelligence

CS 421: Computer Networks SPRING MIDTERM II May 5, minutes

Performance Analysis of Routing Techniques in Networks

In this edition of HowStuffWorks, we'll find out precisely what information is used by routers in determining where to send a packet.

IMPROVEMENT OF SHORTEST-PATH ALGORITHMS USING SUBGRAPHS' HEURISTICS

L3 Network Algorithms

EE/CSCI 451 Midterm 1

Practice Problems for the Final

CS/COE

Position Sort. Anuj Kumar Developer PINGA Solution Pvt. Ltd. Noida, India ABSTRACT. Keywords 1. INTRODUCTION 2. METHODS AND MATERIALS

Role of Genetic Algorithm in Routing for Large Network

COMP4128 Programming Challenges

L22-23: Graph Algorithms

Optimization of Cutting Parameters for Milling Operation using Genetic Algorithm technique through MATLAB

A Study of Different Parallel Implementations of Single Source Shortest Path Algorithms

Dijkstra s algorithm for shortest paths when no edges have negative weight.

Real-World Applications of Graph Theory

Scheduling distributed applications can be challenging in a multi-cloud environment due to the lack of knowledge

PSAV MODEL: AGILE METHOD TO DESIGN HUMAN MACHINE INTERACTION FOR USER EXPERIENCE ACROSS THE PLATFORMS

UNIT 5 GRAPH. Application of Graph Structure in real world:- Graph Terminologies:

Methods and Models for Combinatorial Optimization Exact methods for the Traveling Salesman Problem

SHORTEST PATH TECHNIQUE FOR SWITCHING IN A MESH NETWORK

CS 206 Introduction to Computer Science II

Relaxation Control of Packet Arrival Rate in the Neighborhood of the Destination in Concentric Sensor Networks

Utilizing Restricted Direction Strategy and Binary Heap Technology to Optimize Dijkstra Algorithm in WebGIS

Handling Multi Objectives of with Multi Objective Dynamic Particle Swarm Optimization

A NEW APPROACH FOR FUZZY CRITICAL PATH METHOD USING OCTAGONAL FUZZY NUMBERS

CSC 8301 Design & Analysis of Algorithms: Linear Programming

Australian Journal of Basic and Applied Sciences. Meeting the Desired Fuzzy Shortest Possible Duration to Complete the Project at Fuzzy Least Cost

CHAPTER-III WAVELENGTH ROUTING ALGORITHMS

An Analysis of Least-Cost Routing using Bellman Ford and Dijkstra Algorithms in Wireless Routing Network

Asha. N* et al. International Journal of Pharmacy & Technology

d. Solution coming soon. 6. Directed Graphs

Simple graph Complete graph K 7. Non- connected graph

Autonomous robot motion path planning using shortest path planning algorithms

2.3 Optimal paths. E. Amaldi Foundations of Operations Research Politecnico di Milano 1

Salman Ahmed.G* et al. /International Journal of Pharmacy & Technology

casting etc. across IP Network. Design of IP Based Multimedia Network is the complete guide to a success network

An Efficient Algorithm for Virtual-Wavelength-Path Routing Minimizing Average Number of Hops

Lecture notes on Transportation and Assignment Problem (BBE (H) QTM paper of Delhi University)

Channel Allocation for Averting the Exposed Terminal Problem in a Wireless Mesh Network

Friday 24 May 2013 Morning

Eulerian Cycle (2A) Walk : vertices may repeat, edges may repeat (closed or open) Trail: vertices may repeat, edges cannot repeat (open)

An Algorithmic Approach to Graph Theory Neetu Rawat

Planar Graph Characterization - Using γ - Stable Graphs

Transcription:

ISSN: 0975-766X CODEN: IJPTFI Available Online through Research Article www.ijptonline.com FINDING CRITICAL PATH OF A NETWORK USING MODIFIED DIJKSTRA S ALGORITHM Shantan Sawa, Shivangee Sabharwal, Purushottam Chandra, M. Yamuna* VIT University, Vellore, Tamilnadu - 632014. Email: myamuna@vit.ac.in Received on 06-08-2016 Accepted on 27-08-2016 Abstract Critical path method is used to estimate the duration of the critical path in a network of activities. The critical path denotes the longest path taken by the activities to complete, therefore it gives the maximum duration of the project of which the network diagram is made. In this paper, we aim to replace the typical traditional critical path method by a modified Dijkstra s Algorithm, to find the critical path. The proposed method involves the computation of a critical path without iterative calculations and is less time consuming. The proposed method is efficient as it provides the optimum critical path in all cases. The paper introduces a new method to find a critical path. The paper elucidates the critical path method and the modified Dijkstra s algorithm. Keywords: Critical path, Critical path method (CPM), Dijkstra s Algorithm, Network activity diagram, Optimized path, Reduction. Introduction Dijkstra s algorithm is an algorithm that finds the shortest path between that node and every other. It can also be used for finding the shortest paths from a single node to a single destination node by stopping the algorithm once the shortest path to the destination node has been determined [ 1 ]. One of the main reasons for the popularity of Dijkstra s Algorithm is that it is one of the most important and useful algorithms available for generating (exact) optimal solutions to a large class of shortest path problems. The point is that the shortest path problem is extremely important theoretically, practically, as well as educationally[ 8 ]. The Dijkstra s algorithm consists of n iterations. If all vertices have been visited, then the algorithm finishes; otherwise, from the list of unvisited vertices we have to choose the vertex which has the minimum (smallest) value at its label (At the beginning, we will choose a starting point s). After that, we will consider all neighbours of this vertex IJPT Sep-2016 Vol. 8 Issue No.3 16472-16482 Page 16472

(Neighbours of a vertex are those vertices that have common edges with the initial vertex) [ 9 ]. There have been multiple algorithms designed since to find the shortest distance between two points in a graph, but at the bedrock of those algorithms, Dijkstra s algorithm is ubiquitous and deployed [ 3 ]. The traditional Dijkstra s algorithm is as follows: Let the node at which we are starting be called the initial node. Let the distance of node Y be the distance from the initial node to Y. Dijkstra's algorithm will assign some initial distance values and will try to improve them step by step [ 2 ]. 1. Assign to every node a tentative distance value: set it to zero for our initial node and to infinity for all other nodes. 2. Set the initial node as current. Mark all other nodes unvisited. Create a set of all the unvisited nodes called the unvisited set. 3. For the current node, consider all of its unvisited neighbours and calculate their tentative distances. Compare the newly calculated tentative distance to the current assigned value and assign the smaller one. For example, if the current node A is marked with a distance of 6, and the edge connecting it with a neighbour B has length 2, then the distance to B (through A) will be 6 + 2 = 8. If B was previously marked with a distance greater than 8 then change it to 8. Otherwise, keep the current value. 4. When we are done considering all of the neighbours of the current node, mark the current node as visited and remove it from the unvisited set. A visited node will never be checked again. 5. If the destination node has been marked visited (when planning a route between two specific nodes) or if the smallest tentative distance among the nodes in the unvisited set is infinity (when planning a complete traversal; occurs when there is no connection between the initial node and remaining unvisited nodes), then stop. The algorithm has finished. 6. Otherwise, select the unvisited node that is marked with the smallest tentative distance, set it as the new "current node", and go back to step 3. The Critical Path Method is used to find the critical path of the network. In the paper an algorithm is proposed which finds the critical path of the given network. The proposed algorithm is nothing but Dijkstra s algorithm modified to a new algorithm which finds the critical path. The proposed algorithm is more optimum that the traditional critical path method to find the critical path as it reduces the required calculations and is much faster. IJPT Sep-2016 Vol. 8 Issue No.3 16472-16482 Page 16473

Materials and Methods M. Yamuna* et al. /International Journal of Pharmacy & Technology Existing Method The Critical Path Method (CPM) is one of several related techniques for doing project planning. CPM is for projects that are made up of a number of individual "activities." If some of the activities require other activities to finish before they can start, then the project becomes a complex web of activities [ 4 ] [ 5 ]. CPM evaluates how long a complex project will take to complete which activities are "critical," meaning that they have to be done on time or else the whole project will take longer If information about the cost of each activity is used, and how much it costs to speed up each activity, CPM helps to find: Whether you should try to speed up the project? and, if so, What is the least costly way to speed up the project? Activities An activity is a specific task. An activity can have these properties: names of any other activities that have to be completed before this one can start a projected normal time duration For speeding up cost analysis, the following things about each activity should be known: a cost to complete a shorter time to complete on a crash basis the higher cost of completing it on a crash basis CPM Algorithm List the activities. Draw the network flow diagram Formulate a table with the fields: Activities, duration, earliest start time, earliest finish time, latest start time, latest finish time, total float. Fill the activities and duration column as per the question. Use the forward pass method to calculate the earliest start time. If more than one activity converge at a node, choose the maximum start time. IJPT Sep-2016 Vol. 8 Issue No.3 16472-16482 Page 16474

Use the backward pass method to calculate the latest finish time. If more than one activity leave a node, take the minimum finish time. Latest start time is calculated as the sum of duration of the activity and earliest start time. Earliest finish time is calculated as the difference of latest finish time and duration of the activity. Total float is calculated as the difference of latest start time and earliest start time or latest finish time and earliest finish time. The activity for which the total float is zero is the critical activity. The set of all critical activities is the critical path. The sum of the duration of all activities in the critical path is the duration of the project [ 6 ]. Proposed Algorithm 1. List down all the nodes with the initial and the final nodes separated by the intermediate nodes. 2. Current node = initial node. 3. Update the cost taken to reach the adjacent nodes from the current node. 4. In case of a conflict where a value has already been assigned to the adjacent node, update the value if the new value is greater than or equal to the assigned cost, along with the node. 5. Current node = node with the least cost. 6. Current node = final node? True: All nodes visited? True: Jump to STEP 8. False: Jump to STEP 7. False: Jump to STEP 7. 7. Current node = intermediate node with the least cost not visited, with most nodes traversed. Jump to STEP 3. 8. Cost of the final node gives the critical time. 9. Use back tracking from the final node to find the critical path. We illustrate the proposed method with two examples Example-1 Consider the network seen in Fig. 1 IJPT Sep-2016 Vol. 8 Issue No.3 16472-16482 Page 16475

Table-1: provides the details using the regular CPM. Fig. 1 ACTIVITY DURATION EARLIEST START (ES) EARLIEST FINISH (EF) LATEST START (LS) LATEST FINISH (LF) FLAG (LS-ES) A 15 5 20 95 110 90 B 30 20 50 20 50 0 C 10 80 90 100 110 20 D 5 105 110 105 110 0 E 15 5 20 5 20 0 E 0 20 20 20 20 0 F 15 5 20 5 20 0 G 25 80 105 80 105 0 H 15 5 20 35 50 30 I 30 50 80 50 80 0 J 5 0 5 0 5 0 K 45 5 50 55 100 50 Table 1 IJPT Sep-2016 Vol. 8 Issue No.3 16472-16482 Page 16476

ES J = 0 LF A = 110 ES A = ES J + J LF K = 110 ES A = 5 ES H = ES J + J LF C = 110 ES H = 5 ES E = ES J + J LF D = 110 ES E = 5 ES F = ES J + J LF G = LF D - D ES F = 5 LF G = 105 ES K = ES J + J LF I = min(lf C C, LF G G) ES K = 5 LF I = min(110, 80) LF I = 80 ES E = ES E + E LF H = LF I - I ES E = 20 LF H = 50 ES B = max(es E + E, ES F + F) LF B = LF I - I ES B = max(20, 20) LF B = 50 ES B = 20 ES I = max(es H + H, ES B + B) LF E = LF B - B ES I = max(20, 50) LF E = 20 ES I = 50 ES G = ES I + I LF E = LF E E ES G = 80 LF E = 20 ES C = ES I + I LF F = LF B - B ES C = 80 LF F = 20 ES D = ES G + G LF J = min(lf A A, LF H H, LF E E, LF F F, LF K K) ES D = 105 LF J = min(95, 35, 5, 5, 65) LF J = 5 IJPT Sep-2016 Vol. 8 Issue No.3 16472-16482 Page 16477

As a result we record the following for example 1 using the regular CPM. LATEST FINISH = max(es A + A, ES K + K, ES C + C, ES D + D) LATEST FINISH = max(50, 20, 90, 110) LATEST FINISH = 110 CRITICAL ACTIVITIES: J -> E-> E -> B -> I-> G-> D CRITICAL PATH: 1-> 2 -> 3-> 4-> 5 -> 6-> 7 -> 8 CRITICAL : 5 + 15 + 0 + 30 + 30 + 25 + 5 = 110. We now proceed to do the evaluation for this example using the proposed algorithm. Table 2 illustrates the results generated by implementing the proposed algorithm. Final Node Intermediate Nodes -> 2 3 4 5 6 7 8 Visited Nodes 1 5 - - - - - - via 1 2-20 20 20 - - 50 via 2 via 2 via 2 via 2 3 - - 20 20 - - 50 via 3 via 2 via 2 4 - - - 50 - - 50 via 4 via 2 5 - - - - 80-50 via 5 via 2 6 - - - - - 105 90 via 6 via 6 7 - - - - - - 110 via 7 Critical time = 110 Critical path: 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 Table 2 IJPT Sep-2016 Vol. 8 Issue No.3 16472-16482 Page 16478

Comparing both the results we observe that the value 110 obtained by using the proposed algorithm is same as the value obtained by the regular method. The critical path also remains the same ( both highlighted in red ). Example-2 As a sample example consider the network seen in Fig. 2. Fig. 2 The critical time is 6.4 and the critical path is 1 2 3 5 7 8 9 10 11 using the routine method (calculations are omitted ). ACTIVITY DURATIO N EARLIES T START (ES) EARLIES T FINISH (EF) LATEST START (LS) LATEST FINISH (LF) FLAG (LS-ES) A 0.5 0 0.5 0 0.5 0 B 1.0 0.5 1.5 0.5 1.5 0 C 1.5 1.5 3.0 2.6 4.1 1.1 D 1.4 1.5 2.9 1.5 2.9 0 E 1.2 2.9 4.1 2.9 4.1 0 F 0.8 1.5 2.3 2.3 3.1 0.8 G 1.0 2.3 3.3 3.1 4.1 0.8 H 0.4 4.1 4.5 4.1 4.5 0 I 1.4 4.5 5.9 4.5 5.9 0 J 0.5 5.9 6.4 5.9 6.4 0 IJPT Sep-2016 Vol. 8 Issue No.3 16472-16482 Page 16479

DUMMY (7-8) 0 4.1 4.1 4.1 4.1 0 DUMMY (6-8) 0 3.3 3.3 4.1 4.1 0 Table 3 Hence critical time is 6.4 and the critical path is 1 2 3 5 7 8 9 10 11. Table-3: Provides the result for example 2 using the proposed method. Intermediate Nodes -> 2 3 4 5 6 7 8 9 10 11 Visited Nodes 1 0.5 - - - - - - - - - via 1 2-1.5 - - - - - - - - via 2 3 - - 2.3 2.9 - - 3 - - - via 3 via 3 via 3 4 - - - 2.9 3.3-3 - - - via 3 via 4 via 3 5 - - - - 3.3 4.1 3 - - - via 4 via 5 via 3 8 - - - - 3.3 4.1-3.4 - - via 4 via 5 via 8 6 - - - - - 4.1 3.3 3.4 - - via 5 via 6 via 8 8 - - - - - 4.1-3.7 - - via 5 via 8 9 - - - - - 4.1 - - 5.1 - via 5 via 9 7 - - - - - - 4.1 5.1 - via 7 via 9 8 - - - - - - - 4.5 5.1 - via 8 via 9 9 - - - - - - - - 5.9 - via 9 10 - - - - - - - - - 6.4 via 10 IJPT Sep-2016 Vol. 8 Issue No.3 16472-16482 Page 16480

Critical Time: 6.4 Critical path: 1 -> 2 -> 3 -> 5 -> 7 -> 8 -> 9 -> 10 -> 11 Table 3 Discussion As seen from the elucidations mentioned above, both Dijkstra s Algorithm and Critical Path Method give the same critical path, but the only difference is that in Dijkstra s Algorithm, we can find the critical path of each node with every other node. In this way, if ever we need to find the longest path between two different nodes, we could easily refer the table, unlike in Critical Path Method wherein we have to redo the entire table keeping in mind the updated initial and final node. In all examples, we first found the critical path using the critical path method (CPM) and then found the critical path using Dijkstra s Algorithm. It is clear that even though CPM is more well knows, a small modification in Dijkstra s algorithm can be used to find the same result in a more efficient manner. In the modified algorithm, we consider the initial node of the network. Applying the algorithm iteratively, we compute the critical path along with the critical time for any given network. The algorithm starts with the initial node taken into consideration. From this node, we find all the possible paths to its neighbours and accordingly update the values in the table. For the next iteration, we consider all the intermediate node which takes the least time to reach it. When a new value is attained for any node, we update the already existing values with the one which is greater than or equal to the already assigned value to the node. Unlike Dijkstra's algorithm, which stop the computation as soon as the final node is reached, the proposed algorithm keeps working until all the intermediate nodes have been visited. For instance, in Example 1, the final node, Node 8 was accessed by Node 2 after the second iteration with the time amounting to 50 units. Dijkstra s algorithm would have terminated at this point. But the proposed algorithm continues to compute the optimal, critical path and time. With this method, computation of critical path and time becomes easier as unnecessary calculations of earliest start times and latest finish times and calculation of the flag and slack values are eliminated altogether. The final value at the final node gives the critical time of the network and using backtracking gives us the critical path of the network. Conclusion The difference between Critical Path Method and Dijkstra s Algorithm is the lack of repeated initialization in CPM method which is conveniently eliminated in Dijkstra s algorithm. Not only is this less time consuming, but it s also more efficient, because in the future if we need to find the critical path between two different nodes, we do not need IJPT Sep-2016 Vol. 8 Issue No.3 16472-16482 Page 16481

to recreate the entire table by finding the slack, instead we use the modified Dijkstra s algorithm and refer to the table. This method could widely be used for highway reconstruction, aeroplane navigation, traffic control, geonavigation and other fields where we need to find the critical path between nodes/stations etc. References 1. http://www.ijstr.org/final-print/june2013/a-review-and-evaluations-of-shortest-path-algorithms.pdf. 2. Dijkstra, E. (1959). A note on two problems in connexion with graphs. Numer. Math., 1(1), pp.269-271. 3. Magzhan, K. and Mat Jani, H. (2013). A Review and Evaluations of Shortest Path Algorithms. International Journal of Scientific & Technology Research, Volume 2(Issue 6), pp.99-104. 4. https://www.researchgate.net/publication/265421349 5. Tamrakar, P. (2013). Analysis and Improvement by the Application of Network Analysis (Pert/Cpm). The International Journal of Engineering And Science (IJES), Volume 2(Issue 1), pp.154-159. 6. A.M. Natarajan, P.Balasubramani, A. Tamilarasi. (2014). Operations Research, publisher: Dorling Kindersley (India) Pvt. Ltd., Licensees of Pearson Education of South Asia. ISBN: 978-81-317-0000-6. 7. http://criticalpathmethod.weebly.com/solved-problem.html 8. M. Sniedovich, (2006). Dijkstra s algorithm revisited: the dynamic programming connexion, Control and Cybernetics, Volume 35 (Issue 3), pp. 3. 9. K. Magzhan and H. M. Jani, (2013). A Review And Evaluations Of Shortest Path Algorithms, International Journal of Scientific & Technology Research, Volume 2 (Issue 6), pp. 2.(ISSN: 2277-8616). Corresponding Author: M. Yamuna*, Email: myamuna@vit.ac.in IJPT Sep-2016 Vol. 8 Issue No.3 16472-16482 Page 16482