PDA

View Full Version : Comination Generator

Bloodwraith
10-07-2008, 01:58 PM
I'm trying to make a list of every possible 5v5 comp to make checking comps for my PvP guide easier. I did 2v2 and 3v3 fine, but 5v5 is just getting annoying to try and find each comp.

Does anyone know a program that I could input the 9 classes and get all of the comps? It has to be able to have duplicates too (Ex: W/D/D/D/D).

Lizana
10-07-2008, 02:10 PM
I'm trying to make a list of every possible 5v5 comp to make checking comps for my PvP guide easier. I did 2v2 and 3v3 fine, but 5v5 is just getting annoying to try and find each comp.

Does anyone know a program that I could input the 9 classes and get all of the comps? It has to be able to have duplicates too (Ex: W/D/D/D/D).

You know thats 531441 possible teams... Wait thats number is too high 59049 in current 100000 in Lich king

Bloodwraith
10-07-2008, 02:14 PM
ouch, no wonder it was taking me forever lol

I guess I'll just have to skip scanning that part.

Lizana
10-07-2008, 02:32 PM
And then if you wanted to figure in for possible spec combos

30x30x30x30x30 = 24300000 possible spec/class groups not counting hybrid builds

Sharlos
10-10-2008, 06:16 AM
Does that differentiate a

P/W/W/D/Sh

with a

Sh/P/W/D/W setup?

Rabidwombat
10-10-2008, 07:26 AM
Liz, how did you get those numbers? I think the equation to use is the one for Combinations with Repetition (http://www.mathsisfun.com/combinatorics/combinations-permutations.html) (scroll down a bit or search for it on that page).

(n + r - 1)!
-----------
r!(n-1!)

Where n=9 (the number of classes) and r=5 (the number in a 5v5 arena group) and ! (exclamation mark) means factorial (5! = 5*4*3*2*1). As a side note, I used to think ! meant the number was excited.

(9+5-1)!
------- =
5!(9-1)!

13!
---- =
5!*8!

1287 combinations

That seems a little more manageable, but still too rough for hand calculation.

As to how to generate the actual combinations, a matlab script could do it. With enough googling, I am sure you can find something. Sorry I don't know anything off the top of my head.

mero12513
10-10-2008, 08:07 AM
Here's a smaller example just to show that the combination formula is probably the correct one.

Consider if there were only 5 classes and we selected for 2v2. We'll call the classes a, b, c, d, and e. Using nCr notation, that's 5C2 (5 choose 2). Our possibilities are:

a,a; a,b; a,c; a,d; a,e; (5)
b,b; b,c; b,d; b,e; (4)
c,c; c,d; c,e; (3)
d,d; d,e; (2)
e,e; (1)

That's 15 total. By Rabid's formula it's:

(5 + 2 - 1)!
----------- = 15
2!(5-1!)

@Liz: You're actually calculating Permutations instead of Combinations.

In a permutation, order matters. By your method,
(Druid, Warrior, Rouge) would be different than (Warrior, Rouge, Druid)

We want them to be the same, so we use the math for Cominations.

Edit: I haven't completed anything cool in a while, so I'll make it a programming exercise for myself to make a cool list for you :).

Bloodwraith
10-10-2008, 04:21 PM
Awesome :D

Lizana
10-10-2008, 11:22 PM
Here's a smaller example just to show that the combination formula is probably the correct one.

Consider if there were only 5 classes and we selected for 2v2. We'll call the classes a, b, c, d, and e. Using nCr notation, that's 5C2 (5 choose 2). Our possibilities are:

a,a; a,b; a,c; a,d; a,e; (5)
b,b; b,c; b,d; b,e; (4)
c,c; c,d; c,e; (3)
d,d; d,e; (2)
e,e; (1)

That's 15 total. By Rabid's formula it's:

(5 + 2 - 1)!
----------- = 15
2!(5-1!)

@Liz: You're actually calculating Permutations instead of Combinations.

In a permutation, order matters. By your method,
(Druid, Warrior, Rouge) would be different than (Warrior, Rouge, Druid)

We want them to be the same, so we use the math for Cominations.

Edit: I haven't completed anything cool in a while, so I'll make it a programming exercise for myself to make a cool list for you :).

yeah... Thats what i get posting math after not sleeping... again...