Prev: M9 Next: M11
Back to week 6 page: Link

# Warning: this is a replica of the homework page for testing purposes, please use M10 for homework submission.


# M10 Written (Math) Problems

📗 Enter your ID (the wisc email ID without @wisc.edu) here: and click (or hit enter key)
📗 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


📗 [3 points] Let \(h_{1}\) be an admissible heuristic from a state to the optimal goal, A* search with which ones of the following \(h\) will be admissible?
Hint See Fall 2019 Midterm Q1, Fall 2018 Midterm Q6, Fall 2017 Midterm Q10. Since \(h_{1}\) is admissible, for any \(n\), \(0 \leq h_{1}\left(n\right) \leq h^\star\left(n\right)\). It means if \(0 \leq h\left(n\right) \leq h_{1}\left(n\right)\), then it must be true that \(0 \leq h\left(n\right) \leq h^\star\left(n\right)\), i.e. \(h\) is always admissible. Since \(h^\star\) can be arbitrarily large, only when \(h\left(n\right) < 0\) for some \(n\) or when \(h\left(0\right) \neq 0\), \(h\) is never admissible.
📗 Choices:





None of the above
📗 [3 points] Let \(h_{1}\) be an admissible heuristic from a state to the optimal goal, A* search with which ones of the following \(h\) will be admissible?
Hint See Fall 2019 Midterm Q1, Fall 2018 Midterm Q6, Fall 2017 Midterm Q10. Since \(h_{1}\) is admissible, for any \(n\), \(0 \leq h_{1}\left(n\right) \leq h^\star\left(n\right)\). It means if \(0 \leq h\left(n\right) \leq h_{1}\left(n\right)\), then it must be true that \(0 \leq h\left(n\right) \leq h^\star\left(n\right)\), i.e. \(h\) is always admissible. Since \(h^\star\) can be arbitrarily large, only when \(h\left(n\right) < 0\) for some \(n\) or when \(h\left(0\right) \neq 0\), \(h\) is never admissible.
📗 Choices:





None of the above
📗 [3 points] If \(h_{1}\) and \(h_{2}\) are both admissible heuristic functions, which ones of following are also admissible heuristic functions?
Hint See Fall 2019 Midterm Q4 Q7 Q8 Q9, Fall 2018 Midterm Q5, Spring 2018 Midterm Q2, Fall 2006 Final Q3, Fall 2006 Midterm Q7, Fall 2005 Final Q3, Fall 2005 Midterm Q2. Since \(h_{1}\) and \(h_{2}\) are admissible, for any \(n\), \(0 \leq h_{1}\left(n\right) \leq h^\star\left(n\right)\) and \(0 \leq h_{2}\left(n\right) \leq h^\star\left(n\right)\). It means if \(0 \leq h_{3}\left(n\right) \leq h_{1}\left(n\right)\) or \(0 \leq h_{3}\left(n\right) \leq h_{2}\left(n\right)\), then it must be true that \(0 \leq h_{3}\left(n\right) \leq h^\star\left(n\right)\), i.e. \(h_{3}\) is also admissible.
📗 Choices:





None of the above
📗 [4 points] Run search algorithm on the following graph, starting from state 0 with the goal state being . Write down the expansion path (in the order of the states expanded). The heuristic function \(h\) is shown as subscripts. Break tie by expanding the state with a smaller index.

📗 In case the diagram is not clear: the weights are (with heuristic values on the diagonal entries): .
Hint See Fall 2019 Midterm Q2, Spring 2017 Midterm Q1, Fall 2012 Final Q15, Fall 2010 Midterm Q2, Fall 2009 Midterm Q3,  Fall 2006 Midterm Q9, Fall 2005 Final Q10, Fall 2005 Midterm Q1. Priority queue in Uniform Cost Search is ordered by g(s). Priority queue in Best First Greedy Search is ordered by h(s). Priority queue in A Search is ordered by g(s)+h(s). When a state is deQueued from the priority queue, append it to the expansion path (list of expanded states), and add its successors to the queue.
📗 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 ?
Hint See Fall 2017 Midterm Q9. Due to the convexity of the function, hill climbing will eventually reach the global minimum. If the coefficient in front of \(i\) (or \(j\)) is positive, then \(i\) (or \(j\)) should be as small as possible at the global minimum. If the coefficient in front of \(i\) (or \(j\)) is negative, then \(i\) (or \(j\)) should be as large as possible at the global minimum.
📗 Answer (comma separated vector): .
📗 [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 .
Hint See Fall 2006 Final Q2, Fall 2005 Final Q2, Fall 2005 Midterm Q3. Try flipping the label of all nine nodes, compute the change is score (i.e. the number of same-sign edges that are removed). The flip that leads to the largest decrease in score is the node to change in the next step.
📗 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.
Hint See Spring 2019 Midterm Q10, Fall 2017 Midterm Q8, Fall 2009 Midterm Q5. Try to solve the problem with a small \(n\) and find the pattern. Alternatively, start with the global minimum \(i^\star\), keep count the states while \(s\left(i - 1\right) \geq s\left(i\right), i < i^\star\) or \(s\left(i + 1\right) \geq s\left(i\right), i > i^\star\).
📗 Answer (comma separated vector): .
📗 [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 ?
Hint See Fall 2018 Midterm Q10. Solve \(\exp\left(\dfrac{- \left| f\left(s\right) - f\left(t\right) \right|}{T}\right) = p\) for \(T\).
📗 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.
Hint See Fall 2017 Midterm Q11. If \(f\left(s\right) > f\left(t\right)\), the probability of leaving is 1. If \(f\left(s\right) \leq f\left(t\right)\), the probability of leaving is \(\exp\left(\dfrac{- \left| f\left(s\right) - f\left(t\right) \right|}{T}\right)\). The probability of staying is 1 minus the probability of leaving.
📗 Answer: .
📗 [3 points] Four individuals (i.e. candidate solutions) in the current generation are given by -digit ( dimensional) sequences: . Individual 1: ; Individual 2: ; Individual 3: ; Individual 4: . The fitness function is . What is the result of performing 1-point crossover for the sequences with the highest fitness (break ties by preferring the sequence that appears earlier in the list) with a cross-point between digit and digit .
📗 Note: the first line representing the first child should start with the sequence with the highest fitness, and the second line representing the second child should start with the sequence with the second highest fitness.
Hint See Spring 2017 Midterm Q2. Compute the fitness of all four sequences and find the two with the highest fitness say \(d^{\left(1\right)}, d^{\left(2\right)}\). The crossover of the two sequences between digits \(i\) and \(i + 1\) are \(d^{\left(1\right)}_{1}, ..., d^{\left(1\right)}_{i}, d^{\left(2\right)}_{i+1}, ..., d^{\left(2\right)}_{6}\) and \(d^{\left(2\right)}_{1}, ..., d^{\left(2\right)}_{i}, d^{\left(1\right)}_{i+1}, ..., d^{\left(1\right)}_{6}\).
📗 Calculator: .
📗 Answer (matrix with 2 lines, each line is a comma separated vector):
📗 [1 points] Please enter any comments and suggestions including possible mistakes and bugs with the questions and the auto-grading, and materials relevant to solving the questions that you think are not covered well during the lectures. If you have no comments, please enter "None": do not leave it 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: 10" 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.








Last Updated: November 18, 2024 at 11:43 PM