SlideShare a Scribd company logo
Branch-and-Bound
Traveling Salesperson Problem
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.
Another Example
In the previous example the initial candidate tour turns out to be a minimal tour. This
is usually not the case. We will now look at problem for which the initial candidate
tour is not a minimal tour.
The initial tour is A-F-E-D-B-C-A with a total length of 32. The sum of the minimum
costs of leaving every node is 29 so we know that a minimal tour cannot have length
less than 29.
The live-node list is ordered by bounding value and then by level of completion. That
is, if two nodes have the same bounding value we place the one that is closer to
completion ahead of the other node. This is because the bounding value of the of the
node closer to completion is more likely to be closer to the actual tour length.
The node shown in red were expanded from an active node (F3) with a possible tour
length of 29. However the completed tours turned out to be significantly larger.
Expanding D3 we find an actual tour that is shorter than our initial tour. We do not yet
know if this is a minimal tour but we can remove nodes from our live-node list that have
a bounding value of >= 31. Now we expand D2 to find that it leads to tours of length >=
33.
Expansion of E2 eliminates this path as a candidate for a minimal tour.
When the live-node list is empty we are finished. In this example a minmal tour is
A-C-E-D-B-F-A with a length of 31 we have found a tour that is shorter than the original
candidate tour.

More Related Content

What's hot

The n Queen Problem
The n Queen ProblemThe n Queen Problem
The n Queen Problem
Sukrit Gupta
 
Dijkstra's Algorithm
Dijkstra's Algorithm Dijkstra's Algorithm
Dijkstra's Algorithm
Rashik Ishrak Nahian
 
Strassen's matrix multiplication
Strassen's matrix multiplicationStrassen's matrix multiplication
Strassen's matrix multiplication
Megha V
 
8 queen problem
8 queen problem8 queen problem
8 queen problem
NagajothiN1
 
A presentation on prim's and kruskal's algorithm
A presentation on prim's and kruskal's algorithmA presentation on prim's and kruskal's algorithm
A presentation on prim's and kruskal's algorithm
Gaurav Kolekar
 
Daa:Dynamic Programing
Daa:Dynamic ProgramingDaa:Dynamic Programing
Daa:Dynamic Programing
rupali_2bonde
 
Branch & bound
Branch & boundBranch & bound
Branch & bound
kannanchirayath
 
04 brute force
04 brute force04 brute force
04 brute force
Hira Gul
 
Graph traversals in Data Structures
Graph traversals in Data StructuresGraph traversals in Data Structures
Graph traversals in Data Structures
Anandhasilambarasan D
 
Data Structure and Algorithms.pptx
Data Structure and Algorithms.pptxData Structure and Algorithms.pptx
Data Structure and Algorithms.pptx
Syed Zaid Irshad
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back tracking
Tech_MX
 
A greedy algorithms
A greedy algorithmsA greedy algorithms
A greedy algorithms
Amit Kumar Rathi
 
b+ tree
b+ treeb+ tree
b+ tree
bitistu
 
Backtracking
Backtracking  Backtracking
Backtracking
Vikas Sharma
 
Minimum spanning Tree
Minimum spanning TreeMinimum spanning Tree
Minimum spanning Tree
Narendra Singh Patel
 
0 1 knapsack using branch and bound
0 1 knapsack using branch and bound0 1 knapsack using branch and bound
0 1 knapsack using branch and bound
Abhishek Singh
 
5.1 greedy
5.1 greedy5.1 greedy
5.1 greedy
Krish_ver2
 
Presentation on Breadth First Search (BFS)
Presentation on Breadth First Search (BFS)Presentation on Breadth First Search (BFS)
Presentation on Breadth First Search (BFS)
Shuvongkor Barman
 
sum of subset problem using Backtracking
sum of subset problem using Backtrackingsum of subset problem using Backtracking
sum of subset problem using Backtracking
Abhishek Singh
 
data structures- back tracking
data structures- back trackingdata structures- back tracking
data structures- back tracking
Abinaya B
 

What's hot (20)

The n Queen Problem
The n Queen ProblemThe n Queen Problem
The n Queen Problem
 
Dijkstra's Algorithm
Dijkstra's Algorithm Dijkstra's Algorithm
Dijkstra's Algorithm
 
Strassen's matrix multiplication
Strassen's matrix multiplicationStrassen's matrix multiplication
Strassen's matrix multiplication
 
8 queen problem
8 queen problem8 queen problem
8 queen problem
 
A presentation on prim's and kruskal's algorithm
A presentation on prim's and kruskal's algorithmA presentation on prim's and kruskal's algorithm
A presentation on prim's and kruskal's algorithm
 
Daa:Dynamic Programing
Daa:Dynamic ProgramingDaa:Dynamic Programing
Daa:Dynamic Programing
 
Branch & bound
Branch & boundBranch & bound
Branch & bound
 
04 brute force
04 brute force04 brute force
04 brute force
 
Graph traversals in Data Structures
Graph traversals in Data StructuresGraph traversals in Data Structures
Graph traversals in Data Structures
 
Data Structure and Algorithms.pptx
Data Structure and Algorithms.pptxData Structure and Algorithms.pptx
Data Structure and Algorithms.pptx
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back tracking
 
A greedy algorithms
A greedy algorithmsA greedy algorithms
A greedy algorithms
 
b+ tree
b+ treeb+ tree
b+ tree
 
Backtracking
Backtracking  Backtracking
Backtracking
 
Minimum spanning Tree
Minimum spanning TreeMinimum spanning Tree
Minimum spanning Tree
 
0 1 knapsack using branch and bound
0 1 knapsack using branch and bound0 1 knapsack using branch and bound
0 1 knapsack using branch and bound
 
5.1 greedy
5.1 greedy5.1 greedy
5.1 greedy
 
Presentation on Breadth First Search (BFS)
Presentation on Breadth First Search (BFS)Presentation on Breadth First Search (BFS)
Presentation on Breadth First Search (BFS)
 
sum of subset problem using Backtracking
sum of subset problem using Backtrackingsum of subset problem using Backtracking
sum of subset problem using Backtracking
 
data structures- back tracking
data structures- back trackingdata structures- back tracking
data structures- back tracking
 

Similar to Branch and bound.ppt

Branch and bound method
Branch and bound methodBranch and bound method
Branch and bound method
VidhyaSenthil
 
Heuristic Searching: A* Search
Heuristic Searching: A* SearchHeuristic Searching: A* Search
Heuristic Searching: A* Search
IOSR Journals
 
A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...
A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...
A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...
Khoa Mac Tu
 
Backtracking
BacktrackingBacktracking
Backtracking
Sally Salem
 
A star algorithms
A star algorithmsA star algorithms
A star algorithms
sandeep54552
 
dsa.pptx
dsa.pptxdsa.pptx
Informed search algorithms.pptx
Informed search algorithms.pptxInformed search algorithms.pptx
Informed search algorithms.pptx
Dr.Shweta
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
vikas dhakane
 
logic.pptx
logic.pptxlogic.pptx
logic.pptx
KENNEDY GITHAIGA
 
Unit 3 Informed Search Strategies.pptx
Unit  3 Informed Search Strategies.pptxUnit  3 Informed Search Strategies.pptx
Unit 3 Informed Search Strategies.pptx
DrYogeshDeshmukh1
 
Unit ii divide and conquer -2
Unit ii divide and conquer -2Unit ii divide and conquer -2
Unit ii divide and conquer -2
subhashchandra197
 
DATA STRUCTURES.pptx
DATA STRUCTURES.pptxDATA STRUCTURES.pptx
DATA STRUCTURES.pptx
KENNEDY GITHAIGA
 
Data structure note
Data structure noteData structure note
Data structure note
Muhammad Nawaz
 
Unit ii-ppt
Unit ii-pptUnit ii-ppt
Unit ii-ppt
Aravindharamanan S
 
Dijkstra's algorithm
Dijkstra's algorithmDijkstra's algorithm
Dijkstra's algorithm
gsp1294
 
Floyd aaaaaa
Floyd aaaaaaFloyd aaaaaa
Floyd aaaaaa
Pradeep Bisht
 
Logistics Management Assignment Help
Logistics Management Assignment Help Logistics Management Assignment Help
Logistics Management Assignment Help
Statistics Assignment Help
 
Graph
GraphGraph
Unit 3 daa
Unit 3 daaUnit 3 daa
Unit 3 daa
Nv Thejaswini
 
Analysis of Pathfinding Algorithms
Analysis of Pathfinding AlgorithmsAnalysis of Pathfinding Algorithms
Analysis of Pathfinding Algorithms
SigSegVSquad
 

Similar to Branch and bound.ppt (20)

Branch and bound method
Branch and bound methodBranch and bound method
Branch and bound method
 
Heuristic Searching: A* Search
Heuristic Searching: A* SearchHeuristic Searching: A* Search
Heuristic Searching: A* Search
 
A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...
A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...
A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...
 
Backtracking
BacktrackingBacktracking
Backtracking
 
A star algorithms
A star algorithmsA star algorithms
A star algorithms
 
dsa.pptx
dsa.pptxdsa.pptx
dsa.pptx
 
Informed search algorithms.pptx
Informed search algorithms.pptxInformed search algorithms.pptx
Informed search algorithms.pptx
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
 
logic.pptx
logic.pptxlogic.pptx
logic.pptx
 
Unit 3 Informed Search Strategies.pptx
Unit  3 Informed Search Strategies.pptxUnit  3 Informed Search Strategies.pptx
Unit 3 Informed Search Strategies.pptx
 
Unit ii divide and conquer -2
Unit ii divide and conquer -2Unit ii divide and conquer -2
Unit ii divide and conquer -2
 
DATA STRUCTURES.pptx
DATA STRUCTURES.pptxDATA STRUCTURES.pptx
DATA STRUCTURES.pptx
 
Data structure note
Data structure noteData structure note
Data structure note
 
Unit ii-ppt
Unit ii-pptUnit ii-ppt
Unit ii-ppt
 
Dijkstra's algorithm
Dijkstra's algorithmDijkstra's algorithm
Dijkstra's algorithm
 
Floyd aaaaaa
Floyd aaaaaaFloyd aaaaaa
Floyd aaaaaa
 
Logistics Management Assignment Help
Logistics Management Assignment Help Logistics Management Assignment Help
Logistics Management Assignment Help
 
Graph
GraphGraph
Graph
 
Unit 3 daa
Unit 3 daaUnit 3 daa
Unit 3 daa
 
Analysis of Pathfinding Algorithms
Analysis of Pathfinding AlgorithmsAnalysis of Pathfinding Algorithms
Analysis of Pathfinding Algorithms
 

Recently uploaded

DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
Tier1 app
 
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid
 
Quarter 3 SLRP grade 9.. gshajsbhhaheabh
Quarter 3 SLRP grade 9.. gshajsbhhaheabhQuarter 3 SLRP grade 9.. gshajsbhhaheabh
Quarter 3 SLRP grade 9.. gshajsbhhaheabh
aisafed42
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.
Maitrey Patel
 
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
kgyxske
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
Alberto Brandolini
 
The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024
Yara Milbes
 
Project Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdfProject Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdf
Karya Keeper
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
XfilesPro
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
ISH Technologies
 
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
kalichargn70th171
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
VALiNTRY360
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
What’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete RoadmapWhat’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete Roadmap
Envertis Software Solutions
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
dakas1
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
ervikas4
 

Recently uploaded (20)

DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
 
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
 
Quarter 3 SLRP grade 9.. gshajsbhhaheabh
Quarter 3 SLRP grade 9.. gshajsbhhaheabhQuarter 3 SLRP grade 9.. gshajsbhhaheabh
Quarter 3 SLRP grade 9.. gshajsbhhaheabh
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.
 
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
 
The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024
 
Project Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdfProject Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdf
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
 
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
What’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete RoadmapWhat’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete Roadmap
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
 

Branch and bound.ppt

  • 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. Another Example In the previous example the initial candidate tour turns out to be a minimal tour. This is usually not the case. We will now look at problem for which the initial candidate tour is not a minimal tour. The initial tour is A-F-E-D-B-C-A with a total length of 32. The sum of the minimum costs of leaving every node is 29 so we know that a minimal tour cannot have length less than 29.
  • 16. The live-node list is ordered by bounding value and then by level of completion. That is, if two nodes have the same bounding value we place the one that is closer to completion ahead of the other node. This is because the bounding value of the of the node closer to completion is more likely to be closer to the actual tour length.
  • 17. The node shown in red were expanded from an active node (F3) with a possible tour length of 29. However the completed tours turned out to be significantly larger.
  • 18. Expanding D3 we find an actual tour that is shorter than our initial tour. We do not yet know if this is a minimal tour but we can remove nodes from our live-node list that have a bounding value of >= 31. Now we expand D2 to find that it leads to tours of length >= 33.
  • 19. Expansion of E2 eliminates this path as a candidate for a minimal tour.
  • 20. When the live-node list is empty we are finished. In this example a minmal tour is A-C-E-D-B-F-A with a length of 31 we have found a tour that is shorter than the original candidate tour.