0% found this document useful (0 votes)
4 views15 pages

TSP_119

The Traveling Salesman Problem (TSP) is an optimization algorithm that seeks the shortest route to visit all cities once and return to the starting point, using recursive backtracking for efficiency on small datasets. While it guarantees optimal solutions through dynamic programming, its time complexity of O(n·2^n) makes it impractical for larger datasets. TSP has significant applications in logistics, networking, and route planning, highlighting its relevance in both theory and practice.

Uploaded by

joriwalarakib420
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views15 pages

TSP_119

The Traveling Salesman Problem (TSP) is an optimization algorithm that seeks the shortest route to visit all cities once and return to the starting point, using recursive backtracking for efficiency on small datasets. While it guarantees optimal solutions through dynamic programming, its time complexity of O(n·2^n) makes it impractical for larger datasets. TSP has significant applications in logistics, networking, and route planning, highlighting its relevance in both theory and practice.

Uploaded by

joriwalarakib420
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Travelling

Salesman
Algorithm
Presented By
Md Sadman Sakib
Our team members who have
contributed their best.
Siam 2023-1-60-
119
Redoan Islam
2023-1-60-
118
Rakibul Islam
2023-1-60-
226
Introducti
on
Introduction
The Traveling Salesman Problem (TSP) is an optimization algorithm
for finding the shortest route to visit all cities exactly once and
return to the starting point. The aim is to minimize the total travel
cost or distance. This algorithm uses recursive backtracking to solve
the problem by exploring all possible paths and selecting the one
with the minimum cost. This approach ensures efficiency for small
datasets by eliminating unnecessary paths early which reduced the
computational burden. The output includes the optimal path and its
corresponding minimal travel cost, providing an ideal solution for
the given set of cities.
Flowcha
rt
Flowchart
Graphical
Representati
on
Graphical Representation

For 4 cities
The cost matrix is:

0 4 1 3
4 0 2 1
1 2 0 5
3 1 5 0

The shortest path is,

1 -> 3 -> 2 -> 4 -> 1


Time
Complexit
y
Time
Complexity
Recursive Calls:
The algorithm makes recursive calls for all subsets of cities.

Number of States: 2n ⋅n
All possible subsets of cities = : 2n
iteration through all cities for each subset = n
complexity = O( n⋅2n )

Path Reconstruction:
Reconstructing the optimal path requires a single loop over the cities.
complexity = O(n)

Final Complexity = O( n⋅2n )


Comparis
on
Why This Algorithm Is
Effective
Advantages:

Optimal Solution: Uses Dynamic Programming (DP) to guarantee the minimal


cost path compared to heuristic methods.

Reduced Redundancy: Memorization ensures subproblems are solved only


once, improving efficiency over brute-force approaches .

Deterministic Output: Always provides the correct result, making it reliable


for exact solutions.
Why This Algorithm Is
Effective
Limitations:

Time Complexity: 𝑂(𝑛⋅2𝑛), making it computationally expensive for


large 𝑛.

Space Complexity: Requires 𝑂(𝑛⋅2𝑛), which can be restrictive for


systems with limited memory.

Scalability: Unsuitable for real-world problems involving hundreds of


cities due to exponential growth in complexity.
Conclusion

The Travelling Salesman Problem (TSP) aims to find the shortest route visiting all
cities exactly once and returning to the start. Dynamic programming and
approximation algorithms offer efficient solutions for varying problem sizes. TSP is
widely used in logistics, networking, and route planning, balancing theory and
practical applications.
Thank
You

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy