均匀重复场比赛达到每名参加者的最高金额参加者、均匀、每名、金额

2023-09-11 05:01:10 作者:朋友不在酒量

我有我的创造一切必要的游戏(每名参赛者的7场比赛)的8支球队循环赛的比赛。然而,我需要每个参与者,这意味着我需要复制的对决10场比赛,而且重要的是1和5前不能发挥彼此。您可以从下面我为每个参与者(#游戏)在创建它的秩序将是一轮中产生的游戏数据看。

我试图找出重复的对决和evently分配的对决以这样的方式,有没有那么重复三次,仍保持每名参加者的10场比赛,并有1和5不张扬的对决最好的方式彼此。任何建议将是有益如何想出解决办法。这也需要是一个通用的解决方案,其中其他的可能性仍然工作。

  1(6)
    1比2
    1比3
    1比4
    1比6
    1比7
    1比8
2(7)
    1比2
    2对4
    2比3
    2比6
    2比5
    2 VS 8
    2比7
3(7)
    3比4
    1比3
    2比3
    3比7
    3比8
    3比5
    3比6
4(7)
    3比4
    2对4
    1比4
    4对8
    4比7
    4比6
    4比5
5(6)
    5比6
    5比7
    5比8
    2比5
    3比5
    4比5
6(7)
    5比6
    6对8
    6比7
    2比6
    1比6
    4比6
    3比6
7(7)
    7对8
    5比7
    6比7
    3比7
    4比7
    1比7
    2比7
8(7)
    7对8
    6对8
    5比8
    4对8
    3比8
    2 VS 8
    1比8
 

解决方案

首先,你并没有严格界定什么是平均分配投其所好。所以我会建议,这意味着每对球队起到1或2场。有了这个限制,我对一般的情况下你原来的情况下,解决方案和一些想法。

原来如此

8支球队,每个人都必须打10场比赛,球队1不应该与团队5。这里玩的就是投其所好矩阵:

  1 2 3 4 5 6 7 8
    ----------------------
1 | 0 2 2 1 0 1 2 2
2 | 2 0 1 2 1 2 1 1
3 | 2 1 0 2 2 1 1 1
4 | 1 2 2 0 2 1 1 1
5 | 0 1 2 2 0 2 2 1
6 | 1 2 1 1 2 0 1 2
7 | 2 1 1 1 2 1 0 2
8 | 2 1 1 1 1 2 2 0
 

和相同的矩阵单元按值着色:

赛事报名 到见证千古爱情的 城市山林 跑上一马

此矩阵是对称的,每排(每列)总计为10,这意味着游戏每队总数是10作为必需的。所有的值是1或2,除了在主对角线零(队不发挥自己)和(1,5)和(5,1)电池(组1和5不与对方玩)。

一般情况下

我将解释我是如何构建的矩阵中的一些步骤,原来如此。这些步骤可以被概括为几个不同的条件。但不是所有的。我不建议为最一般的情况下的溶液中。

先从矩阵,其中,可以播放所有的球队,做游戏只有一个游戏。该行矩阵的总和是 [6 7 7 7 6 7 7 7] ,其中6矗立在位置1和5。 尝试,使每一行相同的总和。对于这一点,加队1和8,1和7,5和4,5和3,2和6之间的游戏萨姆现在 [8 8 8 8 8 8 8 8] 。尼斯。 尝试每队那里从previous项目对被禁止添加的两场比赛。在这一步,这样做只为前四的球队。加队1和2,2和4,4和3,3和1之间的游戏萨姆现在 [10 10 10 10 8 8 8 8] 重复previous模式在过去的四支球队。总和为 [10 10 10 10 10 10 10 10] 。每对球队(被允许播放),播放1或2场。我们就大功告成了。

另一个想法,这可能是有益的。在一个均匀分布的匹配起来,允许对之间的游戏数量也可能会不超过1。我们可能会认为它是这样的:所有对玩 N 游戏,和几个对玩 N + 1 游戏。我开始与所有对打了1场比赛在我的解决方案。并给出了初步的款项,必须通过选择这些几对玩一个额外的游戏进行修正。如何将数种类成零对称矩阵允许的地方,这样的行的总和将成为等于给定的载体:那么如下的一般问题可能会被改写?

I have a round robin tournament where I create all the games necessary (7 games per participant) for 8 teams. I however need 10 games per participant which means I need to duplicate matchups, and on top of that 1 and 5 can't play each other. You can see from the data below the games I generated for each participant (# of games) in the order it was created which would be the round.

I am trying to figure out the best possible way to duplicate the matchups and evently distribute the matchups in such a way that there aren't matchups that duplicate three times and still retain 10 games per participant and having 1 and 5 not play each other. Any suggestions would be helpful how to figure this out. This also needs to be a generic solution where other possibilities still work.

1 (6)
    1 vs 2
    1 vs 3
    1 vs 4
    1 vs 6
    1 vs 7
    1 vs 8
2 (7)
    1 vs 2
    2 vs 4
    2 vs 3
    2 vs 6
    2 vs 5
    2 vs 8
    2 vs 7
3 (7)
    3 vs 4
    1 vs 3
    2 vs 3
    3 vs 7
    3 vs 8
    3 vs 5
    3 vs 6
4 (7)
    3 vs 4
    2 vs 4
    1 vs 4
    4 vs 8
    4 vs 7
    4 vs 6
    4 vs 5
5 (6)
    5 vs 6
    5 vs 7
    5 vs 8
    2 vs 5
    3 vs 5
    4 vs 5
6 (7)
    5 vs 6
    6 vs 8
    6 vs 7
    2 vs 6
    1 vs 6
    4 vs 6
    3 vs 6
7 (7)
    7 vs 8
    5 vs 7
    6 vs 7
    3 vs 7
    4 vs 7
    1 vs 7
    2 vs 7
8 (7)
    7 vs 8
    6 vs 8
    5 vs 8
    4 vs 8
    3 vs 8
    2 vs 8
    1 vs 8

解决方案

First of all, you didn't strictly define what is an "evenly distributed" match up. So I will suggest this means that every pair of teams play either 1 or 2 games. With this restriction I have a solution for your original case and some thoughts on the general case.

Original Case

8 teams, each must play 10 games, team 1 should not play with team 5. Here is the match up matrix:

    1  2  3  4  5  6  7  8
    ----------------------
1 | 0  2  2  1  0  1  2  2
2 | 2  0  1  2  1  2  1  1
3 | 2  1  0  2  2  1  1  1
4 | 1  2  2  0  2  1  1  1
5 | 0  1  2  2  0  2  2  1
6 | 1  2  1  1  2  0  1  2
7 | 2  1  1  1  2  1  0  2
8 | 2  1  1  1  1  2  2  0

And the same matrix with cells colored according to value:

This matrix is symmetric, each row (and each column) sums up to 10, which means total number of games for each team is 10 as required. All values are 1 or 2, except for zeroes on main diagonal (teams do not play with themselves) and on (1, 5) and (5, 1) cells (team 1 and 5 do not play with each other).

General case

I will explain how I constructed the matrix for the original case in a number of steps. These steps may be generalized for several different conditions. But not for all. I do not suggest a solution for the most general case.

Start with the matrix where all teams that can play, do play exactly one game. Sum of rows of this matrix is [6 7 7 7 6 7 7 7], where 6 stands in positions 1 and 5. Try to make sum of each row the same. For this, add games between teams 1 and 8, 1 and 7, 5 and 4, 5 and 3, 2 and 6. Sum is now [8 8 8 8 8 8 8 8]. Nice. Try to add two games per team where pairs from the previous item are forbidden. At this step, do it only for the first four teams. Add games between teams 1 and 2, 2 and 4, 4 and 3, 3 and 1. Sum is now [10 10 10 10 8 8 8 8]. Repeat previous pattern for the last four teams. Sum is now [10 10 10 10 10 10 10 10]. Each pair of teams (which are allowed to play) plays 1 or 2 games. We're done.

Another idea, that may be helpful. In an evenly distributed match up, number of games between allowed pairs may differ not more than by 1. We may think of it as this: all pairs play N games, and several pairs play N+1 games. I started with all pairs playing 1 game in my solution. And it gives initial sums, which must be corrected by selecting these several pairs playing one additional game. So the general problem might be reformulated as follows: how to place several ones into allowed places of a zero symmetrical matrix so that sum of rows will become equal to a given vector?