Permutations question?

jbower

New member
Joined
Feb 28, 2020
Messages
6
I have the numbers 456789. I'm stuck at finding how many times 5 will appear after 4.

So far, I've started with 5! to get the number of times it appears if 4 is in the first spot. I'm not sure what to do after that though...

Any help is welcome!!
 
Are you asking in how many permutations of those 6 digits 5 will appear after 4?

[MATH]\text{Place 4 in slot $k$. There are then $6-k$ slots that the 5 can be placed in}\\ \text{for each of these there are 4! arrangements of the other digits}\\ \text{So we have $4!(5+4+3+2+1) = 24\cdot 15 = 360$}[/MATH]
 
Are you asking in how many permutations of those 6 digits 5 will appear after 4?
Yes, I believe that is what the question is going for. I am assuming this is permutations, but I'm also not sure.
 
Here is my method. I never think like Romsek, though he is the master with thinking about these problems in a clean way.

If 4 is in the 1st position, then there are 1*5*4*3*2*1 = 5*4! = 120 ways for the 5 to appear after the 4
If 4 is in the 2nd position, then there are 4*1*4*3*2*1 = 4*4! ways 5 will appear after the 4.
If 4 is in the 3rd position, then there are 4*3*1*3*2*1 = 3*4! ways 5 will appear after the 4.
If 4 is in the 4th position, then there are 4*3*2*1*2*1 = 2*4! ways 5 will appear after the 4.
If 4 is in the 5th position, then there are 4*3*1*3*2*1 = 1*4! ways 5 will appear after the 4.

Addition will show that I arrived at the same result as Romsek.
 
Hold on. Half the times 4 will appear before 5 and the other half of the times, 5 will appear before 4.

There are 6! arrangements. So the answer is 6!/2 = 360.

Seeing Romsek doing some big calculation I thought the problem was harder then it is. I still say that Romsek (usually!!) does these type problems very cleanly.
 
Hold on. Half the times 4 will appear before 5 and the other half of the times, 5 will appear before 4.
I was typing just that when you, Jomo, posted.
Here is another one: In how many rearrangements of \(\large ~0123456789~\) will the prime digits appear in proper order?
 
The primes are 2,3,5 and 7. There are 6 non primes which can be arranged in 6! ways.

Now we need to pick 4 places to put 2,3,5 and 7 into.

If we put 2, 3, 5 and 7 together, we can do that in 7 ways.

If we have 2,3,5 and 7 in two different locations -not together- (like 23 and 57or 2 with 357 ) then we can do that in 3*7C2=63 ways.
If we have 2,3,5 and 7 in 3 different location, we can do this 3*7C3=105ways
4 different location in 1*7C4=35 ways

My answer is 6!(7+63+105 + 35) = 6!*210 = 151,200 ways
 
The primes are 2,3,5 and 7. There are 6 non primes which can be arranged in 6! ways.
Now we need to pick 4 places to put 2,3,5 and 7 into.
If we put 2, 3, 5 and 7 together, we can do that in 7 ways.
If we have 2,3,5 and 7 in two different locations -not together- (like 23 and 57or 2 with 357 ) then we can do that in 3*7C2=63 ways.
If we have 2,3,5 and 7 in 3 different location, we can do this 3*7C3=105ways
4 different location in 1*7C4=35 ways
My answer is 6!(7+63+105 + 35) = 6!*210 = 151,200 ways
Here is the easy way.
 
Top