## Problem Description and Formulation

Kappa Medical wants to mix two creams, Alpha and Beta, to create a mixture that contains at least 4 units of compound X and 8 units of compound Y. The amounts of compound X and Y in each cream are given as follows:

- Cream Alpha: 2 units/mg of compound X, 2.7 units/mg of compound Y
- Cream Beta: 4.1 units/mg of compound X, 3.2 units/mg of compound Y

The costs of purchasing creams Alpha and Beta are $0.70 per mg and $0.90 per mg, respectively. The goal is to minimize the cost of the mixture while meeting the requirements for compounds X and Y.

## Mathematical Formulation

Let \(x\) be the amount of cream Alpha in mg and \(y\) be the amount of cream Beta in mg. The problem can be formulated as a linear programming problem:

### Objective Function

Minimize the total cost: \(0.70x + 0.90y\)

### Constraints

1. Compound X constraint: \(2x + 4.1y \geq 4\)
2. Compound Y constraint: \(2.7x + 3.2y \geq 8\)
3. Non-negativity constraints: \(x \geq 0, y \geq 0\)

## Gurobi Code

```python
import gurobi

def solve_kappa_medical_problem():
    # Create a new model
    model = gurobi.Model()

    # Define variables
    x = model.addVar(name="cream_alpha", lb=0, ub=gurobi.GRB.INFINITY)
    y = model.addVar(name="cream_beta", lb=0, ub=gurobi.GRB.INFINITY)

    # Objective function: minimize cost
    model.setObjective(0.70 * x + 0.90 * y, gurobi.GRB.MINIMIZE)

    # Constraints
    model.addConstr(2 * x + 4.1 * y >= 4, name="compound_x_constraint")
    model.addConstr(2.7 * x + 3.2 * y >= 8, name="compound_y_constraint")

    # Optimize
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print("Optimal cost: ", model.objVal)
        print("Amount of cream Alpha: ", x.varValue)
        print("Amount of cream Beta: ", y.varValue)
    else:
        print("The problem is infeasible")

solve_kappa_medical_problem()
```