Hayden Molz

Problems I'm thinking about

Demo Post Title

Published May 1, 2026

Office
Photo by LYCS Architecture on Unsplash

Background

This is the opening section of the post. Use this area to explain the motivation for the problem, why it matters, and what question you are trying to answer.

Data

This section can describe the data, assumptions, sets, parameters, or example values used in the post.


import pandas as pd

df = pd.read_csv("data.csv")
print(df.head())

Mathematical Model

Let \(x_j\) be 1 if option \(j\) is selected, and 0 otherwise.

\[ \begin{align} \min \quad & Z = \sum_{j \in J} c_j x_j \\ \text{s.t.}\quad & \sum_{j \in J} a_{ij} x_j \ge 1 && \forall i \in I \\ & x_j \in \{0,1\} && \forall j \in J \end{align} \]

Python Implementation

Using the PuLP library to solve a small example:


import pulp as pl

# Define indices and parameters
I = range(3)
J = range(3)

A = [
    [1, 0, 1],
    [0, 1, 1],
    [1, 1, 0]
]

c = [1, 1, 1]

# Define Model
model = pl.LpProblem("Demo-Set-Covering", pl.LpMinimize)

# Decision Variables
x = pl.LpVariable.dicts("x", J, cat='Binary')

# Objective Function
model += pl.lpSum(c[j] * x[j] for j in J)

# Constraints
for i in I:
    model += pl.lpSum(A[i][j] * x[j] for j in J) >= 1

model.solve()
  

Results

This section can summarize the selected variables, objective value, and what the solution means.

Discussion

This section can explain the intuition behind the result, limitations of the model, and possible extensions.