📗 Enter your ID (the wisc email ID without @wisc.edu) here: and click (or hit enter key) 1,2,3,4,5,6,7,8,9,10m1
📗 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.
📗 [2 points] (Enter a number) Evaluate the following expression: \(\displaystyle\sum_{i=1}^{n}\) for \(n\) = .
Hint
Use the formula: \(1 + x + x^{2} + ... + x^{t-1} = \dfrac{1 - x^{t}}{1 - x}\). For example, enter "10 * (1 - 0.5^21) / (1 - 0.5) - 10" for \(\displaystyle\sum_{i=1}^{20} 10 \cdot 0.5^{i} = 10 \cdot \left(1 + 0.5 + 0.5^{2} + ... + 0.5^{20}\right) - 10\).
📗 You can enter a number or an expression (evaluated using math.js).
📗 Use the "Calculate" button or press the "Enter" key to make sure the expression you entered can be evaluated correctly by the auto-grader.
📗 Answer: .
📗 [3 points] (Enter a vector) Find the unit vector that is perpendicular (orthogonal) to the plane = \(0\) with a non-negative \(x_{3}\)-value. It's the red vector on the green plane in the diagram below (may have to rotate to see).
Hint
The normal vector (the blue vector in the diagram) of the plane \(a x_{1} + b x_{2} + c x_{3} + d = 0\) is \(\begin{bmatrix} a \\ b \\ c \end{bmatrix}\) and the unit normal vector is \(\begin{bmatrix} \dfrac{a}{\sqrt{a^{2} + b^{2} + c^{2}}} \\ \dfrac{b}{\sqrt{a^{2} + b^{2} + c^{2}}} \\ \dfrac{c}{\sqrt{a^{2} + b^{2} + c^{2}}} \end{bmatrix}\). For example, enter "1 / sqrt(3), 1 / sqrt(3), 1 / sqrt(3)" if \(a = b = c = d = 1\). If \(c\) is negative, you should multiply all three values by \(-1\).
📗 You can enter three numbers or three expressions separated by commas.
📗 Answer: .
📗 [4 points] (Enter a matrix) Compute the Hessian matrix of evaluated at \(\begin{bmatrix} x_{1} \\ x_{2} \end{bmatrix}\) = .
Hint
The Hessian matrix of \(f\left(x_{1}, x_{2}\right)\) is \(\begin{bmatrix} \dfrac{\partial^2 f}{\partial x_{1}^2} & \dfrac{\partial f}{\partial x_{1} \partial x_{2}} \\ \dfrac{\partial f}{\partial x_{2} \partial x_{1}} & \dfrac{\partial^2 f}{\partial x_{2}^2} \end{bmatrix}\). For example, for \(1 x_{1}^{2} + 2 x_{1} x_{2} + 3 x_{2}^{2}\), and for any value of \(\begin{bmatrix} x_{1} \\ x_{2} \end{bmatrix}\), the Hessian is \(\begin{bmatrix} 2 & 2 \\ 2 & 6 \end{bmatrix}\).
📗 You can enter two numbers or two expressions separated by commas in one line and another two numbers or two expressions in the next line.
📗 Answer: .
📗 [3 points] (Enter an expression) Enter the derivative of as a function of \(w\).
Hint
Use the chain rule. For example, the derivative of \(\dfrac{1}{1 + \exp\left(2 w + 3\right)}\) = \(\left(1 + \exp\left(2 w + 3\right)\right)^{-1}\) is \(\dfrac{\left(-1\right) \cdot 2 \cdot \exp\left(2 w + 3\right)}{\left(1 + \exp\left(2 w + 3\right)\right)^{2}}\), enter "(-2 * exp(2 * w + 3)) / ((1 + exp(2 * w + 3))^2)": note that extra parentheses () and multiplication signs * may be needed.
📗 You can enter expressions of w. Use "exp(w)" for \(e^{w}\). Do not change the variable name "w". You do not need to simplify the expression.
📗 You can plot your expression (red curve) against my answer (green curve) using from to . w
📗 Answer: .
📗 [2 points] (Select one or multiple answers) In an \(n\) dimensional space, consider \(2^{n}\) n-spheres (gray) with radius 1 centered at \(\left(x_{1}, x_{2}, ..., x_{n}\right), x_{i} \in \left\{-1, 1\right\}\). Consider the largest n-sphere (blue) centered at the origin that can fit inside the gray n-spheres and the smallest n-cube (red) centered at the origin that can contain all gray n-spheres. For what values of \(n\) is part of the blue sphere outside of the red cube? Below are examples in 1, 2, and 3 dimensions.
In 1D, a unit 1-sphere is just the endpoints \(\left\{x_{1} - 1, x_{1} + 1\right\}\). Note that the blue sphere is only a point and has radius 0.
In 2D, a unit 2-sphere is the circle with radius 1 centered at \(\left(x_{1}, x_{2}\right)\). Note that the blue sphere is a circle with radius \(\sqrt{2} - 1\).
In 3D, a unit 3-sphere is the sphere with radius 1 centered at \(\left(x_{1}, x_{2}, x_{3}\right)\). Note that the blue sphere has radius \(\sqrt{3} - 1\). Use mouse or touch to rotate the view in the diagram above and note that the radius of the blue sphere is larger than the one in 2D. In higher dimensions, the radius of the blue sphere will get larger and eventually larger than the side length of the red cube, which is always \(2\). Hint
Note that the length of the line segment from the origin to the center of any of the gray spheres is \(\sqrt{n}\). Therefore, the radius of the blue sphere is \(\sqrt{n} - 1\) and half of the side length of the red cube is \(2\). The correct answers are all the \(n\) that satisfy \(\sqrt{n} - 1 > 2\).
📗 You can check one or multiple answers.
📗 You can use this textbox as a calculator: .
📗 Choices:
None of the above
📗 [2 points] (Select objects) Highlight a spanning tree of the following directed graph by selecting the nodes and edges in the spanning tree. Use the convention that parents point to their children.
Hint
A tree that contains all the nodes.
📗 Select (or deselect) a node by mouse click or touch, select (or deselect) a directed edge by mouse drag or touch "drag" from one node to another. The selected nodes and edges should appear red.
select
📗 [4 points] (Select grid elements) Highlight squares in the grid such that the number of highlighted squares in the rows sums up to and in the columns sum up to .
Hint
Similar to finding the joint distribution given the marginal distributions. It is also similar to the Nonogram game, see Wikipedia.
📗 Click inside a square to highlight (or dehighlight it). Dragging from one square to another flips the highlighting of all squares along the path.
grid
📗 [1 points] (Draw a line) Draw the linear decision boundary that classifies all points correctly, i.e. all red points are on the left side of the line and all blue points are on the right side of the line. (Note: the line you draw can be viewed as a vector from your mouse-down (or touch-start) position to your mouse-up (or touch-end) position, and "left side" (and "right side") is based on the direction of that vector.)
Hint
The direction you draw the line does matter: if one direction does not work, try the other direction.
📗 Draw a line using mouse drag or touch (drag). The line connects the point when the mouse is pressed (touch is started) and the point when the mouse is released (touch is ended). The existing line will be replaced when a new line is drawn.
linetrue
📗 [3 points] (Move the sliders) Move the sliders below to change the green plane normal so that all the blue points are above the plane and all the red points are below the plane.
Hint
The vector \(\begin{bmatrix} w_{1} \\ w_{2} \\ w_{3} \end{bmatrix}\) is the normal vector (blue arrow in the diagram). It should point to the blue points.
📗 You can use mouse, touch or keyboard arrow keys to control the sliders. If you use mouse or touch, the diagram will update only when you release the slider.
📗 Rotate the 3D diagrams using the left mouse button (or one-finger touch "drag"), zoom in and out using the mouse scroll wheel (or two-finger touch "pinch"), and pan (move without rotation) using the right mouse button (or two-finger touch "drag").
📗 [3 points] (Draw a graph) Draw a digraph given the following adjacency matrix: .
Hint
There is an edge from i to j if the entry on row i column j in the adjacency matrix is 1.
📗 Add a node by mouse click or touch, add a directed edge by mouse drag or touch "drag" from one node to another (or a loop that goes back to itself).
📗 Remove a node by changing to "Eraser" mode and mouse click or touch the node, remove a directed edge by mouse drag or touch "drag" from one node to another.
graph
📗 [1 points] (Enter text) Please enter your name in the textbox below.
📗 Any non-empty entry is will receive full points.
📗 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: 1" 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.