Daa Mino Joban YAshveer

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

StudentBids: Elevate your campus lifestyle

A PROJECT REPORT

Submitted by

Mohd Aakib (22BCS10045)


Sanket Sharma (22BCS10046)
YashVeer Singh (22BCS10047)

in partial fulfillment for the award of the degree of

BACHELOR OF ENGINEERING
IN
COMPUTER SCIENCE

Chandigarh University
JANUARY 2024
BONAFIDE CERTIFICATE

Certified that this project report “StudentBids: Elevate your campus lifestyle” is
the bonafide work of “Mohd Aakib(22BCS10045), Sanket Sharma
( 22BCS10046), YashVeer Singh(22BCS10047), who carried out the
project work under my/our supervision.

SIGNATURE

Er. Nandita Malik


SUPERVISOR
Assistant Professor
BE CSE

Submitted for the project viva-voce examination held on

INTERNAL EXAMINER EXTERNAL EXAMINER



TABLE OF CONTENTS
List of Figures 7

List of Tables 8

List of Standards 9

CHAPTER 1. INTRODUCTION 11
1. Identification of Client/ Need/ Relevant Contemporary issue 11

2. Identification of Problem 11

3. Identification of Tasks 11

4. Timeline 11

5. Organization of the Report 11

CHAPTER 2. LITERATURE REVIEW/BACKGROUND STUDY 12


1. Timeline of the reported problem 12

2. Existing solutions 12

3. Bibliometric analysis 12

4. Review Summary 12

5. Problem Definition 12

6. Goals/Objectives 12

CHAPTER 3. DESIGN FLOW/PROCESS 13


1. Evaluation & Selection of Specifications/Features 13

2. Design Constraints 13

3. Analysis of Features and finalization subject to constraints 13

4. Design Flow 13

5. Design selection 13

6. Implementation plan/methodology 13
CHAPTER 4. RESULTS ANALYSIS AND VALIDATION 14
4.1. Implementation of solution 14

CHAPTER 5. CONCLUSION AND FUTURE WORK 15


5.1. Conclusion 15
5.2. Future work 15

REFERENCES 16
APPENDIX 17
1. Plagiarism Report 17

2. Design Checklist 17

USER MANUAL 18
Figures

Figure 3.1 ………………………………………………………………………………….

Figure 3.2 ………………………………………………………………………………….

Figure 4.1 …………………………………………………………………………….……


Tables

Table 3.1 ………………………………………………………………………………….


Table 3.2 ………………………………………………………………………………….
Table 4.1 …………………………………………………………………………….……
andard Publish About the standard Pa
ing ge
Agency no

IEEE 802.11 is part of the


IEEE 802 set of local area
network (LAN) technical
standards and specifies the
IEE Mention page nowhere
IEEE set of media access control
E standardis used
(MAC) and physical layer
802
(PHY) protocols
.11
for implementing wireless
local areanetwork (WLAN)
computer
communication.
List of Standards (Mandatory For Engineering

Note: Text in Red is presented as an example (replace with relevant information)


1. INTRODUCTION

1.1. Identification of Client /Need / Relevant Contemporary issue

The need for efficient and reliable pathfinding is a common issue in various fields, including
network routing, transportation, and AI pathfinding for gaming. The ability to compute shortest
paths in weighted graphs efficiently is crucial in these domains, especially when dealing with
large-scale systems. Dijkstra’s algorithm is a widely used approach for this purpose.

1.2. Identification of Problem

Given a graph with weighted edges, the problem is to determine the shortest path from a given
source node to all other nodes. This problem is frequently encountered in real-world applications
such as mapping software (e.g., Google Maps), network optimization, and logistics. The goal is to
implement Dijkstra’s algorithm and compare it with other shortest path algorithms to analyze
efficiency and applicability in different scenarios.

1.3. Identification of Tasks

=In this section, the tasks required to solve the identified problem are outlined. These tasks will
guide the overall approach to implementing and comparing shortest path algorithms. The key tasks
for this project are as follows:
1. Research and Algorithm Selection:
• Review various shortest path algorithms, including Dijkstra’s, Bellman-Ford, and A*.
• Select Dijkstra’s algorithm as the primary algorithm for implementation, due to its
efficiency with non-negative edge weights.
2. Graph Representation:
• Design the structure to represent the graph using adjacency lists or matrices.
• The graph should accommodate weighted, directed edges.
• Develop mechanisms to handle different types of graph inputs (e.g., large, sparse, or
dense graphs).
3. Dijkstra’s Algorithm Implementation:
• Implement Dijkstra’s algorithm using a priority queue to ensure efficient extractionof
the next closest node.
• Ensure that the algorithm is capable of finding the shortest path from a given source
node to all other nodes in the graph.
4. Visualization of the Algorithm:
• Create a graphical or visual representation of the graph and the shortest path process
using tools like Python’s NetworkX and Matplotlib libraries.
• Visualize the progress of the algorithm, showing how nodes are visited and paths are
updated.
5. Comparison with Bellman-Ford Algorithm:
• Implement the Bellman-Ford algorithm to handle graphs with negative edge weights.
• Compare the performance of both algorithms on different types of graphs, focusing
on time complexity, space complexity, and edge case handling.
6. Testing and Performance Evaluation:
• Test both algorithms on various graph inputs to evaluate their efficiency.
• Measure performance metrics such as execution time, memory usage, and scalability.
• Evaluate how the algorithms handle edge cases, such as graphs with disconnected
components or negative weight cycles.
7. Documentation and Reporting:
• Document the design, implementation, and results of the project.
• Write a detailed report on the algorithms' implementation and performancecomparison,
including visual aids and performance charts.
By breaking down the tasks, the project can be organized into manageable phases that guide the
design, implementation, and evaluation processes.

1.4. Timeline

1.5. Organization of the Report

The organization of the report is structured logically to guide the reader from the introduction of
the topic through the literature, methodology, results, and conclusions. Each chapter builds upon the
previous one, culminating in a comprehensive understanding of the project and its outcomes. This
structure is designed to facilitate clarity and coherence, making it easier for readers to follow the
development and findings of the project.
2. LITERATURE REVIEW/BACKGROUND STUDY

2.1. Timeline of the reported problem

As previously outlined, this section details the historical evolution of shortest path algorithms, emphasizing
significant milestones from the introduction of Dijkstra’s algorithm in 1956 to the modern advances in
graphtheory and real-time applications. Understanding this timeline provides essential context for the current
research and highlights the continuous advancements in the field.

2.2. Existing solutions

This section reviews the main algorithms used to solve shortest path problems,
discussing their mechanisms, strengths, and weaknesses:
• Dijkstra’s Algorithm:
• Designed for graphs with non-negative weights.
• Utilizes a priority queue to efficiently find the shortest path from a source node
to allother nodes.
• Time complexity of O(E + V log V), where E is the number of edges and V is
thenumber of vertices.
• Bellman-Ford Algorithm:
• Capable of handling graphs with negative edge weights.
• Uses dynamic programming to find the shortest path, iterating over all edges
andrelaxing them.
• Time complexity of O(VE), which can be slower than Dijkstra’s for large
graphswith non-negative weights.
• Floyd-Warshall Algorithm:
• Computes shortest paths between all pairs of nodes.
• Utilizes a dynamic programming approach.
• Time complexity of O(V^3), making it less efficient for large graphs but
useful fordense graphs.
• A Search Algorithm:*
• Combines Dijkstra’s algorithm with heuristics to optimize pathfinding.
• Efficient for specific applications, such as game development and navigation
systems.
• Heuristic-based, leading to faster search times in many scenarios.
• Johnson’s Algorithm:
• Designed for sparse graphs, computes all-pairs shortest paths efficiently.
• Uses both Dijkstra’s and Bellman-Ford algorithms to achieve better
performance inspecific situations.
• Time complexity of O(V^2 log V + VE), making it effective for large, sparse
graphs.
2.3. Bibliometric analysis

This section analyzes research publications and key contributors in the field of shortest path
algorithms. It includes:

• Key Journals and Conferences:

• Publications in journals like "Journal of Graph Theory," "Algorithmica," and


proceedings from conferences such as "SIAM International Conference on Data
Mining" have significantly contributed to advancements in shortest path
algorithms.

• Leading Researchers:

• Key figures in graph theory and algorithm design, including Edsger W. Dijkstra
and Richard Bellman, are frequently cited in academic literature.

• Trends in Research:

• Increasing focus on applications in real-time systems, AI, and big data analytics.
• A shift toward heuristic and approximation methods for solving complex and
dynamic problems.

2.4. Review Summary

This section synthesizes the findings from the literature review, highlighting:
• Gaps in Existing Research:
• While many algorithms have been developed, there is a need for efficient
implementations that can handle real-time updates and dynamic graphs.
• Opportunities for Improvement:
• Integrating machine learning techniques with traditional algorithms could
enhance performance and adaptability.
• Relevance to Current Project:
• The project aims to address the limitations of existing solutions by focusing on
Dijkstra’s algorithm and providing a comparative analysis with the Bellman-
Ford algorithm, specifically regarding their efficiency and applicability to
various graph types.
2.5. Problem Definition

This section clearly defines the specific problem the project addresses:

Statement of the Problem:

• Many applications require efficient solutions for finding shortest paths in graphs, particularly
in transportation, logistics, and network optimization.
• The challenge lies in selecting the most suitable algorithm based on graph characteristics
(e.g., presence of negative weights, density) and performance requirements (e.g., real-time
processing).

6. Goals/Objectives

The objectives of the project are outlined here:


1. Implement Dijkstra’s Algorithm:
o Develop a robust implementation that effectively computes the shortest path
inweighted graphs.
2. Visualize the Algorithm's Process:
o Create visual representations of the algorithm's operation, enhancing
understandingand educational value.
3. Compare with Bellman-Ford Algorithm:
o Analyze the performance of Dijkstra's algorithm against the Bellman-Ford
algorithmto identify strengths and weaknesses.
4. Provide Recommendations:
o Based on findings, suggest the most appropriate algorithm for different types
ofgraphs and use cases.

3. DESIGN FLOW/PROCESS

3.1. Evaluation & Selection of Specifications/Features

Critically evaluate the features identified in the literature and prepare the list of features
ideally required in the solution.

3.2. Design Constraints

1.1.1. Standards:
Regulations/Economic/Environmental/Health/manufacturability/Safety/Professional/
Ethical/Social & Political Issues/Cost considered in the design.

3.3. Implementation plan/methodology

Step 1: Data Structure Initialization (Graph representation).


Step 2: Algorithm Integration (Dijkstra, A*,
etc.).Step 3: Code Implementation and
Debugging.
Step 4: Testing on Synthetic and Real-world Data Sets.

4. RESULTS ANALYSIS AND VALIDATION

4.1. Implementation of solution

Detailed explanation of the algorithm implementation, including code snippets, pseudocode, and
flowcharts.

2. Results Analysis
Comparison of execution times for different graph sizes.

Analysis of path accuracy and deviations under various

scenarios.Visual representations of paths on sample graphs.

3. Validation
Validation using benchmark problems, real-world data, and simulations. Error metrics and
performance analysis.

5. CONCLUSION AND FUTURE WORK

5.1. Conclusion

1. Conclusion

The project explored the implementation of shortest path algorithms, focusing primarily on
Dijkstra’s algorithm and the A* search algorithm. Both were evaluated for their performance in
terms of computational efficiency and suitability to different types of networks.

The core conclusion drawn from the implementation and testing is as follows:

• Dijkstra's Algorithm is robust and guarantees the shortest path across various types of graphs, both
sparse and dense. However, it tends to be computationally expensive for large-scale networks,
especially when applied to real-time systems where performance is crucial.
• A Search Algorithm* demonstrated clear advantages in scenarios where heuristic-driven pathfinding
is applicable. Its ability to prune unnecessary explorations through the use of a heuristic function
ledto faster results in cases like maze-solving and real-time navigation.

Key insights from the project include:

• Suitability for Static Networks: Dijkstra’s algorithm works well for static, non-changing networks
and when all nodes and edges need to be explored uniformly. It is often preferred when we cannot
assume anything about the graph structure or when dealing with negatively weighted edges (though
the algorithm needs to be modified in such cases).
• Efficiency in Dynamic Environments: The A* search algorithm excels in dynamic or complex
environments where heuristic functions such as Euclidean or Manhattan distances can be leveraged.
Its performance on dense graphs with many nodes was significantly better, making it ideal for real-
time systems like robotics or gaming where rapid decision-making is required.

Overall, the project effectively demonstrated the trade-offs between computational cost and
accuracy in different shortest path algorithms. The experimentation validated that no single
algorithm is universally best; rather, the choice of algorithm must be tailored to the specific
characteristics of the problem, such as graph size, edge weights, and real-time needs.

5.2. Future work

While the current project has delivered insights into the performance of Dijkstra’s and A*
algorithms, several avenues remain for future exploration and optimization:

1. Dynamic Graph Handling:

1. Real-time Adaptation: Future work could focus on algorithms that adapt dynamically as
the graph structure changes (e.g., road closures or network interruptions). Algorithms like
D-Lite* and Fringe Search offer dynamic re-planning capabilities and should be explored
for environments where real-time updates are necessary.
2. Dynamic Weight Adjustments: Implementing solutions that allow for dynamic changes in
edge weights (e.g., traffic updates in navigation systems) would expand the algorithm’s
applicability in real-world problems.

2. Machine Learning for Heuristic Optimization:


1. Predictive Heuristics: One promising research direction is the use of machine learning
techniques to optimize heuristic functions. Instead of using fixed heuristic functions like
Euclidean distance, a model could learn from prior navigation experiences and provide
morecontext-specific heuristics, potentially reducing computation time further.
2. Reinforcement Learning: Combining shortest path algorithms with reinforcement learning
could allow algorithms to "learn" the optimal paths from experience. This approach has
already seen some success in robotic navigation and could be further explored for more
complex applications.

3. Parallel Computing and Distributed Systems:

1. Parallelized Algorithms: Parallel computing could drastically reduce the computation time
for algorithms like Dijkstra’s on large graphs by dividing the graph into segments processed
concurrently. Tools like CUDA (for GPU computation) or frameworks like Hadoop or
Apache Spark (for distributed computing) could be explored to scale the algorithms across
clusters of machines.
2. Cloud-Based Solutions: Implementing shortest path algorithms in a cloud environment
would allow real-time systems with massive datasets (e.g., city-wide traffic systems or
logistics networks) to compute optimal routes more efficiently.

4. Extended Algorithm Research:

1. Alternative Shortest Path Algorithms: Further research into alternative algorithms such
as Johnson's Algorithm (effective for sparse graphs) or Floyd-Warshall Algorithm (best
for solving all-pairs shortest path problems) can provide insights into better handling
specialized cases, especially when considering multi-source, multi-destination queries.
2. Hybrid Approaches: Exploring hybrid solutions that combine Dijkstra’s guaranteed
correctness with A*’s efficiency could be another avenue for optimizing large-scale graphs.

5. Application to Specialized Fields:

1. Healthcare Systems: Shortest path algorithms can be applied to patient transport or supply
chain management within hospitals to optimize response times in emergency situations.
2. IoT and Smart Cities: Integration with Internet of Things (IoT) systems can help in real-
time traffic management and autonomous vehicle navigation, allowing more efficient route
planning through live data inputs.
3. Game Development: In AI for gaming, pathfinding algorithms play a crucial role in non-
player character (NPC) navigation and decision-making. Optimizing A* or exploring other
graph search techniques could improve the fluidity and intelligence of NPCs.
6. REFERENCES

1. Dijkstra, E. W. (1959). A note on two problems in connexion with graphs. Numerische


Mathematik, 1(1), 269-271.This foundational paper introduces Dijkstra’s algorithm and
discusses its application to finding the shortest path in weighted graphs.

2. Bellman, R. (1958). On a routing problem. Quarterly of Applied Mathematics, 16(1),


87- 90.Bellman’s research presents the Bellman-Ford algorithm, focusing on shortest paths
withnegative edge weights and its application in network routing.

3.Hart, P. E., Nilsson, N. J., & Raphael, B. (1968). A Formal Basis for the Heuristic
Determination of Minimum Cost Paths. IEEE Transactions on Systems Science and
Cybernetics, 4(2), 100-107.The introduction of the A* search algorithm, including the role
of heuristic functions in optimizing graph traversal for shortest pathfinding.

4. Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. (2009). Introduction to
Algorithms (3rd ed.). MIT Press.This comprehensive textbook provides detailed
explanations of graph algorithms, including Dijkstra’s and A* algorithms, and offers
insights into their complexities and use cases.

5. Russell, S. & Norvig, P. (2021). Artificial Intelligence: A Modern Approach (4th ed.).
Pearson.A key reference for AI concepts, including heuristic search techniques like A* and
their applications in real-world problem-solving.

Zhan, F. B., & Noon, C. E. (1996). Shortest path algorithms: An evaluation using real road
networks. Transportation Science, 32(1), 65-73.This paper evaluates the performance of
various shortest path algorithms using real-world transportation networks, providing key
insights into practical use cases.

Koenig, S., & Likhachev, M. (2005). D* Lite. Proceedings of the AAAI Conference on
Artificial Intelligence, 476-483.A study introducing D*-Lite, a dynamic pathfinding
algorithm that adapts to changes in graph structure, with applications in robotics and
autonomous systems.

Peterson, D. (2020). Exploring the Shortest Path in Dynamic Graphs: Challenges and
Solutions. Journal of Graph Algorithms and Applications, 24(3), 341-359.This paper
addresses the challenges faced in dynamic pathfinding and presents a detailed review of
modern approaches in handling changes in real-time graph structures.

You might also like