I have 24 students in my class (A, B, C, ..., X). They will work on five projects during the semester in teams of three. I want to create the teams so that students who have been in a team once will not work in another team. Is there an algorithm I can use for this? Thank you.
-
Each student will be in a team with another $10$ students during the year. I am sure it can be done. – Asinomás Feb 25 '15 at 00:18
-
http://www.logic.at/prolog/mst.pdf – Asinomás Feb 25 '15 at 00:32
-
Thank you! Several algorithms there. – Ravi Shukla Feb 25 '15 at 00:42
1 Answers
I found a solution that works for up to seven projects. It is probably not the maximum, I can investigate more if you would like, but this works.
$\begin{bmatrix}1 & 2&3 &4&5&6&7&8\\9&10&11&12&13&14&15&16\\17&18&19&20&21&22&23&24\end{bmatrix}$
We will separate them so that each project has one from each row. As follows:
First project:
$\begin{bmatrix}\color{red}1 & \color{blue}2&\color{green}3 &\color{cyan}4&\color{grey}5&\color{purple}6&\color{brown}7&\color{magenta}8\\\color{red}9 & \color{blue}{10}&\color{green}{11} &\color{cyan}{12}&\color{grey}{13}&\color{purple}{14}&\color{brown}{15}&\color{magenta}{16}\\\color{red}{17}&\color{blue}{18}&\color{green}{19} &\color{cyan}{20}&\color{grey}{21}&\color{purple}{22}&\color{brown}{23}&\color{magenta}{24}\end{bmatrix}$
After this we move the middle row by one and the bottom row by two every time
Second project:
$\begin{bmatrix}\color{red}1 & \color{blue}2&\color{green}3 &\color{cyan}4&\color{grey}5&\color{purple}6&\color{brown}7&\color{magenta}8\\\color{magenta}{9}&\color{red}{10} & \color{blue}{11}&\color{green}{12} &\color{cyan}{13}&\color{grey}{14}&\color{purple}{15}&\color{brown}{16}\\\color{brown}{17}&\color{magenta}{18}&\color{red}{19}&\color{blue}{20}&\color{green}{21} &\color{cyan}{22}&\color{grey}{23}&\color{purple}{24}\end{bmatrix}$
Third project:
$\begin{bmatrix}\color{red}1 & \color{blue}2&\color{green}3 &\color{cyan}4&\color{grey}5&\color{purple}6&\color{brown}7&\color{magenta}8\\\color{brown}{9}&\color{magenta}{10}&\color{red}{11} & \color{blue}{12}&\color{green}{13} &\color{cyan}{14}&\color{grey}{15}&\color{purple}{16}\\\color{grey}{17}&\color{purple}{18}&\color{brown}{19}&\color{magenta}{20}&\color{red}{21}&\color{blue}{22}&\color{green}{23} &\color{cyan}{24}\end{bmatrix}$
Fourth project:
$\begin{bmatrix}\color{red}1 & \color{blue}2&\color{green}3 &\color{cyan}4&\color{grey}5&\color{purple}6&\color{brown}7&\color{magenta}8\\\color{purple}{9}&\color{brown}{10}&\color{magenta}{11}&\color{red}{12} & \color{blue}{13}&\color{green}{14} &\color{cyan}{15}&\color{grey}{16}\\\color{green}{17}&\color{cyan}{18}&\color{grey}{19}&\color{purple}{20}&\color{brown}{21}&\color{magenta}{22}&\color{red}{23}&\color{blue}{24} \end{bmatrix}$
We now have to change strategy a bit, just this once we move the bottom row by three instead of the normal $2$:
Fifth project :
$\begin{bmatrix}\color{red}1 & \color{blue}2&\color{green}3 &\color{cyan}4&\color{grey}5&\color{purple}6&\color{brown}7&\color{magenta}8\\\color{grey}{9}&\color{purple}{10}&\color{brown}{11}&\color{magenta}{12}&\color{red}{13} & \color{blue}{14}&\color{green}{15} &\color{cyan}{16}\\\color{magenta}{17}&\color{red}{18}&\color{blue}{19}&\color{green}{20}&\color{cyan}{21}&\color{grey}{22}&\color{purple}{23}&\color{brown}{24} \end{bmatrix}$
Sixth project :
$\begin{bmatrix}\color{red}1 & \color{blue}2&\color{green}3 &\color{cyan}4&\color{grey}5&\color{purple}6&\color{brown}7&\color{magenta}8\\\color{cyan}{9}&\color{grey}{10}&\color{purple}{11}&\color{brown}{12}&\color{magenta}{13}&\color{red}{14} & \color{blue}{15}&\color{green}{16} \\\color{purple}{17}&\color{brown}{18}&\color{magenta}{19}&\color{red}{20}&\color{blue}{21}&\color{green}{22}&\color{cyan}{23}&\color{grey}{24}\end{bmatrix}$
Seventh project:
$\begin{bmatrix}\color{red}1 & \color{blue}2&\color{green}3 &\color{cyan}4&\color{grey}5&\color{purple}6&\color{brown}7&\color{magenta}8\\\color{green}{9}&\color{cyan}{10}&\color{grey}{11}&\color{purple}{12}&\color{brown}{13}&\color{magenta}{14}&\color{red}{15} & \color{blue}{16}\\\color{cyan}{17}&\color{grey}{18}&\color{purple}{19}&\color{brown}{20}&\color{magenta}{21}&\color{red}{22}&\color{blue}{23}&\color{green}{24} \end{bmatrix}$
You can probably schedule even more projects, unfortunately my combinatorial-design-fu is still to weak.
- 105,651
-
Thanks again. This is way more than what I had expected. I understand the underlying process, I think, and will be able to generalize it to even bigger classes. – Ravi Shukla Feb 26 '15 at 00:01