Hard Light Productions Forums
Off-Topic Discussion => General Discussion => Topic started by: General Battuta on October 15, 2009, 04:52:16 pm
-
Check this out.
You have three types of fruit (peach, watermelon, apple.) You need to pick four fruits. The order is irrelevant, and you can have more than one of each kind of fruit. You don't need to use all the fruits. What are all the possible combinations?
The formula is (6!) / (4! * 2!) = 15. There are fifteen combinations. Now, you might wonder, where the heck does that formula come from? After all, you're only picking four elements. Why is the numerator six factorial?
Well, you can think of it this way.
You're picking out four fruits. Picture the four empty slots as Xs:
X X X X
Now, there are three categories of fruit available, right? You can break the four slots into three categories by placing two (2) dividers.
x | x x | x
With me? All make sense? We could say 'left slot is peach, middle slot is watermelon, right slot is apple', like so:
peach | watermelon, watermelon | apple
So, in fact you can define any configuration of fruits in the four slots by moving the two dividers. A four-peach configuration would be:
x x x x ||
See? Four peaches in the left slot, nothing in the watermelon or apple slots.
So we're actually manipulating the positions of six elements: the four fruit slots and the two dividers.
Thus, 6! as the numerator.
The denominator is the factorial of the number of slots (4!) multiplied by the factorial of the number of dividers.
Thus, (6!)/(4!*2!)
You can generalize this problem to any combination problem where you're fitting N types of things into X slots (with repetition allowed) as
(X + n-1)!/(X! * (n-1)!)
Isn't that sweet?
-
so that's how that works...
-
I'm now hungary.
-
I'm now hungary.
Szia! Hogy vagy?
-
Such typical liberal attitude! Why should I ate what YOU chose for me? I've got 70 problems with that! This is a slippery slope down to some sort of hyperbolic insineity that should stay in your imaginary system!
-
The food police! It's a sine of the end times!
-
where does obama fit into this?
-
he creates gendisc aggro
-
However, it DPS's very, very slowly.
If at all.
-
Effective tank though. Every one concentrates on it first.
-
You know, I was just doing something like this last week. Given n distinct objects, I wanted the number of ways to partition them into subsets of given sizes (e.g. for 4 objects, there are 3 ways to divide them into sets of 2 each), as well as the total number of such partitions over all subsets. I found a formula for the whole thing but couldn't simplify it enough to make it useful for what I wanted to do.
What does Obama think? :p
-
From the title I was expecting Battuta's fruit combinatorics to be an analogy how public healthcare should work :P
-
you talk about watermelons
as a black man, i find this stereotype offensive
f u g b (qtiyd)
-
How many different combinations of FRIED CHICKEN
-
I am latino and this entire forum offends me.
-
well, as a black man I
-
well, as a black man I
Well put
-
As a Canadian steweotypes offend me.
Now stoop it, buddy!
-
As a Canadian steweotypes offend me.
Now stoop it, buddy!
eh?
-
As a stereotype, you all offend me.
-
As a Pole, I think you're all from Tahiti.
...
Wait, what?
-
As a Canadian steweotypes offend me.
Now stoop it, buddy!
eh?
Don't eh me, fwiend!
Or the hockey stick's coming out.
-
Wait, are you saying Obama is a fruit?
-
I'm gonna go ahead and chalk this conversation up as wtf.
-
As a Canadian steweotypes offend me.
Now stoop it, buddy!
eh?
Don't eh me, fwiend!
Or the hockey stick's coming out.
****, i'm a shave ttooo drunk to do that. we can be, like, frined s righht..
-
****, i'm a shave ttooo drunk to do that. we can be, like, frined s righht..
Eh! Friendship and not offending people, taking no sides? Why, that's the 2nd of our 4 national Canadian pasttimes!
Apology accepted guy! Forget aboot it.
-
Stop that! Far too silly for this programme.