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


# M10 Written (Math) Problems

📗 Enter your ID (the wisc email ID without @wisc.edu) here: and click (or hit the "Enter" key)
📗 You can also load from your saved file
and click .
📗 If the questions are not generated correctly, try refresh the page using the button at the top left corner.
📗 The official deadline is July 31, late submissions within a week will be accepted without penalty, but please submit a regrade request form: Link.
📗 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.
📗 Please report any bugs on Piazza: Link

# 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): .
📗 [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): .
📗 [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.
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\), \(k\)) is positive, then \(i\) (or \(j\), \(k\)) 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\), \(k\)) 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: .
📗 [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


 * * * *

 * * * * *

# Submission


📗 Please do not modify the content in the above text field: use the "Grade" button to update.


📗 Please wait for the message "Successful submission." to appear after the "Submit" button. If there is an error message or no message appears after 10 seconds, please save the text in the above text box to a file using the button or copy and paste it into a file yourself and submit it to Canvas Assignment M10. You could submit multiple times (but please do not submit too often): only the latest submission will be counted.
📗 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.




# Solutions

📗 Some of the past exams referenced in the Hints can be found on Professor Zhu, Professor Liang and Professor Dyer's websites: Link, and Link.
📗 Some of the questions are from last year, and I recorded videos going through them, the links are at the bottom of the Week 1 to Week 8 pages, for example: W4 and W8.





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