Thread: Ruby hack: POKéMON Ruby Destiny - Rescue Rangers [Hack of the Month July 2008] View Single Post
#79
March 16th, 2008 (9:29 AM). Edited March 16th, 2008 by Teh Baro.
 Teh Baro In my times...! Join Date: Mar 2006 Location: Spain Gender: Male Nature: Quiet Posts: 522
Quote:
 Originally Posted by zel Yeah, that's the idea. I dont know how many combinations would be possible
Hmmmm

BEHOLD, PURE MATHEMATICS TIME! COMBINATORICS!

Let n be the number of pokemon that he's going to put in teams of 3.
Since ABC != CBA (order matters) and elements can't be repeated, the number of total possible teams is variations of n elements taken in groups of 3, V(n,3)=n!/(n-3)!
Which is a large number unless n is a small number. For example, if you're putting 10 pokemon in teams, the total possible teams would be 10!/7!=10*9*8=720.

Without the "leading pokemon" thing (ABC=ACB=BAC=BCA=CAB=CBA, it'd be C(n,3)= n over 3 = n! / (3! * (n-3)!), which is a smaller number. For 10 pokemon, there'd be 10! / (3! * 7!) = (10*9*8*7*6*5*4*3*2*1)/(3*2*7*6*5*4*3*2*1)=(10*9*8)/(3*2)=10*3*4=120

Here's some wikipedia support
http://en.wikipedia.org/wiki/Combinatorics
__________________
what the fudge