Convex feasible region for a resource budget (source code)

= Convex feasible region for a resource budget
{title2=$C=\{(x,y):x\geq0,\ y\geq0,\ x+2y\leq6\}$}

Consider a stipulated continuous-allocation problem. Amounts $x,y$ of two activities use $x+2y$ units of a common resource, with budget six. The <feasible region>
$$
C=\{(x,y)\in\mathbb R^2:x\geq0,\ y\geq0,\ x+2y\leq6\}
$$
is a <triangle> with <extreme points> $(0,0)$, $(6,0)$ and $(0,3)$. It is the <intersection> of three <closed half-spaces>, hence a <closed convex set>. The general <intersection> argument is short: a <line segment> between two points in every constraint set belongs to every constraint set, so it belongs to their <intersection>.<Convex Optimization by Stephen Boyd and Lieven Vandenberghe>[§2.2.1, p. 27: half-spaces; §2.3.1, p. 36: intersections preserve convexity]{ref}

For an original numerical check, take $A=(1,2)$ and $B=(5,1/4)$. Their resource totals are $5$ and $11/2$. Every <convex combination> $Z(t)=(1-t)A+tB$ is nonnegative and has resource total
$$
Z_x(t)+2Z_y(t)=5+\frac t2\leq\frac{11}{2}<6\qquad(0\leq t\leq1).
$$
In particular the <midpoint> is \b[$(3,9/8)$], using $21/4$ units. This verifies the full <line segment>, rather than just a plotted sample of it.

\Image[/convex-budget-triangle-and-mixture-weights.png]
{title=Feasible averages and convex weights in a continuous resource budget}
{description=Original continuous-allocation model $x\geq0$, $y\geq0$, $x+2y\leq6$. The orange <line segment> joins two feasible allocations; the green point $(2,1)$ is the equal-weight <convex combination> of the three <extreme points>. The shaded region is their <convex hull>, not just the three generating points.}

This is useful whenever divisible quantities share linear limits: the feasible choices remain compatible under averaging. A new <linear equation> also preserves this property, because averaging two identical constraint values gives the same value. The <affine subspace> and <closed half-space> viewpoints explain this without requiring a separate argument for every budget.