hw9 - HW 9 Solutions Fall 2010 Points possible: 20 1. SA...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
HW 9 Solutions Fall 2010 1 Points possible: 20 1. SA Theory We will use the theory of Markov chain to analyze the Metropolis algorithm as defined below. Metropolis is the name for simulated annealing algorithm running at a fixed temperature. Please note that this version of Metropolis algorithm is different from Homework 2 in that it does not keep the best cost it has found so far. Algorithm Metropolis ( CurS, CurCost, T, M ); /* running Metropolis algorithm at temperature T for M steps */ Begin Repeat /* a step begins */ NewS = Neighbor(CurS); NewCost = Cost(NewS); ∆Cost = (NewCost – CurCost); If (∆Cost < 0) Then CurS = NewS; CurCost = Cost(CurS); Else If (RANDOM < e -∆Cost/T ) Then CurS = NewS; CurCost = Cost(CurS); EndIf EndIf M = M – 1; */ a step ends */ Until (M = 0) End (* of Metropolis *) The function we are trying to minimize using the algorithm is cost = 2(x 1 – x 2 ) 2 + x 1 . The domains of x 1 and x 2 are both {0,1}. Neighbors of a state are defined as states obtained by changing the value of one input variable. Let State1 = (0,1); State 2 = (1,1); State 3 = (0,0); State 4 = (1,0). We obtain a state transition diagram as shown on the next page. Each arrow represents a transition with non-zero probability.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
HW 9 Solutions Fall 2010 2 a) (2 points) Calculate the cost for each state. What is the global minimum? For each transition in the diagram, calculate the transition probability as a function of temperature T. (Some probabilities are already given in the diagram as examples.) Explain why there are no self loops for states 1 and 4 s x1 x2 COST(x) 1 0 1 2 2 1 1 1 3 0 0 0 4 1 0 3 No self loops for states 1 and 4 because both neighbors are downhill from them and 1 and 4 are not neighbors of themselves. b) (1 point) Give the transition matrix P for Metropolis algorithm running at temperature T = 1. Reminder: the (i,j) entry of P is the transition probability from state I to state j The general form of the transition matrix is as follows: P = 0 ± ± 0 ± ² ³ ´ µ ± ² ³ ´ µ ± ² ³ · µ 0 ± ² ³ · µ ± ² ³ · µ 0 ± ² ³ · µ ± ² ³ ¸ µ ± ² ³ ¸ µ 0 ± ± 0
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/02/2011 for the course ORIE 5430 taught by Professor Shoemaker during the Fall '11 term at Cornell University (Engineering School).

Page1 / 6

hw9 - HW 9 Solutions Fall 2010 Points possible: 20 1. SA...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online