N Gauge Forum

General Category => General Discussion => Topic started by: steve836 on March 14, 2021, 02:48:43 PM

Title: a maths question.
Post by: steve836 on March 14, 2021, 02:48:43 PM
On a different forum someone was asking about how many combinations of letters there were in a word. The answer is simple, so long as all the letters are different. Eg. "number" has 6 letters, all different so the answer is 6x5x4x3x2x1=720.  The problem arises when a word has some letters the same and one does not wish to say they are a different combination. Eg "mississippi" has 11 letters, but  there are 4 "i"s , 4 "s"s, 2 "p"s and 1"m". bo while there are 11x10x9x8x7x6x5x4x3x2=39,916,800 different combinations, 4x3x2x4x3x2x2=1,152 of them still spell "mississippi "
Is there a way of calculating how many truly different combinations there are?
Title: Re: a maths question.
Post by: ntpntpntp on March 14, 2021, 03:21:45 PM
Is it not just a case of taking the factorial of the number of different letters found?

So "number" has 6 different letters, therefore the combinations is 6! = 720
"mississippi" has 4 different letters, therefore the combinations is 4! = 24

just a first thought, could be totally wrong - and surely must be, it just feels way too low let alone actually trying to figure it out.
Title: Re: a maths question.
Post by: Malc on March 14, 2021, 03:24:25 PM
I think this may answer your question.
https://en.wikipedia.org/wiki/Combination
Title: Re: a maths question.
Post by: kelstonlad on March 14, 2021, 03:30:24 PM
The number of permutations when all the objects are different is just the simple factorial, as you said.

When some of the objects are identical, you reduce the number of permutations by factorials for each set of identical objects. So, for mississippi, the answer is

11! divided by (4! x 4! x 2! x 1!)

In the general case where each object is different, you're effectively dividing by 1! for each member of the set.

The thing that always drove me crazy in maths was the fact that 0! is also equal to 1. I probably learnt how to prove it once.

- Andy
Title: Re: a maths question.
Post by: Cyffordd Llareggub on March 14, 2021, 04:44:30 PM
The answer is 34,650. :D
Title: Re: a maths question.
Post by: TrevL on March 14, 2021, 07:22:28 PM
Tsk!  And here's me thinking the answer to everything was 42.
Title: Re: a maths question.
Post by: Bealman on March 14, 2021, 11:56:54 PM
Well it is, isn't it.  :)