SlideShare a Scribd company logo
1 of 24
Branch-and-Bound
Traveling Salesperson Problem
Shashikant V. Athawale
Assistant Professor ,Computer Engineering Department
AISSMS College of Engineering,
Kennedy Road, Pune , MS, India - 411001
The branch-and-bound problem solving method is very similar to backtracking in that
a state space tree is used to solve a problem.  The differences are that B&B
(1)does not limit us to any particular way of traversing the tree and
(2) is used only for optimization problems. 
A B&B algorithm computes a number (bound) at a node to determine whether the node
is promising. The number is a bound on the value of the solution that could be
obtained by expanding the state space tree beyond the current node.
Types of Traversal
When implementing the branch-and-bound approach there is no restriction on the type
of state-space tree traversal used. Backtracking, for example, is a simple type of B&B
that uses depth-first search.
A better approach is to check all the nodes reachable from the currently active node
(breadth-first) and then to choose the most promising node (best-first) to expand next.
An essential element of B&B is a greedy way to estimate the value of choosing one node
over another. This is called the bound or bounding heuristic. It is an underestimate for a
minimal search and an overestimate for a maximal search.
When performing a breadth-first traversal, the bound is used only to prune the
unpromising nodes from the state-space tree. In a best-first traversal the bound cab
also used to order the promising nodes on the live-node list.
Traveling Salesperson B&B
In the most general case the distances between each pair of cities is a positive value
with dist(A,B) /= dist(B,A). In the matrix representation, the main diagonal values are
omitted (i.e. dist(A,A) = 0).
Obtaining an Initial Tour Use the greedy method to find an initial candidate
tour. We start with city A (arbitrary) and choose the closest city (in this case E).
Moving to the newly chosen city, we always choose the closest city that has not
yet been chosen until we return to A.
Our candidate tour is
A-E-C-G-F-D-B-H-A
with a tour length of 28. We know that a
minimal tour will be no greater than this.
It is important to understand that the initial
candidate tour is not necessarily a minimal
tour nor is it unique.
If we start with city E for example, we have,
E-A-B-H-C-G-F-D-E
with a length of 30
Defining a Bounding Heuristic
Now we must define a bounding heuristic that
provides an underestimate of the cost to
complete a tour from any node using local
information. In this example we choose to use
the actual cost to reach a node plus the
minimum cost from every remaining node as our
bounding heuristic.
                                           
h(x) = a(x) + g(x)
a(x) - actual cost to node x
g(x) - minimum cost to complete
Since we know the minimum cost from each
node to anywhere we know that the minimal
tour cannot be less than 25.
Finding the Minimal Tour
1. Starting with node A determine the actual cost to each of the other nodes.
2. Now compute the minimum cost from every other node 25-4=21.
3. Add the actual cost to a node a(x) to the minimum cost from every other node
to determine a lower bound for tours from A through B,C,. . ., H.
4. Since we already have a candidate tour of 28 we can prune all branches with a
lower-bound that is ? 28. This leaves B, D and E as the only promising nodes. 5.
We continue to expand the promising nodes in a best-first order (E1,B1,,D1).
5. We continue to expand the promising nodes in a best-first order (E1,B1,,D1).
6. We have fully expanded node E so it is removed from our live-node list and we
have two new nodes to add to the list. When two nodes have the same bounding
values we will choose the one that is closer to the solution. So the order of nodes in
our live-node list is (C2,B1,B2,D1).
7. We remove node C2 and add node G3 to the live-node list. (G3,B1,B2,D1).
8. Expanding node G gives us two more promising nodes F4 and H4. Our live-node list is
now (F4,B1,H4,B2,D1).
9. A 1st level node has moved to the front of the live-node list. (B1,D5,H4,B2,D1)
10. (H2,D5,H4,B2,D1)
11. (D5,H4,B2,D1)
12. (H4,B2,D1)
13. (B2,D1)
14. (H3,D1)
15. (D1)
16.We have verified that a minimal tour has length >= 28. Since our candidate tour
has a length of 28 we now know that it is a minimal tour, we can use it without further
searching of the state-space tree.
 Positive integer P1
, P2
, …, Pn
(profit)
W1
, W2
, …, Wn
(weight)
M (capacity)
15
maximize P Xi i
i
n
=
∑
1
subject to W X Mi i
i
n
≤
=
∑
1
Xi = 0 or 1, i =1, …, n.
The problem is modified:
minimize −
=
∑P Xi i
i
n
1
Fig. 6-27 The Branching Mechanism in the Branch-and-Bound
Strategy to Solve 0/1 Knapsack Problem.
16
 Ans: by quickly finding a feasible solution:
starting from the smallest available i, scanning
towards the largest i’s until M is exceeded. The
upper bound can be calculated.
17
 E.g. n = 6, M = 34
 A feasible solution: X1
= 1, X2
= 1, X3
= 0, X4
= 0,
X5
= 0, X6
= 0
-(P1
+P2
) = -16 (upper bound)
Any solution higher than -16 can not be an optimal solution.
18
i 1 2 3 4 5 6
Pi
6 10 4 5 6 4
Wi
10 19 8 10 12 8
(Pi
/Wi
≥ Pi+1
/Wi+1
)
 Ans: by relaxing our restriction from Xi
= 0
or 1 to 0 ≤ Xi
≤ 1 (knapsack problem)
Let −
=
∑P Xi i
i
n
1
be an optimal solution for 0/1
knapsack problem and − ′
=
∑P Xi
i
n
i
1
be an optimal
solution for knapsack problem. Let Y=−
=
∑P Xi i
i
n
1
,
Y’
= − ′
=
∑P Xi
i
n
i
1
.
⇒Y’
≤Y
19
 We can use the greedy method to find an
optimal solution for knapsack problem.
 For example, for the state of X1=1 and X2=1, we
have
X1
= 1, X2
=1, X3
= (34-6-10)/8=5/8, X4
= 0, X5
=
0, X6
=0
-(P1
+P2
+5/8P3
) = -18.5 (lower bound)
-18 is our lower bound. (only consider integers)
20
 By the best-first search scheme
 That is, by expanding the node with the best
lower bound. If two nodes have the same lower
bounds, expand the node with the lower upper
bound.
21
0/1 Knapsack Problem Solved by Branch-and-Bound Strategy 22
Node 2 is terminated because its lower bound is
equal to the upper bound of node 14.
Nodes 16, 18 and others are terminated because
the local lower bound is equal to the local upper
bound.
(lower bound ≤ optimal solution ≤ upper bound
Thank You

More Related Content

What's hot

Greedy Algorithm - Knapsack Problem
Greedy Algorithm - Knapsack ProblemGreedy Algorithm - Knapsack Problem
Greedy Algorithm - Knapsack ProblemMadhu Bala
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy methodhodcsencet
 
implementation of travelling salesman problem with complexity ppt
implementation of travelling salesman problem with complexity pptimplementation of travelling salesman problem with complexity ppt
implementation of travelling salesman problem with complexity pptAntaraBhattacharya12
 
0/1 knapsack
0/1 knapsack0/1 knapsack
0/1 knapsackAmin Omi
 
I. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AII. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AIvikas dhakane
 
Problem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.pptProblem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.pptarunsingh660
 
Divide and conquer - Quick sort
Divide and conquer - Quick sortDivide and conquer - Quick sort
Divide and conquer - Quick sortMadhu Bala
 
Sum of subsets problem by backtracking 
Sum of subsets problem by backtracking Sum of subsets problem by backtracking 
Sum of subsets problem by backtracking Hasanain Alshadoodee
 
Greedy algorithms
Greedy algorithmsGreedy algorithms
Greedy algorithmsRajendran
 
Dijkstra's algorithm presentation
Dijkstra's algorithm presentationDijkstra's algorithm presentation
Dijkstra's algorithm presentationSubid Biswas
 
sum of subset problem using Backtracking
sum of subset problem using Backtrackingsum of subset problem using Backtracking
sum of subset problem using BacktrackingAbhishek Singh
 
Branch and bound.ppt
Branch and bound.pptBranch and bound.ppt
Branch and bound.pptumairshams6
 
State Space Representation and Search
State Space Representation and SearchState Space Representation and Search
State Space Representation and SearchHitesh Mohapatra
 
Turing Machine
Turing MachineTuring Machine
Turing MachineRajendran
 
Strassen's matrix multiplication
Strassen's matrix multiplicationStrassen's matrix multiplication
Strassen's matrix multiplicationMegha V
 

What's hot (20)

A* Algorithm
A* AlgorithmA* Algorithm
A* Algorithm
 
Greedy Algorithm - Knapsack Problem
Greedy Algorithm - Knapsack ProblemGreedy Algorithm - Knapsack Problem
Greedy Algorithm - Knapsack Problem
 
Unit 2 in daa
Unit 2 in daaUnit 2 in daa
Unit 2 in daa
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy method
 
Greedy algorithm
Greedy algorithmGreedy algorithm
Greedy algorithm
 
implementation of travelling salesman problem with complexity ppt
implementation of travelling salesman problem with complexity pptimplementation of travelling salesman problem with complexity ppt
implementation of travelling salesman problem with complexity ppt
 
0/1 knapsack
0/1 knapsack0/1 knapsack
0/1 knapsack
 
I. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AII. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AI
 
Problem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.pptProblem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.ppt
 
Prim's algorithm
Prim's algorithmPrim's algorithm
Prim's algorithm
 
Dijkstra's Algorithm
Dijkstra's Algorithm Dijkstra's Algorithm
Dijkstra's Algorithm
 
Divide and conquer - Quick sort
Divide and conquer - Quick sortDivide and conquer - Quick sort
Divide and conquer - Quick sort
 
Sum of subsets problem by backtracking 
Sum of subsets problem by backtracking Sum of subsets problem by backtracking 
Sum of subsets problem by backtracking 
 
Greedy algorithms
Greedy algorithmsGreedy algorithms
Greedy algorithms
 
Dijkstra's algorithm presentation
Dijkstra's algorithm presentationDijkstra's algorithm presentation
Dijkstra's algorithm presentation
 
sum of subset problem using Backtracking
sum of subset problem using Backtrackingsum of subset problem using Backtracking
sum of subset problem using Backtracking
 
Branch and bound.ppt
Branch and bound.pptBranch and bound.ppt
Branch and bound.ppt
 
State Space Representation and Search
State Space Representation and SearchState Space Representation and Search
State Space Representation and Search
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Strassen's matrix multiplication
Strassen's matrix multiplicationStrassen's matrix multiplication
Strassen's matrix multiplication
 

Similar to Branch and bound

Branch and bound method
Branch and bound methodBranch and bound method
Branch and bound methodVidhyaSenthil
 
Informed Search.pptx
Informed Search.pptxInformed Search.pptx
Informed Search.pptxMohanKumarP34
 
Modified Procedure to Solve Fuzzy Transshipment Problem by using Trapezoidal ...
Modified Procedure to Solve Fuzzy Transshipment Problem by using Trapezoidal ...Modified Procedure to Solve Fuzzy Transshipment Problem by using Trapezoidal ...
Modified Procedure to Solve Fuzzy Transshipment Problem by using Trapezoidal ...inventionjournals
 
Unit 3 Informed Search Strategies.pptx
Unit  3 Informed Search Strategies.pptxUnit  3 Informed Search Strategies.pptx
Unit 3 Informed Search Strategies.pptxDrYogeshDeshmukh1
 
Support vector machine in data mining.pdf
Support vector machine in data mining.pdfSupport vector machine in data mining.pdf
Support vector machine in data mining.pdfRubhithaA
 
Branch and bound technique
Branch and bound techniqueBranch and bound technique
Branch and bound techniqueishmecse13
 
Unit-2 Branch & Bound Design of Algorithms.ppt
Unit-2 Branch & Bound Design of Algorithms.pptUnit-2 Branch & Bound Design of Algorithms.ppt
Unit-2 Branch & Bound Design of Algorithms.pptHarjotDhillon8
 
fdocuments.in_branch-and-bound-design-and-analysis-of-alogorithm.ppt
fdocuments.in_branch-and-bound-design-and-analysis-of-alogorithm.pptfdocuments.in_branch-and-bound-design-and-analysis-of-alogorithm.ppt
fdocuments.in_branch-and-bound-design-and-analysis-of-alogorithm.pptKartikGupta711
 
Support Vector Machines Simply
Support Vector Machines SimplySupport Vector Machines Simply
Support Vector Machines SimplyEmad Nabil
 
Chapter 4 Simplex Method ppt
Chapter 4  Simplex Method pptChapter 4  Simplex Method ppt
Chapter 4 Simplex Method pptDereje Tigabu
 
Heuristic Searching: A* Search
Heuristic Searching: A* SearchHeuristic Searching: A* Search
Heuristic Searching: A* SearchIOSR Journals
 
module4_dynamic programming_2022.pdf
module4_dynamic programming_2022.pdfmodule4_dynamic programming_2022.pdf
module4_dynamic programming_2022.pdfShiwani Gupta
 
ETCS262A-Analysis of design Algorithm.pptx
ETCS262A-Analysis of design Algorithm.pptxETCS262A-Analysis of design Algorithm.pptx
ETCS262A-Analysis of design Algorithm.pptxRahulSingh190790
 

Similar to Branch and bound (20)

Branch and bound method
Branch and bound methodBranch and bound method
Branch and bound method
 
Daa chapter11
Daa chapter11Daa chapter11
Daa chapter11
 
Informed Search.pptx
Informed Search.pptxInformed Search.pptx
Informed Search.pptx
 
Modified Procedure to Solve Fuzzy Transshipment Problem by using Trapezoidal ...
Modified Procedure to Solve Fuzzy Transshipment Problem by using Trapezoidal ...Modified Procedure to Solve Fuzzy Transshipment Problem by using Trapezoidal ...
Modified Procedure to Solve Fuzzy Transshipment Problem by using Trapezoidal ...
 
Unit 3 Informed Search Strategies.pptx
Unit  3 Informed Search Strategies.pptxUnit  3 Informed Search Strategies.pptx
Unit 3 Informed Search Strategies.pptx
 
Support vector machine in data mining.pdf
Support vector machine in data mining.pdfSupport vector machine in data mining.pdf
Support vector machine in data mining.pdf
 
Branch and bound technique
Branch and bound techniqueBranch and bound technique
Branch and bound technique
 
Unit-2 Branch & Bound Design of Algorithms.ppt
Unit-2 Branch & Bound Design of Algorithms.pptUnit-2 Branch & Bound Design of Algorithms.ppt
Unit-2 Branch & Bound Design of Algorithms.ppt
 
Backtracking
BacktrackingBacktracking
Backtracking
 
Greedy Algorithms with examples' b-18298
Greedy Algorithms with examples'  b-18298Greedy Algorithms with examples'  b-18298
Greedy Algorithms with examples' b-18298
 
fdocuments.in_branch-and-bound-design-and-analysis-of-alogorithm.ppt
fdocuments.in_branch-and-bound-design-and-analysis-of-alogorithm.pptfdocuments.in_branch-and-bound-design-and-analysis-of-alogorithm.ppt
fdocuments.in_branch-and-bound-design-and-analysis-of-alogorithm.ppt
 
Network Design Assignment Help
Network Design Assignment HelpNetwork Design Assignment Help
Network Design Assignment Help
 
Support Vector Machines Simply
Support Vector Machines SimplySupport Vector Machines Simply
Support Vector Machines Simply
 
Chapter 4 Simplex Method ppt
Chapter 4  Simplex Method pptChapter 4  Simplex Method ppt
Chapter 4 Simplex Method ppt
 
Brute force
Brute forceBrute force
Brute force
 
Heuristic Searching: A* Search
Heuristic Searching: A* SearchHeuristic Searching: A* Search
Heuristic Searching: A* Search
 
Stochastic Process Assignment Help
Stochastic Process Assignment HelpStochastic Process Assignment Help
Stochastic Process Assignment Help
 
module4_dynamic programming_2022.pdf
module4_dynamic programming_2022.pdfmodule4_dynamic programming_2022.pdf
module4_dynamic programming_2022.pdf
 
ETCS262A-Analysis of design Algorithm.pptx
ETCS262A-Analysis of design Algorithm.pptxETCS262A-Analysis of design Algorithm.pptx
ETCS262A-Analysis of design Algorithm.pptx
 
Stochastic Process Exam Help
Stochastic Process Exam HelpStochastic Process Exam Help
Stochastic Process Exam Help
 

More from Dr Shashikant Athawale (20)

multi threaded and distributed algorithms
multi threaded and distributed algorithms multi threaded and distributed algorithms
multi threaded and distributed algorithms
 
Amortized analysis
Amortized analysisAmortized analysis
Amortized analysis
 
Complexity theory
Complexity theory Complexity theory
Complexity theory
 
Divide and Conquer
Divide and ConquerDivide and Conquer
Divide and Conquer
 
Model and Design
Model and Design Model and Design
Model and Design
 
Fundamental of Algorithms
Fundamental of Algorithms Fundamental of Algorithms
Fundamental of Algorithms
 
CUDA Architecture
CUDA ArchitectureCUDA Architecture
CUDA Architecture
 
Parallel Algorithms- Sorting and Graph
Parallel Algorithms- Sorting and GraphParallel Algorithms- Sorting and Graph
Parallel Algorithms- Sorting and Graph
 
Analytical Models of Parallel Programs
Analytical Models of Parallel ProgramsAnalytical Models of Parallel Programs
Analytical Models of Parallel Programs
 
Basic Communication
Basic CommunicationBasic Communication
Basic Communication
 
Parallel Processing Concepts
Parallel Processing Concepts Parallel Processing Concepts
Parallel Processing Concepts
 
Parallel Processing Concepts
Parallel Processing Concepts Parallel Processing Concepts
Parallel Processing Concepts
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
Parallel algorithms
Parallel algorithms Parallel algorithms
Parallel algorithms
 
Greedy method
Greedy method Greedy method
Greedy method
 
Divide and conquer
Divide and conquerDivide and conquer
Divide and conquer
 
Asymptotic notation
Asymptotic notationAsymptotic notation
Asymptotic notation
 
String matching algorithms
String matching algorithmsString matching algorithms
String matching algorithms
 
Advanced Wireless Technologies
Advanced Wireless TechnologiesAdvanced Wireless Technologies
Advanced Wireless Technologies
 
Vo ip
Vo ipVo ip
Vo ip
 

Recently uploaded

Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage examplePragyanshuParadkar1
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixingviprabot1
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture designssuser87fa0c1
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 

Recently uploaded (20)

Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage example
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixing
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture design
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 

Branch and bound

  • 1. Branch-and-Bound Traveling Salesperson Problem Shashikant V. Athawale Assistant Professor ,Computer Engineering Department AISSMS College of Engineering, Kennedy Road, Pune , MS, India - 411001
  • 2. The branch-and-bound problem solving method is very similar to backtracking in that a state space tree is used to solve a problem.  The differences are that B&B (1)does not limit us to any particular way of traversing the tree and (2) is used only for optimization problems.  A B&B algorithm computes a number (bound) at a node to determine whether the node is promising. The number is a bound on the value of the solution that could be obtained by expanding the state space tree beyond the current node.
  • 3. Types of Traversal When implementing the branch-and-bound approach there is no restriction on the type of state-space tree traversal used. Backtracking, for example, is a simple type of B&B that uses depth-first search. A better approach is to check all the nodes reachable from the currently active node (breadth-first) and then to choose the most promising node (best-first) to expand next. An essential element of B&B is a greedy way to estimate the value of choosing one node over another. This is called the bound or bounding heuristic. It is an underestimate for a minimal search and an overestimate for a maximal search. When performing a breadth-first traversal, the bound is used only to prune the unpromising nodes from the state-space tree. In a best-first traversal the bound cab also used to order the promising nodes on the live-node list.
  • 4. Traveling Salesperson B&B In the most general case the distances between each pair of cities is a positive value with dist(A,B) /= dist(B,A). In the matrix representation, the main diagonal values are omitted (i.e. dist(A,A) = 0).
  • 5. Obtaining an Initial Tour Use the greedy method to find an initial candidate tour. We start with city A (arbitrary) and choose the closest city (in this case E). Moving to the newly chosen city, we always choose the closest city that has not yet been chosen until we return to A. Our candidate tour is A-E-C-G-F-D-B-H-A with a tour length of 28. We know that a minimal tour will be no greater than this. It is important to understand that the initial candidate tour is not necessarily a minimal tour nor is it unique. If we start with city E for example, we have, E-A-B-H-C-G-F-D-E with a length of 30
  • 6. Defining a Bounding Heuristic Now we must define a bounding heuristic that provides an underestimate of the cost to complete a tour from any node using local information. In this example we choose to use the actual cost to reach a node plus the minimum cost from every remaining node as our bounding heuristic.                                             h(x) = a(x) + g(x) a(x) - actual cost to node x g(x) - minimum cost to complete Since we know the minimum cost from each node to anywhere we know that the minimal tour cannot be less than 25.
  • 7. Finding the Minimal Tour 1. Starting with node A determine the actual cost to each of the other nodes. 2. Now compute the minimum cost from every other node 25-4=21. 3. Add the actual cost to a node a(x) to the minimum cost from every other node to determine a lower bound for tours from A through B,C,. . ., H. 4. Since we already have a candidate tour of 28 we can prune all branches with a lower-bound that is ? 28. This leaves B, D and E as the only promising nodes. 5. We continue to expand the promising nodes in a best-first order (E1,B1,,D1).
  • 8. 5. We continue to expand the promising nodes in a best-first order (E1,B1,,D1).
  • 9. 6. We have fully expanded node E so it is removed from our live-node list and we have two new nodes to add to the list. When two nodes have the same bounding values we will choose the one that is closer to the solution. So the order of nodes in our live-node list is (C2,B1,B2,D1).
  • 10. 7. We remove node C2 and add node G3 to the live-node list. (G3,B1,B2,D1).
  • 11. 8. Expanding node G gives us two more promising nodes F4 and H4. Our live-node list is now (F4,B1,H4,B2,D1).
  • 12. 9. A 1st level node has moved to the front of the live-node list. (B1,D5,H4,B2,D1) 10. (H2,D5,H4,B2,D1) 11. (D5,H4,B2,D1) 12. (H4,B2,D1) 13. (B2,D1) 14. (H3,D1)
  • 14. 16.We have verified that a minimal tour has length >= 28. Since our candidate tour has a length of 28 we now know that it is a minimal tour, we can use it without further searching of the state-space tree.
  • 15.  Positive integer P1 , P2 , …, Pn (profit) W1 , W2 , …, Wn (weight) M (capacity) 15 maximize P Xi i i n = ∑ 1 subject to W X Mi i i n ≤ = ∑ 1 Xi = 0 or 1, i =1, …, n. The problem is modified: minimize − = ∑P Xi i i n 1
  • 16. Fig. 6-27 The Branching Mechanism in the Branch-and-Bound Strategy to Solve 0/1 Knapsack Problem. 16
  • 17.  Ans: by quickly finding a feasible solution: starting from the smallest available i, scanning towards the largest i’s until M is exceeded. The upper bound can be calculated. 17
  • 18.  E.g. n = 6, M = 34  A feasible solution: X1 = 1, X2 = 1, X3 = 0, X4 = 0, X5 = 0, X6 = 0 -(P1 +P2 ) = -16 (upper bound) Any solution higher than -16 can not be an optimal solution. 18 i 1 2 3 4 5 6 Pi 6 10 4 5 6 4 Wi 10 19 8 10 12 8 (Pi /Wi ≥ Pi+1 /Wi+1 )
  • 19.  Ans: by relaxing our restriction from Xi = 0 or 1 to 0 ≤ Xi ≤ 1 (knapsack problem) Let − = ∑P Xi i i n 1 be an optimal solution for 0/1 knapsack problem and − ′ = ∑P Xi i n i 1 be an optimal solution for knapsack problem. Let Y=− = ∑P Xi i i n 1 , Y’ = − ′ = ∑P Xi i n i 1 . ⇒Y’ ≤Y 19
  • 20.  We can use the greedy method to find an optimal solution for knapsack problem.  For example, for the state of X1=1 and X2=1, we have X1 = 1, X2 =1, X3 = (34-6-10)/8=5/8, X4 = 0, X5 = 0, X6 =0 -(P1 +P2 +5/8P3 ) = -18.5 (lower bound) -18 is our lower bound. (only consider integers) 20
  • 21.  By the best-first search scheme  That is, by expanding the node with the best lower bound. If two nodes have the same lower bounds, expand the node with the lower upper bound. 21
  • 22. 0/1 Knapsack Problem Solved by Branch-and-Bound Strategy 22
  • 23. Node 2 is terminated because its lower bound is equal to the upper bound of node 14. Nodes 16, 18 and others are terminated because the local lower bound is equal to the local upper bound. (lower bound ≤ optimal solution ≤ upper bound