How to conclude for maximum and minimum values of n according to the given constraints?

48 Views Asked by At

In a 128 days time, each of 9 friends goes to gym on exactly 78 days. There are $n$ days on which at least 5 of the friends gym. Maximum and minimum possible value of n is ?

What i did was consider a set of $128$ elements each corresponding to one student which tells if he goes on {$day_{1},...day_{128}$} or not . Now we can choose pair of 5 students in $\binom{x}{5}$ ways where x is the number of students and we need this to be each pair goes to gym on n days so $n* \binom{x}{5}$ days but how to relate this with 78days so as to conclude for maximum and minimum values of n?

2

There are 2 best solutions below

2
On BEST ANSWER

Let binary decision variable $x_{f,d}$ indicate whether friend $f$ goes to the gym on day $d$. Let binary decision variable $y_d$ indicate whether at least five friends go to the gym on day $d$. The problem is to maximize or minimize $\sum_d y_d$ subject to linear constraints \begin{align} \sum_d x_{f,d} &= 78 && \text{for all $f$} \tag1 \\ 5 y_d \le \sum_f x_{f,d} &\le 4 + 5 y_d &&\text{for all $d$} \tag2 \end{align} Constraint $(1)$ enforces the rule that each friend goes to the gym on exactly $78$ days. Constraint $(2)$ enforces $y_d = 1 \iff \sum_f x_{f,d} \ge 5$.

Summing $(2)$ over all $d$ yields $$5 \sum_d y_d \le \sum_d \sum_f x_{f,d} \le 128 \cdot 4 + 5 \sum_d y_d.$$ Applying $(1)$ now yields $$5 \sum_d y_d \le 9\cdot 78 \le 128 \cdot 4 + 5 \sum_d y_d,$$ from which we deduce bounds $$38 = \frac{9\cdot 78 - 128 \cdot 4}{5} \le \sum_d y_d \le \frac{9\cdot 78}{5} = 140.4.$$ The upper bound is redundant because we already know that $\sum_d y_d \le 128$.

It turns out that both $38$ and $128$ are attainable.

4
On

This in essence is the same as Robs answer.

Total person days available = $9.78 = 702$.

To get maximum, let us evenly spread on $128$ days, we get $\frac{702}{128} > 5$. So $128$ is feasible.

To get smallest, first let us make sure that we have at least $4$ on any day.

This would give us person days as $702 - 4.128 = 190$.

Now let us spread this among only $5$ people. We will get $38$ as minimum. Why only $5$? so we get minimum overlap possible.