Application of Graph Theory To Find Minimal Paths Between Two Places For The Transportation Problem
Application of Graph Theory To Find Minimal Paths Between Two Places For The Transportation Problem
https://doi.org/10.22214/ijraset.2022.47567
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue XI Nov 2022- Available at www.ijraset.com
Abstract: Graph theory is used for finding communities in networks. Graphs are used as device for modeling and description of
real world network systems such are: transport, water, electricity, internet, work operations schemes in the process of production,
construction, etc. Although the content of these schemes differ among themselves, but they have also common features and
reflect certain items that are in the relation between each other. In this paper, we study on how graph theory can generate
transportation problem using shortest path, we designed the solution for practical problem to find a Minimum Spanning
Tree(MST) by using Kruskal’s Algorithm and minimal path between two places and graph search Dijkstra’s algorithm.
Keywords: Graph, Transport, Minimal path, Minimum Spanning Tree, Dijkstra’s algorithm.
I. INTRODUCTION
Graph theory provides many useful applications in Operations research. Graph theory is the study of points and lines. In particular it
involves the ways in which sets of points called nodes or vertices. It can be connected by lines called edges or arcs. Graphs in this
context differ from the more familiar co-ordinates plot that portay mathematical relations and functions. In this paper for a given
graph find a minimum cost to find the minimal path between two places. There are different path options to reach from Place A to
Place B, but our aim is to find the minimal path with a minimum transportation costs, this requires a lot efforts.
II. GRAPH
1) Collection of points
2) Collection of lines
3) Points sets in non empty
In this paper for a given graph we find a minimal path of Transportation problem.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1199
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue XI Nov 2022- Available at www.ijraset.com
A. Kruskal’s Algorithm
Let T = Empty Spanning Tree
E = Set of Edges
N = Number of nodes in graph
While T has fever then N-1 edges. { Remove an edge (v, w) of lowest cost (arc or edge) from E. If adding (v, w) to T would create a
cycle then discard (v, w) to T}.
Figure 3 Figure 4
Arch of lower cost that comes after him with units 1 and 2 is the arc of length 3. Again we have processed in the same wayhaving in
mind that we should not create cycles (Figure 5).
Figure 5 Figure 6
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1200
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue XI Nov 2022- Available at www.ijraset.com
Applying this rule to all arches of the given Graph given, we have gained a minimum Spanning tree which is given in Figure 7.
Arches which are removed from the graph are denoted by red colour, this happened because, because their deployment create
cycles Figure 7.
Figure 7
Figure 8
Let’s start with first option to calculate the distance from Place A to Place B, the result is as follows:
= 2+3+6+7+4+5+2+5+4+3+6+17 = 64 units
V. DIJSKTRA’S ALGORITHM
Dijkstra’s algorithm is the iterative algorithmic process to provide us with the minimal path from one specific starting node to all
other nodes of a graph. It is different from the minimum spanning tree as the shortest distance among two vertices might not involve
all the vertices of the graph.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1201
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue XI Nov 2022- Available at www.ijraset.com
By using Dijsktra’s algorithm we are able to find the minimal distances (length of arc) from a place to all other nodes. Firstly, we
start from the Place A, which is chosen as permanent Place(node). Analyzing the distances of the neighbourhoods Place(nodes) of
the Place (node) A, we are able to find the minimal path to Place 2 (its distance is equal with 2). Afterwards Place 2 is chosen as
permanent Place and we have to check the distances from Place 2 to the neighbour Places. To the each neighbour Place is added the
length of the permanent Place.
Now is chosen the minimum distance from Place A. Minimum distance is chosen as permanent Place, since the 3+2 distance is
shorter than 7, this means that distance 7 is not going to be considered anymore and we have to use the distance 5.
Now is chosen the minimum distance from Place A. For this case the permanent node is chosen the minimum distance 4, this means
that to all neighbour Place is added the distance of permanent node.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1202
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue XI Nov 2022- Available at www.ijraset.com
Figure 13 Figure 14
Figure 15 Figure 16
For example, for the permanent node 6 by adding distances 6+8=14, is shown that 14 > 9, this means that the previous distance 9
remains, while the distance 14 is not considered anymore. This means that node 9 is chosen as permanent node and the procedure
is similar to the previous cases.
Figure 17 Figure 18
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1203
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue XI Nov 2022- Available at www.ijraset.com
Figure 19 Figure 20
Figure 21 Figure 22
Figure 23 Figure 24
Figure 25 Figure 26
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1204
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue XI Nov 2022- Available at www.ijraset.com
VII. CONCLUSION
Dijkstra's algorithm will find the shortest path between two Places(nodes).The results which are obtained for the given example
shows that Algorithm Dijsktra is very effective tool to find the path with lowest cost from Place A to Place B. Same results have
been obtained also for Minimum Spanning Tree by using Kruskal algorithm, but this case the procedure is much simpler with a
minimum spanning tree to reach node B from node A with the lowest total cost. We have tried also to find the worst scenario to
reach node B from node A which is approximately 63% more expensive from the first case.
VIII. ACKNOWLEDGEMENT
Thank you to M.RAMYA , Assistant professor in Department of Mathematics at Dr SNS Rajalakshmi College of Arts and Science
who has supported this research.
REFERENCES
[1] A.Arockiamary, G.Pravina, Application of Graph theory to find shortest path of transportation problem. Email: [email protected] ,
[email protected]
[2] Vitala seta,Finding the shortest path using dijkstra’s algorithm,IJIRMPS Volume 9,September 2021 ISSN:2349-7300
[3] T.Neumann,Routing planning as an application of graph theory with fuzzy logic, volume 10 number 4
[4] Xiao Zhu WANG(2018),The comparison of three algorithm in shortest path issue, IOP Publishing, China
[5] S.Pavithra, K.M.Manikandan, Application of graph theory to find optimal path and minimized time for the transportation problem, IJSRP Volume 11, Issue 1,
January 2021, ISSN 2250-3153
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1205