Prev: M24 Next: M26

# M25 Past Exam Problems

📗 Enter your ID (the wisc email ID without @wisc.edu) here: and click (or hit enter key)
📗 If the questions are not generated correctly, try refresh the page using the button at the top left corner.
📗 The same ID should generate the same set of questions. Your answers are not saved when you close the browser. You could print the page: , solve the problems, then enter all your answers at the end.
📗 Please do not refresh the page: your answers will not be saved.

# Warning: please enter your ID before you start!


# Question 1


📗

# Question 2


📗

# Question 3


📗

# Question 4


📗

# Question 5


📗

# Question 6


📗

# Question 7


📗

# Question 8


📗

# Question 9


📗

# Question 10


📗

# Question 11


📗

# Question 12


📗

# Question 13


📗

# Question 14


📗

# Question 15


📗

# Question 16


📗

# Question 17


📗

# Question 18


📗

# Question 19


📗

# Question 20


📗

# Question 21


📗

# Question 22


📗

# Question 23


📗

# Question 24


📗

# Question 25


📗


📗 [3 points] When using Simulated Annealing, which value of temperature \(T\) from the list would imize the probability of moving to an inferior (worse) state? Enter one value of \(T\), not its index in the list.
📗 Answer: .

📗 [4 points] In simulated annealing we move from \(s\) to an inferior neighbor \(t\) with probability \(\exp\left(\dfrac{- \left| f\left(s\right) - f\left(t\right) \right|}{T}\right)\), where \(T\) is the temperature parameter. Suppose \(f\left(s\right)\) = and \(f\left(t\right)\) = and \(T\) = . What is the probability we move to \(t\)?
📗 Note: we are minimizing the score.
📗 Answer: .
📗 [2 points] In simulated annealing we move from \(s\) to an inferior neighbor \(t\) with probability \(\exp\left(\dfrac{- \left| f\left(s\right) - f\left(t\right) \right|}{T}\right)\), where \(T\) is the temperature parameter. Suppose \(f\left(s\right)\) = and \(f\left(t\right)\) = and \(T\) = . What is the probability we stay at \(s\) instead of moving to \(t\)?
📗 Note: we are minimizing the score.
📗 Answer: .
📗 [2 points] In simulated annealing one accepts a transition from \(s\) to an inferior neighbor \(t\) with probability \(\exp\left(\dfrac{- \left| f\left(s\right) - f\left(t\right) \right|}{T}\right)\), where \(T\) is the temperature parameter. Suppose \(f\left(s\right)\) = and \(f\left(t\right)\) = . At what temperature is the transition probability ?
📗 Answer: .
📗 [1 points] For the following 3SAT problem, assume the variables are set to . In one step of hill-climbing, one of the variables is flipped (from T to F or F to T). In case of tie, flip the variable that appears earlier in the list. What are the values of the variables after one step of hill-climbing. Enter a sequence of "T"s or "F"s, comma separated.
Clause 1:
Clause 2:
Clause 3:
Clause 4:
Clause 5:
📗 Answer: .
📗 [4 points] Let the states be 3D integer points with integer coordinates \(\left(i, j, k\right)\) with boundary constrains and and . Each state \(\left(i, j, k\right)\) has six successors \(\left(i - 1, j, k\right), \left(i + 1, j, k\right), \left(i, j - 1, k\right), \left(i, j + 1, k\right), \left(i, j, k - 1\right), \left(i, j, k + 1\right)\) or a subset thereof subject to the boundary constraints. The score of state \(\left(i, j, k\right)\) is . Which local minimum will be reached if hill climbing is used starting from ? Enter the state, not the score.
📗 Answer (comma separated vector): .
📗 [2 points] Let the states be 2D integer points with integer coordinates \(\left(i, j\right)\) with boundary constrains and . Each state \(\left(i, j\right)\) has four successors \(\left(i - 1, j\right), \left(i + 1, j\right), \left(i, j - 1\right), \left(i, j + 1\right)\) or a subset thereof subject to the boundary constraints. The score of state \(\left(i, j\right)\) is . Which local minimum will be reached if hill climbing is used starting from ?
📗 Answer (comma separated vector): .
📗 [2 points] Let the states be 2D integer points with integer coordinates \(\left(i, j\right)\) with boundary constrains and . Each state \(\left(i, j\right)\) has four successors \(\left(i - 1, j\right), \left(i + 1, j\right), \left(i, j - 1\right), \left(i, j + 1\right)\) or a subset thereof subject to the boundary constraints. The score of state \(\left(i, j\right)\) is . Which local minimum will be reached if hill climbing is used starting from ?
📗 Answer (comma separated vector): .
📗 [2 points] Consider the following version of hill climbing: at initial state \(s\) we randomly choose one of \(s\)'s neighbors with equal probability. If the chosen neighbor has a strictly better score than \(s\) we move to the neighbor; otherwise we stay at \(s\). Assume \(s\) has neighbors, and only of the neighbors has a strictly better score than \(s\). What is the chance that we move out of \(s\) in iterations or less?
📗 Answer: .
📗 [3 points] Given the scores in the following table, if hill-climbing (valley-finding) is used, how many states will lead to the global imum? Note: the neighbors of state \(i\) are states \(i - 1\) and \(i + 1\) (if they exist).
State 0 1 2 3 4 5 6 7
Score

📗 Answer: .
📗 [3 points] Consider a state space where the states are positive integers between 1 and . State \(i\) has two neighbors \(i - 1\) and \(i + 1\) (subject to the boundary constraints). State \(i\) has score . If one runs the hill climbing algorithm, how many initial states can reach the global minimum? Break tie by moving towards the global minimum. If there are multiple global minima, count all of them.
📗 Answer: .
📗 [3 points] Consider a state space where the states are positive integers between 1 and . State \(i\) has two neighbors \(i - 1\) and \(i + 1\) (subject to the boundary constraints). State \(i\) has score . If one runs the hill climbing algorithm, which initial states can reach the global minimum? Break ties by moving towards the global minimum. If there are multiple global minima, list the states that lead to all of them.
📗 Answer (comma separated vector): .
📗 [2 points] Alice, Bob and Cindy go to the same school and live on a straight street lined with evenly spaced telephone poles. Alice's house is at the pole , Bob's is at the pole , Cindy's is at the pole . Where should the school set up a school bus stop so that the sum of distances (from house to bus stop) walked by the three students is minimized?
📗 Answer: .
📗 [3 points] In the following graph coloring problem, each node is either labeled as + or -. The score of the graph is the number of edges connecting two nodes with the same label (color). We are minimizing the score. If the successor function is to change the label of a single node, in hill climbing (here, valley finding), which node should we change in the following graph? Enter the index of the node (subscript in the diagram) or -1 if we are at a local minimum. Break ties by entering the node with the smaller index.

In case the diagram is not clear: the labels are (1 is +, 0 is -) and the indices are .
📗 Answer: .
📗 [4 points] There are lights in a row. The initial state is , 0 is "off", 1 is "on". A valid move finds two adjacent lights where one is on and the other is off, and switches them while keeping all other lights the same. That is, locally, you may do 01 to 10 or 10 to 01. What is the smallest number of moves to reach the goal state .
📗 Answer: .
📗 [3 points] Given the following function, if hill climbing with a (uniform) random initial state is used once (i.e. without restart) to find the maximum score, what is the probability that it finds the global maximum? In case of ties, assume hill climbing move towards the global maximum.
State \(s_{1}\) \(s_{2}\) \(s_{3}\) \(s_{4}\) \(s_{5}\)
Score

📗 Answer: .
📗 [1 points] Blank.
📗 Answer: .
📗 [1 points] Blank.
📗 Answer: .
📗 [1 points] Blank.
📗 Answer: .
📗 [1 points] Blank.
📗 Answer: .
📗 [1 points] Blank.
📗 Answer: .
📗 [1 points] Blank.
📗 Answer: .
📗 [1 points] Blank.
📗 Answer: .
📗 [1 points] Blank.
📗 Answer: .
📗 [1 points] Blank.
📗 Answer: .

# Grade


 * * * *

 * * * * *


📗 You could save the text in the above text box to a file using the button or copy and paste it into a file yourself .
📗 You could load your answers from the text (or txt file) in the text box below using the button . The first two lines should be "##m: 25" and "##id: your id", and the format of the remaining lines should be "##1: your answer to question 1" newline "##2: your answer to question 2", etc. Please make sure that your answers are loaded correctly before submitting them.


📗 You can find videos going through the questions on Link.





Last Updated: January 20, 2025 at 3:12 AM