tailieunhanh - Algorithms and Networking for Computer Games phần 4

2 chỉ bao gồm một máy nghe nhạc, tự nhiên có thể có nhiều người chơi tham gia dòng chảy dữ liệu, mỗi với sản lượng của riêng của họ và các thiết bị đầu vào. Hơn nữa, các trò chơi máy tính có thể được phân phối giữa các nút nhau chứ không phải là cư trú bên trong một nút duy nhất. | TOURNAMENTS 63 0 6 1 . ÌỊỊ 5 ---- . -------r-T-fc 2 4 3 a Figure A partition of the matches into two rounds of a round robin tournaments with seven players a the matches for the initial round and b the matches for the next round. Table A straightforward organization of matches in a round robin tournament with seven players. Round Matches Resting 0 1 - - 6 2 - 5 3 - -4 0 1 2 0 3 6 4 5 1 2 3 1 4 0 5 6 2 3 4 2 5 1 6 0 3 4 5 3 6 2 0 1 4 5 6 4 0 3 1 2 5 6 0 5 1 4 2 3 6 to some round. Table lists the whole schedule round by round for seven players. The column resting shows the player with the bye and as already mentioned it equals the round index. An observant reader might have already noticed that the method presented does not work at all if the number of players is even. Fortunately we can easily transform the scheduling problem with an even n to a problem with an odd n If n is even we divide the set of players P p0 p1 . pn-1 into two sets P S u P where set S is a singleton and set P equals P S. We can always let S pn-1 . Because set P has an odd number of players Equation provides a schedule of their matches. The resting player of P is then paired with the player in S. For example to determine the matches for eight players we pair the eighth player p7 with the resting player as per Table . Algorithm returns the matches in a round robin tournament when the round index and the number of players is given. The resulting sequence R consists of _n 2_ pairs of 64 TOURNAMENTS player indices that define the matches. If n is odd the sequence also includes an extra entry Rn 1 for the resting player. Algorithm Straightforward pairings for a round robin tournament. SlMPLE-RoUND-ROBIN-PAIRINGS r n in round index r 0 r 2 _ n 1 2J number of players n 1 n out sequence R of n player indices indicating the match pairings between players R2i and R2i 1 when i 0 . n 2 1 if n is odd Rn 1 indicates the resting player. 1 R n Reserve space for n player indices.

crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.