Notifications
Clear all

[Closed] Math Help / Calculation Help

Hi all,

Hmm, this seems so easy, yet I can’t figure it out. I have found a few formulas on the net, but I’m not exactly sure they are right because it seems there are a few ways to do this. Basically I am looking at “Combination’ math.

So for example, I have a Character which consists of 3 elements

Hat

Pants

Shoes

Within those elements there are different variations, e.g 3 hat types 5 pant types, 3 shoe types.

What I’m trying to get is the math to figure out how many possible combinations there are

So for this example formula I’m using is :

Hat : 5

Pants : 4

Shoes : 3

543 = 60

But that doesn’t seem right?

Any ideas, I suck at Math! (or Maths, I suck at English too)

Thanks

7 Replies

Why doesn’t it?

If you don’t trust your instincts, you can write 3 simple nested loops just to get a better feeling:


(cnt = 0
for a = 1 to 5 do
	for b = 1 to 4 do
		for c = 1 to 3 do
			cnt += 1
cnt)

Here’s some info with a calculator about combinations and permutations you might find useful –
http://www.mathsisfun.com/combinatorics/combinations-permutations-calculator.html

Thanks Bobo!

Wow very cool way of laying it out, very clear.

Thanks for the link Ian, it makes my head kind of spin the amount of ways you can look at it!

Much appreciated!

you are absolutely right in your doubt… the right formula is

b(numPants+1)(numShoes+1)[/b]

so in your case it’s 654 = 120

because… (dramatic pause is here) … every character can be also with no hat, pants, or shoes

True, even Spongebob is sometimes without pants! :applause:

and the formula above is not also corrent. there is a revision:
b(numPants+1)[/b][b](numShoes+1)[/b][b]^2

[/b]because any character can be worn in different shows
so the final number of combinations is 654^2 = 480

Lol…I never thought taking away would add more