# Final F1A

📗 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



📗 [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): .
📗 [4 points] In GoogSoft, software engineers A and B form a two-person team. Their year-end bonus depends on their relative performance. The bonus outcomes are summarized in the following table. The value of slacking to each person is \(s\) = . The total payoff to each person is the sum of the bonus and the value from slacking. What is the smallest value of \(x\) such that both players will work hard in a Nash equilibrium?
- B works hard B slacks
A works hard \(x, x\)
A slacks

Hint See Fall 2005 Final Q20.
📗 Answer: .
📗 [4 points] Imagine a population of \(N\) = individuals. Each of them simultaneously chooses between taking the vaccine and not. All individuals have the same payoffs. Suppose there are \(n\) people who choose not to take the vaccine, then the payoff from not taking the vaccine is \(- \alpha \cdot \dfrac{n}{N}\), and the payoff from taking the vaccine is \(- c - \beta \cdot \dfrac{n}{N}\), \(\alpha\) = is the herd immunity coefficient, \(\beta\) = measures the ineffectiveness of the vaccine, and \(c\) = is the cost of getting the vaccine. In a Nash equilibrium, what is the largest number of individuals who choose NOT to take the vaccine?
📗 Note: \(n\) is the number of people NOT taking the vaccine, and the question is asking for the largest number of individuals who choose NOT to take the vaccine.
Hint
📗 Answer: .
📗 [4 points] What is the projected variance of and onto the principal component ? Use the MLE (Maximum Likelihood Estimate) formula for the variance: \(\sigma^{2} = \dfrac{1}{n} \displaystyle\sum_{i=1}^{n} \left(x_{i} - \mu\right)^{2}\) with \(\mu = \dfrac{1}{n} \displaystyle\sum_{i=1}^{n} x_{i}\).

Hint
📗 Answer: .
📗 [4 points] You are given the distance table. Consider the next iteration of hierarchical clustering using linkage. What will the new values be in the resulting distance table corresponding to the new clusters? If you merge two columns (rows), put the new distances in the column (row) with the smaller index. For example, if you merge columns 2 and 4, the new column 2 should contain the new distances and column 4 should be removed, i.e. the columns and rows should be in the order (1), (2 and 4), (3).
\(d\) =
Hint See Spring 2017 Midterm Q4. The resulting matrix should have 4 columns and 4 rows. Find the smallest non-zero number in the pair-wise distance matrix, suppose row \(i\) and column \(j\), merge columns \(i\) and \(j\) and rows \(i\) and \(j\) at the same time: for single linkage, take the minimum of the numbers in the two rows and columns; for complete linkage, take the maximum.
📗 Answer (matrix with multiple lines, each line is a comma separated vector): .
📗 [4 points] Imagine a world where each person has friends. Alice and Bob are \(d\) = "friendship links" away (i.e. if \(d\) = 1, Alice and Bob are friends; if \(d\) = 2, there is a third person X such that Alice and X are friends, and Bob and X are friends; and so on). Imagine a algorithm that has access to the friendship links. The algorithm starts at Alice and the goal is to find Bob. In the worst case, how many people the algorithm needs to visit (including Alice and Bob)?
Hint See Fall 2018 Midterm Q1, Fall 2016 Midterm Q1, Fall 2010 Final Q3. For both BFS and DFS, if the goal is the "last" node visited, then the number of nodes visited is the same as the total number of nodes in a complete tree with depth \(d\) and branching factor \(b\), which is \(\displaystyle\sum_{i=0}^{d} b^{i}\).
📗 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] 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? Enter the correct choices as a list, comma separated, without parentheses, for example, "1, 2, 4".
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:
(1)
(2)
(3)
(4)
(5)
(6)
(7) None of the above
📗 Answer (comma separated vector): .
📗 [4 points] Given the following game payoff table, suppose the row player uses a pure strategy, and column player uses a mixed strategy playing L with probability \(q\). What is the smallest and largest value of \(q\) in a mixed strategy Nash equilibrium?
Row \ Col L R
U
D

Note: the following is a diagram of the best responses (make sure you understand what they are and how to draw them). The red curve is the best response for the column player and the blue curve is the best response for the row player.

Hint Draw the best response diagrams: the region where the two curves intersect are Nash equilibria (since those mixed strategies are best responses to each other). Find the smallest and largest values of \(p\) or \(q\) in that region. The way to compute the location where the blue curve is vertical (or the red curve is horizontal) is by setting the expected payoffs from U and D equal to each other (or from L and R equal to each other).
📗 Answer (comma separated vector): .
📗 [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, F1A.
📗 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: July 14, 2024 at 8:37 PM