Stats: 3,191,684 members, 7,945,108 topics. Date: Tuesday, 10 September 2024 at 11:19 AM |
Nairaland Forum / Science/Technology / Programming / Challenge: League Fixture Algorithm (2813 Views)
The Greatest Programmer On Nairaland / Your Toughest Algorithm / Ludo Game Algorithm Wanted For AI Project (2) (3) (4)
Challenge: League Fixture Algorithm by kodewrita(m): 8:41am On Oct 21, 2013 |
The Problem: You have a 12 team league (A-L). Teams A-C are the high profile teams. Team A and G are from the same city. same for team C, D and E which all come from another city. Write an algorithm to schedule matches for the entire season given the following. --Two derby matches must not follow each other. ( derby meaning matches between teams from the same city). --high profile teams can only play each other once in each half of the season. --no team can have more than 3 away matches in succession. (Not certain if this is hard or easy but it seemed to be an interesting challenge). All languages permitted. Post your solutions here. Regards. 1 Like |
Re: Challenge: League Fixture Algorithm by Javanian: 5:53pm On Oct 21, 2013 |
Re: Challenge: League Fixture Algorithm by codeaddict(m): 5:58pm On Oct 21, 2013 |
Well, some of us don't watch football, ![]() So by entire season, how many home | away matches are allowed for each team? And, does half season mean half of the total number of away & home matches scheduled? 1 Like |
Re: Challenge: League Fixture Algorithm by kodewrita(m): 6:21pm On Oct 21, 2013 |
codeaddict: Well, some of us don't watch football, assume that a season is composed of matches between all teams with two teams playing one home match and one away match against each other. A plays C at C's home. C plays A at A's home. |
Re: Challenge: League Fixture Algorithm by codeaddict(m): 9:03am On Oct 23, 2013 |
Re: Challenge: League Fixture Algorithm by ToyinDipo(m): 9:21pm On Oct 25, 2013 |
Here is a version in java. It ensures the following: 1. No team plays more than two consecutive home or away games. 2. No team plays consecutive derby. 3. No team at anytime has number of home games or away games exceeding half of games played so far plus one. 4. No team can play another more than once in each half of the season. However, because of these restrictions, the algorithm is only able to execute perfectly like one in every 8 possible combinations. Here are the classes: Class Team /* Class Match /* Class Fixtures /* 1 Like |
Re: Challenge: League Fixture Algorithm by Javanian: 9:34pm On Oct 26, 2013 |
Back to this Thread, i am tired of seeing apps apps apps every where ![]() ![]() ![]() Anyone who tried this would agree this is not near as easy as it looks ![]() 1 Like |
Re: Challenge: League Fixture Algorithm by dsypha(m): 10:50pm On Oct 26, 2013 |
Javanian: Back to this Thread, i am tired of seeing apps apps apps every wherelols... |
Re: Challenge: League Fixture Algorithm by Javanian: 5:08pm On Dec 25, 2013 |
bump |
Re: Challenge: League Fixture Algorithm by naijaswag1: 1:30am On Dec 26, 2013 |
The Hyundia car would be good. if I sort this, am I gonna get it? |
(1) (Reply)
Challenges Finding A Technical Co-founder In Nigeria / Test / Pls Programmers Help With Similarities Of Pseudocode & Algorithm
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 31 |