DAAL_Assignment No 10
DAAL_Assignment No 10
Assignment No.: 10
Assignment Title: Develop a program for Travelling Salesman Problem using Branch and Bound.
Objectives:
Minimize Total Travel Cost:
The primary objective of solving the TSP using the Branch and Bound method is to find the
shortest possible route that allows the salesman to visit each city exactly once and return to the
starting point while minimizing the total distance or travel cost.
Understand Optimization Techniques:
Demonstrate the application of the Branch and Bound technique in solving combinatorial
optimization problems like TSP, where the problem space is large and exhaustive search is
impractical.
Introduce a systematic approach to solve NP-hard problems by exploring only promising paths,
rather than evaluating all possible permutations of the cities.
Illustrate Problem-Solving with State-Space Tree:
Construct and explore the state-space tree to represent different partial solutions (nodes) of the
problem.
Use bounds to prune the search space, showing how a problem is divided into smaller subproblems
(branching) and how unpromising branches are eliminated (bounding).
Outcomes:
Students will learn to develop and implement efficient search strategies using Branch and
Bound, where the solution space is explored using heuristics (lower bounds) to minimize the
number of nodes that need to be explored.
Gain insight into how the Branch and Bound method is used to reduce the time complexity by
pruning unnecessary paths, making it more efficient than brute-force approaches.
THEORY:
Introduction
The Traveling Salesman Problem (TSP) is a classic optimization problem where a salesman must visit each
city exactly once and return to the starting city, minimizing the total travel cost.
Branch and Bound is a state-space search method for solving combinatorial optimization problems. It
involves:
o Branching: Dividing the problem into smaller subproblems.
o Bounding: Using heuristics to calculate lower bounds to prune branches that cannot lead to an
optimal solution.
Algorithm:
1. Define a Node class to represent each partial path and its bound.
2. Use a priority queue to explore nodes with lower bounds first.
3. For each node, generate its children by extending the current path.
4. Calculate the bound for each child.
5. Prune nodes whose bounds are greater than the current minimum.
6. Keep track of the best path and update the minimum cost when a complete path is found.
Conclusion: By leveraging the Branch and Bound method, the TSP can be solved more efficiently than
through brute force.