Problem Statement

Let’s imagine Bob has to plan out a day for his date in Vancouver. He has to figure out how to maximize the most of his day by doing as much activity as possible in a single day based on how important each activity is.

GIF from GIPHY
https://giphy.com/gifs/cartoons-comics-excited-humor-TXJiSN8vCERuE

GIF from GIPHY https://giphy.com/gifs/cartoons-comics-excited-humor-TXJiSN8vCERuE

This is similar to the knapsack problem where instead of maximizing the number of valuable item in a bag, we will maximize the number of activity in a day that is valuable to the person Bob is dating.

Define Variable

Identify Constraints & Assumptions

Build Solution

$$ \begin{aligned} \text{maximize}\qquad &\sum^n_{i=1}v_ix_i\\ \text{subject to}\qquad & \sum^n_{i=1}\beta_ix_i &\leq \Beta\\ &\sum^n_{i=1}t_ix_i &\leq T\\ \ &x_i \in \{0,1\} \end{aligned} $$