Presentasi sedang didownload. Silahkan tunggu

Presentasi sedang didownload. Silahkan tunggu

Branch and Bound Lecture 12 CS3024.

Presentasi serupa


Presentasi berjudul: "Branch and Bound Lecture 12 CS3024."— Transcript presentasi:

1 Branch and Bound Lecture 12 CS3024

2 Review: 0/1 knapsack dg backtracking
6/5/06 RMB/Lect12

3 Review: 0/1 knapsack dg backtracking
pi wi pi /wi 1 $40 2 $20 $30 5 $6 3 $50 10 $5 4 $10 $2 6/5/06 RMB/Lect12

4 Review: 0/1 knapsack dg backtracking
6/5/06 RMB/Lect12

5 Review: 0/1 knapsack dg backtracking
6/5/06 RMB/Lect12

6 Review: 0/1 knapsack dg backtracking
6/5/06 RMB/Lect12

7 Review: 0/1 knapsack dg backtracking
Complexity Comparing the DP and backtracking 6/5/06 RMB/Lect12

8 Branch and bound Basic idea and particularities
It is a method to solve combinatorial optimization problems It is based on the same idea as backtracking: it constructs a state space tree and stop developing a branch in this tree as soon as we can decide that it cannot lead to a solution Backtracking: - search for configurations which satisfy some constraints Branch and Bound: - search for configurations which satisfy some constraints and optimize a criterion (objective function) 6/5/06 RMB/Lect12

9 What is Branch and Bound ?
Branch and Bound (B&B):explore all solutions using constraints (bounds) Lower Bound: min. possible value of solution (minimasi) Upper Bound: max. possible value of solution (maksimasi) The problem is split into sub-problems Each sub-problems is expanded until a solution is obtained as long as its cost doesn’t exceed the bounds Its cost must be greater than the lower bound 6/5/06 RMB/Lect12

10 Application: Knapsack Problem
Diberikan n items yang diketahui weights wi dan profit vi, i=1,2,…,n, dan kapasitas knapsack W. Langkah pertama mengurutkan density vi / wi secara descending: v1/w1≥v2/w2≥…≥vn/wn Langkah kedua, menghitung upper bound (ub): ub = v + (W-w)(vi+1/wi+1) 6/5/06 RMB/Lect12

11 Application: Knapsack Problem
Perhatikan tabel knapsack berikut ini. Kapasitas knapsack W adalah 10. 6/5/06 RMB/Lect12

12 Application: Knapsack Problem
Setiap level dari pohon ruang status menyatakan subsets dari n items. Path dari root memiliki dua cabang, masing-masing menyatakan: Cabang kiri  inclusion item Cabang kanan exclusion item Hitung ub root  = 100 6/5/06 RMB/Lect12

13 Application: Knapsack Problem
6/5/06 RMB/Lect12

14 Application: TSP Problem
Tentukan lb dengan panjang l dari setiap tour dengan formula: Untuk setiap kota i, 1≤i≤n, hitung hasil penjumlahan jarak si dari kota i ke dua kota terdekatnya. Lakukan penjumlahan tersebut sebanyak n, kemudian hasilnya bagi dengan 2. Lb = s/2 6/5/06 RMB/Lect12

15 Application: TSP Problem
Perhatikan graf berbobot berikut ini 6/5/06 RMB/Lect12

16 Application: TSP Problem
Sebagai contoh, lb awal menghasilkan Lb = [(1+3)+(3+6)+(1+2)+(3+4)+(2+3)]/2 = 14 Persamaan lb tersebut dimodifikasi untuk edge(a,d) dan (d,a) atau tour lainnya: [(1+5)+(3+6)+(1+2)+(3+5)+(2+3)]/2 = 16 6/5/06 RMB/Lect12

17 Application: TSP Problem
6/5/06 RMB/Lect12

18 Exercises Terapkan algoritma branch and bound untuk persoalan knapsack berikut ini. 6/5/06 RMB/Lect12

19 Exercises Terapkan algoritma branch and bound untuk persoalan TSP dari graph berikut ini. 6/5/06 RMB/Lect12

20 Breadth-first search with branch and bound pruning
Best-first search with branch-and-bound pruning. 6/5/06 RMB/Lect12

21 BFS with Branch and Bound Pruning
W=16, n=4 i pi wi pi /wi 1 $40 2 $20 $30 5 $6 3 $50 10 $5 4 $10 $2 6/5/06 RMB/Lect12

22 BFS with Branch and Bound Pruning
6/5/06 RMB/Lect12

23 BFS with Branch and Bound Pruning Algorithm
6/5/06 RMB/Lect12

24 6/5/06 RMB/Lect12

25 6/5/06 RMB/Lect12

26 Best-first search with Branch and Bound Pruning
6/5/06 RMB/Lect12

27 Best first search algorithm
6/5/06 RMB/Lect12


Download ppt "Branch and Bound Lecture 12 CS3024."

Presentasi serupa


Iklan oleh Google