Math/Logic expert help needed please!
Math/Logic expert help needed please!
Author
Discussion

-DeaDLocK-

Original Poster:

3,368 posts

280 months

Tuesday 24th November 2009
quotequote all
Guys,

I need an expert on logics or mathematical sequencing etc.

I need to draw up a tournament bracket/roster for a games tournament I am organising. It is proving to be particularly tricky and I have spent a few unsuccessful hours on it.

1) There are 16 teams (in two groups; A-H and I-P)
2) There are 8 game stations
3) There are 8 sequential time slots

For every time slot, two teams will challenge each other in a different each game station. The order of the game stations is not important. The only conditions are that:

1) Every team play at every station once.
2) Teams from A-H must play against a team from I-P. So, team A cannot challenge team C, but team A will challenge all teams in I-P once.

I have been trying to find a pattern for this to draw up a roster, but am failing. There must be some mathematical way of computing this, and I hope you smart guys can lend a hand.

Thanks!

-DeaDLocK-

Original Poster:

3,368 posts

280 months

Tuesday 24th November 2009
quotequote all
Just to clarify that no two teams will play each other more than once.

Justayellowbadge

37,057 posts

271 months

Tuesday 24th November 2009
quotequote all
1 A I B K C M
2 B J C L D N
3 C K D M E O
4 D L E N F P
5 E M F O G I
6 F N G P H J
7 G O H I A K
8 H P A J B L

And so on....

havoc

33,384 posts

264 months

Tuesday 24th November 2009
quotequote all
JAYB has the right idea, sort-of. Try this instead:-

Time 1: AI/BJ/CK/DL/...
Time 2: AJ/BK/CL/DM/...
Time 3: AK/BL/CM/DN/...
etc...

Basically you've got 3 axes. Keep one fixed (in this case "Team A-H" - note they don't move in the above chart), and flex the other two linearly to each other, so as "Time" processes forwards, "Team I-P" processes forwards too.

Edited by havoc on Tuesday 24th November 13:16

Justayellowbadge

37,057 posts

271 months

Tuesday 24th November 2009
quotequote all
That's what I said!

The formatting confuses it, but 1-8 on my solution are the stations, not times - that would be the columns..


-DeaDLocK-

Original Poster:

3,368 posts

280 months

Tuesday 24th November 2009
quotequote all
Close guys, and appreciate the help, but no cigar. There ends up being a situation where two teams play each other twice.

To make it easier to map out and to see, I've created an Excel spreadsheet - fill in the top row of each box with A-H, and the bottom of I-P. No two boxes can have the same combinations, but yet every team must occupy each row of time and column of station once.

http://www.xrcmedia.com/file.xls

It's harder than it looks, and would really appreciate assistance. Am pulling my hair out!

Rollcage

11,345 posts

221 months

Tuesday 24th November 2009
quotequote all
edited for idiocy-cant delete on mobile PH!

Edited by Rollcage on Tuesday 24th November 14:07

Justayellowbadge

37,057 posts

271 months

Tuesday 24th November 2009
quotequote all
-DeaDLocK- said:
Close guys, and appreciate the help, but no cigar. There ends up being a situation where two teams play each other twice.

To make it easier to map out and to see, I've created an Excel spreadsheet - fill in the top row of each box with A-H, and the bottom of I-P. No two boxes can have the same combinations, but yet every team must occupy each row of time and column of station once.

http://www.xrcmedia.com/file.xls

It's harder than it looks, and would really appreciate assistance. Am pulling my hair out!
No repetition, I assure you.

1 A vs I B vs K C vs M D vs O E vs I F vs K G vs M H vs O
2 B vs J C vs L D vs N E vs P F vs J G vs L H vs N A vs P
3 C vs K D vs M E vs O F vs I G vs K H vs M A vs O B vs I
4 D vs L E vs N F vs P G vs J H vs L A vs N B vs P C vs J
5 E vs M F vs O G vs I H vs K A vs M B vs O C vs I D vs K
6 F vs N G vs P H vs J A vs L B vs N C vs P D vs J E vs L
7 G vs O H vs I A vs K B vs M C vs O D vs I E vs K F vs M
8 H vs P A vs J B vs L C vs N D vs P E vs J F vs L G vs N


Station number to the left, each column pairing represents a time period. Every team from the first group plays every team from the second, and at a different station.

Edited by Justayellowbadge on Tuesday 24th November 14:04

Size Nine Elm

5,167 posts

313 months

Tuesday 24th November 2009
quotequote all
Justayellowbadge said:
-DeaDLocK- said:
Close guys, and appreciate the help, but no cigar. There ends up being a situation where two teams play each other twice.

To make it easier to map out and to see, I've created an Excel spreadsheet - fill in the top row of each box with A-H, and the bottom of I-P. No two boxes can have the same combinations, but yet every team must occupy each row of time and column of station once.

http://www.xrcmedia.com/file.xls

It's harder than it looks, and would really appreciate assistance. Am pulling my hair out!
No repetition, I assure you.

1 A vs I B vs K C vs M D vs O E vs I F vs K G vs M H vs O
2 B vs J C vs L D vs N E vs P F vs J G vs L H vs N A vs P
3 C vs K D vs M E vs O F vs I G vs K H vs M A vs O B vs I
4 D vs L E vs N F vs P G vs J H vs L A vs N B vs P C vs J
5 E vs M F vs O G vs I H vs K A vs M B vs O C vs I D vs K
6 F vs N G vs P H vs J A vs L B vs N C vs P D vs J E vs L
7 G vs O H vs I A vs K B vs M C vs O D vs I E vs K F vs M
8 H vs P A vs J B vs L C vs N D vs P E vs J F vs L G vs N


Station number to the left, each column pairing represents a time period. Every team from the first group plays every team from the second, and at a different station.

Edited by Justayellowbadge on Tuesday 24th November 14:04
Sorry, station 1, I plays twice... and numerous other duplicates

Edited by Size Nine Elm on Tuesday 24th November 14:15

Justayellowbadge

37,057 posts

271 months

Tuesday 24th November 2009
quotequote all
Size Nine Elm said:
Justayellowbadge said:
-DeaDLocK- said:
Close guys, and appreciate the help, but no cigar. There ends up being a situation where two teams play each other twice.

To make it easier to map out and to see, I've created an Excel spreadsheet - fill in the top row of each box with A-H, and the bottom of I-P. No two boxes can have the same combinations, but yet every team must occupy each row of time and column of station once.

http://www.xrcmedia.com/file.xls

It's harder than it looks, and would really appreciate assistance. Am pulling my hair out!
No repetition, I assure you.

1 A vs I B vs K C vs M D vs O E vs I F vs K G vs M H vs O
2 B vs J C vs L D vs N E vs P F vs J G vs L H vs N A vs P
3 C vs K D vs M E vs O F vs I G vs K H vs M A vs O B vs I
4 D vs L E vs N F vs P G vs J H vs L A vs N B vs P C vs J
5 E vs M F vs O G vs I H vs K A vs M B vs O C vs I D vs K
6 F vs N G vs P H vs J A vs L B vs N C vs P D vs J E vs L
7 G vs O H vs I A vs K B vs M C vs O D vs I E vs K F vs M
8 H vs P A vs J B vs L C vs N D vs P E vs J F vs L G vs N


Station number to the left, each column pairing represents a time period. Every team from the first group plays every team from the second, and at a different station.

Edited by Justayellowbadge on Tuesday 24th November 14:04
Sorry, station 1, I plays twice...
Yeah, I know.

Teams dont duplicate, but the second group repeat the same 4 stations.

Bugger.

Size Nine Elm

5,167 posts

313 months

Tuesday 24th November 2009
quotequote all
Just need to write a nice little recursive depth-first-search to solve - if at all...

moosepig

1,306 posts

270 months

Tuesday 24th November 2009
quotequote all
Why is the "different station" important? It makes this really difficult! nerd

Edited for typo

Edited by moosepig on Tuesday 24th November 14:24

Fume troll

4,389 posts

241 months

Tuesday 24th November 2009
quotequote all
I don't think it can be done. Three unique dimensions in a 2D array...

Cheers,

FT.

rhinochopig

17,932 posts

227 months

Tuesday 24th November 2009
quotequote all
Fume troll said:
I don't think it can be done. Three unique dimensions in a 2D array...

Cheers,

FT.
Of course it can be done! This is Piston Heads Dammit!

We're like the Internet's version of the A Team.

the-gofer

651 posts

269 months

Tuesday 24th November 2009
quotequote all

Is this it?

Edited to show working, in case it is the right answer... smile


Edited by the-gofer on Tuesday 24th November 15:27

Justayellowbadge

37,057 posts

271 months

Tuesday 24th November 2009
quotequote all
the-gofer said:

Is this it?
Nope, duplicate pairings - look at A & I for instance.

DrTre

12,957 posts

261 months

Tuesday 24th November 2009
quotequote all
rhinochopig said:
Fume troll said:
I don't think it can be done. Three unique dimensions in a 2D array...

Cheers,

FT.
Of course it can be done! This is Piston Heads Dammit!

We're like the Internet's version of the A Team.
I'm Face.

the-gofer

651 posts

269 months

Tuesday 24th November 2009
quotequote all
Justayellowbadge said:
the-gofer said:

Is this it?
Nope, duplicate pairings - look at A & I for instance.
d'oh.
Righto, needs a "de-dupe and fill-in from remainder" check...

moosepig

1,306 posts

270 months

Tuesday 24th November 2009
quotequote all
Just set a recursive depth first search going in Matlab - this may take some time wink

M400 NBL

3,552 posts

241 months

Tuesday 24th November 2009
quotequote all
Have you tried pulling the letters out of a hat hundreds of times?