Math Help / Calculation Help

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 02 February 2013   #1
Question 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



5*4*3 = 60



But that doesnít seem right?



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



Thanks





 
Old 02 February 2013   #2
Originally Posted by Animare: 5*4*3 = 60
But that doesnít seem right?


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)
__________________
Bobo
 
Old 02 February 2013   #3
Here's some info with a calculator about combinations and permutations you might find useful -
http://www.mathsisfun.com/combinato...calculator.html
 
Old 02 February 2013   #4
Thumbs up

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!
 
Old 02 February 2013   #5
Originally Posted by Animare: 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

5*4*3 = 60

But that doesnít seem right?



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

(numHats+1)*(numPants+1)*(numShoes+1)

so in your case it's 6*5*4 = 120

because... (dramatic pause is here) ... every character can be also with no hat, pants, or shoes
 
Old 02 February 2013   #6
Originally Posted by denisT: because... (dramatic pause is here) ... every character can be also with no hat, pants, or shoes


True, even Spongebob is sometimes without pants!
__________________
Bobo
 
Old 02 February 2013   #7
Originally Posted by denisT: you are absolutely right in your doubt... the right formula is

(numHats+1)*(numPants+1)*(numShoes+1)

so in your case it's 6*5*4 = 120

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


and the formula above is not also corrent. there is a revision:
(numHats+1)*(numPants+1)*(numShoes+1)^2

because any character can be worn in different shows
so the final number of combinations is 6*5*4^2 = 480
 
Old 03 March 2013   #8
Wink

Lol....I never thought taking away would add more
 
Old 03 March 2013   #9
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 09:02 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.