Un torneo ad eliminazione diretta - numero di combinazioni possibili
-
19-09-2019 - |
Domanda
Quali sono il numero di combinazioni in cui 8 persone che partecipano a un singolo gioco eliminazione tornament? no totale delle partite giocate sarebbero 7, ma ho anche bisogno il numero di combinazioni che possono per questo set
Soluzione
Se non importa dove nella struttura di un giocatore inizia, ma solo che gli avversari lui / lei combatte, e per quanto tempo lui / lei ottiene, possiamo dire che il giocatore a sinistra vince sempre e poi basta calcolare il numero di modi per creare il fondo più fila, che è di 8! 40320.
La prima possibilità:
a
a e
a c e g
a b c d e f g h
La seconda possibilità:
a
a e
a c e h
a b c d e f h g
Altri suggerimenti
Ci sono (8 * 7) / 2 = 28 combinazioni [In altre parole, 8! / (2 * (8-2)!)]
Con Set :: partizione in Perl posso scrivere:
my $s = Set::Partition->new(
list => ['a'..'h'],
partition => [2, 6],
);
while (my $p = $s->next) {
print join( ' ', map { "[@$_]" } @$p ), $/;
}
che dà
[a b] [c d e f g h]
[a c] [b d e f g h]
[a d] [b c e f g h]
[a e] [b c d f g h]
[a f] [b c d e g h]
[a g] [b c d e f h]
[a h] [b c d e f g]
[b c] [a d e f g h]
[b d] [a c e f g h]
[b e] [a c d f g h]
[b f] [a c d e g h]
[b g] [a c d e f h]
[b h] [a c d e f g]
[c d] [a b e f g h]
[c e] [a b d f g h]
[c f] [a b d e g h]
[c g] [a b d e f h]
[c h] [a b d e f g]
[d e] [a b c f g h]
[d f] [a b c e g h]
[d g] [a b c e f h]
[d h] [a b c e f g]
[e f] [a b c d g h]
[e g] [a b c d f h]
[e h] [a b c d f g]
[f g] [a b c d e h]
[f h] [a b c d e g]
[g h] [a b c d e f]
che si può interpretare due giocatori a giocare, e gli altri sei in piedi intorno tifo e bevendo birra.
Se vuoi dire, quanti possibili 2 partite del giocatore ci sono in una pozza di 8 giocatori, allora la risposta è 28 (8x7 / 2). Se vuoi dire qualcos'altro, allora chiarire la tua domanda un po '.