# Final F2A

📗 Enter your ID (the wisc email ID without @wisc.edu) here: and click
📗 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. You can save and load your answers (only fill-in-the-blank questions) using the buttons at the bottom of the page.

# 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



📗 [4 points] Suppose the states are integers between and . The initial state is , and the goal state is . The successors of a state \(i\) are \(2 i\) and \(2 i + 1\), if exist. How many states are expanded using a Breadth First Search? Include both the initial and goal states.
📗 Note: use the convention used in the lectures, enqueue the states with smaller index into the queue first.
Hint
📗 Answer: .
📗 [3 points] Let the search space be integers. Each state \(n\) has successors . Write down the shortest path (i.e. the sequence of states) from the initial state 1 to the goal state .
Hint See Fall 2018 Midterm Q2, Fall 2017 Final Q13. Suppose the successors are \(a n, a n + 1, ...\), then start from the goal state \(g\), look at the remainder when \(g\) is divided by \(a\) to figure out which integer is its "predecessor" and do this repeatedly until the initial state is reached.
📗 Answer (comma separated vector): .
📗 [4 points] What is the row player's value in a Nash equilibrium of the following zero-sum normal form game? A (row) is the max player, B (col) is the min player. If there are multiple Nash equilibria, use the one with the largest value (to the max player).
A \ B I II III IV
I        
II        
III        
IV        

Hint See Fall 2012 Final Q18, Fall 2006 Midterm Q12. Circle the largest number of each column and the smallest number of each row: the action pairs corresponding to the elements with two circles are the Nash equilibria. The action corresponding to a circled element is called the best response: a Nash equilibrium is when two actions are best responses to each other.
📗 Answer: .
📗 [3 points] Perform k-means clustering on six points: \(x_{1}\) = , \(x_{2}\) = , \(x_{3}\) = , \(x_{4}\) = , \(x_{5}\) = , \(x_{6}\) = . Initially the cluster centers are at \(c_{1}\) = , \(c_{2}\) = . Run k-means for one iteration (assign the points, update center once and reassign the points once). Break ties in distances by putting the point in the cluster with the smaller index (i.e. favor cluster 1). What is the reduction in total distortion? Use Euclidean distance and calculate the total distortion by summing the squares of the individual distances to the center.

📗 Note: the red points are the cluster centers and the other points are the training items.
Hint See Spring 2018 Midterm Q7, Fall 2016 Final Q9, Fall 2014 Midterm Q5, Fall 2012 Final Q3. (1) Find which cluster each \(x_{i}\) belongs to (call it \(k_{i}\)): it's the cluster center that is the closest to the point. (2) Compute the total distortion as \(\displaystyle\sum_{i=1}^{6} \left(x_{i} - c_{k_{i}}\right)^{2}\). (3) Compute the new cluster centers \(c'_{1}, c'_{2}\) as \(c'_{k} = \dfrac{1}{\displaystyle\sum_{k_{i} = k} 1} \displaystyle\sum_{k_{i} = k} x_{i}\). Then repeat (1) and (2). Take the difference between the two distortions.
📗 Answer: .
📗 [4 points] Consider the following zero-sum game tree. MAX player moves first. Draw a new game tree by re-ordering the children of each internal node (including the root), such that the new game is equivalent to the tree above, but alpha-beta pruning will prune as many nodes as possible. (You do not have to submit the drawing.) Enter the number of nodes pruned.

Hint Fall 2008 Midterm Q5
📗 Answer: .
📗 [4 points] Consider a zero-sum sequential move game with Chance. Min player moves first, then Chance, then Max. The values of the terminal states are shown in the diagram (they are the values for the Max player). What is the (expected) value of the game (for the Max player)?

Hint See Fall 2019 Q14 Q15, Spring 2017 Midterm Q3, Fall 2006 Final Q5, Fall 2005 Final Q5, Fall 2005 Midterm Q7
📗 Answer: .
📗 [4 points] Suppose \(n\) = witnesses heard a gunshot near 221B Baker Street. The benefit from at least one witness calling the police is \(b\) = and the cost of calling the police is \(c\) = . If no witness calls the police, everyone gets 0. In a Nash equilibrium in which every witness uses the same mixed strategy, what is the probability that no one calls the police?
Hint This is the Volunteer's Dilemma. Suppose every other witness call the police with probability \(p\), then calling the police lead to net benefit \(b - c\) and not calling the police lead to net benefit \(0 \cdot \left(1 - p\right)^{n - 1} + b \cdot \left(1 - \left(1 - p\right)^{n - 1}\right)\), where \(\left(1 - p\right)^{n - 1}\) is the probability that no one else calls the police. A witness would use a mixed strategy only if the net benefits from calling and not calling are equal to each other, and this can be used to set up a equation to solve for \(p\).
📗 Answer: .
📗 [3 points] Let \(x\) = and \(v\) = . The projection of \(x\) onto \(v\) is the point \(y\) on the direction of \(v\) such that the line connecting \(x, y\) is perpendicular to \(v\). Compute \(y\).
Hint See Fall 2018 Midterm Q14. To compute the projection: if \(v\) is a unit vector \(\left\|v\right\| = 1\), use the simplified formula: \(v^\top x v\); otherwise, use the formula: \(\dfrac{v^\top x}{v^\top v} v\).
📗 Answer (comma separated vector): .
📗 [4 points] You will receive 4 points for this question and you can choose to donate x points (a number between 0 and 4). Your final grade for this question is the points you keep plus twice the average donation (sum of the donations from everyone in your section divided by the number of people in your section, combining both versions). Enter the points you want to donate (an integer between 0 and 4).
📗 Answer: (The grade for this question will be updated later).
📗 [1 points] Please enter any comments including possible mistakes and bugs with the questions or your answers. If you have no comments, please enter "None": do not leave it blank.
📗 Answer: .

# Grade


 ***** ***** ***** ***** ***** 


 ***** ***** ***** ***** ***** 
 

# Warning: remember to submit this on Canvas!


📗 Please copy and paste the text between the *****s (not including the *****s) and submit it on Canvas, F2A.
📗 Please save a copy as text file using the button or just copy and paste it into a text file.
📗 You could load your answers using the button from the text field:







Last Updated: August 10, 2021 at 4:17 PM