## Problem Description and Formulation

The research lab needs to minimize weekly wages while meeting certain requirements for undergraduate and graduate students. Let's denote the number of undergraduate students as \(U\) and the number of graduate students as \(G\).

The requirements are:
1. The lab requires at least 50 students: \(U + G \geq 50\)
2. At least 10 students must be graduate students: \(G \geq 10\)
3. The number of graduate students should be at least a third the number of undergraduate students: \(G \geq \frac{1}{3}U\)

The objective is to minimize weekly wages, with undergraduate students earning $100 a week and graduate students earning $300 a week. The objective function can be formulated as:
\[ \text{Minimize:} \quad 100U + 300G \]

## Converting to Gurobi Code

To solve this linear programming problem using Gurobi, we will use the Gurobi Python interface. First, ensure you have Gurobi installed in your Python environment. You can install it via pip if you have the Gurobi license:

```bash
pip install gurobi
```

Here's the Gurobi code for the problem:

```python
from gurobi import *

# Create a new model
m = Model("ResearchLab")

# Define the variables
U = m.addVar(lb=0, vtype=GRB.INTEGER, name="UndergraduateStudents")
G = m.addVar(lb=0, vtype=GRB.INTEGER, name="GraduateStudents")

# Objective function: Minimize weekly wages
m.setObjective(100*U + 300*G, GRB.MINIMIZE)

# Constraints
m.addConstr(U + G >= 50, name="TotalStudents")
m.addConstr(G >= 10, name="MinGraduateStudents")
m.addConstr(G >= U/3, name="GraduateUndergraduateRatio")

# Optimize the model
m.optimize()

# Print the status of the optimization
print("Optimization Status:", m.status)

# If the model is optimized, print the solution
if m.status == GRB.OPTIMAL:
    print("Undergraduate Students:", U.varValue)
    print("Graduate Students:", G.varValue)
    print("Minimum Weekly Wages: $", 100*U.varValue + 300*G.varValue)
else:
    print("The model is infeasible.")
```