## Symbolic Representation

The problem can be represented symbolically as follows:

Let's define the variables:
- $x_1$ as the number of ads in DIY videos
- $x_2$ as the number of ads in shopping videos
- $x_3$ as the number of ads in unboxing videos

The objective is to maximize viewership, which can be represented as:
\[ \text{Maximize:} \quad 10000x_1 + 4000x_2 + 9000x_3 \]

The constraints are:
1. Budget constraint: $5000x_1 + 3200x_2 + 4000x_3 \leq 120000$
2. Limit on DIY videos: $x_1 \leq 5$
3. Limit on unboxing videos: $x_3 \leq 0.5(x_1 + x_2 + x_3)$
4. Minimum shopping videos: $x_2 \geq 0.2(x_1 + x_2 + x_3)$
5. Non-negativity: $x_1, x_2, x_3 \geq 0$ and integer

## Converting to Gurobi Code

Here is the Gurobi code in Python:

```python
import gurobi

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

    # Define the variables
    x1 = model.addVar(name="x1", vtype=gurobi.GRB.INTEGER)  # DIY videos
    x2 = model.addVar(name="x2", vtype=gurobi.GRB.INTEGER)  # Shopping videos
    x3 = model.addVar(name="x3", vtype=gurobi.GRB.INTEGER)  # Unboxing videos

    # Objective function: Maximize viewership
    model.setObjective(10000*x1 + 4000*x2 + 9000*x3, gurobi.GRB.MAXIMIZE)

    # Budget constraint
    model.addConstr(5000*x1 + 3200*x2 + 4000*x3 <= 120000)

    # Limit on DIY videos
    model.addConstr(x1 <= 5)

    # Limit on unboxing videos
    model.addConstr(x3 <= 0.5*(x1 + x2 + x3))

    # Minimum shopping videos
    model.addConstr(x2 >= 0.2*(x1 + x2 + x3))

    # Non-negativity
    model.addConstr(x1 >= 0)
    model.addConstr(x2 >= 0)
    model.addConstr(x3 >= 0)

    # Solve the model
    model.optimize()

    # Print the solution
    if model.status == gurobi.GRB.OPTIMAL:
        print("Optimal Solution:")
        print(f"Ads in DIY videos: {x1.varValue}")
        print(f"Ads in shopping videos: {x2.varValue}")
        print(f"Ads in unboxing videos: {x3.varValue}")
        print(f"Max Viewership: {model.objVal}")
    else:
        print("The model is infeasible")

solve_ad_optimization()
```

## Symbolic Representation in JSON

```json
{
    'sym_variables': [('x1', 'ads in DIY videos'), ('x2', 'ads in shopping videos'), ('x3', 'ads in unboxing videos')],
    'objective_function': '10000*x1 + 4000*x2 + 9000*x3',
    'constraints': [
        '5000*x1 + 3200*x2 + 4000*x3 <= 120000',
        'x1 <= 5',
        'x3 <= 0.5*(x1 + x2 + x3)',
        'x2 >= 0.2*(x1 + x2 + x3)',
        'x1, x2, x3 >= 0'
    ]
}
```