Building the schedule for a speed date algorithm

wolf1015

New Member
Joined
Mar 10, 2016
Messages
1
Hello everyone.


The Problem
==========


I am working on a speed date project. The "who meets whom" part is already solved, and the output of that is a full list with all the pairs that will be meeting that day. The actual speed dating day will consist of **N rounds**, and will have **P participants**. The restrictions are:


- **P** is an **even** number
- Each participant is represented by a number, from 1 to P
- N is equal or lower than P-1
- **Each person meets N other people**, and **is seen by N people as well**. Consequently, people don't "sit out" (i.e. everyone must meet someone on all rounds)
- People meet in pairs, and naturally, one person can only have one meeting on each round.


The Need
==========
**What I need is an algorithm that creates the schedule for the different rounds** (i.e. indicates which pairs are meeting in which round).


The Input
==========
As for the **input**, you are given a list with 2 columns. Each line contains a pair that must meet, and there are " P * N / 2 pairs "(i.e. each round accommodates P/2 pairs).
The lowest number between the two people is on the left column. Not sure this matters.


I can also point out that N will probably be 3, 4 or 5, and that P will be somewhere in the range of 30-40 (again, even numbers only). **I don't need the fastest solution in the world**. If you have an algorithm that solves the problem in under 6 hours with the power of an average desktop, I am happy enough.


Examples
==========


http://i.stack.imgur.com/0aXU6.png : Example 1 has 6 people and 4 rounds. Example 2 has 30 people and 4 rounds.


**Output of the example 1**: One can read the table as: (1st line example) Person1(p1) is meeting p2 on round1, then meets p3 on round 2, then p4 on r3, and finally p5 on r4


**Output of the Example 2:** This showcases where one can start seeing some issues: as we try to allocate the pairs, some clashes start to occur. 1st clash in this example occurs at Yellow (line 19 of the input), and a 2nd clash occurs at red (line 29 of the input). The yellow case was "solved" by simply delaying the pair 6 & 10 to the 2nd round. But when we try to make players 8 & 9 meet, we can see how attempting to make that happen, would cause a cascade of effects on the table.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Forum statistics

Threads
1,215,051
Messages
6,122,871
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top