What is constrained optimisation in plain words, and why does a constraint change where the best answer is? Use a farmer who has 20 m of fencing and wants the biggest rectangular field?

Linear algebra and optimisation, Constrained optimisation
Level L1 Beginner. Length Short. Nature Th Theoretical.

What's being asked

Whether you can say what an objective and a constraint are, and see that the constraint decides which answers are allowed.

Key idea

Optimising means choosing inputs to make some quantity (the objective) as large or as small as possible. A constraint is a rule the inputs must obey. Without the rule the best answer may not exist or may be silly; with the rule you search only among the allowed choices, and the best allowed choice is often not the best choice overall.

Steps

  1. Name the objective: the area of the field, which the farmer wants as large as possible.
  2. Name the constraint: the fence has length 20 m, so the sides satisfy 2×width+2×length=20. That is, width + length = 10.
  3. Try three allowed fields. Width 2 m, length 8 m: area 16. Width 4 m, length 6 m: area 24. Width 5 m, length 5 m: area 25.
  4. Say what the constraint did. With no fence limit, you could keep making the field bigger forever, so there would be no best answer. With the limit, the best allowed field is the 5 m by 5 m square, with area 25 square metres.
  5. Link to ML: a constraint can be a budget on weights, such as keeping them small, or a rule such as probabilities adding up to 1. A later question shows how calculus finds the best allowed point.

Common mistakes

How long your answer should be

3–5 sentences; the three trial fields are enough.

Read this

Previous in Linear algebra and optimisation: How do full-batch gradient descent, stochastic gradient descent (SGD) and mini-batch gradient descent differ in how they compute each parameter update, and why is mini-batch SGD the standard choice in machine learning (ML)?
Next in Linear algebra and optimisation: What are an eigenvector and an eigenvalue of a square matrix intuitively, why are they useful, and how do you check that v=(1,1)⊤ is an eigenvector of A=(3113) and find its eigenvalue?