Branch & Bound Another technique for optimization, this time as an and-tree Guaranteed to provide the globally optimum solution to a problem, but may need.

Slides:



Advertisements
Similar presentations
Algorithm Design Methods Spring 2007 CSE, POSTECH.
Advertisements

Greedy Algorithms.
1 Finite Constraint Domains. 2 u Constraint satisfaction problems (CSP) u A backtracking solver u Node and arc consistency u Bounds consistency u Generalized.
Knapsack Problem Section 7.6. Problem Suppose we have n items U={u 1,..u n }, that we would like to insert into a knapsack of size C. Each item u i has.
Branch and Bound Example. Initial lower bound Jrpd Use 1 machine preemptive schedule as lower bound Job 2 has a lateness of 5,
Chapter 5 Fundamental Algorithm Design Techniques.
5-1 Chapter 5 Tree Searching Strategies. 5-2 Satisfiability problem Tree representation of 8 assignments. If there are n variables x 1, x 2, …,x n, then.
Branch & Bound Algorithms
Sum of Subsets and Knapsack
Branch and Bound Searching Strategies
6 - 1 § 6 The Searching Strategies e.g. satisfiability problem x1x1 x2x2 x3x3 FFF FFT FTF FTT TFF TFT TTF TTT.
Quiz Oct “Solving” a Jiggsaw puzzle We want to build a “jigsaw puzzle solver”. You are given 3 jigsaw puzzle pieces, A,B,C and a template. Your.
1 Branch and Bound Searching Strategies 2 Branch-and-bound strategy 2 mechanisms: A mechanism to generate branches A mechanism to generate a bound so.
Knapsack Problem Truck – 10t capacity Optimum cargo combination: Item 1: $5 (3t) Item 2: $7 (4t) Item 3: $8 (5t)
5-1 Chapter 5 Tree Searching Strategies. 5-2 Breadth-first search (BFS) 8-puzzle problem The breadth-first search uses a queue to hold all expanded nodes.
Search.
Branch and bound branch and bound methods economize the search for the best trees by backing out of dead alleys.
1 Branch and Bound Searching Strategies Updated: 12/27/2010.
Algorithm Design Methods (II) Fall 2003 CSE, POSTECH.
M Tech Project – First Stage Improving Branch-And-Price Algorithms For Solving 1D Cutting Stock Problem Soumitra Pal [ ]
5-1 Copyright © 2013 Pearson Education Integer Programming: The Branch and Bound Method Module C.
Branch and Bound Searching Strategies
Approximation Algorithms
3.4: Linear Programming  Intro: Oftentimes we want to optimize a situation - this means to:  find a maximum value (such as maximizing profits)  find.
1 Section 5.1 Analyzing Algorithms Let P be a problem and A an algorithm to solve P. The running time of A can be analyzed by counting the number of certain.
Lecture 6 The Rest of Scheduling Algorithms and The Beginning of Memory Management.
Chapter 6 Branch & Bound (B & B).
Integer Programming An integer linear program (ILP) is defined exactly as a linear program except that values of variables in a feasible solution have.
Dynamic Programming Sequence of decisions. Problem state.
Greedy Method 6/22/2018 6:57 PM Presentation for use with the textbook, Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015.
Algorithm Design Methods
5.3 Mixed-Integer Nonlinear Programming (MINLP) Models
Backtracking And Branch And Bound
Merge Sort 7/29/ :21 PM The Greedy Method The Greedy Method.
The Greedy Method and Text Compression
Lecture 11: Tree Search © J. Christopher Beck 2008.
The Greedy Method and Text Compression
Search
Analysis and design of algorithm
Games & Adversarial Search
Quiz Oct
Heuristics Definition – a heuristic is an inexact algorithm that is based on intuitive and plausible arguments which are “likely” to lead to reasonable.
Merge Sort 11/28/2018 2:18 AM The Greedy Method The Greedy Method.
Merge Sort 11/28/2018 2:21 AM The Greedy Method The Greedy Method.
Merge Sort 11/28/2018 8:16 AM The Greedy Method The Greedy Method.
Branch and Bound.
Exam 2 LZW not on syllabus. 73% / 75%.
Analysis & Design of Algorithms (CSCE 321)
Games & Adversarial Search
Games & Adversarial Search
Our B & B Description Prob : ((e1, … , ek), Rest) where ei E, 0  k  |E|, Rest = E / {e1, … , ek}, and e1 = (v1, v) and ek = (v’,v1) and for all ei.
Sungho Kang Yonsei University
Merge Sort 1/17/2019 3:11 AM The Greedy Method The Greedy Method.
Compute convex lower bounding function and optimize it instead!
Search Exercise Search Tree? Solution (Breadth First Search)?
Branch and Bound Searching Strategies
Algorithm Design Methods
Branch and Bound Example
The Puzzle Tyson Kendon © 2007.
Algorithm Design Methods
Knapsack Problem Truck – 10t capacity Optimum cargo combination:
We need something new Tyson Kendon © 2007.
ALGORITHM TYPES Divide and Conquer, Dynamic Programming, Backtracking, and Greedy. Note the general strategy from the examples. The classification is neither.
Search Model 2 Using a tree we don’t need to keep information about previous states in the search control, rather this data is kept in the search model.
Knapsack Problem Truck – 10t capacity Optimum cargo combination:
Merge Sort 5/2/2019 7:53 PM The Greedy Method The Greedy Method.
We have the following incomplete B&B tree:
Branch-and-Bound Algorithm for Integer Program
Algorithm Design Methods
Lecture 4: Tree Search Strategies
Presentation transcript:

Branch & Bound Another technique for optimization, this time as an and-tree Guaranteed to provide the globally optimum solution to a problem, but may need to go through many states taking up time and space Use a function fBound to determine which branches can be worked on and which do not need work Tyson Kendon © 2007

0-1 Knapsack Problem (as GA) pi/ci = (5,3,2,1) Tyson Kendon © 2007

Search Control 1 Change any nodes that can change to yes (if there is more than one chose left-most) Otherwise choose the node with the highest fBound Choose the xi to work on where i is smallest Tyson Kendon © 2007

Branch & Bound S0 1 x Item 1 10 profit, 2 cost Env: Maxsol = 0 (!, !, !, !) ? Bound = 16 1 x Item 1 10 profit, 2 cost .5 x Item 2  6 profit, 2 cost Tyson Kendon © 2007

Branch & Bound S0  Env: Maxsol = 0 (!, !, !, !) ? Bound = 16 (0, !, !, !) ? Bound = 12 (1, !, !, !) Bound = 16 Tyson Kendon © 2007

Branch & Bound S1   (!, !, !, !) ? Bound = 16 Env: Maxsol = 0 (0, !, !, !) ? Bound = 12 (1, !, !, !) ? Bound = 16  (1, 0, !, !) ? Bound = 13 (1, 1, !, !) Bound = 16 Tyson Kendon © 2007

Branch & Bound S2    (!, !, !, !) ? Bound = 16 Env: Maxsol = 0 (0, !, !, !) ? Bound = 12 (1, !, !, !) ? Bound = 16   (1, 0, !, !) ? Bound = 13 (1, 1, !, !) ? Bound = 16 (1, 1, !, !) yes Bound = 16 Tyson Kendon © 2007

Branch & Bound S3     Env: Maxsol = 0 (!, !, !, !) Bound = 16 ? Bound = 16  S3 Env: Maxsol = 0 (0, !, !, !) ? Bound = 12 (1, !, !, !) ? Bound = 16   (1, 0, !, !) ? Bound = 13  (1, 1, !, !) yes Bound = 16 (1, 0, 0, !) ? Bound = 11 (1, 0, 1, !) Bound = 13 Tyson Kendon © 2007

Branch & Bound S4      Env: Maxsol = 0 (!, !, !, !) Bound = 16 ? Bound = 16  S4 Env: Maxsol = 0 (0, !, !, !) ? Bound = 12 (1, !, !, !) ? Bound = 16   (1, 0, !, !) ? Bound = 13  (1, 1, !, !) yes Bound = 16 (1, 0, 0, !) ? Bound = 11 (1, 0, 1, !) Bound = 13  (1, 0, 1, 0) ? Bound = 12 (1, 0, 1, 1) Bound = 13 Tyson Kendon © 2007

Branch & Bound S5       Env: Env: Maxsol = 12 Maxsol = 0 (!, !, !, !) ? Bound = 16  S5 Env: Maxsol = 0 Env: Maxsol = 12 (0, !, !, !) ? Bound = 12 (1, !, !, !) ? Bound = 16   (1, 0, !, !) ? Bound = 13  (1, 1, !, !) yes Bound = 16 (1, 0, 0, !) ? Bound = 11 (1, 0, 1, !) Bound = 13   (1, 0, 1, 0) yes Bound = 12 (1, 0, 1, 0) ? Bound = 12 (1, 0, 1, 1) ? Bound = 13 Tyson Kendon © 2007

Branch & Bound S6        Env: Maxsol = 12 (!, !, !, !) ? Bound = 16  S6 Env: Maxsol = 12  (0, !, !, !) ? Bound = 12 (0, !, !, !) yes Bound = 12 (1, !, !, !) ? Bound = 16   (1, 0, !, !) ? Bound = 13  (1, 1, !, !) yes Bound = 16 (1, 0, 0, !) ? Bound = 11 (1, 0, 1, !) Bound = 13   (1, 0, 1, 0) yes Bound = 12 (1, 0, 1, 0) ? Bound = 12 (1, 0, 1, 1) ? Bound = 13 Tyson Kendon © 2007

Branch & Bound S7         Env: Maxsol = 12 (!, !, !, !) ? Bound = 16  S7 Env: Maxsol = 12  (0, !, !, !) ? Bound = 12 (0, !, !, !) yes Bound = 12 (1, !, !, !) ? Bound = 16   (1, 0, !, !) ? Bound = 13  (1, 1, !, !) yes Bound = 16  (1, 0, 0, !) yes Bound = 11 (1, 0, 0, !) ? Bound = 11 (1, 0, 1, !) ? Bound = 13   (1, 0, 1, 0) yes Bound = 12 (1, 0, 1, 0) ? Bound = 12 (1, 0, 1, 1) ? Bound = 13 Tyson Kendon © 2007

Branch & Bound S8          Env: Maxsol = 12 Env: Maxsol = 13 (!, !, !, !) ? Bound = 16  S8 Env: Maxsol = 12 Env: Maxsol = 13  (0, !, !, !) yes Bound = 12 (0, !, !, !) ? Bound = 12 (1, !, !, !) ? Bound = 16   (1, 0, !, !) ? Bound = 13  (1, 1, !, !) yes Bound = 16  (1, 0, 0, !) ? Bound = 11 (1, 0, 0, !) yes Bound = 11 (1, 0, 1, !) ? Bound = 13    (1, 0, 1, 0) ? Bound = 12 (1, 0, 1, 0) yes Bound = 12 (1, 0, 1, 1) ? Bound = 13 (1, 0, 1, 1) yes Bound = 13 Tyson Kendon © 2007

Search Control 2 Change any nodes that can change to yes (if there is more than one chose left-most) Otherwise choose the node with the highest fBound Choose the xi to work on where pi is highest Tyson Kendon © 2007

Branch & Bound S0  Env: Maxsol = 0 (!, !, !, !) ? Bound = 16 (!, 0, !, !) ? Bound = 13 (!, 1, !, !) Bound = 12 Tyson Kendon © 2007

Branch & Bound S1   (!, !, !, !) ? Bound = 16 Env: Maxsol = 0 (!, 0, !, !) ? Bound = 13 (!, 1, !, !) ? Bound = 12 (0, 0, !, !) ? Bound = 3 (1, 0, !, !) Bound = 13 Tyson Kendon © 2007

Branch & Bound S2    Env: Maxsol = 0 (!, !, !, !) Bound = 16 ? Bound = 16  S2 Env: Maxsol = 0  (!, 0, !, !) ? Bound = 13 (!, 1, !, !) ? Bound = 12 (0, 0, !, !) ? Bound = 3 (1, 0, !, !) ? Bound = 13  (1, 0, 0, !) ? Bound = 11 (1, 0, 1, !) Bound = 13 Tyson Kendon © 2007

Branch & Bound S3     Env: Maxsol = 0 (!, !, !, !) Bound = 16 ? Bound = 16  S3 Env: Maxsol = 0  (!, 0, !, !) ? Bound = 13 (!, 1, !, !) ? Bound = 12 (0, 0, !, !) ? Bound = 3 (1, 0, !, !) ? Bound = 13  (1, 0, 0, !) ? Bound = 11 (1, 0, 1, !) Bound = 13  (1, 0, 1, 0) ? Bound = 12 (1, 0, 1, 1) Bound = 13 Tyson Kendon © 2007

Branch & Bound S4      Env: Env: Maxsol = 12 Maxsol = 0 (!, !, !, !) ? Bound = 16  S4 Env: Maxsol = 0 Env: Maxsol = 12  (!, 0, !, !) ? Bound = 13 (!, 1, !, !) ? Bound = 12 (0, 0, !, !) ? Bound = 3 (1, 0, !, !) ? Bound = 13  (1, 0, 0, !) ? Bound = 11 (1, 0, 1, !) Bound = 13   (1, 0, 1, 0) yes Bound = 12 (1, 0, 1, 0) ? Bound = 12 (1, 0, 1, 1) ? Bound = 13 Tyson Kendon © 2007

Branch & Bound S5       Env: Maxsol = 12 (!, !, !, !) Bound = 16 ? Bound = 16  S5 Env: Maxsol = 12  (!, 0, !, !) ? Bound = 13 (!, 1, !, !) ? Bound = 12  (0, 0, !, !) yes Bound = 3 (0, 0, !, !) ? Bound = 3 (1, 0, !, !) ? Bound = 13  (1, 0, 0, !) ? Bound = 11 (1, 0, 1, !) Bound = 13   (1, 0, 1, 0) ? Bound = 12 (1, 0, 1, 0) yes Bound = 12 (1, 0, 1, 1) ? Bound = 13 Tyson Kendon © 2007

Branch & Bound S6        Env: Maxsol = 12 (!, !, !, !) ? Bound = 16  S6 Env: Maxsol = 12  (!, 0, !, !) ? Bound = 13 (!, 1, !, !) ? Bound = 12  (0, 0, !, !) yes Bound = 3 (0, 0, !, !) ? Bound = 3 (1, 0, !, !) ? Bound = 13  (1, 0, 0, !) ? Bound = 11 (1, 0, 1, !) Bound = 13  (1, 0, 0, !) yes Bound = 11   (1, 0, 1, 0) ? Bound = 12 (1, 0, 1, 0) yes Bound = 12 (1, 0, 1, 1) ? Bound = 13 Tyson Kendon © 2007

Branch & Bound S7         Env: Env: Maxsol = 13 Maxsol = 12 (!, !, !, !) ? Bound = 16  S7 Env: Maxsol = 12 Env: Maxsol = 13  (!, 0, !, !) ? Bound = 13 (!, 1, !, !) ? Bound = 12  (0, 0, !, !) yes Bound = 3 (0, 0, !, !) ? Bound = 3 (1, 0, !, !) ? Bound = 13  (1, 0, 0, !) ? Bound = 11 (1, 0, 1, !) Bound = 13  (1, 0, 0, !) yes Bound = 11    (1, 0, 1, 0) ? Bound = 12 (1, 0, 1, 0) yes Bound = 12 (1, 0, 1, 1) ? Bound = 13 (1, 0, 1, 1) yes Bound = 13 Tyson Kendon © 2007

Branch & Bound S8          Env: Maxsol = 13 (!, !, !, !) ? Bound = 16  S8 Env: Maxsol = 13   (!, 0, !, !) ? Bound = 13 (!, 1, !, !) yes Bound = 12 (!, 1, !, !) ? Bound = 12  (0, 0, !, !) ? Bound = 3 (0, 0, !, !) yes Bound = 3 (1, 0, !, !) ? Bound = 13  (1, 0, 0, !) ? Bound = 11 (1, 0, 1, !) Bound = 13  (1, 0, 0, !) yes Bound = 11    (1, 0, 1, 0) ? Bound = 12 (1, 0, 1, 0) yes Bound = 12 (1, 0, 1, 1) ? Bound = 13 (1, 0, 1, 1) yes Bound = 13 Tyson Kendon © 2007