-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathReadMe.txt
More file actions
55 lines (38 loc) · 2.13 KB
/
Copy pathReadMe.txt
File metadata and controls
55 lines (38 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
github link: https://github.com/ayushr6/DAA_project.git
# Problem Statement
Web mapping consumer application like Google Maps offered by Google is quite popular and helpful nowadays as it enables us to
find the shortest path from one specific location to another, despite the case we are walking, biking, driving or using any
public transport. It eventually helps us to pan our route effortlessly. But, the question is, what sort of algorithm is behind
this world’s most popular functionality? Not the actual implementation, but we have tried to find the shortest path between two
districts between states Rajasthan, Punjab and Gujarat.
# Data Formation
We have used Google Maps to get distance between two districts (by road distance).
We have connect all districts with its neighbouring districts in graph as nodes. For e.g. we have connected Jaipur with districts
which shares their border with Jaipur. With districts of three states, we got a matrix of 89 x 89.
Punjab - 23 districts
Rajasthan - 33 districts
Gujarat - 33 districts
# Matrix Example
0 Amritsar Barnala Bathinda Faridkot
Amritsar 0 0 0 0
Barnala 0 0 65 0
Bathinda 0 65 0 70
Faridkot 0 0 70 0
# Algorithm Implemented
To find the shortest path between two nodes (districts) we have used Dijkstra algorithm (Greedy Algorithm). At every step of the
algorithm, we find a node that is connected to a node (starting with source) and has a minimum distance from that node or have
minimum edge weight. After getting the path with minimum cost (kilometers), we display the path, from source to destination,i.e.,
from which districts one is required to travel to reach his/her destination with minimum cost.
# Result
Enter District Name (Source):
Amritsar
Enter District Name (Destination):
Jaipur
Source: Amritsar
Destination: Jaipur
Cost (Km): 727.0 Km
Path: -> Amritsar -> Tarn Taran -> Firozpur -> Fazilka -> Hanumangarh -> Churu -> Sikar -> Jaipur
# Team Members
Ayush Ranwa (2020BTechCSE016)
Ritisha Mathur (2020BTechCSE065)
Yash Agarwal (2020BTechCSE102)