Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

A

Project Report
On

“SHORTEST ROUTE”

Submitted By

MR. SAURABH SHAMRAO BHOSALE


MISS. RADHIKA RAJENDRA MANE
MISS. TRUSHNA SANJAY PANDUGADE
MISS. SNEHAL RAMESH PATIL

Guided by

Mr. S. Y. INAMDAR

Department of Computer Science and Engineering


G. K. Gujar Memorial Charitable Trust’s
Dr. Ashok Gujar Technical Institute’s
Dr. Daulatrao Aher College of Engineering, Karad
Shivaji University, Kolhapur

2020-21
G. K. Gujar Memorial Charitable Trust’s
Dr. Ashok Gujar Technical Institute’s
Dr. Daulatrao Aher College of Engineering, Karad

CERTIFICATE
This is to certify that,
MR. Saurabh Shamrao Bhosale,
MISS. Radhika Rajendra Mane,
MISS. Trushna Sanjay Pandugade and
MISS. Snehal Ramesh Patil.
have satisfactorily completed the T.E. Project entitled, “Shortest Route”. This work is being
submitted in partial fulfillment for the Third Year in Computer Science and Engineering of the
Shivaji University, Kolhapur, Maharashtra, INDIA for the academic year 2016-2017.

Mr. S. Y. Inamdar Mr. A. N. Patil External Examiner


Head of Department Computer
Guide
Science and Engineering
DECLARATION

We declare that this written submission represents ideas in our own words. Where
others ideas or words have been included, we have adequately cited and referenced
the original sources. We declare that adhere to all principles of academic honesty
and integrity. Also we have not misrepresented or fabricated or falsified any
idea/data/fact/source in our submission. We also declare that this submission is our
original work and to the best of our knowledge and belief, it contains no material
previously published or written by another person’s nor material which has been
accepted for the award of any of the degree of the Shivaji University, Kolhapur or
other University.

Name of Student Roll No Signature

MR. Saurabh Shamrao Bhosale 22027


MISS. Radhika Rajendra Mane 22022
MISS. Trushna Sanjay Pandugade 22054
MISS. Snehal Ramesh Patil 22059
ACKNOWLEDGEMENT

I express my special thanks to Prof. S. Y. Inamdar, Project Guide for his/ her sincere efforts and
kind guidance in selecting project topic. I am very grateful to Prof. A. N. Patil, Head of
Computer Science and Engineering Department, for making available all the facilities required
for the fulfillment of the project.

I cannot forget to express my immense sense of thankfulness towards all the teaching and non-
teaching staff of Computer Science and Engineering department, and all my friends who offered
their helping hands at the time of need.

Name Roll No. Signature

MR. Saurabh Shamrao Bhosale 22027


MISS. Radhika Rajendra Mane 22022
MISS. Trushna Sanjay Pandugade 22054
MISS. Snehal Ramesh Patil 22059

Date :
Abstract

A shortest-path algorithm finds a path containing the minimal cost


between two vertices in a graph. A plethora of shortest-path algorithms is studied
in the literature that span across multiple disciplines. This paper presents a survey
of shortest-path algorithms based on a taxonomy that is introduced in the paper.
One dimension of this taxonomy is the various flavours of the shortest-path
problem. There is no one general algorithm that is capable of solving all variants
of the shortest-path problem due to the space and time complexities associated
with each algorithm. Other important dimensions of the taxonomy include
whether the shortest-path algorithm operates over a static or a dynamic graph,
whether the shortest-path algorithm produces exact or approximate answers, and
whether the objective of the shortest-path algorithm is to achieve time-
dependence or is to only be goal directed. This survey studies and classifies
shortest-path algorithms according to the proposed taxonomy. The survey also
presents the challenges and proposed solutions associated with each category in
the taxonomy.

There are also various settings in which a shortest-path can be identified. For
example, the graph can

Be static, where the vertices and the edges do not change over time. In contrast,
a graph can be dynamic,

Where vertices and edges can be introduced, updated or deleted over time. The
graph contains either

Directed or undirected edges. The weights over the edges can either be negative
or non-negative weights.
INDEX
Chapter No Description Page No.
1. INTRODUCTION
1.1 Project Overview
2. PROBLEM STATEMENT & SCOPE
2.1  Problem statement
2.2  Objective
2.3  Scope
3.  LITERATURE REVIEW
4.  METHODOLOGY / SYSTEM DEVELOPMENT
5.  SOFTWARE DESIGN
5.1 Software Requirements
5.2 Hardware Requirements
5.3 Technology
6.  Project Plan
6.1 Project plan schedule
6.2 SDLC
6.3 Risk Analysis and Planning

6.4 Software Design


6.5 DFD
6.6 UML
7.  Result And Discussions
7.1 Implementation
7.2 Testing
8.  Conclusion
9.  Reference
1. INTRODUCTION

 Project Overview

The shortest-path problem is one of the well-studied topics in computer


science, specifically in graph theory. An optimal shortest-path is one with the
minimum length criteria from a source to a destination.

There has been a surge of research in shortest-path algorithms due to the


problem’s numerous and diverse applications. These applications include network
routing protocols, route planning and traffic control and path finding in social
networks, computer games, and transportation systems, to count a few.
There are various graph types that shortest-path algorithms consider. A general
graph is a mathematical object consisting of vertices and edges. A spatial graph
contains vertices where their positions are not interpreted as locations in space.
On the other hand, a spatial graph contains vertices that have locations through
the edge’s end-points. A planar graph is plotted in two dimensions with no edges
Crossing and with continuous edges that need not be straight.
There are also various settings in which a shortest-path can be identified. For
example, the graph can be static, where the vertices and the edges do not change
over time. In contrast, a graph can be dynamic,
Where vertices and edges can be introduced, updated or deleted over time. The
graph contains either directed or undirected edges. The weights over the edges
can either be negative or non-negative weights.
The values can be real or integer numbers. This relies on the type of problem
being issued.
The majority of shortest-path algorithms fall into two broad categories. The first
category is single-source shortest-path (SSSP), where the objective is to find the
shortest-paths from a single-source vertex to all other vertices. The second
category is all-pairs shortest-path (APSP), where the objective is to find the
shortest-paths between all pairs of vertices in a graph. The computation of
shortest-path can generate either exact or approximate solutions. The choice of
which algorithm to use depends on the characteristics of the graph and the
required application.
2 2. PROBLEM STATEMENT & SCOPE

2.1 Problem Statement

One of the biggest problems for every person is the longest way and the
rush/jam of vehicles on road.

To save time every person tries to find a shortest way to reach their destination.
In essence, they investigate which networks can existing techniques be adopted

to. Best illustrates speed-up techniques for fast routing between road networks
and transportation
networks. Bast’s survey argues that the algorithms for both networks are different
and require specialized
speed-up techniques for each. Also, the survey presents how the speed-up
technique performs against
Dijkstra’s algorithm. Moreover, the survey presents two open questions, namely,
(1) how to achieve
speed-up despite the lack of a hierarchy in transportation networks, and (2) how
to efficiently compute
local searches, e.g., as in neighbourhoods.
Demetrescu and Italiano [39] survey algorithms that investigate fully dynamic
directed graphs with
emphasis on dynamic shortest-paths and dynamic transitive closures. The survey
focuses on defining the
algebraic and combinatorial properties as well as tools for dynamic techniques.
The survey tackles two
important questions, namely whether dynamic shortest-paths achieve a space
complexity and
whether single-source shortest path algorithms in a fully-dynamic setting be
solved efficiently over general
graphs. Nannicini and Liberti [105] survey techniques for dynamic graph weights
and dynamic graph
topology. They list classical and recent techniques for finding trees and shortest-
paths in large graphs.
2.2 Objective

Objectives of the project: -

To find an efficient route is difficult problem for many drivers. Car


Navigation Systems are sometimes offered as a special feature on new cars. –

To the systems are capable of performing some of the tasks traditionally


performed by driver, such as determining the best route to the destination.

To the software should have all the basic functionalities like searching,
getting site information, getting shortest distance between a source and
destination.
2.3 Scope of Project

This software will be used for finding the shortest possible path in the map of
Gurgaon.

The features that are described in this document are used in the future phases of
the software development cycle.

The features described here meet the needs of all the users.

The success criterion for the system is based in the level up to which the features
described in this document are implemented in the system.
3. LITERATURE REVIEW

Sara Nazari et.al in [1] proposed some new shortest path finding algorithms that
are improved version of Dijkstra algorithm, which states that search space is
restricted by the use of rectangle or a static and dynamic hexagon. These
methods can improve the run time and usage memory because the visited nodes
and edges are limited. These algorithms are implemented in car navigation
system for determining the optimum shortest path from source to destination on
a restricted space city map. Liang Dai in [2] suggested the A* algorithm that can
achieve better running time by using Euclidean heuristic function although it
theoretical time complexity is still the same as Dijkstra’s. It can also guarantee to
find the International Journal of Engineering Trends and Technology- July to Aug
Issue 2011 ISSN: 2231-5381 http://www.internationaljournalssrg.org Page 49
shortest paths. The restricted algorithm can find the optimal path within linear
time but the restricted area has to be carefully selected. The selection actually
depends on the graph itself. The smaller selected area can get less search time
but the trade-off is that it may not find the shortest path or, it may not find any
path. This algorithm can be used in a way that allowing search again by increasing
the factor if the first search fails; Syarifah Teh Nadhiah in [3] suggested many
different operations that can be done on graphs to finding a minimum path.
Usually methods such as Kruskal's algorithm and Prim's algorithm find the most
efficient way to solve that problem. However, if the distance between two given
vertices needed to be calculated, an alternate method would be required. As we
know, Dijkstra's algorithm may be useful to determine alternatives in decision
making in finding a good route between the nodes. The huge and complicated
road network in a modem country makes it difficult to find a best route with
minimum path for traveling from one place to another. Dijkstra's Algorithm will
be used to solve this problem effectively. Car navigation systems are being
offered as a special feature of new cars for an increasing number of car brands. A
navigation system offers the driver the possibility to be guided to his destination,
by means of spoken and/or visual advices.
The key components of a car navigation system are positioning, route planning
and guidance. J.H Verriet in [4] suggested the route planning functionality of a car
navigation system. He expects that the system provides him an optimum route
according to a particular cost function Planning optimum routes fast on very large
road networks still poses a significant challenge to companies developing car
navigation systems. At the same time, taking information on daily congestion
patterns into account is getting more important. A car navigation system uses
road networks that may contain millions of road segments. However, a driver
expects a route to be calculated quickly, within a few seconds typically.
4. METHODOLOGY / SYSTEM DEVELOPMENT

Dijkstra's algorithm is called the single-source shortest path


problem. It computes length of the shortest path from the source to each of the
remaining vertices in the graph. The single source shortest path problem can be
described as follows: Let G= {V, E} be a directed weighted graph with V having the
set of vertices. The special vertex s in V, where s is the source and let for any edge
e in E, Edge Cost(e) be the length of edge e. All the weights in the graph should be
non-negative. Before going in depth about Dijkstra’s algorithm let’s talk in detail
about directed-weighted graph. Directed graph can be defined as an ordered pair
G: = (V, E) where V is a set, whose elements are called vertices or nodes and E is a
set of ordered pairs of vertices, called directed edges, arcs, or arrows. Directed
graphs are also known as digraph. Dijkstra’s –A Greedy Algorithm: Greedy
algorithms use problem solving methods based on actions to see if there’s a
better long term strategy. Dijkstra’s algorithm uses the greedy approach to solve
the single source shortest problem. It repeatedly selects from the unselected
vertices, vertex v nearest to source s and declares the distance to be the actual
shortest distance from s to v. The edges of v are then checked to see if their
destination can be reached by v followed by the relevant outgoing edges. Before
going into details of the project it is important to know how the algorithm works.
Dijkstra’s algorithm works by solving the sub-problem k, which computes the
shortest path from the source to vertices among the k closest vertices to the
source. For the dijkstra’s algorithm to work it should be directed weighted graph
and the edges should be non-negative. If the edges are negative then the actual
shortest path cannot be obtained. At the kth round, there will be a set called
Frontier of k vertices that will consist of the vertices closest to the source and the
vertices that lie outside frontier are computed and put into New Frontier. The
shortest distance obtained is maintained in sDist. It holds the estimate of the
distance from s to w. Dijkstra’s algorithm finds the next closest vertex by
maintaining the New Frontier vertices in a priority-min queue.
5. SOFTWARE REQUIREMENT SPECIFICATION

 Software Requirement Specification

5.1 Software Requirements:

Operating system : Windows XP and above

Software Turbo C

IDE Used : gedit(text editor)

5.2 Hardware Requirements:

System Processor : Intel i3

Motherboard : Intel

RAM : 256 MB or above

Hard disk : 20 GB
5.3 Technology:

C Language: C is a general-purpose, high-level language that was originally


developed by Dennis M. Ritchie to develop the UNIX operating system at Bell
Labs. C was originally first implemented on the DEC PDP-11 computer in 1972.

The UNIX operating system, the C compiler, and essentially all UNIX application
programs have been written in C. C has now become a widely used professional
language for various reasons −

 Easy to learn

 Structured language

 It produces efficient programs

 It can handle low-level activities

 It can be compiled on a variety of computer platforms


6. Project Plan

6.1 Project Schedule:

Week Project Plan

1st Week  Introduction to Mini Project.


Next 2 weeks (2nd & 3rd)  Project Planning.
Next 2 weeks (4th & 5th)  Collecting prerequisite information.
Next 2 weeks (6th & 7th)  Documentation.
Next 3 weeks (8th 9th &  Development of actual code.
10th)
11th Week  testing
12th Week  Final documentation.
6.2 SDLC
6.3 Risk Analysis and Planning

Entering characters or special symbols as an input is a risk for the system.


For this purpose if user enters different input the system displays garbage value.

6.4 Software Design

System design is the process of defining the architecture, modules, interfaces


& data for a system to satisfy specified requirements. System design could be seen
as the application of systems theory to product development
6.5 DFD

A data flow diagram (DFD) maps out the flow of information for any process or system. It uses
defined symbols like rectangles, circles and arrows, plus short text labels, to show data inputs,
outputs, storage points and the routes between each destination.
6.6 UML Diagrams:
Unified Modeling Language (UML) diagramming was created: to forge a common
visual language in the complex world of software development that would also be
understandable for business users and anyone who wants to understand a system.
7.RESULTS AND DISCUSSIONS

7.1 Implementation Details

Input Specification

The input will contain several lines, and each line contains a number N
which stands for the time. The input will be terminated with a line that contains a
number which are given to every path.

Output Specification

For each input situation, you should print a line with two numbers (x, y), the
column and the row number, with exactly one space between them.

Sample Input

Path 1 = 10Km

Path 2 = 20Km

Path 3 = 40Km

Path 4 = 70Km
Output

After comparing all paths shortest path found is path 1 and path 2.

Difference between path 1 and 2 is 10 km while path2 and 3 is 20, path 3 and 4 is
30, path 4 and 1 is 60.

7.2 Testing

Test case Test case name Expected output Actual output Status
no.
1 Path 1 to path 2 10 10 Shortest
2 Path 1 to path 3 30 30 Long
3 Path 1 to path 4 60 60 Too long
8. CONCLUSION

The primary goal of this work is to study the three variants of


dijkstra’s algorithm and implement them in improving the car navigation systems
time complexity. Two algorithms, namely rectangle restricted space and hexagon
restricted space have been implemented. Applying the restricted space algorithm
reduces the time complexity and is really a boon for any path finding algorithm.
This project provided us with an opportunity to analyse and practice all the
phases of the Software Development Life Cycle.
9. REFERENCE :

http://www.internationaljournalssrg.org/

https://creately.com/diagram/example/hz3p3c262/FIND%20SHORTEST%20
ROUTE

https://www.researchgate.net/publication/316736456_A_Survey_of_Shortest-
Path_Algorithms#:~:text=Abstract,that%20span%20across%20multiple%20
disciplines.

https://www.researchgate.net/publication/310594546_A_Review_and_Evaluat
ions_of_Shortest_Path_Algorithms

https://www.engpaper.com/shortest-path.htm

You might also like