SlideShare a Scribd company logo
5
Most read
7
Most read
13
Most read
Solving traveling salesman and water
jug problem using Branch and Bound
Technique
Prepared By
Mehta Ishani
Introduction
Branch and Bound
 method for solving optimization problems
 approach developed for solving discrete and
combinatorial optimization problems
8/23/20142
Problem domain
discrete optimization problems
(decision variables assume discrete values)
combinatorial optimization problems
(choosing the best combination)
8/23/20143
Difficulty
No optimality conditions
To ensure optimality perform comparison
Explicit comparison results in NP Completeness
Implicit comparison results partial enumeratoin
8/23/20144
Solution
Branch and Bound technique
 breaking up its feasible set into successively smaller
subsets
 calculating bounds on the objective function value
 discard certain subsets
The method was first proposed by A. H. Land and A.
G. Doig in 1960 for discrete programming
8/23/20145
Steps
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. 8/23/20146
Water Jug
Initial state (0,0)
Goal state (2,0)
Path p1:
(0,0) -> (4,0) -> (1,3) -> (1,0) -> (0,1) -> (4,1) -> (2,3) -
> (2,0)
P1
8/23/20147
Water Jug
 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
 Path 3:
(0,0) -> (0,3) -> (3,3) -> (4,2) -> (0,2) -> (2,0)
P1
P3 P1
8/23/20148
Water Jug
 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
P1 P3
8/23/20149
Traveling Salesman Problem
8/23/201410
Problem
 NP-hard
 Brute Force takes O(n!) to complete
 Algorithms to solve take one of two forms:
 Exact algorithms
 Branch and Bound O(2n)
 Linear Programming
 Heuristic algorithms
 Nearest neighbor O( log n )
 Pair wise exchange
 Randomized improvement (genetic algorithms)
 Many real world applications:
8/23/201411
Solution
 Special properties of the Traveling Salesman
Problem that make it suitable for Branch and Bound:
 As you build your solution, cost increases.
 Partial solutions have valid costs (lower bound costs)
8/23/201412
Steps
 Given a complete, weighted graph on n nodes, find the
least weight Hamiltonian cycle, a cycle that visits every
node once.
 Though this problem is easy enough to explain, it is very
difficult to solve.
 Finding all the Hamiltonian cycles of a graph takes
exponential time. Therefore, TSP is in the class NP.
8/23/201413
Solution
 Path1 {A, B, C, D, E, A} - length 24
P1
8/23/201414
Solution
Path2 {A, B, C, E, D, A} - length 31
P2 P1
8/23/201415
Solution
Path 3 {A,B,D,C,E,A} - length 21
P3 P2 P1
8/23/201416
Solution
 After perform sorting queue is
 Hence Optimal Solution is Path 3
P2 P1 P3
8/23/201417
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.
8/23/201418
Summery
 Thus Branch and Bound is:
 a general search method.
 minimize a function f(x), where x is restricted to some
feasible region.
8/23/201419
8/23/201420

More Related Content

What's hot (20)

PPT
Instance Based Learning in Machine Learning
Pavithra Thippanaik
 
PPTX
AI - Local Search - Hill Climbing
Andrew Ferlitsch
 
PDF
Daa notes 3
smruti sarangi
 
PPTX
Loop optimization
Vivek Gandhi
 
PPTX
Means End Analysis (MEA) in Artificial.pptx
suchita74
 
PDF
Max net
Sandilya Sridhara
 
PDF
AI 7 | Constraint Satisfaction Problem
Mohammad Imam Hossain
 
PPTX
Issues in knowledge representation
Sravanthi Emani
 
PPTX
Daa unit 1
Abhimanyu Mishra
 
PPTX
Graph coloring using backtracking
shashidharPapishetty
 
PPTX
AI_Session 7 Greedy Best first search algorithm.pptx
Guru Nanak Technical Institutions
 
PPT
IPV4 Frame Format
Aditya Rawat
 
PDF
P, NP, NP-Complete, and NP-Hard
Animesh Chaturvedi
 
PPT
Bellman Ford's Algorithm
Tanmay Baranwal
 
PDF
Heuristic search-in-artificial-intelligence
grinu
 
PPT
Np cooks theorem
Narayana Galla
 
PDF
I. AO* SEARCH ALGORITHM
vikas dhakane
 
PPT
Principles of soft computing-Associative memory networks
Sivagowry Shathesh
 
PPTX
Data Structure and Algorithm - Divide and Conquer
Laguna State Polytechnic University
 
PPTX
Lecture optimal binary search tree
Divya Ks
 
Instance Based Learning in Machine Learning
Pavithra Thippanaik
 
AI - Local Search - Hill Climbing
Andrew Ferlitsch
 
Daa notes 3
smruti sarangi
 
Loop optimization
Vivek Gandhi
 
Means End Analysis (MEA) in Artificial.pptx
suchita74
 
AI 7 | Constraint Satisfaction Problem
Mohammad Imam Hossain
 
Issues in knowledge representation
Sravanthi Emani
 
Daa unit 1
Abhimanyu Mishra
 
Graph coloring using backtracking
shashidharPapishetty
 
AI_Session 7 Greedy Best first search algorithm.pptx
Guru Nanak Technical Institutions
 
IPV4 Frame Format
Aditya Rawat
 
P, NP, NP-Complete, and NP-Hard
Animesh Chaturvedi
 
Bellman Ford's Algorithm
Tanmay Baranwal
 
Heuristic search-in-artificial-intelligence
grinu
 
Np cooks theorem
Narayana Galla
 
I. AO* SEARCH ALGORITHM
vikas dhakane
 
Principles of soft computing-Associative memory networks
Sivagowry Shathesh
 
Data Structure and Algorithm - Divide and Conquer
Laguna State Polytechnic University
 
Lecture optimal binary search tree
Divya Ks
 

Viewers also liked (20)

PDF
Branch and bound technique
ishmecse13
 
DOC
Branch and bound
Nv Thejaswini
 
PPTX
Back tracking and branch and bound class 20
Kumar
 
PPTX
Branch and bounding : Data structures
Kàŕtheek Jåvvàjí
 
PPT
Branch & bound
kannanchirayath
 
PPTX
Branch and bound
Acad
 
PPTX
8 queens problem using back tracking
Tech_MX
 
PPTX
Backtracking
subhradeep mitra
 
PPTX
Branch and bound
Myrian Santos
 
PPTX
Tsp branch and-bound
Saravanan Natarajan
 
PPTX
Knapsack
Karthik Chetla
 
PPTX
Knapsack Problem
Jenny Galino
 
PPT
Knapsack problem
Vikas Sharma
 
PPT
01 knapsack using backtracking
mandlapure
 
PPTX
Backtracking
Sulman Bin Khurshid
 
PDF
backtracking algorithms of ada
Sahil Kumar
 
PDF
Travelling Salesperson Problem-Branch & Bound
Sharmila Chidaravalli
 
PPTX
Travelling Salesman
Shuvojit Kar
 
PPT
Artificial Intelligence
Sharbani Bhattacharya
 
PPTX
Branch&bound at
Sandy Walker
 
Branch and bound technique
ishmecse13
 
Branch and bound
Nv Thejaswini
 
Back tracking and branch and bound class 20
Kumar
 
Branch and bounding : Data structures
Kàŕtheek Jåvvàjí
 
Branch & bound
kannanchirayath
 
Branch and bound
Acad
 
8 queens problem using back tracking
Tech_MX
 
Backtracking
subhradeep mitra
 
Branch and bound
Myrian Santos
 
Tsp branch and-bound
Saravanan Natarajan
 
Knapsack
Karthik Chetla
 
Knapsack Problem
Jenny Galino
 
Knapsack problem
Vikas Sharma
 
01 knapsack using backtracking
mandlapure
 
Backtracking
Sulman Bin Khurshid
 
backtracking algorithms of ada
Sahil Kumar
 
Travelling Salesperson Problem-Branch & Bound
Sharmila Chidaravalli
 
Travelling Salesman
Shuvojit Kar
 
Artificial Intelligence
Sharbani Bhattacharya
 
Branch&bound at
Sandy Walker
 
Ad

Similar to Branch and bound technique (20)

PPTX
TSP_Branch_and_Bound___Presentation.pptx
ArjunSinghRajput16
 
PPT
fdocuments.in_branch-and-bound-design-and-analysis-of-alogorithm.ppt
KartikGupta711
 
PDF
Backtracking & branch and bound
Vipul Chauhan
 
PPT
Branch and bound.ppt
umairshams6
 
PPT
Mixed Integer Programming (MIP) is a type of mathematical optimization Branch...
havehalifax15
 
PPT
Unit-2 Branch & Bound Design of Algorithms.ppt
HarjotDhillon8
 
PPTX
Backtracking algorithm with examples N-queens
ssuser746d32
 
PPTX
Branch and bound method
VidhyaSenthil
 
PPT
Backtracking
Vikas Sharma
 
PPTX
Graph Traversal Algorithms - Breadth First Search
Amrinder Arora
 
PPTX
bcfbedbf-6679-4d5d-b8a5-7d4c9c48dba4.pptx
B.T.L.I.T
 
PPTX
ETCS262A-Analysis of design Algorithm.pptx
RahulSingh190790
 
PDF
heuristic search Techniques and game playing.pdf
vijeta3feb
 
PDF
Algorithm chapter 11
chidabdu
 
PPTX
Lecture 12 Heuristic Searches
Hema Kashyap
 
PPTX
Data analytics concepts
Hiranthi Tennakoon
 
PPT
Helgaun's algorithm for the TSP
Kaal Nath
 
PPTX
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
muthukrishnavinayaga
 
PPTX
Undecidable Problems and Approximation Algorithms
Muthu Vinayagam
 
DOCX
Searching techniques
Prof.Dharmishtha R. Chaudhari
 
TSP_Branch_and_Bound___Presentation.pptx
ArjunSinghRajput16
 
fdocuments.in_branch-and-bound-design-and-analysis-of-alogorithm.ppt
KartikGupta711
 
Backtracking & branch and bound
Vipul Chauhan
 
Branch and bound.ppt
umairshams6
 
Mixed Integer Programming (MIP) is a type of mathematical optimization Branch...
havehalifax15
 
Unit-2 Branch & Bound Design of Algorithms.ppt
HarjotDhillon8
 
Backtracking algorithm with examples N-queens
ssuser746d32
 
Branch and bound method
VidhyaSenthil
 
Backtracking
Vikas Sharma
 
Graph Traversal Algorithms - Breadth First Search
Amrinder Arora
 
bcfbedbf-6679-4d5d-b8a5-7d4c9c48dba4.pptx
B.T.L.I.T
 
ETCS262A-Analysis of design Algorithm.pptx
RahulSingh190790
 
heuristic search Techniques and game playing.pdf
vijeta3feb
 
Algorithm chapter 11
chidabdu
 
Lecture 12 Heuristic Searches
Hema Kashyap
 
Data analytics concepts
Hiranthi Tennakoon
 
Helgaun's algorithm for the TSP
Kaal Nath
 
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
muthukrishnavinayaga
 
Undecidable Problems and Approximation Algorithms
Muthu Vinayagam
 
Searching techniques
Prof.Dharmishtha R. Chaudhari
 
Ad

More from ishmecse13 (13)

PDF
Search engine and web crawler
ishmecse13
 
PPTX
Web services concepts, protocols and development
ishmecse13
 
PDF
Web services concepts, protocols and development
ishmecse13
 
PPTX
Web services
ishmecse13
 
PPTX
Wap wml
ishmecse13
 
PDF
Wap architecture and wml script
ishmecse13
 
PPT
Solving travelling salesman problem using firefly algorithm
ishmecse13
 
PPTX
Object oriented concepts with java
ishmecse13
 
PPTX
Kerberos using public key cryptography
ishmecse13
 
PPTX
Hierarchical clustering
ishmecse13
 
PPT
File models and file accessing models
ishmecse13
 
PDF
Case study on cyber crime
ishmecse13
 
PPTX
Cyber crime and cyber laws
ishmecse13
 
Search engine and web crawler
ishmecse13
 
Web services concepts, protocols and development
ishmecse13
 
Web services concepts, protocols and development
ishmecse13
 
Web services
ishmecse13
 
Wap wml
ishmecse13
 
Wap architecture and wml script
ishmecse13
 
Solving travelling salesman problem using firefly algorithm
ishmecse13
 
Object oriented concepts with java
ishmecse13
 
Kerberos using public key cryptography
ishmecse13
 
Hierarchical clustering
ishmecse13
 
File models and file accessing models
ishmecse13
 
Case study on cyber crime
ishmecse13
 
Cyber crime and cyber laws
ishmecse13
 

Recently uploaded (20)

PDF
20ES1152 Programming for Problem Solving Lab Manual VRSEC.pdf
Ashutosh Satapathy
 
PDF
Electrical Machines and Their Protection.pdf
Nabajyoti Banik
 
PPTX
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
PDF
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
PPT
New_school_Engineering_presentation_011707.ppt
VinayKumar304579
 
PPTX
What is Shot Peening | Shot Peening is a Surface Treatment Process
Vibra Finish
 
PPTX
Water Resources Engineering (CVE 728)--Slide 4.pptx
mohammedado3
 
PDF
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
PDF
MODULE-5 notes [BCG402-CG&V] PART-B.pdf
Alvas Institute of Engineering and technology, Moodabidri
 
PPTX
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
PPTX
fatigue in aircraft structures-221113192308-0ad6dc8c.pptx
aviatecofficial
 
PDF
methodology-driven-mbse-murphy-july-hsv-huntsville6680038572db67488e78ff00003...
henriqueltorres1
 
PDF
SERVERLESS PERSONAL TO-DO LIST APPLICATION
anushaashraf20
 
PPTX
Final Major project a b c d e f g h i j k l m
bharathpsnab
 
PPTX
Distribution reservoir and service storage pptx
dhanashree78
 
PDF
Digital water marking system project report
Kamal Acharya
 
PDF
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
PPTX
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
PPTX
Lecture 1 Shell and Tube Heat exchanger-1.pptx
mailforillegalwork
 
PDF
aAn_Introduction_to_Arcadia_20150115.pdf
henriqueltorres1
 
20ES1152 Programming for Problem Solving Lab Manual VRSEC.pdf
Ashutosh Satapathy
 
Electrical Machines and Their Protection.pdf
Nabajyoti Banik
 
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
New_school_Engineering_presentation_011707.ppt
VinayKumar304579
 
What is Shot Peening | Shot Peening is a Surface Treatment Process
Vibra Finish
 
Water Resources Engineering (CVE 728)--Slide 4.pptx
mohammedado3
 
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
MODULE-5 notes [BCG402-CG&V] PART-B.pdf
Alvas Institute of Engineering and technology, Moodabidri
 
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
fatigue in aircraft structures-221113192308-0ad6dc8c.pptx
aviatecofficial
 
methodology-driven-mbse-murphy-july-hsv-huntsville6680038572db67488e78ff00003...
henriqueltorres1
 
SERVERLESS PERSONAL TO-DO LIST APPLICATION
anushaashraf20
 
Final Major project a b c d e f g h i j k l m
bharathpsnab
 
Distribution reservoir and service storage pptx
dhanashree78
 
Digital water marking system project report
Kamal Acharya
 
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
Lecture 1 Shell and Tube Heat exchanger-1.pptx
mailforillegalwork
 
aAn_Introduction_to_Arcadia_20150115.pdf
henriqueltorres1
 

Branch and bound technique

  • 1. Solving traveling salesman and water jug problem using Branch and Bound Technique Prepared By Mehta Ishani
  • 2. Introduction Branch and Bound  method for solving optimization problems  approach developed for solving discrete and combinatorial optimization problems 8/23/20142
  • 3. Problem domain discrete optimization problems (decision variables assume discrete values) combinatorial optimization problems (choosing the best combination) 8/23/20143
  • 4. Difficulty No optimality conditions To ensure optimality perform comparison Explicit comparison results in NP Completeness Implicit comparison results partial enumeratoin 8/23/20144
  • 5. Solution Branch and Bound technique  breaking up its feasible set into successively smaller subsets  calculating bounds on the objective function value  discard certain subsets The method was first proposed by A. H. Land and A. G. Doig in 1960 for discrete programming 8/23/20145
  • 6. Steps 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. 8/23/20146
  • 7. Water Jug Initial state (0,0) Goal state (2,0) Path p1: (0,0) -> (4,0) -> (1,3) -> (1,0) -> (0,1) -> (4,1) -> (2,3) - > (2,0) P1 8/23/20147
  • 8. Water Jug  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  Path 3: (0,0) -> (0,3) -> (3,3) -> (4,2) -> (0,2) -> (2,0) P1 P3 P1 8/23/20148
  • 9. Water Jug  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 P1 P3 8/23/20149
  • 11. Problem  NP-hard  Brute Force takes O(n!) to complete  Algorithms to solve take one of two forms:  Exact algorithms  Branch and Bound O(2n)  Linear Programming  Heuristic algorithms  Nearest neighbor O( log n )  Pair wise exchange  Randomized improvement (genetic algorithms)  Many real world applications: 8/23/201411
  • 12. Solution  Special properties of the Traveling Salesman Problem that make it suitable for Branch and Bound:  As you build your solution, cost increases.  Partial solutions have valid costs (lower bound costs) 8/23/201412
  • 13. Steps  Given a complete, weighted graph on n nodes, find the least weight Hamiltonian cycle, a cycle that visits every node once.  Though this problem is easy enough to explain, it is very difficult to solve.  Finding all the Hamiltonian cycles of a graph takes exponential time. Therefore, TSP is in the class NP. 8/23/201413
  • 14. Solution  Path1 {A, B, C, D, E, A} - length 24 P1 8/23/201414
  • 15. Solution Path2 {A, B, C, E, D, A} - length 31 P2 P1 8/23/201415
  • 16. Solution Path 3 {A,B,D,C,E,A} - length 21 P3 P2 P1 8/23/201416
  • 17. Solution  After perform sorting queue is  Hence Optimal Solution is Path 3 P2 P1 P3 8/23/201417
  • 18. 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. 8/23/201418
  • 19. Summery  Thus Branch and Bound is:  a general search method.  minimize a function f(x), where x is restricted to some feasible region. 8/23/201419