You're a teacher, you have a standard deck of cards with 2 jokers, so 54 cards in total. You distribute the cards equally amongst your 18 students, resulting in 3 cards per student. they can only have 3 cards at a time.
Each type of card is assigned a different number of points:
Joker - 0
Ace - 1
(2-10) - Respective values
Jack - 11
Queen - 12
King - 13
If you have a pair you are given 5 bonus points. E g. 5,5,6 = 5+5+6+5(bonus)
A triple is 10 bonus points. Ex. 6,6,6 = 6+6+6+10(bonus)
The goal is for students to reach a score of 30 or more. Students can trade cards to reach that goal but they all have to have exactly 3 cards at all times.
The question is, what is the maximum amount of students that can reach a score of 30 or more?
Also me and my friend tried calculating this and we got the max as 10 winners and 8 losers.
the 10 winners would be
- K+6+6
- Q+7+7
- J+7+7
- 10+8+8
- 9+8+8
- 8+9+9
- 6+10+10
- 4+J+J
- 2+Q+Q
- K+K+K
You can solve the problem via integer linear programming as follows. Let the ranks be $R=\{0,\dots,13\}$, with "supply" $s_r=2$ if $r=0$ (two jokers) and $s_r=4$ otherwise. Let $W$ be the set of $88$ possible winning hands $(i,j,k)\in R^3$, with $i \le j \le k$. Let $d_{ijkr}\in\{0,1,2,3\}$ be the "demand" in hand $(i,j,k)$ for rank $r$, that is, the number of cards of rank $r$ among $\{i,j,k\}$. Let nonnegative integer decision variable $x_{ijk}$ represent the number of copies of hand $(i,j,k)$ that are used. The problem is to maximize $$\sum_{(i,j,k)\in W} x_{ijk}$$ subject to linear constraints $$\sum_{(i,j,k)\in W} d_{ijkr} x_{ijk} \le s_r \quad \text{for $r\in R$} \tag1\label1$$ The optimal objective value turns out to be $13$, attained by the following solution: \begin{matrix} i & j & k & \text{score} & x \\ \hline 0 &13 &13 &31 &1 \\ 3 &11 &11 &30 &2 \\ 3 &12 &12 &32 &2 \\ 5 &10 &10 &30 &2 \\ 6 & 6 &13 &30 &2 \\ 7 & 7 & 7 &31 &1 \\ 7 & 9 & 9 &30 &1 \\ 8 & 8 & 9 &30 &2 \end{matrix}
The optimal dual variables of the linear programming relaxation provide a short certificate of optimality. Explicitly, take $\pi_6=1/4$, $\pi_r=1/3$ for $r\in\{7,8,9\}$, and $\pi_r=1/2$ for $r\in\{10,11,12,13\}$. Multiply \eqref{1} by $\pi_r$ and add them up to derive upper bound $$\sum_{(i,j,k)\in W} x_{ijk} \le \sum_{r\in R} \pi_r s_r = \frac{1}{4}\cdot4 + \frac{1}{3}(4+4+4) + \frac{1}{2}(4+4+4+4) = 13.$$