Backtracking and Branch-and-Bound Search

Size: px
Start display at page:

Download "Backtracking and Branch-and-Bound Search"

Transcription

1 Outline Bruteforce search Backtracking Branch and Bound Backtracking and BranchandBound Search Georgy Gimel farb (with basic contributions by Michael J. Dinneen) COMPSCI 369 Computational Science 1 / 22

2 Outline Bruteforce search Backtracking Branch and Bound 1 Bruteforce search 2 Backtracking 3 Branch and Bound Search Learning outcomes: Understand that heuristic optimisation strategies must be used when no good exact algorithm is known Recommended reading: R. E. Neapolitan, K. Naimipour: Foundations of Algorithms Using C++ Pseudocode. Sudbury, Mass., USA : Jones and Bartlett, 24 Additional sources: R. Bartak: Systematic search algorithms: bartak/constraints/backtrack.html jzbv/algorithms/backtracking.htm jzbv/algorithms/branch and Bound.htm and bound 2 / 22

3 Outline Bruteforce search Backtracking Branch and Bound Systematic Search Through Possible Solutions Potential solution: an assignment of values to a vector of variables x = [x 1,..., x m ], such that satisfy given constraints m variables (x 1, x 2,..., x m ) with k values each: k m possible assignments m variables (x 1, x 2,..., x m ); x i X i = {α i:1,..., α i:ki } m X i m K i possible assignments i=1 i=1 Partial solution: a vector [x 1,..., x i ] of i < m elements, which have been assigned Example: n Queens Problem Place n nonattacking queens on an n n chess board How quickly can we find a solution? E.g. for n = 8 3 / 22

4 Outline Bruteforce search Backtracking Branch and Bound Brute Force, or GenerateandTest Search Full exhaustion of, or searching through all the possible assignments of values from X i to variables x i ; i = 1,..., K 1 Systematically guess (generate) one of the remaining solutions 2 Test whether this solution is correct 3 Terminate if the test is successful Disadvantage: The inefficiency of generating new assignments with no account of earlier rejected ones This method considers m X i m K i combinations (the size i=1 i=1 of the Cartesian product X 1 X m of all the variable domains) For better efficiency, the validity of each constraint is to be tested as soon as its respective variable is instantiated The latter idea is used by the backtracking method 4 / 22

5 Outline Bruteforce search Backtracking Branch and Bound The nqueens Problem: No Mutual Attacks! Place n queens on a square n n chess board in a way that no two queens would be able to attack each other Two queens can attack eacn others on the same row, column, or diagonal The board has n rows, n columns, and 4n 2 diagonals Distinct solution: may differ by symmetric operations (rotation and reflection of the board) Eight queens (n = 8) 92 distinct solutions Unique solution: symmetric configurations are the same Eight queens (n = 8) 12 unique solutions Exponential complexity The world record for n = 25 over 5 years of the cumulated computing time (a heterogeneous computer cluster over the world) 5 / 22

6 Outline Bruteforce search Backtracking Branch and Bound Eight Queens Problem Solution one queen per row, column or diagonal: X X X X X X X X X X X X X X X X X X X X X X X X X Full exhaustion: n = ( 64 8 ) = 4, 426, 165, 368 assignments!!! 6 / 22

7 Outline Bruteforce search Backtracking Branch and Bound Faster Search by Constraints Propagation A vast majority of the assignments do not match constraints The bruteforce exhaustion takes no account of constraints Faster search if each next assigned value is consistent with the current partial solution One per row constraint: n = 8 8 = 16, 777, 216 ( ) 64 One per row and column : n = 8! = 4, / 22

8 Outline Bruteforce search Backtracking Branch and Bound Backtracking The most common algorithm for systematic search through all the possible combinations within a search space Incrementally attempts to extend a partial solution toward a complete solution Partial solution: consistent values for some of the variables Extension by repeatedly choosing a value for another variable consistent with the values in the current partial solution A merge of generate and test phases from the full exhaustion 1 Instantiate the variables sequentially 2 As soon as all the variables relevant to a constraint are instantiated, test the validity of the constraint 3 Whenever the test fails, backtrack to the most recently instantiated variable that still has alternatives available 4 Terminate when all the variables are successfully instantiated 8 / 22

9 Outline Bruteforce search Backtracking Branch and Bound Example: 4 Queens Problem Bruteforce: `16 4 = 43, 68; 1 in row : 4 4 = 256; 1 in row/column : 4! = 24 Step 1: Instantiate Queen 1 position (1 st out of 4) Step 2: Instantiate Queen 2 position (1 st out of 2) Step 3: Backtracking (no position for Queen 3) Step 4: Instantiate Queen 2 position (2 nd out of 2) Step 5: Instantiate Queen 3 position (1 st out of 1) Step 6: Backtracking (no position for Queens 42) Step 7: Instantiate Queen 1 position (2 nd out of 4) Step 8: Instantiate Queen 2 position (1 st out of 1) Step 9: Instantiate Queen 3 position (1 st out of 1) Step 1: Instantiate Queen 4 position (1 st out of 1) 9 / 22

10 Outline Bruteforce search Backtracking Branch and Bound Example: 4 Queens Problem Bruteforce: `16 4 = 43, 68; 1 in row : 4 4 = 256; 1 in row/column : 4! = 24 Step 1: Instantiate Queen 1 position (1 st out of 4) Step 2: Instantiate Queen 2 position (1 st out of 2) Step 3: Backtracking (no position for Queen 3) Step 4: Instantiate Queen 2 position (2 nd out of 2) Step 5: Instantiate Queen 3 position (1 st out of 1) Step 6: Backtracking (no position for Queens 42) Step 7: Instantiate Queen 1 position (2 nd out of 4) Step 8: Instantiate Queen 2 position (1 st out of 1) Step 9: Instantiate Queen 3 position (1 st out of 1) Step 1: Instantiate Queen 4 position (1 st out of 1) 9 / 22

11 Outline Bruteforce search Backtracking Branch and Bound Example: 4 Queens Problem Bruteforce: `16 4 = 43, 68; 1 in row : 4 4 = 256; 1 in row/column : 4! = 24 Step 1: Instantiate Queen 1 position (1 st out of 4) Step 2: Instantiate Queen 2 position (1 st out of 2) Step 3: Backtracking (no position for Queen 3) Step 4: Instantiate Queen 2 position (2 nd out of 2) Step 5: Instantiate Queen 3 position (1 st out of 1) Step 6: Backtracking (no position for Queens 42) Step 7: Instantiate Queen 1 position (2 nd out of 4) Step 8: Instantiate Queen 2 position (1 st out of 1) Step 9: Instantiate Queen 3 position (1 st out of 1) Step 1: Instantiate Queen 4 position (1 st out of 1) 9 / 22

12 Outline Bruteforce search Backtracking Branch and Bound Example: 4 Queens Problem Bruteforce: `16 4 = 43, 68; 1 in row : 4 4 = 256; 1 in row/column : 4! = 24 Step 1: Instantiate Queen 1 position (1 st out of 4) Step 2: Instantiate Queen 2 position (1 st out of 2) Step 3: Backtracking (no position for Queen 3) Step 4: Instantiate Queen 2 position (2 nd out of 2) Step 5: Instantiate Queen 3 position (1 st out of 1) Step 6: Backtracking (no position for Queens 42) Step 7: Instantiate Queen 1 position (2 nd out of 4) Step 8: Instantiate Queen 2 position (1 st out of 1) Step 9: Instantiate Queen 3 position (1 st out of 1) Step 1: Instantiate Queen 4 position (1 st out of 1) 9 / 22

13 Outline Bruteforce search Backtracking Branch and Bound Example: 4 Queens Problem Bruteforce: `16 4 = 43, 68; 1 in row : 4 4 = 256; 1 in row/column : 4! = 24 Step 1: Instantiate Queen 1 position (1 st out of 4) Step 2: Instantiate Queen 2 position (1 st out of 2) Step 3: Backtracking (no position for Queen 3) Step 4: Instantiate Queen 2 position (2 nd out of 2) Step 5: Instantiate Queen 3 position (1 st out of 1) Step 6: Backtracking (no position for Queens 42) Step 7: Instantiate Queen 1 position (2 nd out of 4) Step 8: Instantiate Queen 2 position (1 st out of 1) Step 9: Instantiate Queen 3 position (1 st out of 1) Step 1: Instantiate Queen 4 position (1 st out of 1) 9 / 22

14 Outline Bruteforce search Backtracking Branch and Bound Example: 4 Queens Problem Bruteforce: `16 4 = 43, 68; 1 in row : 4 4 = 256; 1 in row/column : 4! = 24 Step 1: Instantiate Queen 1 position (1 st out of 4) Step 2: Instantiate Queen 2 position (1 st out of 2) Step 3: Backtracking (no position for Queen 3) Step 4: Instantiate Queen 2 position (2 nd out of 2) Step 5: Instantiate Queen 3 position (1 st out of 1) Step 6: Backtracking (no position for Queens 42) Step 7: Instantiate Queen 1 position (2 nd out of 4) Step 8: Instantiate Queen 2 position (1 st out of 1) Step 9: Instantiate Queen 3 position (1 st out of 1) Step 1: Instantiate Queen 4 position (1 st out of 1) 9 / 22

15 Outline Bruteforce search Backtracking Branch and Bound Example: 4 Queens Problem Bruteforce: `16 4 = 43, 68; 1 in row : 4 4 = 256; 1 in row/column : 4! = 24 Step 1: Instantiate Queen 1 position (1 st out of 4) Step 2: Instantiate Queen 2 position (1 st out of 2) Step 3: Backtracking (no position for Queen 3) Step 4: Instantiate Queen 2 position (2 nd out of 2) Step 5: Instantiate Queen 3 position (1 st out of 1) Step 6: Backtracking (no position for Queens 42) Step 7: Instantiate Queen 1 position (2 nd out of 4) Step 8: Instantiate Queen 2 position (1 st out of 1) Step 9: Instantiate Queen 3 position (1 st out of 1) Step 1: Instantiate Queen 4 position (1 st out of 1) 9 / 22

16 Outline Bruteforce search Backtracking Branch and Bound Example: 4 Queens Problem Bruteforce: `16 4 = 43, 68; 1 in row : 4 4 = 256; 1 in row/column : 4! = 24 Step 1: Instantiate Queen 1 position (1 st out of 4) Step 2: Instantiate Queen 2 position (1 st out of 2) Step 3: Backtracking (no position for Queen 3) Step 4: Instantiate Queen 2 position (2 nd out of 2) Step 5: Instantiate Queen 3 position (1 st out of 1) Step 6: Backtracking (no position for Queens 42) Step 7: Instantiate Queen 1 position (2 nd out of 4) Step 8: Instantiate Queen 2 position (1 st out of 1) Step 9: Instantiate Queen 3 position (1 st out of 1) Step 1: Instantiate Queen 4 position (1 st out of 1) 9 / 22

17 Outline Bruteforce search Backtracking Branch and Bound Example: 4 Queens Problem Bruteforce: `16 4 = 43, 68; 1 in row : 4 4 = 256; 1 in row/column : 4! = 24 Step 1: Instantiate Queen 1 position (1 st out of 4) Step 2: Instantiate Queen 2 position (1 st out of 2) Step 3: Backtracking (no position for Queen 3) Step 4: Instantiate Queen 2 position (2 nd out of 2) Step 5: Instantiate Queen 3 position (1 st out of 1) Step 6: Backtracking (no position for Queens 42) Step 7: Instantiate Queen 1 position (2 nd out of 4) Step 8: Instantiate Queen 2 position (1 st out of 1) Step 9: Instantiate Queen 3 position (1 st out of 1) Step 1: Instantiate Queen 4 position (1 st out of 1) 9 / 22

18 Outline Bruteforce search Backtracking Branch and Bound Example: 4 Queens Problem Bruteforce: `16 4 = 43, 68; 1 in row : 4 4 = 256; 1 in row/column : 4! = 24 Step 1: Instantiate Queen 1 position (1 st out of 4) Step 2: Instantiate Queen 2 position (1 st out of 2) Step 3: Backtracking (no position for Queen 3) Step 4: Instantiate Queen 2 position (2 nd out of 2) Step 5: Instantiate Queen 3 position (1 st out of 1) Step 6: Backtracking (no position for Queens 42) Step 7: Instantiate Queen 1 position (2 nd out of 4) Step 8: Instantiate Queen 2 position (1 st out of 1) Step 9: Instantiate Queen 3 position (1 st out of 1) Step 1: Instantiate Queen 4 position (1 st out of 1) 9 / 22

19 Outline Bruteforce search Backtracking Branch and Bound Example: 4 Queens Problem Bruteforce: `16 4 = 43, 68; 1 in row : 4 4 = 256; 1 in row/column : 4! = 24 Step 1: Instantiate Queen 1 position (1 st out of 4) Step 2: Instantiate Queen 2 position (1 st out of 2) Step 3: Backtracking (no position for Queen 3) Step 4: Instantiate Queen 2 position (2 nd out of 2) Step 5: Instantiate Queen 3 position (1 st out of 1) Step 6: Backtracking (no position for Queens 42) Step 7: Instantiate Queen 1 position (2 nd out of 4) Step 8: Instantiate Queen 2 position (1 st out of 1) Step 9: Instantiate Queen 3 position (1 st out of 1) Step 1: Instantiate Queen 4 position (1 st out of 1) 9 / 22

20 Outline Bruteforce search Backtracking Branch and Bound Backtracking Exemplified by the n Queens Problem Algoritm Positions to check for n = 8 ( Bruteforce 64 ) 8 = 4, 426, 165, 368 One per row 8 8 = 16, 777, 216 One per row and column 8! = 4, 32 Backtracking 2,57 n unique ,787 92,333 distinct ,68 14,2 73,712 Backtracking is just depthfirst search (DFS) on an implicit graph of configurations Can easily iterate through all subsets or permutations of a set Ensures correctness by enumerating all possibilities However, to be efficient, it must prune the search space 1 / 22

21 Outline Bruteforce search Backtracking Branch and Bound Backtracking as DFS (for the 4 Queens Example) Step: 1 Position:,, 1, 2, 3, start, 1 1, 1 2, 1 3, 1, 2 1, 2 2, 2 3, 2, 3 1, 3 2, 3 3, 3,, 1 1, 1, 1 1, 2 1, 3 1, 1, 1 1, 2 1, 3 x x x x x 2, 2, 1 2, 2 2, 3 2, 2, 1 2, 2 2, 3 x x x x x x x 2, 3, 3, 1 3, 2 3, 3 3, 3, 1 3, 2 x x x x x x 11 / 22

22 Outline Bruteforce search Backtracking Branch and Bound Backtracking as DFS (for the 4 Queens Example) Step: 1 2 Position:, 1,2, 1, 2, 3, start, 1 1, 1 2, 1 3, 1, 2 1, 2 2, 2 3, 2, 3 1, 3 2, 3 3, 3,, 1 1, 1, 1 1, 2 1, 3 1, 1, 1 1, 2 1, 3 x x x x x 2, 2, 1 2, 2 2, 3 2, 2, 1 2, 2 2, 3 x x x x x x x 2, 3, 3, 1 3, 2 3, 3 3, 3, 1 3, 2 x x x x x x 11 / 22

23 Outline Bruteforce search Backtracking Branch and Bound Backtracking as DFS (for the 4 Queens Example) Step: Position:, 1,2 BT, 1, 2, 3, start, 1 1, 1 2, 1 3, 1, 2 1, 2 2, 2 3, 2, 3 1, 3 2, 3 3, 3,, 1 1, 1, 1 1, 2 1, 3 1, 1, 1 1, 2 1, 3 x x x x x 2, 2, 1 2, 2 2, 3 2, 2, 1 2, 2 2, 3 x x x x x x x 2, 3, 3, 1 3, 2 3, 3 3, 3, 1 3, 2 x x x x x x 11 / 22

24 Outline Bruteforce search Backtracking Branch and Bound Backtracking as DFS (for the 4 Queens Example) Step: Position:, 1,2 BT 1,3, 1, 2, 3, start, 1 1, 1 2, 1 3, 1, 2 1, 2 2, 2 3, 2, 3 1, 3 2, 3 3, 3,, 1 1, 1, 1 1, 2 1, 3 1, 1, 1 1, 2 1, 3 x x x x x 2, 2, 1 2, 2 2, 3 2, 2, 1 2, 2 2, 3 x x x x x x x 2, 3, 3, 1 3, 2 3, 3 3, 3, 1 3, 2 x x x x x x 11 / 22

25 Outline Bruteforce search Backtracking Branch and Bound Backtracking as DFS (for the 4 Queens Example) Step: Position:, 1,2 BT 1,3 2,1, 1, 2, 3, start, 1 1, 1 2, 1 3, 1, 2 1, 2 2, 2 3, 2, 3 1, 3 2, 3 3, 3,, 1 1, 1, 1 1, 2 1, 3 1, 1, 1 1, 2 1, 3 x x x x x 2, 2, 1 2, 2 2, 3 2, 2, 1 2, 2 2, 3 x x x x x x x 2, 3, 3, 1 3, 2 3, 3 3, 3, 1 3, 2 x x x x x x 11 / 22

26 Outline Bruteforce search Backtracking Branch and Bound Backtracking as DFS (for the 4 Queens Example) Step: Position:, 1,2 BT 1,3 2,1 BT, 1, 2, 3, start, 1 1, 1 2, 1 3, 1, 2 1, 2 2, 2 3, 2, 3 1, 3 2, 3 3, 3,, 1 1, 1, 1 1, 2 1, 3 1, 1, 1 1, 2 1, 3 x x x x x 2, 2, 1 2, 2 2, 3 2, 2, 1 2, 2 2, 3 x x x x x x x 2, 3, 3, 1 3, 2 3, 3 3, 3, 1 3, 2 x x x x x x 11 / 22

27 Outline Bruteforce search Backtracking Branch and Bound Backtracking as DFS (for the 4 Queens Example) Step: Position:, 1,2 BT 1,3 2,1 BT,1, 1, 2, 3, start, 1 1, 1 2, 1 3, 1, 2 1, 2 2, 2 3, 2, 3 1, 3 2, 3 3, 3,, 1 1, 1, 1 1, 2 1, 3 1, 1, 1 1, 2 1, 3 x x x x x 2, 2, 1 2, 2 2, 3 2, 2, 1 2, 2 2, 3 x x x x x x x 2, 3, 3, 1 3, 2 3, 3 3, 3, 1 3, 2 x x x x x x 11 / 22

28 Outline Bruteforce search Backtracking Branch and Bound Backtracking as DFS (for the 4 Queens Example) Step: Position:, 1,2 BT 1,3 2,1 BT,1 1,3, 1, 2, 3, start, 1 1, 1 2, 1 3, 1, 2 1, 2 2, 2 3, 2, 3 1, 3 2, 3 3, 3,, 1 1, 1, 1 1, 2 1, 3 1, 1, 1 1, 2 1, 3 x x x x x 2, 2, 1 2, 2 2, 3 2, 2, 1 2, 2 2, 3 x x x x x x x 2, 3, 3, 1 3, 2 3, 3 3, 3, 1 3, 2 x x x x x x 11 / 22

29 Outline Bruteforce search Backtracking Branch and Bound Backtracking as DFS (for the 4 Queens Example) Step: Position:, 1,2 BT 1,3 2,1 BT,1 1,3 2,, 1, 2, 3, start, 1 1, 1 2, 1 3, 1, 2 1, 2 2, 2 3, 2, 3 1, 3 2, 3 3, 3,, 1 1, 1, 1 1, 2 1, 3 1, 1, 1 1, 2 1, 3 x x x x x 2, 2, 1 2, 2 2, 3 2, 2, 1 2, 2 2, 3 x x x x x x x 2, 3, 3, 1 3, 2 3, 3 3, 3, 1 3, 2 x x x x x x 11 / 22

30 Outline Bruteforce search Backtracking Branch and Bound Backtracking as DFS (for the 4 Queens Example) Step: Position:, 1,2 BT 1,3 2,1 BT,1 1,3 2, 3,2, 1, 2, 3, start, 1 1, 1 2, 1 3, 1, 2 1, 2 2, 2 3, 2, 3 1, 3 2, 3 3, 3,, 1 1, 1, 1 1, 2 1, 3 1, 1, 1 1, 2 1, 3 x x x x x 2, 2, 1 2, 2 2, 3 2, 2, 1 2, 2 2, 3 x x x x x x x 2, 3, 3, 1 3, 2 3, 3 3, 3, 1 3, 2 x x x x x x 11 / 22

31 Outline Bruteforce search Backtracking Branch and Bound Standard Backtracking: Major Drawbacks Thrashing (repeated failure due to the same reason) Without identification of conflicting variables, search in different parts of the space keeps failing for the same reason Intelligent backtracking: returning directly to the variable that caused the failure Redundant work Even if the conflicting values of variables are identified during the intelligent backtracking, they are not remembered for subsequent immediate conflict detection Dependencydirected backtracking eliminates both above drawbacks Too late detection of the conflict Applying consistency techniques to forward check the possible future conflicts 12 / 22

32 Outline Bruteforce search Backtracking Branch and Bound Backtracking vs. BranchandBound Backtracking: Depthfirst search (DFS) with pruning for systematic enumeration of the space of all candidate solutions Branchandbound: Breadthfirst search (BFS) with pruning Performs better for many optimisation problems Example: min x S f(x) minimise an objective function f(x) of variables x = (x 1,..., x n ) over a region of feasible solutions S Typical constraints: discrete x i X = {α 1,..., α K}; S = X n DFS through K n solutions (α 1, α 1,..., α 1 ), (α 2, α 1,..., α 1 ),..., (α K, α K,..., α K ) DFS: Pruning and backtracking if the subsequence (x 1,..., x k ) cannot be continued due to the problem constraints BFS: Looking first through all α k X for x 1, then for x 2, etc. BFS: Pruning by finding at each level i bounds for the objective function, which do not depend on the values assigned to the remaining variables (x i+1,..., x n ) 13 / 22

33 Outline Bruteforce search Backtracking Branch and Bound BranchandBound (B&B): Basic Principles B&B is an algorithm paradigm to be filled out for each problem Splitting (branching) and bounding to discard large subsets of fruitless candidates Branching divides a set S of candidates into two or more smaller sets such that their union covers S Recursive branching defines the search tree whose nodes are the subsets of S Bounding computes upper and lower bounds for the objectivel function Pruning for minimisation: if the lower bound for some tree node (set of candidates) q i is greater than the upper bound for some other node q k, then q i and all its descendants may be discarded 14 / 22

34 Outline Bruteforce search Backtracking Branch and Bound BranchandBound (B&B): Basic Principles B&B searches through a dynamically built search tree Root node the initial problem to be solved, e.g. min x S f(x) Each other node a subproblem of the initial problem Children of a node q are subproblems derived from q through imposing a new constraint for each subproblem Descendants of the node q subproblems satisfying the same constraints as q and additionally a number of others Leaves the feasible solutions (the exponential number of the leaves for an NPhard problem) Bounding function b(x) associates the bound to each node: b(q i ) f(q i ) for all nodes q i in the tree b(q i ) = f(q i ) for all leaves in the tree b(q i ) b(q j ) if q j is the parent of q i By J. Clausen: Branch and bound algorithms: Principles and examples. Copenhagen, / 22

35 Outline Bruteforce search Backtracking Branch and Bound NPHard Integer 1 Knapsack Problem Maximise Total Value of Objects in a Knapsack Given: 1 a knapsack of a limited size S and 2 a set Ω = {ω 1,..., ω n } of n objects of size s i and value v i each; i = 1,..., n, Select a most valuable subset of the objects to place into the knapsack: { n } n V = max x i v i x i s i S (x 1,...,x n) {,1} n i=1 The 1 constraint x i {, 1} for the indicator variables: only the whole object ω i can be placed into the knapsack i=1 16 / 22

36 Outline Bruteforce search Backtracking Branch and Bound Relaxed 1 Knapsack Problem Relaxed, or fractional problem is much simpler: { n V = x i v i x 1,..., x n 1; max (x 1,...,x n) [,1] n i=1 } n x i s i S i=1 The relaxation implies that V V The optimal solution of the relaxed problem is an upper bound for the optimal solution of the original problem with integer x i {, 1} For a fixed integer subsequence x 1,..., x i, such that i j=1 x is i < S, the solution with the relaxed remaining variables x i+1,..., x n is an upper bound for the optimal solution of the original problem constrained by fixing the indicators x 1,..., x i 17 / 22

37 Outline Bruteforce search Backtracking Branch and Bound Relaxed Knapsack Problem: Greedy Algorithm 1 Sort the objects by decreasing value density η i = v i s i 2 Set x i = 1 for the top k objects: k i=1 s i S < k+1 ( 3 Set x k+1 = 1 s k+1 S ) k i=1 s k 4 The solution V = k i=1 v i + x k+1 v k+1 i=1 s i Example: S = 11; n = 5; Object i Value v i Size s i Density η i = vi s i Solution of the relaxed problem (the upper bound for the 1 one): x = ( x 1 =, x 2 =, x 3 = 1, x 4 = 1 6, x 5 = 1 ) V = = 56.5; S = = / 22

38 Outline Bruteforce search Backtracking Branch and Bound B&B Solution: State Space Tree Information associated with a tree node q: Total current value V c:q in the knapsack s contents Total current size S c:q of the knapsack s contents Max potential value V p:q (bound) the knapsack can hold The root the empty knapsack: V c: = S c: = ; V p: = V The nodes q at level i for the indicators x i = 1 and x i = Constraint: the first i items have been already considered Greedy solution V p:q with the already selected x 1,...,x i V c:q = P i j=1 xivi; Sc:q = P i j=1 xisi Each of the remaining objects ω i+1,..., ω n is placed onebyone until the object ω k is too big w.r.t. the available size: k 1 X j=i+1 s j S S c:q < kx j=i+1 s j V p:q = V c:q+ k 1 X j=i+1 v j+ S S c:q k 1 P s k j=i+1 s j! v k 19 / 22

39 Outline Bruteforce search Backtracking Branch and Bound B&B Solution: State Space Tree Fractional amount of the first too big object, ω k, determines the potential greedy maximum, being the upper bound of the goal one: S c:q = i x j s j ; V c:q = i x j v j ; k k 1 s j < S S c:q < k j=1 i=1 V p:q = V c:q + k 1 j=i+1 v i + j=i+1 S S k 1 P c:q s j j=i+1 s k v k s j j=i+1 start x 1 = 1 x 1 = (i = 1) x 2 = 1 x 2 = x 2 = 1 x 2 = (i = 2) 2 / 22

40 Outline Bruteforce search Backtracking Branch and Bound Example: B&B Solution for the 1 Knapsack i v i s i η i q S c:q : V c:q : V p:q : : : 18 : 56.5 x : 53 : 56.5 x 5 1 : : 49 : 18 : 45!X 45<53!X 49<53 x 4 1!X Sc:q=16>11 1 : 53 : 56.5 x 2 1!X Sc:q=12>11 1 : 53 : 56.5 x : 54 : 56.5!X 53<54 21 / 22

41 Outline Bruteforce search Backtracking Branch and Bound Example: B&B Solution for the 1 Knapsack i v i s i η i q S c:q : V c:q : V p:q : : : 18 : 56.5 x : 53 : 56.5 x 5 1 : : 49 : 18 : 45!X 45<53!X 49<53 x 4 1!X Sc:q=16>11 1 : 53 : 56.5 x 2 1!X Sc:q=12>11 1 : 53 : 56.5 x : 54 : 56.5!X 53<54 21 / 22

42 Outline Bruteforce search Backtracking Branch and Bound Example: B&B Solution for the 1 Knapsack i v i s i η i q S c:q : V c:q : V p:q : : : 18 : 56.5 x : 53 : 56.5 x 5 1 : : 49 : 18 : 45!X 45<53!X 49<53 x 4 1!X Sc:q=16>11 1 : 53 : 56.5 x 2 1!X Sc:q=12>11 1 : 53 : 56.5 x : 54 : 56.5!X 53<54 21 / 22

43 Outline Bruteforce search Backtracking Branch and Bound Example: B&B Solution for the 1 Knapsack i v i s i η i q S c:q : V c:q : V p:q : : : 18 : 56.5 x : 53 : 56.5 x 5 1 : : 49 : 18 : 45!X 45<53!X 49<53 x 4 1!X Sc:q=16>11 1 : 53 : 56.5 x 2 1!X Sc:q=12>11 1 : 53 : 56.5 x : 54 : 56.5!X 53<54 21 / 22

44 Outline Bruteforce search Backtracking Branch and Bound Example: B&B Solution for the 1 Knapsack i v i s i η i q S c:q : V c:q : V p:q : : : 18 : 56.5 x : 53 : 56.5 x 5 1 : : 49 : 18 : 45!X 45<53!X 49<53 x 4 1!X Sc:q=16>11 1 : 53 : 56.5 x 2 1!X Sc:q=12>11 1 : 53 : 56.5 x : 54 : 56.5!X 53<54 21 / 22

45 Outline Bruteforce search Backtracking Branch and Bound Example: B&B Solution for the 1 Knapsack i v i s i η i q S c:q : V c:q : V p:q : : : 18 : 56.5 x : 53 : 56.5 x 5 1 : : 49 : 18 : 45!X 45<53!X 49<53 x 4 1!X Sc:q=16>11 1 : 53 : 56.5 x 2 1!X Sc:q=12>11 1 : 53 : 56.5 x : 54 : 56.5!X 53<54 21 / 22

46 Outline Bruteforce search Backtracking Branch and Bound Example: B&B Solution for the 1 Knapsack i v i s i η i q S c:q : V c:q : V p:q : : : 18 : 56.5 x : 53 : 56.5 x 5 1 : : 49 : 18 : 45!X 45<53!X 49<53 x 4 1!X Sc:q=16>11 1 : 53 : 56.5 x 2 1!X Sc:q=12>11 1 : 53 : 56.5 x : 54 : 56.5!X 53<54 21 / 22

47 Outline Bruteforce search Backtracking Branch and Bound Example: B&B Solution for the 1 Knapsack i v i s i η i q S c:q : V c:q : V p:q : : : 18 : 56.5 x : 53 : 56.5 x 5 1 : : 49 : 18 : 45!X 45<53!X 49<53 x 4 1!X Sc:q=16>11 1 : 53 : 56.5 x 2 1!X Sc:q=12>11 1 : 53 : 56.5 x : 54 : 56.5!X 53<54 21 / 22

48 Outline Bruteforce search Backtracking Branch and Bound 1 Knapsack Example: B&B Vs. Backtracking Backtracking uses the DFS with the same state space tree as B&B Pruning of nonpromising nodes in backtracking: if the search cannot proceed to one of the node s children without exceeding the maximum knapsack size S Backtracking in the example: analysing 49 nodes out of 63 nodes 63 tree nodes in total (2 6 1) Pruning: 14 nodes (by the constraint 5 i=1 x is i < 11) Branchandboundin the example: analysing only 11 nodes out of 63 nodes Although both algorithms have exponential complexity, the B&B search is faster due to more diverse pruning 22 / 22

5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1

5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1 5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1 General Integer Linear Program: (ILP) min c T x Ax b x 0 integer Assumption: A, b integer The integrality condition

More information

A Constraint Programming based Column Generation Approach to Nurse Rostering Problems

A Constraint Programming based Column Generation Approach to Nurse Rostering Problems Abstract A Constraint Programming based Column Generation Approach to Nurse Rostering Problems Fang He and Rong Qu The Automated Scheduling, Optimisation and Planning (ASAP) Group School of Computer Science,

More information

Dynamic programming. Doctoral course Optimization on graphs - Lecture 4.1. Giovanni Righini. January 17 th, 2013

Dynamic programming. Doctoral course Optimization on graphs - Lecture 4.1. Giovanni Righini. January 17 th, 2013 Dynamic programming Doctoral course Optimization on graphs - Lecture.1 Giovanni Righini January 1 th, 201 Implicit enumeration Combinatorial optimization problems are in general NP-hard and we usually

More information

Integrating Benders decomposition within Constraint Programming

Integrating Benders decomposition within Constraint Programming Integrating Benders decomposition within Constraint Programming Hadrien Cambazard, Narendra Jussien email: {hcambaza,jussien}@emn.fr École des Mines de Nantes, LINA CNRS FRE 2729 4 rue Alfred Kastler BP

More information

Smart Graphics: Methoden 3 Suche, Constraints

Smart Graphics: Methoden 3 Suche, Constraints Smart Graphics: Methoden 3 Suche, Constraints Vorlesung Smart Graphics LMU München Medieninformatik Butz/Boring Smart Graphics SS2007 Methoden: Suche 2 Folie 1 Themen heute Suchverfahren Hillclimbing Simulated

More information

Branch-and-Price Approach to the Vehicle Routing Problem with Time Windows

Branch-and-Price Approach to the Vehicle Routing Problem with Time Windows TECHNISCHE UNIVERSITEIT EINDHOVEN Branch-and-Price Approach to the Vehicle Routing Problem with Time Windows Lloyd A. Fasting May 2014 Supervisors: dr. M. Firat dr.ir. M.A.A. Boon J. van Twist MSc. Contents

More information

INTEGER PROGRAMMING. Integer Programming. Prototype example. BIP model. BIP models

INTEGER PROGRAMMING. Integer Programming. Prototype example. BIP model. BIP models Integer Programming INTEGER PROGRAMMING In many problems the decision variables must have integer values. Example: assign people, machines, and vehicles to activities in integer quantities. If this is

More information

Y. Xiang, Constraint Satisfaction Problems

Y. Xiang, Constraint Satisfaction Problems Constraint Satisfaction Problems Objectives Constraint satisfaction problems Backtracking Iterative improvement Constraint propagation Reference Russell & Norvig: Chapter 5. 1 Constraints Constraints are

More information

24. The Branch and Bound Method

24. The Branch and Bound Method 24. The Branch and Bound Method It has serious practical consequences if it is known that a combinatorial problem is NP-complete. Then one can conclude according to the present state of science that no

More information

Scheduling Home Health Care with Separating Benders Cuts in Decision Diagrams

Scheduling Home Health Care with Separating Benders Cuts in Decision Diagrams Scheduling Home Health Care with Separating Benders Cuts in Decision Diagrams André Ciré University of Toronto John Hooker Carnegie Mellon University INFORMS 2014 Home Health Care Home health care delivery

More information

Recovery of primal solutions from dual subgradient methods for mixed binary linear programming; a branch-and-bound approach

Recovery of primal solutions from dual subgradient methods for mixed binary linear programming; a branch-and-bound approach MASTER S THESIS Recovery of primal solutions from dual subgradient methods for mixed binary linear programming; a branch-and-bound approach PAULINE ALDENVIK MIRJAM SCHIERSCHER Department of Mathematical

More information

Scheduling Single Machine Scheduling. Tim Nieberg

Scheduling Single Machine Scheduling. Tim Nieberg Scheduling Single Machine Scheduling Tim Nieberg Single machine models Observation: for non-preemptive problems and regular objectives, a sequence in which the jobs are processed is sufficient to describe

More information

Chapter 13: Binary and Mixed-Integer Programming

Chapter 13: Binary and Mixed-Integer Programming Chapter 3: Binary and Mixed-Integer Programming The general branch and bound approach described in the previous chapter can be customized for special situations. This chapter addresses two special situations:

More information

Single machine models: Maximum Lateness -12- Approximation ratio for EDD for problem 1 r j,d j < 0 L max. structure of a schedule Q...

Single machine models: Maximum Lateness -12- Approximation ratio for EDD for problem 1 r j,d j < 0 L max. structure of a schedule Q... Lecture 4 Scheduling 1 Single machine models: Maximum Lateness -12- Approximation ratio for EDD for problem 1 r j,d j < 0 L max structure of a schedule 0 Q 1100 11 00 11 000 111 0 0 1 1 00 11 00 11 00

More information

1.204 Lecture 10. Greedy algorithms: Job scheduling. Greedy method

1.204 Lecture 10. Greedy algorithms: Job scheduling. Greedy method 1.204 Lecture 10 Greedy algorithms: Knapsack (capital budgeting) Job scheduling Greedy method Local improvement method Does not look at problem globally Takes best immediate step to find a solution Useful

More information

Introduction & Overview

Introduction & Overview ID2204: Constraint Programming Introduction & Overview Lecture 01, Christian Schulte cschulte@kth.se Software and Computer Systems School of Information and Communication Technology KTH Royal Institute

More information

2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]

2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8] Code No: R05220502 Set No. 1 1. (a) Describe the performance analysis in detail. (b) Show that f 1 (n)+f 2 (n) = 0(max(g 1 (n), g 2 (n)) where f 1 (n) = 0(g 1 (n)) and f 2 (n) = 0(g 2 (n)). [8+8] 2. (a)

More information

A Branch and Bound Algorithm for Solving the Binary Bi-level Linear Programming Problem

A Branch and Bound Algorithm for Solving the Binary Bi-level Linear Programming Problem A Branch and Bound Algorithm for Solving the Binary Bi-level Linear Programming Problem John Karlof and Peter Hocking Mathematics and Statistics Department University of North Carolina Wilmington Wilmington,

More information

Approximation Algorithms

Approximation Algorithms Approximation Algorithms or: How I Learned to Stop Worrying and Deal with NP-Completeness Ong Jit Sheng, Jonathan (A0073924B) March, 2012 Overview Key Results (I) General techniques: Greedy algorithms

More information

The Problem of Scheduling Technicians and Interventions in a Telecommunications Company

The Problem of Scheduling Technicians and Interventions in a Telecommunications Company The Problem of Scheduling Technicians and Interventions in a Telecommunications Company Sérgio Garcia Panzo Dongala November 2008 Abstract In 2007 the challenge organized by the French Society of Operational

More information

Distributed and Scalable QoS Optimization for Dynamic Web Service Composition

Distributed and Scalable QoS Optimization for Dynamic Web Service Composition Distributed and Scalable QoS Optimization for Dynamic Web Service Composition Mohammad Alrifai L3S Research Center Leibniz University of Hannover, Germany alrifai@l3s.de Supervised by: Prof. Dr. tech.

More information

Keywords: Power Transmission Networks, Maintenance Scheduling problem, Hybrid Constraint Methods, Constraint Programming

Keywords: Power Transmission Networks, Maintenance Scheduling problem, Hybrid Constraint Methods, Constraint Programming SCHEDULING MAINTENANCE ACTIVITIES OF ELECTRIC POWER TRANSMISSION NETWORKS USING AN HYBRID CONSTRAINT METHOD Nuno Gomes, Raul Pinheiro, ZitaVale, Carlos Ramos GECAD Knowledge Engineering and Decision Support

More information

A hybrid approach for solving real-world nurse rostering problems

A hybrid approach for solving real-world nurse rostering problems Presentation at CP 2011: A hybrid approach for solving real-world nurse rostering problems Martin Stølevik (martin.stolevik@sintef.no) Tomas Eric Nordlander (tomas.nordlander@sintef.no) Atle Riise (atle.riise@sintef.no)

More information

Load Balancing. Load Balancing 1 / 24

Load Balancing. Load Balancing 1 / 24 Load Balancing Backtracking, branch & bound and alpha-beta pruning: how to assign work to idle processes without much communication? Additionally for alpha-beta pruning: implementing the young-brothers-wait

More information

A Constraint-Based Method for Project Scheduling with Time Windows

A Constraint-Based Method for Project Scheduling with Time Windows A Constraint-Based Method for Project Scheduling with Time Windows Amedeo Cesta 1 and Angelo Oddi 1 and Stephen F. Smith 2 1 ISTC-CNR, National Research Council of Italy Viale Marx 15, I-00137 Rome, Italy,

More information

Near Optimal Solutions

Near Optimal Solutions Near Optimal Solutions Many important optimization problems are lacking efficient solutions. NP-Complete problems unlikely to have polynomial time solutions. Good heuristics important for such problems.

More information

Enumerating possible Sudoku grids

Enumerating possible Sudoku grids Enumerating possible Sudoku grids Bertram Felgenhauer Department of Computer Science TU Dresden 00 Dresden Germany bf@mail.inf.tu-dresden.de Frazer Jarvis Department of Pure Mathematics University of Sheffield,

More information

Warshall s Algorithm: Transitive Closure

Warshall s Algorithm: Transitive Closure CS 0 Theory of Algorithms / CS 68 Algorithms in Bioinformaticsi Dynamic Programming Part II. Warshall s Algorithm: Transitive Closure Computes the transitive closure of a relation (Alternatively: all paths

More information

Introduction Solvability Rules Computer Solution Implementation. Connect Four. March 9, 2010. Connect Four

Introduction Solvability Rules Computer Solution Implementation. Connect Four. March 9, 2010. Connect Four March 9, 2010 is a tic-tac-toe like game in which two players drop discs into a 7x6 board. The first player to get four in a row (either vertically, horizontally, or diagonally) wins. The game was first

More information

The truck scheduling problem at cross-docking terminals

The truck scheduling problem at cross-docking terminals The truck scheduling problem at cross-docking terminals Lotte Berghman,, Roel Leus, Pierre Lopez To cite this version: Lotte Berghman,, Roel Leus, Pierre Lopez. The truck scheduling problem at cross-docking

More information

Efficient Data Structures for Decision Diagrams

Efficient Data Structures for Decision Diagrams Artificial Intelligence Laboratory Efficient Data Structures for Decision Diagrams Master Thesis Nacereddine Ouaret Professor: Supervisors: Boi Faltings Thomas Léauté Radoslaw Szymanek Contents Introduction...

More information

Analysis of Algorithms I: Optimal Binary Search Trees

Analysis of Algorithms I: Optimal Binary Search Trees Analysis of Algorithms I: Optimal Binary Search Trees Xi Chen Columbia University Given a set of n keys K = {k 1,..., k n } in sorted order: k 1 < k 2 < < k n we wish to build an optimal binary search

More information

Backdoors to Combinatorial Optimization: Feasibility and Optimality

Backdoors to Combinatorial Optimization: Feasibility and Optimality Backdoors to Combinatorial Optimization: Feasibility and Optimality Bistra Dilkina, Carla P. Gomes, Yuri Malitsky 2, Ashish Sabharwal, and Meinolf Sellmann 2 Department of Computer Science, Cornell University,

More information

MapReduce and Distributed Data Analysis. Sergei Vassilvitskii Google Research

MapReduce and Distributed Data Analysis. Sergei Vassilvitskii Google Research MapReduce and Distributed Data Analysis Google Research 1 Dealing With Massive Data 2 2 Dealing With Massive Data Polynomial Memory Sublinear RAM Sketches External Memory Property Testing 3 3 Dealing With

More information

In this paper we present a branch-and-cut algorithm for

In this paper we present a branch-and-cut algorithm for SOLVING A TRUCK DISPATCHING SCHEDULING PROBLEM USING BRANCH-AND-CUT ROBERT E. BIXBY Rice University, Houston, Texas EVA K. LEE Georgia Institute of Technology, Atlanta, Georgia (Received September 1994;

More information

Sport Timetabling. Outline DM87 SCHEDULING, TIMETABLING AND ROUTING. Outline. Lecture 15. 1. Problem Definitions

Sport Timetabling. Outline DM87 SCHEDULING, TIMETABLING AND ROUTING. Outline. Lecture 15. 1. Problem Definitions Outline DM87 SCHEDULING, TIMETABLING AND ROUTING Lecture 15 Sport Timetabling 1. Problem Definitions Marco Chiarandini DM87 Scheduling, Timetabling and Routing 2 Problems we treat: single and double round-robin

More information

Measuring the Performance of an Agent

Measuring the Performance of an Agent 25 Measuring the Performance of an Agent The rational agent that we are aiming at should be successful in the task it is performing To assess the success we need to have a performance measure What is rational

More information

AI: A Modern Approach, Chpts. 3-4 Russell and Norvig

AI: A Modern Approach, Chpts. 3-4 Russell and Norvig AI: A Modern Approach, Chpts. 3-4 Russell and Norvig Sequential Decision Making in Robotics CS 599 Geoffrey Hollinger and Gaurav Sukhatme (Some slide content from Stuart Russell and HweeTou Ng) Spring,

More information

A Note on Maximum Independent Sets in Rectangle Intersection Graphs

A Note on Maximum Independent Sets in Rectangle Intersection Graphs A Note on Maximum Independent Sets in Rectangle Intersection Graphs Timothy M. Chan School of Computer Science University of Waterloo Waterloo, Ontario N2L 3G1, Canada tmchan@uwaterloo.ca September 12,

More information

Multiple Spanning Tree Protocol (MSTP), Multi Spreading And Network Optimization Model

Multiple Spanning Tree Protocol (MSTP), Multi Spreading And Network Optimization Model Load Balancing of Telecommunication Networks based on Multiple Spanning Trees Dorabella Santos Amaro de Sousa Filipe Alvelos Instituto de Telecomunicações 3810-193 Aveiro, Portugal dorabella@av.it.pt Instituto

More information

Subgraph Patterns: Network Motifs and Graphlets. Pedro Ribeiro

Subgraph Patterns: Network Motifs and Graphlets. Pedro Ribeiro Subgraph Patterns: Network Motifs and Graphlets Pedro Ribeiro Analyzing Complex Networks We have been talking about extracting information from networks Some possible tasks: General Patterns Ex: scale-free,

More information

The Bi-Objective Pareto Constraint

The Bi-Objective Pareto Constraint The Bi-Objective Pareto Constraint Renaud Hartert and Pierre Schaus UCLouvain, ICTEAM, Place Sainte Barbe 2, 1348 Louvain-la-Neuve, Belgium {renaud.hartert,pierre.schaus}@uclouvain.be Abstract. Multi-Objective

More information

A Constraint Programming Application for Rotating Workforce Scheduling

A Constraint Programming Application for Rotating Workforce Scheduling A Constraint Programming Application for Rotating Workforce Scheduling Markus Triska and Nysret Musliu Database and Artificial Intelligence Group Vienna University of Technology {triska,musliu}@dbai.tuwien.ac.at

More information

Research Paper Business Analytics. Applications for the Vehicle Routing Problem. Jelmer Blok

Research Paper Business Analytics. Applications for the Vehicle Routing Problem. Jelmer Blok Research Paper Business Analytics Applications for the Vehicle Routing Problem Jelmer Blok Applications for the Vehicle Routing Problem Jelmer Blok Research Paper Vrije Universiteit Amsterdam Faculteit

More information

Constraint Programming for Random Testing of a Trading System

Constraint Programming for Random Testing of a Trading System Constraint Programming for Random Testing of a Trading System Roberto Castañeda Lozano Master s thesis. Stockholm, January 28, 2010. School of Information and Communication Technology KTH Royal Institute

More information

Clustering and scheduling maintenance tasks over time

Clustering and scheduling maintenance tasks over time Clustering and scheduling maintenance tasks over time Per Kreuger 2008-04-29 SICS Technical Report T2008:09 Abstract We report results on a maintenance scheduling problem. The problem consists of allocating

More information

Distributed Aggregation in Cloud Databases. By: Aparna Tiwari tiwaria@umail.iu.edu

Distributed Aggregation in Cloud Databases. By: Aparna Tiwari tiwaria@umail.iu.edu Distributed Aggregation in Cloud Databases By: Aparna Tiwari tiwaria@umail.iu.edu ABSTRACT Data intensive applications rely heavily on aggregation functions for extraction of data according to user requirements.

More information

Efficient and Robust Allocation Algorithms in Clouds under Memory Constraints

Efficient and Robust Allocation Algorithms in Clouds under Memory Constraints Efficient and Robust Allocation Algorithms in Clouds under Memory Constraints Olivier Beaumont,, Paul Renaud-Goud Inria & University of Bordeaux Bordeaux, France 9th Scheduling for Large Scale Systems

More information

CHAPTER 9. Integer Programming

CHAPTER 9. Integer Programming CHAPTER 9 Integer Programming An integer linear program (ILP) is, by definition, a linear program with the additional constraint that all variables take integer values: (9.1) max c T x s t Ax b and x integral

More information

The Taxman Game. Robert K. Moniot September 5, 2003

The Taxman Game. Robert K. Moniot September 5, 2003 The Taxman Game Robert K. Moniot September 5, 2003 1 Introduction Want to know how to beat the taxman? Legally, that is? Read on, and we will explore this cute little mathematical game. The taxman game

More information

Scheduling Shop Scheduling. Tim Nieberg

Scheduling Shop Scheduling. Tim Nieberg Scheduling Shop Scheduling Tim Nieberg Shop models: General Introduction Remark: Consider non preemptive problems with regular objectives Notation Shop Problems: m machines, n jobs 1,..., n operations

More information

Algebra 2 Chapter 1 Vocabulary. identity - A statement that equates two equivalent expressions.

Algebra 2 Chapter 1 Vocabulary. identity - A statement that equates two equivalent expressions. Chapter 1 Vocabulary identity - A statement that equates two equivalent expressions. verbal model- A word equation that represents a real-life problem. algebraic expression - An expression with variables.

More information

Learning Example. Machine learning and our focus. Another Example. An example: data (loan application) The data and the goal

Learning Example. Machine learning and our focus. Another Example. An example: data (loan application) The data and the goal Learning Example Chapter 18: Learning from Examples 22c:145 An emergency room in a hospital measures 17 variables (e.g., blood pressure, age, etc) of newly admitted patients. A decision is needed: whether

More information

New Exact Solution Approaches for the Split Delivery Vehicle Routing Problem

New Exact Solution Approaches for the Split Delivery Vehicle Routing Problem New Exact Solution Approaches for the Split Delivery Vehicle Routing Problem Gizem Ozbaygin, Oya Karasan and Hande Yaman Department of Industrial Engineering, Bilkent University, Ankara, Turkey ozbaygin,

More information

Compact Representations and Approximations for Compuation in Games

Compact Representations and Approximations for Compuation in Games Compact Representations and Approximations for Compuation in Games Kevin Swersky April 23, 2008 Abstract Compact representations have recently been developed as a way of both encoding the strategic interactions

More information

Logic Cuts Generation in a Branch and Cut Framework for Location Problems Mara A. Osorio Lama School of Computer Science Autonomous University of Puebla, Puebla 72560 Mexico Rosalba Mujica Garca Abstract

More information

CSCE 310J Data Structures & Algorithms. Dynamic programming 0-1 Knapsack problem. Dynamic programming. Dynamic Programming. Knapsack problem (Review)

CSCE 310J Data Structures & Algorithms. Dynamic programming 0-1 Knapsack problem. Dynamic programming. Dynamic Programming. Knapsack problem (Review) CSCE J Data Structures & Algorithms Dynamic programming - Knapsac problem Dr. Steve Goddard goddard@cse.unl.edu CSCE J Data Structures & Algorithms Giving credit where credit is due:» Most of slides for

More information

Lecture 13: The Knapsack Problem

Lecture 13: The Knapsack Problem Lecture 13: The Knapsack Problem Outline of this Lecture Introduction of the 0-1 Knapsack Problem. A dynamic programming solution to this problem. 1 0-1 Knapsack Problem Informal Description: We have computed

More information

A Column-Generation and Branch-and-Cut Approach to the Bandwidth-Packing Problem

A Column-Generation and Branch-and-Cut Approach to the Bandwidth-Packing Problem [J. Res. Natl. Inst. Stand. Technol. 111, 161-185 (2006)] A Column-Generation and Branch-and-Cut Approach to the Bandwidth-Packing Problem Volume 111 Number 2 March-April 2006 Christine Villa and Karla

More information

5.1 Bipartite Matching

5.1 Bipartite Matching CS787: Advanced Algorithms Lecture 5: Applications of Network Flow In the last lecture, we looked at the problem of finding the maximum flow in a graph, and how it can be efficiently solved using the Ford-Fulkerson

More information

Protein Threading. Bioinformatics 404 DIKU Spring 2006

Protein Threading. Bioinformatics 404 DIKU Spring 2006 Protein Threading Bioinformatics 404 DIKU Spring 2006 Agenda Protein Threading in general Branch and bound Refresh Protein Threading with B&B Evaluation and optimization Performance Engbo Jørgensen & Leon

More information

Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li

Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li Computer Algorithms NP-Complete Problems NP-completeness The quest for efficient algorithms is about finding clever ways to bypass the process of exhaustive search, using clues from the input in order

More information

Noncommercial Software for Mixed-Integer Linear Programming

Noncommercial Software for Mixed-Integer Linear Programming Noncommercial Software for Mixed-Integer Linear Programming J. T. Linderoth T. K. Ralphs December, 2004. Revised: January, 2005. Abstract We present an overview of noncommercial software tools for the

More information

Optimization models for targeted offers in direct marketing: exact and heuristic algorithms

Optimization models for targeted offers in direct marketing: exact and heuristic algorithms Optimization models for targeted offers in direct marketing: exact and heuristic algorithms Fabrice Talla Nobibon, Roel Leus and Frits C.R. Spieksma {Fabrice.TallaNobibon; Roel.Leus; Frits.Spieksma}@econ.kuleuven.be

More information

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay Lecture - 17 Shannon-Fano-Elias Coding and Introduction to Arithmetic Coding

More information

Mathematics of Sudoku I

Mathematics of Sudoku I Mathematics of Sudoku I Bertram Felgenhauer Frazer Jarvis January, 00 Introduction Sudoku puzzles became extremely popular in Britain from late 00. Sudoku, or Su Doku, is a Japanese word (or phrase) meaning

More information

Chapter 15: Dynamic Programming

Chapter 15: Dynamic Programming Chapter 15: Dynamic Programming Dynamic programming is a general approach to making a sequence of interrelated decisions in an optimum way. While we can describe the general characteristics, the details

More information

Fairness in Routing and Load Balancing

Fairness in Routing and Load Balancing Fairness in Routing and Load Balancing Jon Kleinberg Yuval Rabani Éva Tardos Abstract We consider the issue of network routing subject to explicit fairness conditions. The optimization of fairness criteria

More information

Chapter 11. 11.1 Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling

Chapter 11. 11.1 Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling Approximation Algorithms Chapter Approximation Algorithms Q. Suppose I need to solve an NP-hard problem. What should I do? A. Theory says you're unlikely to find a poly-time algorithm. Must sacrifice one

More information

A Computer Application for Scheduling in MS Project

A Computer Application for Scheduling in MS Project Comput. Sci. Appl. Volume 1, Number 5, 2014, pp. 309-318 Received: July 18, 2014; Published: November 25, 2014 Computer Science and Applications www.ethanpublishing.com Anabela Tereso, André Guedes and

More information

M. Sugumaran / (IJCSIT) International Journal of Computer Science and Information Technologies, Vol. 2 (3), 2011, 1001-1006

M. Sugumaran / (IJCSIT) International Journal of Computer Science and Information Technologies, Vol. 2 (3), 2011, 1001-1006 A Design of Centralized Meeting Scheduler with Distance Metrics M. Sugumaran Department of Computer Science and Engineering,Pondicherry Engineering College, Puducherry, India. Abstract Meeting scheduling

More information

Heuristics for Dynamically Adapting Constraint Propagation in Constraint Programming

Heuristics for Dynamically Adapting Constraint Propagation in Constraint Programming Heuristics for Dynamically Adapting Constraint Propagation in Constraint Programming Kostas Stergiou AI Lab University of the Aegean Greece CPAIOR 09 Workshop on Bound reduction techniques for CP and MINLP

More information

Data Structure with C

Data Structure with C Subject: Data Structure with C Topic : Tree Tree A tree is a set of nodes that either:is empty or has a designated node, called the root, from which hierarchically descend zero or more subtrees, which

More information

Knowledge Discovery and Data Mining. Structured vs. Non-Structured Data

Knowledge Discovery and Data Mining. Structured vs. Non-Structured Data Knowledge Discovery and Data Mining Unit # 2 1 Structured vs. Non-Structured Data Most business databases contain structured data consisting of well-defined fields with numeric or alphanumeric values.

More information

Dantzig-Wolfe bound and Dantzig-Wolfe cookbook

Dantzig-Wolfe bound and Dantzig-Wolfe cookbook Dantzig-Wolfe bound and Dantzig-Wolfe cookbook thst@man.dtu.dk DTU-Management Technical University of Denmark 1 Outline LP strength of the Dantzig-Wolfe The exercise from last week... The Dantzig-Wolfe

More information

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits Outline NP-completeness Examples of Easy vs. Hard problems Euler circuit vs. Hamiltonian circuit Shortest Path vs. Longest Path 2-pairs sum vs. general Subset Sum Reducing one problem to another Clique

More information

New Improvements in Optimal Rectangle Packing

New Improvements in Optimal Rectangle Packing New Improvements in Optimal Rectangle Packing Eric Huang and Richard E. Korf Computer Science Department University of California, Los Angeles Los Angeles, CA 90095 ehuang@cs.ucla.edu, korf@cs.ucla.edu

More information

PARALLELIZED SUDOKU SOLVING ALGORITHM USING OpenMP

PARALLELIZED SUDOKU SOLVING ALGORITHM USING OpenMP PARALLELIZED SUDOKU SOLVING ALGORITHM USING OpenMP Sruthi Sankar CSE 633: Parallel Algorithms Spring 2014 Professor: Dr. Russ Miller Sudoku: the puzzle A standard Sudoku puzzles contains 81 grids :9 rows

More information

Part 2: Community Detection

Part 2: Community Detection Chapter 8: Graph Data Part 2: Community Detection Based on Leskovec, Rajaraman, Ullman 2014: Mining of Massive Datasets Big Data Management and Analytics Outline Community Detection - Social networks -

More information

Outline BST Operations Worst case Average case Balancing AVL Red-black B-trees. Binary Search Trees. Lecturer: Georgy Gimel farb

Outline BST Operations Worst case Average case Balancing AVL Red-black B-trees. Binary Search Trees. Lecturer: Georgy Gimel farb Binary Search Trees Lecturer: Georgy Gimel farb COMPSCI 220 Algorithms and Data Structures 1 / 27 1 Properties of Binary Search Trees 2 Basic BST operations The worst-case time complexity of BST operations

More information

Euclidean Minimum Spanning Trees Based on Well Separated Pair Decompositions Chaojun Li. Advised by: Dave Mount. May 22, 2014

Euclidean Minimum Spanning Trees Based on Well Separated Pair Decompositions Chaojun Li. Advised by: Dave Mount. May 22, 2014 Euclidean Minimum Spanning Trees Based on Well Separated Pair Decompositions Chaojun Li Advised by: Dave Mount May 22, 2014 1 INTRODUCTION In this report we consider the implementation of an efficient

More information

Chapter 6: Episode discovery process

Chapter 6: Episode discovery process Chapter 6: Episode discovery process Algorithmic Methods of Data Mining, Fall 2005, Chapter 6: Episode discovery process 1 6. Episode discovery process The knowledge discovery process KDD process of analyzing

More information

Dynamic programming formulation

Dynamic programming formulation 1.24 Lecture 14 Dynamic programming: Job scheduling Dynamic programming formulation To formulate a problem as a dynamic program: Sort by a criterion that will allow infeasible combinations to be eli minated

More information

Modeling and Solving the Capacitated Vehicle Routing Problem on Trees

Modeling and Solving the Capacitated Vehicle Routing Problem on Trees in The Vehicle Routing Problem: Latest Advances and New Challenges Modeling and Solving the Capacitated Vehicle Routing Problem on Trees Bala Chandran 1 and S. Raghavan 2 1 Department of Industrial Engineering

More information

Fast Matching of Binary Features

Fast Matching of Binary Features Fast Matching of Binary Features Marius Muja and David G. Lowe Laboratory for Computational Intelligence University of British Columbia, Vancouver, Canada {mariusm,lowe}@cs.ubc.ca Abstract There has been

More information

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm. Approximation Algorithms 11 Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of three

More information

Lecture 3. Linear Programming. 3B1B Optimization Michaelmas 2015 A. Zisserman. Extreme solutions. Simplex method. Interior point method

Lecture 3. Linear Programming. 3B1B Optimization Michaelmas 2015 A. Zisserman. Extreme solutions. Simplex method. Interior point method Lecture 3 3B1B Optimization Michaelmas 2015 A. Zisserman Linear Programming Extreme solutions Simplex method Interior point method Integer programming and relaxation The Optimization Tree Linear Programming

More information

Data Preprocessing. Week 2

Data Preprocessing. Week 2 Data Preprocessing Week 2 Topics Data Types Data Repositories Data Preprocessing Present homework assignment #1 Team Homework Assignment #2 Read pp. 227 240, pp. 250 250, and pp. 259 263 the text book.

More information

How To Find An Optimal Search Protocol For An Oblivious Cell

How To Find An Optimal Search Protocol For An Oblivious Cell The Conference Call Search Problem in Wireless Networks Leah Epstein 1, and Asaf Levin 2 1 Department of Mathematics, University of Haifa, 31905 Haifa, Israel. lea@math.haifa.ac.il 2 Department of Statistics,

More information

Liner Shipping Revenue Management with Respositioning of Empty Containers

Liner Shipping Revenue Management with Respositioning of Empty Containers Liner Shipping Revenue Management with Respositioning of Empty Containers Berit Løfstedt David Pisinger Simon Spoorendonk Technical Report no. 08-15 ISSN: 0107-8283 Dept. of Computer Science University

More information

Optimal Vehicle Routing and Scheduling with Precedence Constraints and Location Choice

Optimal Vehicle Routing and Scheduling with Precedence Constraints and Location Choice Optimal Vehicle Routing and Scheduling with Precedence Constraints and Location Choice G. Ayorkor Korsah, Anthony Stentz, M. Bernardine Dias, and Imran Fanaswala Abstract To realize the vision of intelligent

More information

Decision Trees from large Databases: SLIQ

Decision Trees from large Databases: SLIQ Decision Trees from large Databases: SLIQ C4.5 often iterates over the training set How often? If the training set does not fit into main memory, swapping makes C4.5 unpractical! SLIQ: Sort the values

More information

How To Solve A Minimum Set Covering Problem (Mcp)

How To Solve A Minimum Set Covering Problem (Mcp) Measuring Rationality with the Minimum Cost of Revealed Preference Violations Mark Dean and Daniel Martin Online Appendices - Not for Publication 1 1 Algorithm for Solving the MASP In this online appendix

More information

DESIGN AND DEVELOPMENT OF CSP TECHNIQUES FOR FINDING ROBUST SOLUTIONS IN JOB-SHOP SCHEDULING PROBLEMS WITH OPERATORS

DESIGN AND DEVELOPMENT OF CSP TECHNIQUES FOR FINDING ROBUST SOLUTIONS IN JOB-SHOP SCHEDULING PROBLEMS WITH OPERATORS UNIVERSIDAD POLITÉCNICA DE VALENCIA DEPARTAMENTO DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN DESIGN AND DEVELOPMENT OF CSP TECHNIQUES FOR FINDING ROBUST SOLUTIONS IN JOB-SHOP SCHEDULING PROBLEMS WITH OPERATORS

More information

Memory Allocation Technique for Segregated Free List Based on Genetic Algorithm

Memory Allocation Technique for Segregated Free List Based on Genetic Algorithm Journal of Al-Nahrain University Vol.15 (2), June, 2012, pp.161-168 Science Memory Allocation Technique for Segregated Free List Based on Genetic Algorithm Manal F. Younis Computer Department, College

More information

Binary Heaps * * * * * * * / / \ / \ / \ / \ / \ * * * * * * * * * * * / / \ / \ / / \ / \ * * * * * * * * * *

Binary Heaps * * * * * * * / / \ / \ / \ / \ / \ * * * * * * * * * * * / / \ / \ / / \ / \ * * * * * * * * * * Binary Heaps A binary heap is another data structure. It implements a priority queue. Priority Queue has the following operations: isempty add (with priority) remove (highest priority) peek (at highest

More information

An optimisation framework for determination of capacity in railway networks

An optimisation framework for determination of capacity in railway networks CASPT 2015 An optimisation framework for determination of capacity in railway networks Lars Wittrup Jensen Abstract Within the railway industry, high quality estimates on railway capacity is crucial information,

More information

Ant Colony Optimization and Constraint Programming

Ant Colony Optimization and Constraint Programming Ant Colony Optimization and Constraint Programming Christine Solnon Series Editor Narendra Jussien WILEY Table of Contents Foreword Acknowledgements xi xiii Chapter 1. Introduction 1 1.1. Overview of the

More information

Protein Protein Interaction Networks

Protein Protein Interaction Networks Functional Pattern Mining from Genome Scale Protein Protein Interaction Networks Young-Rae Cho, Ph.D. Assistant Professor Department of Computer Science Baylor University it My Definition of Bioinformatics

More information

In Search of Influential Event Organizers in Online Social Networks

In Search of Influential Event Organizers in Online Social Networks In Search of Influential Event Organizers in Online Social Networks ABSTRACT Kaiyu Feng 1,2 Gao Cong 2 Sourav S. Bhowmick 2 Shuai Ma 3 1 LILY, Interdisciplinary Graduate School. Nanyang Technological University,

More information