The probability that I could solve this is Zero (0).
The probability that I would work to solve this if I could do so is Zero (0).
The probability that there is some meaningful purpose to solving this is, by me, unknown; however, the probability of my caring about the answer to this is Zero (0).
Now, I'm guessing that one only needs to count the groupings of all the AA, EE, and PP combinations, of which I think there are three and then calculate the permutations of randomizing all the other letters as though they were just distinct items (n), and then finally . . . oops . . . forget it. It gets complicated here, right?
@coquette saidThe probability that I will waste my time telling you "you are wrong"...Probably...I think...I cant be sure because you really didn't actually try to answer?
The probability that I could solve this is Zero (0).
The probability that I would work to solve this if I could do so is Zero (0).
The probability that there is some meaningful purpose to solving this is, by me, unknown; however, the probability of my caring about the answer to this is Zero (0).
Now, I'm guessing that one only needs to count the groupings of all the ...[text shortened]... distinct items (n), and then finally . . . oops . . . forget it. It gets complicated here, right?
@joe-shmo saidIf a is selected the chances of the other a next is 1/11
If we randomly mix up the letters of
HAPPYEASTER
What is the probability that the scramble results in the A next to the A, the E next to E and the P next to the P?
The chances of the other a not being next is 1/9
The same for the e and p so the calculation is (1/11*1/9)*3 =.03.
@venda saidSorry Venda...Try again
If a is selected the chances of the other a next is 1/11
The chances of the other a not being next is 1/9
The same for the e and p so the calculation is (1/11*1/9)*3 =.03.
@venda saidI think the principal is wrong.
@joe-shmo
Ok, Is it that I've just miscounted or is the principal wrong?
(1/10)*(1/8)*3 =.0375
Hint:
OK, I think I have the math now.
Either that, or I got the same wrong answer both ways, LOL.
=================================================================
The string "HAPPYEASTER" is 11 characters long.
Consider ONLY the ways that the pairs can appear in the order: 'AA', 'EE', 'PP'.
If we put the first two pairs at the very beginning, we have:
AAEE XXXX XXX
There are 6 ways to add 'PP'.
If the 'EE' was one position to the right, there would only be 5 ways to add 'PP', and so on.
For all "AAXX XXXX XXX", there are 6+5+4+3+2+1 = 21 ways to add the other letters.
If we started instead with:
XAAX XXXX XXX
By the same logic, there would by 5+4+3+2+1 = 15 ways to add the other letters.
Continuing to push AA to the right, there are 56 total ways to arrange the three pairs, in the prescribed order.
Multiply that by 8, to account for duplicate combinations of each pair. (Treating each letter as unique, P1 P2 gives the same word as P2 P1, etc.)
Multiply that by a further 6, because there are six different orderings of the three pairs.
This gives 2688 ways to arrange the pairs.
But wait! Don't forget the five other letters.
So we're up to 2688 * 5! ways.
I'm not going to multiply that because it's too ugly. Instead, I will simply note that the total number of letter arrangements is:
11!
So the odds of getting an arrangements with the three pairs together is:
2688 * 5! / 11! = 2688 / (11*10*9*8*7*6) = 2688 / 332640 = 0.00808080
@bigdoggproblem saidMy only curiosity is where do you get your programme from?
My program gives 322560/39916800 = 0.008 08 ...
[Execution time = 11.3s, for the curious.]
I am having trouble producing the same via math. 🙂
If you have made it yourself well done.
I would like a copy!
I also got some enormous numbers when I tried the combinations method.
As to the answer,I expect you're correct as usual.
I tried it a different way but got bogged down (as usual!!)
There are 4 distinct groups AA EE PP and YTRSH
It doesn't matter how they are arranged within the groups or where the groups appear in the complete sequence.
So 3/4 = .75
Then we come to if the pairs AA EE PP are split.
Not having a programme!,I tried it "longhand" first for the A's split and the EE and PP together.
I concluded that the A's could occupy 25 positions in the sequence (positions 1,3 1,4 etc through to 5,9)EE PP A YTRSHA for 3 ,9 for example.
I then got to wondering if this could be applied similarly to the E's and P's so the answer could be (3/4 )/(9/25)*3 or something.
This will be wrong, but it all helps to keep ones mind active!!
@bigdoggproblem saidGood work!
OK, I think I have the math now.
Either that, or I got the same wrong answer both ways, LOL.
=================================================================
The string "HAPPYEASTER" is 11 characters long.
Consider ONLY the ways that the pairs can appear in the order: 'AA', 'EE', 'PP'.
If we put the first two pairs at the very beginning, we have:
AAEE ...[text shortened]... he three pairs together is:
2688 * 5! / 11! = 2688 / (11*10*9*8*7*6) = 2688 / 332640 = 0.00808080
We can treat the doubled letters as single units:
AA, PP, EE, H, R, S, T, Y
There are 8! ways to arrange these units.
The number of distinct arrangements of the 11 letters taken when not necessarily grouped:
C(11,2)*C(9,2)*C(7,2)*5! = 55*36*21*5!
P = 8*7*6 / ( 55*36*21 ) = 4/495
P.S. I do have reservations about saying the ways of rearranging the letters is 11! as you have. That's only the case if they are ALL distinct, which they are not. All joking aside, you have actually seemed to make the same error in the numerator as the denominator, it works out here because we are looking at the ratio.
@joe-shmo saidO.k Joe,I am really fascinated by how these things are done but (only)if you have the time and patience could you one day explain in simple terms where some of the numbers come from. A pm will do if you don't want to clutter up the thread.
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
I get the 11!
I get the 8!
I get the 5!
Where I get lost is the (9,2) (7,2) and the 8! 7! 6!
@venda saidYes, I wrote a program to solve this problem.
My only curiosity is where do you get your programme from?
If you have made it yourself well done.
I would like a copy!
I also got some enormous numbers when I tried the combinations method.
As to the answer,I expect you're correct as usual.
I tried it a different way but got bogged down (as usual!!)
There are 4 distinct groups AA EE PP and YTRSH
It doesn't matter how t ...[text shortened]... ld be (3/4 )/(9/25)*3 or something.
This will be wrong, but it all helps to keep ones mind active!!
I am not sure how I want to share it. It's written in Python. I would post the code here, but RHP removes the spacing.
@joe-shmo saidBut is it really an error, if I noticed it was happening and adjusted for it?
Good work!
We can treat the doubled letters as single units:
AA, PP, EE, H, R, S, T, Y
There are 8! ways to arrange these units.
The number of distinct arrangements of the 11 letters taken when not necessarily grouped:
C(11,2)*C(9,2)*C(7,2)*5! = 55*36*21*5!
P = 8*7*6 / ( 55*36*21 ) = 4/495
P.S. I do have reservations about saying the ways of rearrangi ...[text shortened]... me error in the numerator as the denominator, it works out here because we are looking at the ratio.
Your way is more elegant. I just didn't want to break that 11! apart, for some reason.