## Problem Description and Formulation

The problem is a linear programming optimization problem. The goal is to maximize the viewership of a movie by placing posters in three malls: Northside, Southside, and Central, under certain constraints.

### Variables

- \(x_N\): Number of posters placed at the Northside mall
- \(x_S\): Number of posters placed at the Southside mall
- \(x_C\): Number of posters placed at the Central mall

### Objective Function

The objective is to maximize the total viewership. The viewership attracted by each poster at the respective malls is given as:
- Northside: 20,000 viewers per poster
- Southside: 50,000 viewers per poster
- Central: 40,000 viewers per poster

So, the objective function to maximize is: \(20,000x_N + 50,000x_S + 40,000x_C\)

### Constraints

1. **Budget Constraint**: The total cost should not exceed $30,000.
   - Cost at Northside: $500 per poster
   - Cost at Southside: $1,000 per poster
   - Cost at Central: $800 per poster
   - So, \(500x_N + 1000x_S + 800x_C \leq 30,000\)

2. **Southside Limitation**: The number of posters at Southside should not exceed 5.
   - \(x_S \leq 5\)

3. **Central Mall Limitation**: At most a third of the posters should be placed at the Central mall.
   - \(x_C \leq \frac{1}{3}(x_N + x_S + x_C)\)
   - This can be rewritten as \(3x_C \leq x_N + x_S + x_C\) or \(2x_C \leq x_N + x_S\)

4. **Northside Requirement**: At least 20% of the posters should be placed at the Northside mall.
   - \(x_N \geq 0.20(x_N + x_S + x_C)\)
   - This can be rewritten as \(5x_N \geq x_N + x_S + x_C\) or \(4x_N \geq x_S + x_C\)

5. **Non-Negativity Constraint**: The number of posters cannot be negative.
   - \(x_N \geq 0, x_S \geq 0, x_C \geq 0\)

## Gurobi Code

```python
import gurobi

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

    # Define variables
    x_N = model.addVar(name="Northside", vtype=gurobi.GRB.INTEGER, lb=0)
    x_S = model.addVar(name="Southside", vtype=gurobi.GRB.INTEGER, lb=0)
    x_C = model.addVar(name="Central", vtype=gurobi.GRB.INTEGER, lb=0)

    # Objective function: Maximize viewership
    model.setObjective(20000*x_N + 50000*x_S + 40000*x_C, gurobi.GRB.MAXIMIZE)

    # Budget constraint
    model.addConstr(500*x_N + 1000*x_S + 800*x_C <= 30000, name="Budget")

    # Southside limitation
    model.addConstr(x_S <= 5, name="Southside_Limit")

    # Central mall limitation
    model.addConstr(2*x_C <= x_N + x_S, name="Central_Limit")

    # Northside requirement
    model.addConstr(4*x_N >= x_S + x_C, name="Northside_Requirement")

    # Optimize
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal Solution:")
        print(f"Northside: {x_N.varValue}")
        print(f"Southside: {x_S.varValue}")
        print(f"Central: {x_C.varValue}")
        print(f"Max Viewership: {model.objVal}")
    else:
        print("No optimal solution found.")

solve_poster_placement()
```