views:

177

answers:

3

What are the no of combinations in which 8 persons taking part in a knockout tornament play? Total no of matches played would be 7 but I also need the number of combinations that can for this set

+1  A: 

If you mean, how many possible 2 player matches are there in a pool of 8 players then the answer is 28 (8x7/2). If you mean something else, then clarify your question a bit.

High Performance Mark
+2  A: 

There are (8 * 7) / 2 combinations = 28 [ in other words, 8!/(2! * (8-2)!) ]

With Set::Partition in Perl I can write:

my $s = Set::Partition->new(
    list      => ['a'..'h'],
    partition => [2, 6],
);

while (my $p = $s->next) {
    print join( ' ', map { "[@$_]" } @$p ), $/;
}

which gives

[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]

which you can interpret two players playing, and the six others standing around cheering and drinking beer.

dland
How did you get from `(8 * 7) / 2` to that partitioning?
Jonas Elfström
by partitioning a set of 8 elements into a set of 2 (the players) and a set of 6 (the non-players).
dland
+2  A: 

If it doesn't matter where in the tree a player starts, but only witch opponent, and how long he gets, we can say that the left player always wins and then just calculate the number of ways to create the bottom most row, which is 8! 40320.

The first possibility:

       a
   a       e
 a   c   e   g
a b c d e f g h

The second possibility:

       a
   a       e
 a   c   e   h
a b c d e f h g
Thomas Ahle
Actually this also requires, that you care about two people fight. Otherwise you could swap b and d and so on.
Thomas Ahle