Quantcast
Channel: Yet Another Math Programming Consultant
Viewing all articles
Browse latest Browse all 809

The Muffin Problem

$
0
0


We are asked to split \(m=5\) muffins between \(s=3\) students, such that each student gets in total \[\frac{m}{s} = \frac{5}{3}\] worth of muffins [1]. From [2] we see two possible ways of doing this:

Allocation 1

Allocation 2

The problem is to find a way to divide the muffins such that the smallest piece is maximized.

There is a nice and simple MIP formulation for this. Let's define \(x_{i,j}\) as the fraction of muffin \(i\) assigned to student \(j\). Also we need: \[\delta_{i,j} = \begin{cases} 1 & \text{if $x_{i,j} \gt 0$} \\ 0 & \text{if $x_{i,j}=0$}\end{cases}\] Then we can write:


Muffin Problem
\[\begin{align}\max\> & \color{DarkRed} z \\ & \sum_i \color{DarkRed} x_{i,j} = \color{DarkBlue} {\frac{m}{s}} && \forall j\\ & \sum_j \color{DarkRed} x_{i,j} = 1  && \forall i\\ & \color{DarkRed} \delta_{i,j} = 0 \Rightarrow \color{DarkRed} x_{i,j} = 0 \\ & \color{DarkRed} \delta_{i,j} = 1 \Rightarrow \color{DarkRed} z \le \color{DarkRed} x_{i,j} \\ & 0 \le \color{DarkRed} x_{i,j} \le 1\\ & \color{DarkRed} \delta_{i,j} \in \{0,1\}\end{align}\]

The objective takes care of \(x_{i,j}=0 \Rightarrow \delta_{i,j}=0\). The implications can be rewritten as inequalities:

ImplicationInequality
\[\color{DarkRed} \delta_{i,j} = 0 \Rightarrow \color{DarkRed} x_{i,j} = 0 \]\[\color{DarkRed} x_{i,j} \le \color{DarkRed} \delta_{i,j}\]
\[\color{DarkRed} \delta_{i,j} = 1 \Rightarrow \color{DarkRed} z \le \color{DarkRed} x_{i,j} \]\[\color{DarkRed} z \le \color{DarkRed} x_{i,j}+ (1-\color{DarkRed} \delta_{i,j})\]


This is somewhat simpler than the approach used in [3] (that formulation is more explicit in dealing with rational fractions).

The results are:

----     25 VARIABLE x.L  fraction of muffin assigned to student

student1 student2 student3

muffin1 0.4170.583
muffin2 0.4170.583
muffin3 0.5000.500
muffin4 0.4170.583
muffin5 0.4170.583


---- 25 VARIABLE d.L indicator for nonzero x

student1 student2 student3

muffin1 1.0001.000
muffin2 1.0001.000
muffin3 1.0001.000
muffin4 1.0001.000
muffin5 1.0001.000


If student1 arrives early and confiscates muffin1, we can fix \(x_{\text{muffin1},\text{student1}}=1\). With this we can reproduce the first solution:


----     28 VARIABLE x.L  fraction of muffin assigned to student

student1 student2 student3

muffin1 1.000
muffin2 1.000
muffin3 0.3330.667
muffin4 0.6670.333
muffin5 1.000


References

  1. Guangiqi Cui, John Dickerson, Naveen Durvasula, William Gasarch, Erik Metz, Jacob Prinz, Naveen Raman, Daniel Smolyak, Sung Hyun Yoo, The Muffin Problem, 13 Mar 2018, https://arxiv.org/pdf/1709.02452.pdf
  2. https://www.cs.umd.edu/~gasarch/muffintalk.pdf
  3. https://math.stackexchange.com/questions/2958179/how-to-prove-that-1-3-is-the-optimal-solution-for-the-muffin-problem-with-5-stud

Viewing all articles
Browse latest Browse all 809

Trending Articles