Go back
Behind The Times

Behind The Times

Posers and Puzzles

R
Standard memberRemoved

Joined
10 Dec 06
Moves
8528
Clock
09 Apr 21
Vote Up
Vote Down

@venda said
O.k Joe ,I've got a bit further
Your formula C(11,2)*C(9,2)*C(7,2)*5! = 55*36*21*5! Is actually the same calculation as 11!/2!2!2!.
I just need to look at the probability part now!
As an aside,I looked in an book I once compiled when I encountered this sort of thing years ago and I had written::-
The way to find any number of objects "p" of one kind and "q" of another with ...[text shortened]... that in a spreadsheet but couldn't get the same answer.
I suppose I may have written it down wrong.
Yep, you've got it. Just another way to skin the same cat!

venda
Dave

S.Yorks.England

Joined
18 Apr 10
Moves
86218
Clock
12 Apr 21
1 edit
Vote Up
Vote Down

@joe-shmo said
Lets try another:

How many distinct strings can be made such that only two sets of the doubled letters are next to each other?

Example of desired outcome:

HPAASTREEPY
There are 84 ways to include the string aa ee in the sequence(6:9)
There are 4 ways to arrange the letters within their sequence(a1 a2, a2 a1 e1,e2,e2,e1).
But there is pp to consider so 2:3 =6
So 84*4*6 = 2016 strings
Remember when I asked you about this formula being correct?The way to find any number of objects "p" of one kind and "q" of another with the rest all different = (p+1)(q+1)2^n-p-q-1
Is it correct?

R
Standard memberRemoved

Joined
10 Dec 06
Moves
8528
Clock
12 Apr 21
3 edits
Vote Up
Vote Down

@venda said
There are 84 ways to include the string aa ee in the sequence(6:9)
There are 4 ways to arrange the letters within their sequence(a1 a2, a2 a1 e1,e2,e2,e1).
But there is pp to consider so 2:3 =6
So 84*4*6 = 2016 strings
Remember when I asked you about this formula being correct?The way to find any number of objects "p" of one kind and "q" of another with the rest all different = (p+1)(q+1)2^n-p-q-1
Is it correct?
We are looking for much larger numbers here.

This one is a bit more involved... To get an idea of how to approach it I would recommend starting with a simplified version.

It will be completely reasonable to explicitly list half of these out ( arguing symmetry for the other half ) , and just count the ways. Then try to work out the formula.

Given the letters A,A,B,B,C how many arrangements have exactly 1 set of the doubled letters next to each other?

As for your formula you asked about, I'm not sure I follow it. But it seems like you could apply it exactly in this simplified case, so see if it matches what you get longhand.

venda
Dave

S.Yorks.England

Joined
18 Apr 10
Moves
86218
Clock
13 Apr 21
Vote Up
Vote Down

@joe-shmo said
We are looking for much larger numbers here.

This one is a bit more involved... To get an idea of how to approach it I would recommend starting with a simplified version.

It will be completely reasonable to explicitly list half of these out ( arguing symmetry for the other half ) , and just count the ways. Then try to work out the formula.

Given the letters A,A ...[text shortened]... like you could apply it exactly in this simplified case, so see if it matches what you get longhand.
Cheers Joe.
I did get a big number by multiplying my answer by 7! (for the remaining letters) but thought that was far too big so I ignored it.
The number was 10160640.
I'll give it some thought later.
As for the formula I had, I looked on google and found this.
I've just pasted the last bit:-
But number of ways of selecting one or more things out of given things =(p+1)(q+1)(r+1)2n−1=(p+1)(q+1)(r+1)2n-1.

R
Standard memberRemoved

Joined
10 Dec 06
Moves
8528
Clock
13 Apr 21
Vote Up
Vote Down

@venda said
Cheers Joe.
I did get a big number by multiplying my answer by 7! (for the remaining letters) but thought that was far too big so I ignored it.
The number was 10160640.
I'll give it some thought later.
As for the formula I had, I looked on google and found this.
I've just pasted the last bit:-
But number of ways of selecting one or more things out of given things =(p+1)(q+1)(r+1)2n−1=(p+1)(q+1)(r+1)2n-1.
The number was 10160640.

ehhh.... Thats only off by a factor of 24.

venda
Dave

S.Yorks.England

Joined
18 Apr 10
Moves
86218
Clock
14 Apr 21
Vote Up
Vote Down

@joe-shmo said
The number was 10160640.

ehhh.... Thats only off by a factor of 24.
OK.Going back a stage to your example AABBC with only 1 pair of letters consecutive:-
I know there are 5! ways of arranging the letters individually.
I know there are 4! ways of arranging the letters with one pair together.
So is the answer 5!/4! ?

R
Standard memberRemoved

Joined
10 Dec 06
Moves
8528
Clock
14 Apr 21
4 edits
Vote Up
Vote Down

@venda said
OK.Going back a stage to your example AABBC with only 1 pair of letters consecutive:-
I know there are 5! ways of arranging the letters individually.
I know there are 4! ways of arranging the letters with one pair together.
So is the answer 5!/4! ?
Think about grouping just one of the duplicated letter sets. For instance, the group AA = A₂

 Now you have the following string.

  A₂ B B C

 How many ways to arrange this?

However, that set will include in it the cases in which both sets of duplicated letters are adjacent as well. Those cases need to be excluded. You can use the same tactic here. Now AA = A₂ , and BB = B₂

 The new string is:

  A₂ B₂ C

 The number of ways to arrange the string above is?

The last thing you need to do is realize you chose 1 of 2 ways to group one set of duplicated letters for the first calculation.

You should actually try to explicitly write out these combinations to confirm what I've said. I promise, its not as time consuming as it sounds for this example, and it helped me understand the nature of the problem.

𝜋

Cookies help us deliver our Services. By using our Services or clicking I agree, you agree to our use of cookies. Learn More.