Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
doom2day

Big favor request

Recommended Posts

I need a schedule. But first, I need to post the requirements of this schedule:
There are 20 teams.
Each team needs to play against each other team at least twice.


There need to be between 14 and 16 days in the schedule to get every team's requirements met..
In each day there are 5 matches: 4 teams in each match.
In those matches, 4 teams play against each other.

No team can appear twice in any day.

Here is a schedule that fits these requirements in 20 days.

* the teams are 0 - 19. for the spaces that have a -1, any team can go there.

Schedule


Day 1	 Match 1           Match 2           Match 3           Match 4           Match 5          
		0		1		2		3		7
		19		5		17		18		10
		11		8		13		9		14
		12		4		15		6		16

Day 2	 Match 1           Match 2           Match 3           Match 4           Match 5          
		0		1		2		4		5
		6		17		13		15		18
		12		7		10		16		19
		9		3		14		8		11

Day 3	 Match 1           Match 2           Match 3           Match 4           Match 5          
		0		1		2		4		8
		14		12		7		6		11
		17		5		9		15		13
		18		3		10		16		19

Day 4	 Match 1           Match 2           Match 3           Match 4           Match 5          
		0		2		4		6		10
		7		17		19		13		16
		1		5		9		15		14
		11		3		12		8		18

Day 5	 Match 1           Match 2           Match 3           Match 4           Match 5          
		0		1		2		4		8
		3		9		18		17		10
		16		6		11		13		19
		5		14		12		7		15

Day 6	 Match 1           Match 2           Match 3           Match 4           Match 5          
		0		1		3		4		5
		2		10		6		14		17
		9		18		19		11		16
		8		13		12		7		15

Day 7	 Match 1           Match 2           Match 3           Match 4           Match 5          
		0		1		2		5		7
		10		9		4		11		8
		14		19		3		13		12
		15		17		18		6		16

Day 8	 Match 1           Match 2           Match 3           Match 4           Match 5          
		0		1		3		5		12
		19		2		11		10		17
		4		6		8		14		7
		13		16		15		18		9

Day 9	 Match 1           Match 2           Match 3           Match 4           Match 5          
		0		1		5		6		9
		15		4		10		14		18
		3		11		19		17		16
		7		2		13		8		12

Day 10	 Match 1           Match 2           Match 3           Match 4           Match 5          
		0		1		3		4		6
		5		14		16		17		7
		8		15		13		10		9
		2		18		11		12		19

Day 11	 Match 1           Match 2           Match 3           Match 4           Match 5          
		0		1		2		3		5
		18		19		12		8		9
		6		15		16		10		11
		4		13		7		14		17

Day 12	 Match 1           Match 2           Match 3           Match 4           Match 5          
		0		1		2		3		5
		13		8		14		9		7
		17		12		19		4		6
		10		-1		15		-1		-1

Day 13	 Match 1           Match 2           Match 3           Match 4           Match 5          
		0		2		3		4		7
		16		19		13		5		15
		1		6		14		-1		18
		-1		-1		10		-1		8

Day 14	 Match 1           Match 2           Match 3           Match 4           Match 5          
		1		3		4		5		6
		10		19		14		7		17
		-1		-1		-1		12		11
		-1		-1		-1		9		-1

Day 15	 Match 1           Match 2           Match 3           Match 4           Match 5          
		4		5		7		8		-1
		10		14		19		17		-1
		-1		15		13		9		-1
		-1		-1		18		16		-1

Day 16	 Match 1           Match 2           Match 3           Match 4           Match 5          
		6		7		8		9		11
		10		19		18		13		16
		-1		-1		12		15		17
		-1		-1		-1		14		-1

Day 17	 Match 1           Match 2           Match 3           Match 4           Match 5          
		6		9		12		17		-1
		10		15		16		18		-1
		-1		11		14		19		-1
		-1		13		-1		-1		-1

Day 18	 Match 1           Match 2          Match 3           Match 4           Match 5          
		9		12		16		-1		-1
		11		13		19		-1		-1
		10		14		18		-1		-1
		-1		15		-1		-1		-1

Day 19	 Match 1           Match 2           Match 3           Match 4           Match 5          
		10		13		14		-1		-1
		15		16		19		-1		-1
		11		-1		-1		-1		-1
		12		-1		-1		-1		-1

Day 20	 Match 1           Match 2           Match 3           Match 4           Match 5          
		11		12		16		-1		-1
		14		13		19		-1		-1
		-1		-1		-1		-1		-1
		-1		-1		-1		-1		-1
I have a program in java that I made and used. It didn't really get me far. The best I've gotten so far is an 18 day schedule. Not good enough. Even that took a while. I tried going for a 16 day schedule over a weekend and I got 180,000,000 failures.

If someone can help me find a working schedule that has a length between 14 and 16 days or can prove that it is impossible/ greatly impractical, I would be thankful beyond words. Thank you for reading my request.

Oh yeah, why aren't there spoiler tags?

Share this post


Link to post

Maybe Fredrik will come in here and solve it in five seconds with like six quadratic equations and some calculus and mock our weak computational skills.

Share this post


Link to post
fraggle said:

If the teams are 0-20 then there are 21 teams. Do you mean 0-19?

I thought of that, too, but then I saw that there was no 20 in the schedule and concluded it was just a typo.

Share this post


Link to post
exp(x) said:

I thought of that, too, but then I saw that there was no 20 in the schedule and concluded it was just a typo.

How did I mess up my zero based counting? I'm fixing it right now.
Thank you.

If I had a paypal account and maybe a credit card, I would offer a $100 (US) wager (reward) for a working solution.

Share this post


Link to post

Mine was way more simple and no one even commented on that thing, you think someone is going to solve this for you?

Good fucking luck

Share this post


Link to post

Day 1  Match 1  Match 2  Match 3  Match 4  Match 5
       0        1        2        3        4
       5        6        7        8        9
       10       11       12       13       14
       15       16       17       18       19
  
Day 2  Match 1  Match 2  Match 3  Match 4  Match 5
       0        1        2        3        4
       6        7        8        9        5
       12       13       14       10       11
       18       19       15       16       17
  
Day 3  Match 1  Match 2  Match 3  Match 4  Match 5
       0        1        2        3        4
       7        8        9        5        6
       14       10       11       12       13
       16       17       18       19       15

Day 4  Match 1  Match 2  Match 3  Match 4  Match 5
       0        1        2        3        4
       8        9        5        6        7
       11       12       13       14       10
       19       15       16       17       18
  
Day 5  Match 1  Match 2  Match 3  Match 4  Match 5
       0        1        2        3        4
       9        5        6        7        8
       13       14       10       11       12
       17       18       19       15       16
  
Day 6  Match 1  Match 2  Match 3  Match 4  Match 5
       0        5        10       15       4
       1        6        11       16       9
       2        7        12       17       14
       3        8        13       18       19
  
Day 7  Match 1  Match 2  Match 3  Match 4  Match 5
       1        6        11       16       0
       2        7        12       17       5
       3        8        13       18       10
       4        9        14       19       15
 
Day 8  Match 1  Match 2  Match 3  Match 4  Match 5
       0        5        10       15       -1
       4        9        14       19       -1
       -1       -1       -1       -1       -1
       -1       -1       -1       -1       -1

Day 9  Match 1  Match 2  Match 3  Match 4  Match 5
       0        1        2        3        4
       5        6        7        8        9
       10       11       12       13       14
       15       16       17       18       19
  
Day 10 Match 1  Match 2  Match 3  Match 4  Match 5
       0        1        2        3        4
       6        7        8        9        5
       12       13       14       10       11
       18       19       15       16       17
  
Day 11 Match 1  Match 2  Match 3  Match 4  Match 5
       0        1        2        3        4
       7        8        9        5        6
       14       10       11       12       13
       16       17       18       19       15

Day 12 Match 1  Match 2  Match 3  Match 4  Match 5
       0        1        2        3        4
       8        9        5        6        7
       11       12       13       14       10
       19       15       16       17       18
  
Day 13 Match 1  Match 2  Match 3  Match 4  Match 5
       0        1        2        3        4
       9        5        6        7        8
       13       14       10       11       12
       17       18       19       15       16
  
Day 14 Match 1  Match 2  Match 3  Match 4  Match 5
       0        5        10       15       4
       1        6        11       16       9
       2        7        12       17       14
       3        8        13       18       19
  
Day 15 Match 1  Match 2  Match 3  Match 4  Match 5
       1        6        11       16       0
       2        7        12       17       5
       3        8        13       18       10
       4        9        14       19       15
 
Day 16 Match 1  Match 2  Match 3  Match 4  Match 5
       0        5        10       15       -1
       4        9        14       19       -1
       -1       -1       -1       -1       -1
       -1       -1       -1       -1       -1

Share this post


Link to post

I'll check it then.
Edit:
I'm not done and I'm impressed.

VERY IMPRESSED.

Thank you.

I don't know how you did it.

Share this post


Link to post
yomoneyboat said:

Most productive first post ever?

Yeah, because that's obviously not an alternate account. I'd be interested in seeing how it was solved, though. I didn't even attempt to find a solution.

Share this post


Link to post

Really though, he (she?) came out of nowhere solving my dilemma. Well... I better check it first though.
This reminds me of something...
http://www.xkcd.com/208/
Yeah, it worked. Lots of thanks.

EDIT:

I found a way to condense your schedule to 15 days.
Shift the teams in the second half up by 2, then that leaves you able to merge days 16 and 8.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×