Download presentation
Presentation is loading. Please wait.
Published byDevi Santoso Modified over 5 years ago
1
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
2
0-1 Knapsack Problem (as GA)
pi/ci = (5,3,2,1) Tyson Kendon © 2007
3
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
4
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
5
Branch & Bound S0 Env: Maxsol = 0 (!, !, !, !) ? Bound = 16
(0, !, !, !) ? Bound = 12 (1, !, !, !) Bound = 16 Tyson Kendon © 2007
6
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
7
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
8
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
9
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
10
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
11
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
12
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
13
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
14
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
15
Branch & Bound S0 Env: Maxsol = 0 (!, !, !, !) ? Bound = 16
(!, 0, !, !) ? Bound = 13 (!, 1, !, !) Bound = 12 Tyson Kendon © 2007
16
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
17
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
18
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
19
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
20
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
21
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
22
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
23
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.