# Maths solution for students in pairs puzzle

**URL:** <https://boards.straightdope.com/t/maths-solution-for-students-in-pairs-puzzle/150415>\
**Category:** Factual Questions\
**Created:** [January 23, 2003, 11:10am UTC](https://boards.straightdope.com/t/maths-solution-for-students-in-pairs-puzzle/150415 "2003-01-23T11:10:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Junior\_Spaceman](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Junior\_Spaceman](https://boards.straightdope.com/u/Junior_Spaceman)\
**Post date:** [January 23, 2003, 11:10am UTC](https://boards.straightdope.com/t/maths-solution-for-students-in-pairs-puzzle/150415/1 "2003-01-23T11:10:16Z")

</div>

First off, I have to warn, I’m not much of a maths wizz, so if I’ve messed up any terms, I apologise (except for ‘maths’, which is the correct Australian way of saying ‘math’ ;))

I was once chatting with someone who was doing a Phd in Mathematics, and he mentioned that he’d solved a problem that a friend of his (who was a teacher) was having, using the branch of mathematics he was expert in (which I think was something like set theory).

The problem is as follows:

There are twenty students in a class. Students are to be paired up for a week, and then rotated, so the following week everyone is working with a different partner. No two students are to be paired together more than once for the nineteen weeks the class is together.

For example, if there were four students:  
week 1:  
student 1 and 2 work together; student 3 and 4 work together

week 2:  
student 1 and 3 work together; student 2 and 4 work together

week 3:  
student 1 and 4 work together; student 2 and 3 work together

I can work it out for ten students by hand, but there’s supposedly a mathematical way of doing it, which can be extended to very large numbers of students. Do any of the wise folk here have any suggestions?

---

<div class="post-metadata">

**Author:** ![grimpixie](https://avatars.discourse-cdn.com/v4/letter/g/ecb155/32.png) [@grimpixie](https://boards.straightdope.com/u/grimpixie)\
**Post date:** [January 23, 2003, 11:17am UTC](https://boards.straightdope.com/t/maths-solution-for-students-in-pairs-puzzle/150415/2 "2003-01-23T11:17:18Z")

</div>

> [@](#):
>
> \*Originally posted by HenrySpencer \*  
> \*\*… I apologise (except for ‘maths’, which is the correct Australian way of saying ‘math’ ;)) \*\*

**Never** apologise for being correct - _Math_ ith a church thervith for Catholicth!! 😉

I must admit that I don’t really understand your question - are you asking for a way of easily producing a listing of all the different combinations of pupils that will occur during the 19 week course?

Grim

---

<div class="post-metadata">

**Author:** ![Bryan\_Ekers](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bryan_ekers/32/183_2.png) [@Bryan\_Ekers](https://boards.straightdope.com/u/Bryan_Ekers)\
**Post date:** [January 23, 2003, 11:27am UTC](https://boards.straightdope.com/t/maths-solution-for-students-in-pairs-puzzle/150415/3 "2003-01-23T11:27:04Z")

</div>

You’re essentially talking about “round robin scheduling”, which is commonly applied to sporting events in which each team (or participant) plays every other team (or participant) exactly once.

[This page](http://www.devenezia.com/downloads/round-robin/) discusses some of the math in detail, and you can set N=20 to get a full schedule of pairings of 20 students.

---

<div class="post-metadata">

**Author:** ![aahala](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@aahala](https://boards.straightdope.com/u/aahala)\
**Post date:** [January 23, 2003, 3:13pm UTC](https://boards.straightdope.com/t/maths-solution-for-students-in-pairs-puzzle/150415/4 "2003-01-23T15:13:52Z")

</div>

Perhaps I don’t understand the problem correctly.

I take it as rather simple. If N=number of players, then (N-1)! are the number of pairings.

If each plays once a week, then the number of weeks would be  
N-1 if the number of players was even and simply N if odd.

---

<div class="post-metadata">

**Author:** ![Junior\_Spaceman](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Junior\_Spaceman](https://boards.straightdope.com/u/Junior_Spaceman)\
**Post date:** [January 23, 2003, 10:36pm UTC](https://boards.straightdope.com/t/maths-solution-for-students-in-pairs-puzzle/150415/5 "2003-01-23T22:36:32Z")

</div>

**Bryan** , thanks for that link - it’s exactly what I was after. Now I just have to wade through the maths 🙂
