SlideShare a Scribd company logo
1 of 4
Download to read offline
1 Mehta Ishani
2nd
M.E.(C.S.E)
Solving traveling salesman and water jug
problem using Branch and Bound Technique
Introduction
Branch and bound is a systematic method for solving optimization problems that
applies where the greedy method and dynamic programming fail.
Branch-and-bound is an approach developed for solving discrete and
combinatorial optimization problems.
Problem
The discrete optimization problems are problems in which the decision variables
assume discrete values from a specified set.
The combinatorial optimization problems, on the other hand, are problems of
choosing the best combination out of all possible combinations.
The major difficulty with these problems is that we do not have any optimality
conditions to check if a given (feasible) solution is optimal or not. In order to guarantee
a given feasible solution's optimality is "to compare" it with every other feasible solution.
To do this explicitly, amounts to total enumeration of all possible alternatives
which is computationally prohibitive due to the NP-Completeness. Therefore, this
comparison must be done implicitly, resulting in partial enumeration of all possible
alternatives.
Solution
Branch and bound methods solve a discrete optimization problem by breaking up
its feasible set into successively smaller subsets, calculating bounds on the objective
function value over each subset, and using them to discard certain subsets from further
consideration.
The procedure ends when each subset has either produced a feasible solution,
or was shown to contain no better solution than the one already in hand. The best
solution found during the procedure is a global optimum.
The general idea of B&B is a BFS-like search for the optimal solution, but not all
nodes get expanded (i.e., their children generated). Rather, a carefully selected criterion
determines which node to expand and when, and another criterion tells the algorithm
when an optimal solution has been found.
The method was first proposed by A. H. Land and A. G. Doig in 1960 for
discrete programming
2 Mehta Ishani
2nd
M.E.(C.S.E)
Steps for branch and bound algorithm
1. Place the start node of zero path length on the queue.
2. Until the queue is empty or a goal node has been found do the following:
(i) Determine if the s first path in the queue contains a good node.
(ii) If the first path contains a goal node exit with success.
(iii) If the first path does not contain a good node remove the path from the queue
and form new paths by extending the removed paths by on step.
(iv)Compute the cost of the new paths and add them to the queue.
(v) Sort the paths on the queue with lowest-cost path in front.
3. otherwise exit with failure.
Water Jug
Now let us see how the branch - and -bound search could be used to find the
shortest solution to the water- jug problem. Unfortunately although this algorithm is
more efficient and simple. It requires exponential time. The exact amount of time it
saves for particular problem depends on the order in which the paths are explored. And
also in this problem, there is a possibility that the algorithm enters into an indefinite loop.
For example, consider the following configuration generated in the process of
generating a path.
Initial state (0,0)
Goal state (2,0)
Path 1:
(0,0) -> (4,0) -> (1,3) -> (1,0) -> (0,1) -> (4,1) -> (2,3) -> (2,0)
Since goal node is reached so put in queue
Path 2:
(0,0) -> (0,3) -> (3,3)->(3,0)->(4,0)->(0,0)
Since this results infinite loop then not to put in queue
P1
3 Mehta Ishani
2nd
M.E.(C.S.E)
Path 3:
(0,0) -> (0,3) -> (3,3) -> (4,2) -> (0,2) -> (2,0)
Goal node is reached then put in queue
Now path 1 contains 8 states and path 2 contains 6 states after performing sorting the
queue is
Thus our optimal solution is Path 3
The Traveling Salesman Problem
The traveling salesman problem consists of a salesman and a set of cities. The
salesman has to visit each one of the cities starting from a certain one (e.g. the
hometown) and returning same city. The challenge of the problem is that the traveling
salesman wants to minimize the total length of the trip.
Why the Traveling Salesman Problem?
 NP-hard
 Brute Force takes O(n!) to complete
 Algorithms to solve take one of two forms:
o Exact algorithms
 Branch and Bound O(2n)
 Linear Programming
o Heuristic algorithms
 Nearest neighbor O( log n )
 Pair wise exchange
 Randomized improvement (genetic algorithms)
 Many real world applications:
 Special properties of the Traveling Salesman Problem that make it suitable for
Branch and Bound:
o As you build your solution, cost increases.
o Partial solutions have valid costs (lower bound costs)
P1 P3
P3 P1
4 Mehta Ishani
2nd
M.E.(C.S.E)
Solution steps
o Given a complete, weighted graph on n nodes, find the least weight Hamiltonian
cycle, a cycle that visits every node once.
o Though this problem is easy enough to explain, it is very difficult to solve.
o Finding all the Hamiltonian cycles of a graph takes exponential time. Therefore,
TSP is in the class NP.
For example the path
Path1 {A, B, C, D, E, A} - length 24
Path2 {A, B, C, E, D, A} - length 31
Path 3 {A,B,D,C,E,A} - length 21
Hence our queue is
After sorting queue is
Hence Optimal Solution is Path 3
Pros and Cons
 An enhancement of backtracking
 However, it is much slower. Indeed, it often leads to exponential time
complexities in the worst case.
 On the other hand, if applied carefully, it can lead to algorithms that run
reasonably fast on average.
Summery
 Thus Branch and Bound is:
o a general search method.
o minimize a function f(x), where x is restricted to some feasible region.
P1 P2 P3
P3 P1 P2

More Related Content

What's hot

5.3 mining sequential patterns
5.3 mining sequential patterns5.3 mining sequential patterns
5.3 mining sequential patternsKrish_ver2
 
Informed and Uninformed search Strategies
Informed and Uninformed search StrategiesInformed and Uninformed search Strategies
Informed and Uninformed search StrategiesAmey Kerkar
 
Multiple Access in Computer Network
Multiple Access in Computer NetworkMultiple Access in Computer Network
Multiple Access in Computer NetworkHitesh Mohapatra
 
Graph Based Clustering
Graph Based ClusteringGraph Based Clustering
Graph Based ClusteringSSA KPI
 
All pairs shortest path algorithm
All pairs shortest path algorithmAll pairs shortest path algorithm
All pairs shortest path algorithmSrikrishnan Suresh
 
Lecture 17 Iterative Deepening a star algorithm
Lecture 17 Iterative Deepening a star algorithmLecture 17 Iterative Deepening a star algorithm
Lecture 17 Iterative Deepening a star algorithmHema Kashyap
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy methodhodcsencet
 
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWERUndecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWERmuthukrishnavinayaga
 
Bayesian Networks - A Brief Introduction
Bayesian Networks - A Brief IntroductionBayesian Networks - A Brief Introduction
Bayesian Networks - A Brief IntroductionAdnan Masood
 
Strassen's matrix multiplication
Strassen's matrix multiplicationStrassen's matrix multiplication
Strassen's matrix multiplicationMegha V
 
Example of iterative deepening search & bidirectional search
Example of iterative deepening search & bidirectional searchExample of iterative deepening search & bidirectional search
Example of iterative deepening search & bidirectional searchAbhijeet Agarwal
 
0/1 knapsack
0/1 knapsack0/1 knapsack
0/1 knapsackAmin Omi
 
Flow control in Computer Network
Flow control in Computer NetworkFlow control in Computer Network
Flow control in Computer NetworkAhtesham Ullah khan
 
I. Alpha-Beta Pruning in ai
I. Alpha-Beta Pruning in aiI. Alpha-Beta Pruning in ai
I. Alpha-Beta Pruning in aivikas dhakane
 
Introduction to Garbage Collection
Introduction to Garbage CollectionIntroduction to Garbage Collection
Introduction to Garbage CollectionArtur Mkrtchyan
 
finding Min and max element from given array using divide & conquer
finding Min and max element from given array using  divide & conquer finding Min and max element from given array using  divide & conquer
finding Min and max element from given array using divide & conquer Swati Kulkarni Jaipurkar
 

What's hot (20)

5.3 mining sequential patterns
5.3 mining sequential patterns5.3 mining sequential patterns
5.3 mining sequential patterns
 
Informed and Uninformed search Strategies
Informed and Uninformed search StrategiesInformed and Uninformed search Strategies
Informed and Uninformed search Strategies
 
Multiple Access in Computer Network
Multiple Access in Computer NetworkMultiple Access in Computer Network
Multiple Access in Computer Network
 
Graph Based Clustering
Graph Based ClusteringGraph Based Clustering
Graph Based Clustering
 
All pairs shortest path algorithm
All pairs shortest path algorithmAll pairs shortest path algorithm
All pairs shortest path algorithm
 
Lecture 17 Iterative Deepening a star algorithm
Lecture 17 Iterative Deepening a star algorithmLecture 17 Iterative Deepening a star algorithm
Lecture 17 Iterative Deepening a star algorithm
 
And or graph
And or graphAnd or graph
And or graph
 
COMPILER DESIGN Run-Time Environments
COMPILER DESIGN Run-Time EnvironmentsCOMPILER DESIGN Run-Time Environments
COMPILER DESIGN Run-Time Environments
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy method
 
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWERUndecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
 
Bayesian Networks - A Brief Introduction
Bayesian Networks - A Brief IntroductionBayesian Networks - A Brief Introduction
Bayesian Networks - A Brief Introduction
 
Strassen's matrix multiplication
Strassen's matrix multiplicationStrassen's matrix multiplication
Strassen's matrix multiplication
 
Example of iterative deepening search & bidirectional search
Example of iterative deepening search & bidirectional searchExample of iterative deepening search & bidirectional search
Example of iterative deepening search & bidirectional search
 
0/1 knapsack
0/1 knapsack0/1 knapsack
0/1 knapsack
 
Flow control in Computer Network
Flow control in Computer NetworkFlow control in Computer Network
Flow control in Computer Network
 
I. Alpha-Beta Pruning in ai
I. Alpha-Beta Pruning in aiI. Alpha-Beta Pruning in ai
I. Alpha-Beta Pruning in ai
 
Divide and Conquer
Divide and ConquerDivide and Conquer
Divide and Conquer
 
Introduction to Garbage Collection
Introduction to Garbage CollectionIntroduction to Garbage Collection
Introduction to Garbage Collection
 
finding Min and max element from given array using divide & conquer
finding Min and max element from given array using  divide & conquer finding Min and max element from given array using  divide & conquer
finding Min and max element from given array using divide & conquer
 
GO BACK N PROTOCOL
GO BACK N PROTOCOLGO BACK N PROTOCOL
GO BACK N PROTOCOL
 

Similar to Branch and bound technique

Branch and bound technique
Branch and bound techniqueBranch and bound technique
Branch and bound techniqueishmecse13
 
A MODIFIED VORTEX SEARCH ALGORITHM FOR NUMERICAL FUNCTION OPTIMIZATION
A MODIFIED VORTEX SEARCH ALGORITHM FOR NUMERICAL FUNCTION OPTIMIZATIONA MODIFIED VORTEX SEARCH ALGORITHM FOR NUMERICAL FUNCTION OPTIMIZATION
A MODIFIED VORTEX SEARCH ALGORITHM FOR NUMERICAL FUNCTION OPTIMIZATIONijaia
 
Mb0048 operations research
Mb0048 operations researchMb0048 operations research
Mb0048 operations researchsmumbahelp
 
MODIFIED VORTEX SEARCH ALGORITHM FOR REAL PARAMETER OPTIMIZATION
MODIFIED VORTEX SEARCH ALGORITHM FOR REAL PARAMETER OPTIMIZATIONMODIFIED VORTEX SEARCH ALGORITHM FOR REAL PARAMETER OPTIMIZATION
MODIFIED VORTEX SEARCH ALGORITHM FOR REAL PARAMETER OPTIMIZATIONcscpconf
 
Modified Vortex Search Algorithm for Real Parameter Optimization
Modified Vortex Search Algorithm for Real Parameter Optimization Modified Vortex Search Algorithm for Real Parameter Optimization
Modified Vortex Search Algorithm for Real Parameter Optimization csandit
 
The Traveling Salesman Problem: A Neural Network Perspective
The Traveling Salesman Problem: A Neural Network PerspectiveThe Traveling Salesman Problem: A Neural Network Perspective
The Traveling Salesman Problem: A Neural Network Perspectivemustafa sarac
 
A Chess Composer Of Two-Move Mate Problems
A Chess Composer Of Two-Move Mate ProblemsA Chess Composer Of Two-Move Mate Problems
A Chess Composer Of Two-Move Mate ProblemsNat Rice
 
Particle Swarm Optimization to Solve Multiple Traveling Salesman Problem
Particle Swarm Optimization to Solve Multiple Traveling Salesman ProblemParticle Swarm Optimization to Solve Multiple Traveling Salesman Problem
Particle Swarm Optimization to Solve Multiple Traveling Salesman ProblemIRJET Journal
 
Traveling Salesman Problem in Distributed Environment
Traveling Salesman Problem in Distributed EnvironmentTraveling Salesman Problem in Distributed Environment
Traveling Salesman Problem in Distributed Environmentcsandit
 
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENT
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENTTRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENT
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENTcscpconf
 
Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...
Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...
Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...SSA KPI
 
RESEARCH ON FUZZY C- CLUSTERING RECURSIVE GENETIC ALGORITHM BASED ON CLOUD CO...
RESEARCH ON FUZZY C- CLUSTERING RECURSIVE GENETIC ALGORITHM BASED ON CLOUD CO...RESEARCH ON FUZZY C- CLUSTERING RECURSIVE GENETIC ALGORITHM BASED ON CLOUD CO...
RESEARCH ON FUZZY C- CLUSTERING RECURSIVE GENETIC ALGORITHM BASED ON CLOUD CO...ijaia
 
Bidirectional graph search techniques for finding shortest path in image base...
Bidirectional graph search techniques for finding shortest path in image base...Bidirectional graph search techniques for finding shortest path in image base...
Bidirectional graph search techniques for finding shortest path in image base...Navin Kumar
 
Slides TSALBP ACO 2008
Slides TSALBP ACO 2008Slides TSALBP ACO 2008
Slides TSALBP ACO 2008Manuel ChiSe
 

Similar to Branch and bound technique (20)

Branch and bound technique
Branch and bound techniqueBranch and bound technique
Branch and bound technique
 
A MODIFIED VORTEX SEARCH ALGORITHM FOR NUMERICAL FUNCTION OPTIMIZATION
A MODIFIED VORTEX SEARCH ALGORITHM FOR NUMERICAL FUNCTION OPTIMIZATIONA MODIFIED VORTEX SEARCH ALGORITHM FOR NUMERICAL FUNCTION OPTIMIZATION
A MODIFIED VORTEX SEARCH ALGORITHM FOR NUMERICAL FUNCTION OPTIMIZATION
 
Mb0048 operations research
Mb0048 operations researchMb0048 operations research
Mb0048 operations research
 
MODIFIED VORTEX SEARCH ALGORITHM FOR REAL PARAMETER OPTIMIZATION
MODIFIED VORTEX SEARCH ALGORITHM FOR REAL PARAMETER OPTIMIZATIONMODIFIED VORTEX SEARCH ALGORITHM FOR REAL PARAMETER OPTIMIZATION
MODIFIED VORTEX SEARCH ALGORITHM FOR REAL PARAMETER OPTIMIZATION
 
Modified Vortex Search Algorithm for Real Parameter Optimization
Modified Vortex Search Algorithm for Real Parameter Optimization Modified Vortex Search Algorithm for Real Parameter Optimization
Modified Vortex Search Algorithm for Real Parameter Optimization
 
The Traveling Salesman Problem: A Neural Network Perspective
The Traveling Salesman Problem: A Neural Network PerspectiveThe Traveling Salesman Problem: A Neural Network Perspective
The Traveling Salesman Problem: A Neural Network Perspective
 
A Chess Composer Of Two-Move Mate Problems
A Chess Composer Of Two-Move Mate ProblemsA Chess Composer Of Two-Move Mate Problems
A Chess Composer Of Two-Move Mate Problems
 
Computer Network Assignment Help
Computer Network Assignment HelpComputer Network Assignment Help
Computer Network Assignment Help
 
Particle Swarm Optimization to Solve Multiple Traveling Salesman Problem
Particle Swarm Optimization to Solve Multiple Traveling Salesman ProblemParticle Swarm Optimization to Solve Multiple Traveling Salesman Problem
Particle Swarm Optimization to Solve Multiple Traveling Salesman Problem
 
Traveling Salesman Problem in Distributed Environment
Traveling Salesman Problem in Distributed EnvironmentTraveling Salesman Problem in Distributed Environment
Traveling Salesman Problem in Distributed Environment
 
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENT
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENTTRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENT
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENT
 
Ds33717725
Ds33717725Ds33717725
Ds33717725
 
Ds33717725
Ds33717725Ds33717725
Ds33717725
 
Ica 2013021816274759
Ica 2013021816274759Ica 2013021816274759
Ica 2013021816274759
 
Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...
Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...
Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...
 
RESEARCH ON FUZZY C- CLUSTERING RECURSIVE GENETIC ALGORITHM BASED ON CLOUD CO...
RESEARCH ON FUZZY C- CLUSTERING RECURSIVE GENETIC ALGORITHM BASED ON CLOUD CO...RESEARCH ON FUZZY C- CLUSTERING RECURSIVE GENETIC ALGORITHM BASED ON CLOUD CO...
RESEARCH ON FUZZY C- CLUSTERING RECURSIVE GENETIC ALGORITHM BASED ON CLOUD CO...
 
Linkedin_PowerPoint
Linkedin_PowerPointLinkedin_PowerPoint
Linkedin_PowerPoint
 
Unit 2
Unit 2Unit 2
Unit 2
 
Bidirectional graph search techniques for finding shortest path in image base...
Bidirectional graph search techniques for finding shortest path in image base...Bidirectional graph search techniques for finding shortest path in image base...
Bidirectional graph search techniques for finding shortest path in image base...
 
Slides TSALBP ACO 2008
Slides TSALBP ACO 2008Slides TSALBP ACO 2008
Slides TSALBP ACO 2008
 

More from ishmecse13

Search engine and web crawler
Search engine and web crawlerSearch engine and web crawler
Search engine and web crawlerishmecse13
 
Web services concepts, protocols and development
Web services concepts, protocols and developmentWeb services concepts, protocols and development
Web services concepts, protocols and developmentishmecse13
 
Web services concepts, protocols and development
Web services concepts, protocols and developmentWeb services concepts, protocols and development
Web services concepts, protocols and developmentishmecse13
 
Wap architecture and wml script
Wap architecture and wml scriptWap architecture and wml script
Wap architecture and wml scriptishmecse13
 
Solving travelling salesman problem using firefly algorithm
Solving travelling salesman problem using firefly algorithmSolving travelling salesman problem using firefly algorithm
Solving travelling salesman problem using firefly algorithmishmecse13
 
Object oriented concepts with java
Object oriented concepts with javaObject oriented concepts with java
Object oriented concepts with javaishmecse13
 
Kerberos using public key cryptography
Kerberos using public key cryptographyKerberos using public key cryptography
Kerberos using public key cryptographyishmecse13
 
Hierarchical clustering
Hierarchical clusteringHierarchical clustering
Hierarchical clusteringishmecse13
 
File models and file accessing models
File models and file accessing modelsFile models and file accessing models
File models and file accessing modelsishmecse13
 
Case study on cyber crime
Case study on cyber crimeCase study on cyber crime
Case study on cyber crimeishmecse13
 
Cyber crime and cyber laws
Cyber crime and cyber lawsCyber crime and cyber laws
Cyber crime and cyber lawsishmecse13
 

More from ishmecse13 (13)

Search engine and web crawler
Search engine and web crawlerSearch engine and web crawler
Search engine and web crawler
 
Web services concepts, protocols and development
Web services concepts, protocols and developmentWeb services concepts, protocols and development
Web services concepts, protocols and development
 
Web services concepts, protocols and development
Web services concepts, protocols and developmentWeb services concepts, protocols and development
Web services concepts, protocols and development
 
Web services
Web servicesWeb services
Web services
 
Wap wml
Wap wmlWap wml
Wap wml
 
Wap architecture and wml script
Wap architecture and wml scriptWap architecture and wml script
Wap architecture and wml script
 
Solving travelling salesman problem using firefly algorithm
Solving travelling salesman problem using firefly algorithmSolving travelling salesman problem using firefly algorithm
Solving travelling salesman problem using firefly algorithm
 
Object oriented concepts with java
Object oriented concepts with javaObject oriented concepts with java
Object oriented concepts with java
 
Kerberos using public key cryptography
Kerberos using public key cryptographyKerberos using public key cryptography
Kerberos using public key cryptography
 
Hierarchical clustering
Hierarchical clusteringHierarchical clustering
Hierarchical clustering
 
File models and file accessing models
File models and file accessing modelsFile models and file accessing models
File models and file accessing models
 
Case study on cyber crime
Case study on cyber crimeCase study on cyber crime
Case study on cyber crime
 
Cyber crime and cyber laws
Cyber crime and cyber lawsCyber crime and cyber laws
Cyber crime and cyber laws
 

Recently uploaded

Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projectssmsksolar
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfRagavanV2
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 

Recently uploaded (20)

Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 

Branch and bound technique

  • 1. 1 Mehta Ishani 2nd M.E.(C.S.E) Solving traveling salesman and water jug problem using Branch and Bound Technique Introduction Branch and bound is a systematic method for solving optimization problems that applies where the greedy method and dynamic programming fail. Branch-and-bound is an approach developed for solving discrete and combinatorial optimization problems. Problem The discrete optimization problems are problems in which the decision variables assume discrete values from a specified set. The combinatorial optimization problems, on the other hand, are problems of choosing the best combination out of all possible combinations. The major difficulty with these problems is that we do not have any optimality conditions to check if a given (feasible) solution is optimal or not. In order to guarantee a given feasible solution's optimality is "to compare" it with every other feasible solution. To do this explicitly, amounts to total enumeration of all possible alternatives which is computationally prohibitive due to the NP-Completeness. Therefore, this comparison must be done implicitly, resulting in partial enumeration of all possible alternatives. Solution Branch and bound methods solve a discrete optimization problem by breaking up its feasible set into successively smaller subsets, calculating bounds on the objective function value over each subset, and using them to discard certain subsets from further consideration. The procedure ends when each subset has either produced a feasible solution, or was shown to contain no better solution than the one already in hand. The best solution found during the procedure is a global optimum. The general idea of B&B is a BFS-like search for the optimal solution, but not all nodes get expanded (i.e., their children generated). Rather, a carefully selected criterion determines which node to expand and when, and another criterion tells the algorithm when an optimal solution has been found. The method was first proposed by A. H. Land and A. G. Doig in 1960 for discrete programming
  • 2. 2 Mehta Ishani 2nd M.E.(C.S.E) Steps for branch and bound algorithm 1. Place the start node of zero path length on the queue. 2. Until the queue is empty or a goal node has been found do the following: (i) Determine if the s first path in the queue contains a good node. (ii) If the first path contains a goal node exit with success. (iii) If the first path does not contain a good node remove the path from the queue and form new paths by extending the removed paths by on step. (iv)Compute the cost of the new paths and add them to the queue. (v) Sort the paths on the queue with lowest-cost path in front. 3. otherwise exit with failure. Water Jug Now let us see how the branch - and -bound search could be used to find the shortest solution to the water- jug problem. Unfortunately although this algorithm is more efficient and simple. It requires exponential time. The exact amount of time it saves for particular problem depends on the order in which the paths are explored. And also in this problem, there is a possibility that the algorithm enters into an indefinite loop. For example, consider the following configuration generated in the process of generating a path. Initial state (0,0) Goal state (2,0) Path 1: (0,0) -> (4,0) -> (1,3) -> (1,0) -> (0,1) -> (4,1) -> (2,3) -> (2,0) Since goal node is reached so put in queue Path 2: (0,0) -> (0,3) -> (3,3)->(3,0)->(4,0)->(0,0) Since this results infinite loop then not to put in queue P1
  • 3. 3 Mehta Ishani 2nd M.E.(C.S.E) Path 3: (0,0) -> (0,3) -> (3,3) -> (4,2) -> (0,2) -> (2,0) Goal node is reached then put in queue Now path 1 contains 8 states and path 2 contains 6 states after performing sorting the queue is Thus our optimal solution is Path 3 The Traveling Salesman Problem The traveling salesman problem consists of a salesman and a set of cities. The salesman has to visit each one of the cities starting from a certain one (e.g. the hometown) and returning same city. The challenge of the problem is that the traveling salesman wants to minimize the total length of the trip. Why the Traveling Salesman Problem?  NP-hard  Brute Force takes O(n!) to complete  Algorithms to solve take one of two forms: o Exact algorithms  Branch and Bound O(2n)  Linear Programming o Heuristic algorithms  Nearest neighbor O( log n )  Pair wise exchange  Randomized improvement (genetic algorithms)  Many real world applications:  Special properties of the Traveling Salesman Problem that make it suitable for Branch and Bound: o As you build your solution, cost increases. o Partial solutions have valid costs (lower bound costs) P1 P3 P3 P1
  • 4. 4 Mehta Ishani 2nd M.E.(C.S.E) Solution steps o Given a complete, weighted graph on n nodes, find the least weight Hamiltonian cycle, a cycle that visits every node once. o Though this problem is easy enough to explain, it is very difficult to solve. o Finding all the Hamiltonian cycles of a graph takes exponential time. Therefore, TSP is in the class NP. For example the path Path1 {A, B, C, D, E, A} - length 24 Path2 {A, B, C, E, D, A} - length 31 Path 3 {A,B,D,C,E,A} - length 21 Hence our queue is After sorting queue is Hence Optimal Solution is Path 3 Pros and Cons  An enhancement of backtracking  However, it is much slower. Indeed, it often leads to exponential time complexities in the worst case.  On the other hand, if applied carefully, it can lead to algorithms that run reasonably fast on average. Summery  Thus Branch and Bound is: o a general search method. o minimize a function f(x), where x is restricted to some feasible region. P1 P2 P3 P3 P1 P2