Hard Light Productions Forums

Off-Topic Discussion => General Discussion => Topic started by: General Battuta on October 15, 2009, 04:52:16 pm

Title: Obama says combinatorics is awesome
Post 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?
Title: Re: Combinatorics is awesome
Post by: Topgun on October 15, 2009, 04:56:36 pm
so that's how that works...
Title: Re: Combinatorics is awesome
Post by: MR_T3D on October 15, 2009, 04:58:37 pm
I'm now hungary.
Title: Re: Combinatorics is awesome
Post by: General Battuta on October 15, 2009, 04:59:47 pm
I'm now hungary.

Szia! Hogy vagy?
Title: Re: Obama says combinatorics is awesome
Post by: Axem on October 15, 2009, 05:25:31 pm
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!
Title: Re: Obama says combinatorics is awesome
Post by: Nuclear1 on October 15, 2009, 06:52:44 pm
The food police! It's a sine of the end times! 
Title: Re: Obama says combinatorics is awesome
Post by: MR_T3D on October 15, 2009, 07:07:55 pm
where does obama fit into this?
Title: Re: Obama says combinatorics is awesome
Post by: General Battuta on October 15, 2009, 07:11:00 pm
he creates gendisc aggro
Title: Re: Obama says combinatorics is awesome
Post by: NGTM-1R on October 15, 2009, 07:25:43 pm
However, it DPS's very, very slowly.

If at all.
Title: Re: Obama says combinatorics is awesome
Post by: Scotty on October 15, 2009, 08:14:27 pm
Effective tank though.  Every one concentrates on it first.
Title: Re: Obama says combinatorics is awesome
Post by: CP5670 on October 15, 2009, 11:57:44 pm
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
Title: Re: Obama says combinatorics is awesome
Post by: StarSlayer on October 16, 2009, 12:07:16 am
From the title I was expecting Battuta's fruit combinatorics to be an analogy how public healthcare should work :P
Title: Re: Obama says combinatorics is awesome
Post by: Janos on October 16, 2009, 02:01:52 pm
you talk about watermelons

as a black man, i find this stereotype offensive

f u g b (qtiyd)
Title: Re: Obama says combinatorics is awesome
Post by: General Battuta on October 16, 2009, 02:57:06 pm
How many different combinations of FRIED CHICKEN
Title: Re: Obama says combinatorics is awesome
Post by: Topgun on October 16, 2009, 02:58:21 pm
I am latino and this entire forum offends me.
Title: Re: Obama says combinatorics is awesome
Post by: Janos on October 16, 2009, 03:35:29 pm
well, as a black man I
Title: Re: Obama says combinatorics is awesome
Post by: Aardwolf on October 16, 2009, 03:56:33 pm
well, as a black man I

Well put
Title: Re: Obama says combinatorics is awesome
Post by: Nuclear1 on October 16, 2009, 04:33:18 pm
As a Canadian steweotypes offend me. 

Now stoop it, buddy!
Title: Re: Obama says combinatorics is awesome
Post by: MR_T3D on October 16, 2009, 05:31:52 pm
As a Canadian steweotypes offend me. 

Now stoop it, buddy!
eh?
Title: Re: Obama says combinatorics is awesome
Post by: NGTM-1R on October 16, 2009, 05:34:14 pm
As a stereotype, you all offend me.
Title: Re: Obama says combinatorics is awesome
Post by: Titan on October 16, 2009, 06:10:36 pm
As a Pole, I think you're all from Tahiti.

...

Wait, what?
Title: Re: Obama says combinatorics is awesome
Post by: Nuclear1 on October 16, 2009, 09:03:20 pm
As a Canadian steweotypes offend me. 

Now stoop it, buddy!
eh?

Don't eh me, fwiend!

Or the hockey stick's coming out.
Title: Re: Obama says combinatorics is awesome
Post by: Blue Lion on October 16, 2009, 09:11:01 pm
Wait, are you saying Obama is a fruit?
Title: Re: Obama says combinatorics is awesome
Post by: Mongoose on October 16, 2009, 09:39:59 pm
I'm gonna go ahead and chalk this conversation up as wtf.
Title: Re: Obama says combinatorics is awesome
Post by: MR_T3D on October 16, 2009, 11:53:58 pm
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..
Title: Re: Obama says combinatorics is awesome
Post by: Nuclear1 on October 17, 2009, 12:04:01 am
****, 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.
Title: Re: Obama says combinatorics is awesome
Post by: karajorma on October 20, 2009, 08:40:45 am
Stop that! Far too silly for this programme.