Skip to content
The Lumenary

Practice · Advanced undergraduate

Optimisation

Optimisation

Warm-upHuman

Maximise 2x+y2x + y subject to x+y≤4x + y \le 4, x≤3x \le 3, x,y≥0x, y \ge 0. What is the optimal value?

Optimisation

Warm-upHuman

Which of these functions R→R\mathbb{R} \to \mathbb{R} are convex? (Choose all that apply.)

Choose all that apply

Optimisation

CoreHuman

In the workshop problem (max⁡3x+5y\max 3x + 5y subject to x≤4x \le 4, 2y≤122y \le 12, 3x+2y≤183x + 2y \le 18, x,y≥0x, y \ge 0) the optimal dual solution is y=(0,32,1)y = (0, \tfrac32, 1). By how much does the maximum profit increase if workshop C gets one extra hour (so 3x+2y≤193x + 2y \le 19)?

Optimisation

CoreHuman

In the proof of weak duality, cTx≤(ATy)Tx=yT(Ax)≤yTbc^{\mathsf T}x \le (A^{\mathsf T}y)^{\mathsf T}x = y^{\mathsf T}(Ax) \le y^{\mathsf T}b. Which hypotheses justify the last inequality yT(Ax)≤yTby^{\mathsf T}(Ax) \le y^{\mathsf T}b?

Choose one

Optimisation

CoreHuman

Minimise (x−3)2+(y−1)2(x - 3)^2 + (y - 1)^2 subject to x+y≤2x + y \le 2. Which point is the minimiser?

Choose one

Optimisation

CoreFormal

The Lean theorem local_min_convex_global assumes hf : ConvexOn ℝ Set.univ f and hx : IsLocalMin f x and concludes f x ≤ f y. Which function and point show that the convexity hypothesis hf cannot be dropped?

Choose one

Optimisation

StretchHuman

Gradient descent with step 1/L1/L is run on a convex LL-smooth function with L=4L = 4, starting at distance ∥x0−x∗∥=3\|x_0 - x^*\| = 3 from a minimiser. Using Theorem 9, what is the smallest number of steps kk that guarantees f(xk)−f(x∗)≤0.01f(x_k) - f(x^*) \le 0.01?

Optimisation

StretchComputational

Write gradient_descent(grad, x0, step, iters) that applies x↦x−step⋅grad(x)x \mapsto x - \text{step} \cdot \text{grad}(x) to a number x0 iters times and returns the final value. Then use it on f(x)=2(x−3)2f(x) = 2(x - 3)^2, whose gradient is 4(x−3)4(x - 3) (so L=4L = 4), and observe that steps below 2/L=0.52/L = 0.5 converge while larger steps diverge.

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.