# Rewrite linear optimisation problem in canonical form

Preliminary notation: Consider a finite set $$\mathcal{Y}\equiv \{1,...,L\}$$ and a function $$u:\mathcal{Y}\rightarrow \mathbb{R}$$. Let $$\Delta(\mathcal{Y})$$ be the set of probability distributions over $$\mathcal{Y}$$, that is $$\Delta(\mathcal{Y})\equiv \{P\in \mathbb{R}^L: P_y\geq 0 \forall y\in \mathcal{Y}, \sum_{y\in \mathcal{Y}}P_y=1\}$$

Consider the set $$\mathcal{Y}^*\equiv argmax_{y\in \mathcal{Y}}u(y)$$. For each $$y\in \mathcal{Y}^*$$, take $$P\in \Delta(\mathcal{Y})$$ such that $$P_y=1$$. Collect all such $$|\mathcal{Y}^*|$$ vectors into the set $$\mathcal{B}$$. For example. let $$\mathcal{Y}^*=\{1,2\}$$ and $$L=3$$. Then, $$\mathcal{B}\equiv \{(1,0,0),(0,1,0)\}$$ Let $$co\{\mathcal{B}\}$$ denote the convex hull of $$\mathcal{B}$$.

The linear optimisation problem: I have to solve with Matlab the following linear minimisation problem $$\min_{P\in co\{\mathcal{B}\}}f'P$$ where $$f$$ is a known $$L\times 1$$ vector of parameters.

Question: I want to rewrite this linear minimisation problem in the canonical form requested by solvers (e.g., Matlab). That is, $$\min_P f'P\\ \text{s.t. } A_{eq}P=b_{eq}\\ A_{ineq}P \leq b_{ineq}\\$$ Could you help? I can easily accommodate $$P_y\geq 0$$ $$\forall y\in \mathcal{Y}$$ and $$\sum_{y\in \mathcal{Y}}P_y=1$$ into the canonical contraints above, but I'm struggling to accommodate the part defining $$\mathcal{B}$$.