ECE457A, Spring 2011 Cooperative and Adaptive Algorithms Midterm Exam June 9th, 2011 5:30-7:00 pm Please attempt all 3 questions and put your answers in clear and legible writing. 1) Heuristic Search and Game Playing a. [12 marks] Compare Depth First, Breadth First, Bidirectional and Iterative Deeping Search strategies in terms of optimality, space and time requirements (assuming a branching factor b and depth d). b. Consider the following game: Two players have in front of them a single pile of objects, say a stack of pennies. The first player divides the original stack into two stacks that must be unequal. Each player alternately thereafter does the same to some single stack when it is his turn to play. The game proceeds until finally every stack has either just one penny or two, at which point continuation becomes impossible. The player who first gets into this situation is the loser. i. [8 marks] Generate the game tree (or graph) that results from this game starting with 7 pennies. ii. [5 marks] Using max-min strategy, show that the second player in this game can always win. iii. [5 marks] Apply the alpha-beta pruning technique and show which part of the tree, if any, need not be generated. 2) Tabu Search (TS) a. [8 marks] Explain what is meant by the following and illustrate your answers using simple examples: i. Aspiration criteria ii. Long-term memory b. The Vehicle Routing Problem (VPR) is defined by having m vehicles at the depot that need to service customers in c cities. The travel distances between every two cities are defined by a matrix D. The travel distances from the depot to all the cities are given by a vector Depot. The VPR consists of determining the routes to be taken by a set of m vehicles satisfying the following conditions: • Starting and ending at the depot, • Having minimum travel cost, • Each customer is visited exactly once by exactly one vehicle, The figure below illustrates an example. 1 ECE457A, Spring 2011 Cooperative and Adaptive Algorithms 5 3 8 1 2 Depot 4 6 7 TS can be used to solve this problem by having the following vector solution representation: Sol = [d , R1 , d , R2 ,..., d , Rm , d ] where Ri denotes the list of customers serviced by vehicle i and these lists are separated by d denoting the depot. Possible neighborhood operators are: 1- Swapping two randomly selected cities in any two randomly selected routes, 2- Removing a randomly selected city from one randomly selected route and inserting it into a randomly selected position in a different randomly selected route. Assume that when a city gets removed from one route inserted into the other, it only gets inserted at the beginning of the route. Assume also that there are no swaps between two cities in the same route. For the following symmetric problem: ⎡0 ⎢ ⎢ ⎢ ⎢ D=⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢⎣ 12 0 20 10 0 25 11 2 0 30 22 11 10 0 2 20 10 5 ⎤ ⎡10 ⎤ ⎥ ⎢ 20 ⎥ 30 9 7 ⎥ ⎢ ⎥ ⎢ 25 ⎥ 25 5 3 ⎥ ⎥ ⎢ ⎥ 20 7 6 ⎥ 25 , Depot = ⎢ ⎥ ⎢ 20 ⎥ 12 10 7 ⎥ ⎥ ⎢ ⎥ 0 11 10 ⎥ ⎢10 ⎥ ⎢5 ⎥ 0 4 ⎥ ⎥ ⎢ ⎥ 0 ⎥⎦ ⎢⎣ 7 ⎥⎦ ECE457A, Spring 2011 i. Cooperative and Adaptive Algorithms [ 6 marks] Define an efficient (memory and time) tabu memory structure that can handle the swapping and insertion/deletion operators. ii. [ 13 marks] Starting from the solution shown in the figure above, apply TS algorithm for 1 iteration using the first operator followed by 1 iteration using the second operator. Restrict the neighborhood to 3 neighbors. iii. [ 8 marks] Explain how you would solve the problem, if we also want to find the optimum number of vehicles k ≤ m. Explain any necessary change in neighborhood operators and the cost function. 3) Simulated Annealing a. [9 marks] Explain when and how the acceptance probability is applied in simulated annealing. b. The job-shop scheduling problem (JSSP) can be described as a set of n jobs denoted by Jj where j =1,2...n which have to be processed on a set of m machines denoted by Mk where k =1,2...m. Operation of jth job on the kth machine will be denoted by Okj with the processing time pkj. Each job should be processed through the machines in a particular order. Once a machine starts to process a job, no interruption is allowed. The objective is to produce a schedule (a schedule can be described by the processing orders of operations on the machines) that minimizes this makespan value (final completion time over all machines). Consider solving the following instance of this problem using SA: Jobs 1 2 3 Machine Sequence 1,3,2 2,3 2,1,3 Processing Times O11=3, O31=2, O21=3 O22=2, O32=3 O23=2, O13=3, O33=4 i. [7 marks] Generate an initial solution, ii. [7 marks] Define a suitable neighborhood operator, iii. [12 marks] Define a suitable annealing schedule and perform 3 iterations of SA. 3
© Copyright 2025 Paperzz