# Introduction to LP Problems - standard form

## Diet problem
you have a list of food, their macronutrients and the price. You want to get the most out of your food intake for the lowest cost possible

(Per portion)

|Product|Energy (kcal)|Proteins (g)|Calcium (mg)|Price (cent)|
|------|-----|-----|-----|-----|
|Oats|110|4|2|2|25|
|Chicken|205|32|12|130|
|Egg|160|13|54|85|
|Milk|160|8|285|70 |
|Cake|420 |22 | 95|
|Bean|260|14|80|98|

Suppose you require 2000kcal, 55g proteins and 800mg of calcium. Write the LP and the write it in its standard form:

## More problems
### 1
\begin{equation}
\min 3x_1+8x_2+4x_3\\
\textrm{subject to} \begin{cases}
x_1+x_2 \ge 8\\
2x_1-3x_2 \le 0\\
x_2 \ge 9 \\
x_1,x_2 \ge 0
\end{cases}
\end{equation}
### 2
\begin{equation}
\max 3x_1+2x_2-x_3+x_4\\
\textrm{subject to} \begin{cases}
x_1 + 2x_2 + x_3 - x_4 \le 5\\
-2x_1 - 4 x_2 + x_3 + x_4 \le -1\\
x_1\ge 0,x_2 \le 0
\end{cases}
\end{equation}

### 3
\begin{equation}
\min x_1 - x_2 + x_3\\
\textrm{subject to} \begin{cases}
x_1 + 2x_2 - x_3 \le 3\\
-x_1 + x_2 + x_3 \ge 2\\
x_1 - x_2 = 10\\
x_1 \ge 0, x_2 \le 0
\end{cases}
\end{equation}


### 4
\begin{equation}
\max x_1 - x_2 + x_3\\
\textrm{subject to} \begin{cases}
x_1 + 2x_2 - x_3 \le 3\\
-x_1 + x_2 + x_3 \ge 2\\
x_1 - x_2 = 10\\
x_1 \ge 0, x_2 \le 0
\end{cases}
\end{equation}


```julia

```

5461417eeddfd0453d146899a3a738508973542c
ipynb
Jupyter Notebook
Exercises/PS7bis.ipynb
JuliaTagBot/ES313.jl
3601743ca05bdb2562a26efd8b809c1a4f78c7b1
MIT
Exercises/PS7bis.ipynb
JuliaTagBot/ES313.jl
3601743ca05bdb2562a26efd8b809c1a4f78c7b1
MIT
Exercises/PS7bis.ipynb
JuliaTagBot/ES313.jl
3601743ca05bdb2562a26efd8b809c1a4f78c7b1
MIT
Qwen/Qwen-72B
1. YES
2. YES