0% found this document useful (0 votes)
21 views

DAAL_Assignment No 10

Uploaded by

apdeshmukh371122
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

DAAL_Assignment No 10

Uploaded by

apdeshmukh371122
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Department of Artificial Intelligence & Data Science

K. K. Wagh Institute of Engineering Education and Research


Hirabai Haridas Vidyanagari, Amrut Dham, Panchavati, Nashik-422003
Design and Analysis of Algorithms Lab
TY AI&DS Semester: I

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.

Principle of Branch and Bound Algorithm for TSP:

 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.

Travelling and Salesman Problem using Branch and Bound 1


 For TSP, the goal is to find a path visiting all cities with minimum total cost.

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.

Travelling and Salesman Problem using Branch and Bound 2

You might also like