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

ANALYSIS OF DIJKSTRA’S AND A* ALGORITHM TO FIND

THE SHORTEST PATH

Lê Đức Việt

12/1/2024
Chương 1

1.1 Introduction
1.1.1 Problem
Pathfinding involves moving an object from its initial position to the final position. Pathfinding algorithms
(PFAs) find applications in various areas such as Games, Virtual Tours, Driverless Vehicles, Robot Motion, and
Navigation[6].
The objective of pathfinding is to find the shortest path between two points in a given environment. The
criteria for the optimal path may include imitating a person’s chosen path, minimizing fuel consumption, or
passing through an intermediate point[6]. Finding the shortest path is a challenging problem in navigation
systems, artificial intelligence, and computer simulations.
Shortest path algorithms are widely used in network flow problems, tree problems, and related domains[7].
They determine the minimum cost of travel, shortest path in an electric circuit, or the most reliable way. The
internet extensively uses shortest path algorithms for data package transmissions with minimal time or using
the most reliable path.
This research implements a shortest path algorithm using the A* algorithm and compares it with Dijkstra’s
algorithm based on criteria such as search time and distance[7]. The comparison aims to analyze their efficiency
in a 2-dimensional matrix environment.
The A* algorithm is commonly used in pathfinding and graph traversal[3]. It traverses the chart by following
the lowest known path, maintaining a sorted priority queue of alternate path sections. The heuristic function
plays a crucial role in controlling the behavior of A*.
Dijkstra’s algorithm, known as the single-source shortest path problem, computes the length of the shortest
path from the source to each vertex on the plot. The algorithm works on directed weighted graphs, where all
weights are non-negative.

1.1.2 Problem Statement


Pathfinding involves finding the shortest path between two locations. This study proposes the use of A* and
Dijkstra’s algorithms to find the shortest path solution efficiently. The comparison is based on time to search
and minimum distance.

1.1.3 Objectives of the Research


The objectives of this research are:

1. Apply A* and Dijkstra’s algorithms to find the shortest path.


2. Compare A* and Dijkstra’s algorithms based on distance and time consumption.

1.1.4 Scope of Research


The research focuses on comparing A* and Dijkstra’s algorithms based on time to search and minimum
distance on the shortest path. The comparison is conducted in four cases using 2-dimensional grids of different
sizes (8x8, 22x22, 33x33, 10x10).

1.1.5 Motivation
Dijkstra’s Algorithm and A* algorithm are both efficient in finding the shortest path, but they have different
characteristics. Dijkstra’s Algorithm explores all possible paths, while A* algorithm uses heuristics to guide the

1
search. The motivation for this research is to understand and compare the efficiency of these algorithms in
different scenarios.

1.1.6 Research Outline


This thesis consists of five chapters:
1. Chapter 1: Overview, main objectives, scope of work, and motivation.
2. Chapter 2: Basic methods and related work.

3. Chapter 3: Methodology and tools.


4. Chapter 4: Implementation details.
5. Chapter 5: Results, comparisons, and conclusion.

2
Tài liệu tham khảo

[1] Cohen, H. (1993). , "A Course in Computational Algebraic Number Theory", New York: Springer-Verlag.
ISBN 0-387-55640-0.

[2] Cohn, H. (1962), "Advanced Number Theory", New York: Dover. ISBN 0-486-64023-X.
[3] Cox, D.; Little, J.; O’Shea, D. (1997), " Ideals, Varieties, and Algorithms: An Introduction to Computational
Algebraic Geometry and Commutative Algebra"
[4] Stillwell, J. (1997), "Numbers and Geometry"

[5] Tattersall, J. J. (2005), " Elementary Number Theory in Nine Chapters.".


[6] Adam A. Razavian, Sun J. (2005), " Cognitive Based Adaptive Path Planning Algorithm for Autonomous
Robotic Vehicles, Southeast Con 2005 Proceedings.".
[7] Benaicha Ramzi, Taibi Mahmoud.(2013), Dijkstra Algorithm Implementation On Fpga Card For Telecom
Calculations

You might also like