problem
i have table of sports results , looking best possible way select 1 team in each round such sum of associated scores maximal. selection subject following constraints:
- there many teams there rounds
- you must select each team once , once, , make single selection every round
- some teams not legal choice in of rounds
details
the score particular team in particular round margin of game played in. positive if have won , negative if have lost
there 2 possible reasons why given selection may forbidden. opponent of lowest-ranking team (which may change between rounds) may never selected. , in games there may byes, affected teams may not selected either.
example
consider following example numbers in brackets scores team round , *
denotes team playing bottom placed team , therefore unavailable selected round.
round 1: team a* (+26) vs team b (-26), team c (-15) vs team d (+15) round 2: team (+75) vs team c (-75), team b (+ 5) vs team d* (- 5) round 3: team (+85) vs team d (-85), team b* (- 3) vs team c (+ 3) round 4: team ( 0) vs team b ( 0), team c (+12) vs team d* (-12)
in case best combination select:
- round 1: d (+15)
- round 2: b (+5)
- round 3: (+85)
- round 4: c (+12)
note: example have created not include rounds byes. doesn't require selecting negative score best possible total, although possible.
known solution
obviously low numbers of teams or rounds brute force trying every combination. there way work out larger numbers of teams , rounds (say 20?).
you describing assignment problem: looking perfect matching between teams , rounds such sum of scores associated edges of matching maximized. forbidden bottom teams can modeled using socre of -∞. hungarian algorithm established method solving kind of problem.
Comments
Post a Comment