Let N be the number of permutations τ of ( 1 , 4 , 9 , 1 6 , 2 5 , 3 6 , 4 9 ) such that
τ ( 1 ) + τ ( 9 ) + τ ( 2 5 ) > τ ( 4 ) + τ ( 1 6 ) + τ ( 3 6 ) .
What are the last 3 digits of N ?
This problem is posed by Derek K .
Details and assumptions
A permutation τ , on a set S , is a bijection from S onto itself. τ ( s ) denotes the image of the element s under this map.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Nice solution. I won't post mine, as it was pretty much the same as yours. However, here's a little variation I thought of after-the-fact:
So we're looking for cases where τ ( 1 ) + τ ( 9 ) + τ ( 2 5 ) = 7 0 − τ ( 4 9 ) / 2 and clearly τ ( 4 9 ) cannot be 25 (or any odd number) so WLOG let's assume that τ ( 4 ) = 2 5 .
Now observe that τ ( 1 ) + τ ( 9 ) + τ ( 2 5 ) ≡ ± 1 ± 1 ± 1 m o d 5 and 7 0 − τ ( 4 9 ) / 2 ≡ ± 3 m o d 5 means that τ ( 1 ) ≡ τ ( 9 ) ≡ τ ( 2 5 ) m o d 5 .
But that gives just 2 possibilities for τ ( 1 ) + τ ( 9 ) + τ ( 2 5 ) , namely 1 + 1 6 + 3 6 = 5 3 or 4 + 9 + 4 9 = 6 2 . The former case gives τ ( 4 9 ) = 3 4 which is impossible.
The latter case gives τ ( 4 9 ) = 1 6 , and the rest of the proof is the same as what you posted.
nice solution!
Nice casework and not brute forcing. Wish I saw it earlier.
By symmetry, N will be equal to the number of permutations for the case where the inequality is flipped. So N must equal the total number of permutations minus the permutations for which the left- and right-hand sides are equal, divided by two. The two sides are equal only if the triplets are ( 1 , 2 5 , 3 6 ) and ( 4 , 9 , 4 9 ) , since 1 + 2 5 + 3 6 = 4 + 9 + 4 9 .
There are 3 ! = 6 ways to order each triplet, and since we are counting cases when the two sides are equal, we can assign either the left- or right-hand side either triplet.Thus there are 6 × 6 × 2 = 7 2 cases where they are equal. There are 7 ! = 5 0 4 0 permutations in total.
Hence, N = 2 5 0 4 0 − 7 2 = 2 4 8 4 .
I see others went into further detail regarding the uniqueness of the partition for which the two triplets are equal. I admit I used a less formal argument.
To eliminate any other case, first note that no reorganization of the given six numbers could maintain equality. It then suffices to rule out 1 6 from being involved. The closest the two sides can be if 1 6 is involved is 9 + 1 6 + 2 5 = 5 0 < 5 4 = 1 + 4 + 4 9 .
We would first count the number of cases where τ ( 1 ) + τ ( 9 ) + τ ( 2 5 ) = τ ( 4 ) + τ ( 1 6 ) + τ ( 3 6 ) . Thus τ ( 1 ) + τ ( 4 ) . . . + τ ( 3 6 ) must be even. Note that τ ( 1 ) + τ ( 4 ) + . . . + τ ( 4 9 ) = 1 4 0 , so τ ( 4 9 ) must be even, so it is either 4 , 1 6 , or 3 6 .
Case 1 : τ ( 4 9 ) = 4 .
τ ( 1 ) + τ ( 4 ) . . . + τ ( 3 6 ) = 1 4 0 − 4 = 1 3 6 , so τ ( 1 ) + τ ( 9 ) + τ ( 2 5 ) = τ ( 4 ) + τ ( 1 6 ) + τ ( 3 6 ) = 2 1 3 6 = 6 8 . We consider the one containing the 4 9 . The sum of the other 2 in that group will be 6 8 − 4 9 = 1 9 . However, there are no two perfect squares that have a sum of 1 9 , because 1 9 − 1 6 = 3 , 1 9 − 9 = 1 0 , 1 9 − 4 = 1 5 , and 1 9 − 1 = 1 8 are not perfect squares.
Case 2 : τ ( 4 9 ) = 1 6 .
τ ( 1 ) + τ ( 4 ) . . . + τ ( 3 6 ) = 1 4 0 − 1 6 = 1 2 4 , so τ ( 1 ) + τ ( 9 ) + τ ( 2 5 ) = τ ( 4 ) + τ ( 1 6 ) + τ ( 3 6 ) = 2 1 2 4 = 6 2 . We consider the one containing the 4 9 . The sum of the other 2 in that group will be 6 2 − 4 9 = 1 3 . The only two perfect squares that sum up to 1 3 is 9 and 4 . It is easy to check that 1 3 − 1 = 1 2 is not a perfect square. Hence we have a pairing of 4 9 , 9 , 4 and 3 6 , 1 6 , 1 . There are 2 ways to choose which unordered triplet goes to τ 1 , τ 9 , τ 2 5 or τ 4 , τ 1 6 , τ 3 6 , and 6 ways to rearrange within each, so there are ( 2 ) ( 6 ) ( 6 ) = 7 2 permutations in all.
Case 3 : τ ( 4 9 ) = 3 6 . τ ( 1 ) + τ ( 4 ) . . . + τ ( 3 6 ) = 1 4 0 − 3 6 = 1 0 4 , so τ ( 1 ) + τ ( 9 ) + τ ( 2 5 ) = τ ( 4 ) + τ ( 1 6 ) + τ ( 3 6 ) = 2 1 0 4 = 5 2 . We consider the one containing the 4 9 . The sum of the other 2 in that group will be 5 2 − 4 9 = 3 . However, the smallest possible value of two distinct perfect squares is 1 + 4 = 5 , so this case is not possible.
Hence there are only 7 2 combinations such that τ ( 1 ) + τ ( 9 ) + τ ( 2 5 ) = τ ( 4 ) + τ ( 1 6 ) + τ ( 3 6 ) . Note that there are 7 ! = 5 0 4 0 permutations in all, so there are 5 0 4 0 − 7 2 = 4 9 6 8 permutations where τ ( 1 ) + τ ( 9 ) + τ ( 2 5 ) = τ ( 4 ) + τ ( 1 6 ) + τ ( 3 6 ) . Note that exactly half of those satisfy τ ( 1 ) + τ ( 9 ) + τ ( 2 5 ) > τ ( 4 ) + τ ( 1 6 ) + τ ( 3 6 ) because we could just reverse the numbers then the symbol will be reversed.
Hence N = 2 4 9 6 8 = 2 4 8 4 . Its last 3 digits are 4 8 4 .
minor typo: τ1,τ9,τ25 or τ4,τ16,τ36 should be τ(1),τ(9),τ(25) or τ(4),τ(16),τ(36)
May I ask if this: Note that exactly half of those satisfy τ(1)+τ(9)+τ(25)>τ(4)+τ(16)+τ(36), does not need reasoninig?
Symmetry is the essence of combinatorics
Let S 1 = τ ( 1 ) + τ ( 9 ) + τ ( 2 5 ) & S 2 = τ ( 4 ) + τ ( 1 6 ) + τ ( 3 6 ) . Given any value of τ ( 4 9 ) , all permutations τ can be classified in 3 parts: (i) when S 1 > S 2 ; (ii) when S 1 = S 2 & (iii) when S 1 < S 2 .
Observe that cases (i) & (iii) are symmetric & equally present in permutations τ , as they are basically same(oppositely). In fact, say for a particular permutation S 1 > S 2 , then you can switch values of τ ( 4 ) , τ ( 1 6 ) & τ ( 3 6 ) with τ ( 1 ) , τ ( 9 ) & τ ( 2 5 ) to obtain S 1 < S 2 (and for each such permutation you can do so).
So, cases (i) & (iii) occur in equal numbers.Now let's find when S 1 = S 2 .
Observe that sum of all terms τ ( 1 ) + τ ( 4 ) + . . . + τ ( 4 9 ) = 1 + 4 + 9 + . . . + 4 9 = 1 4 0 , then, so that S 1 = S 2 = 2 1 4 0 − τ ( 4 9 ) , τ ( 4 9 ) must be even (4,16 or 36).
On checking, for τ ( 4 9 ) = 1 6 , we have 9 + 4 + 4 9 = 1 + 2 5 + 3 6 . Both sides S 1 & S 2 can be switched in 2 ways, & each triplet can permute in 3 ! ways. So number of such permutations is 2 ⋅ 3 ! ⋅ 3 ! .
So we subtract it from total permutations & divide by 2 to get the particular case when S 1 > S 2 , which is 2 7 ! − 2 ⋅ 3 ! ⋅ 3 ! = 2 4 8 4 .
Define P > , P ≤ , P < and P = as the number of permutations τ such that, respectively:
τ ( 1 ) + τ ( 9 ) + τ ( 2 5 ) > τ ( 4 ) + τ ( 1 6 ) + τ ( 3 6 ) ( 1 ) τ ( 1 ) + τ ( 9 ) + τ ( 2 5 ) ≤ τ ( 4 ) + τ ( 1 6 ) + τ ( 3 6 ) τ ( 1 ) + τ ( 9 ) + τ ( 2 5 ) < τ ( 4 ) + τ ( 1 6 ) + τ ( 3 6 ) τ ( 1 ) + τ ( 9 ) + τ ( 2 5 ) = τ ( 4 ) + τ ( 1 6 ) + τ ( 3 6 )
Since τ can map each number into any other anyway, it doesn't matter in which order we write 1, 4, 9, 16 and 25 in the expression above: they will allways lead to the same respective results. Therefore, by convenientely repositioning the numbers in ( 1 ) , we may conclude that S > = S < .
Naturally, P > + P ≤ = 7 ! , which is the total number of permutations, and S ≤ = S < + S = . By manipulating the equations, we get:
P > = 2 7 ! − P =
Now we are only left to find P = . By directly testing the possibilities, we find that the only ways to attain the equality are the following:
( τ ( 1 ) , τ ( 9 ) , τ ( 2 5 ) ) = ( 1 , 2 5 , 3 6 ) ( τ ( 4 ) , τ ( 1 6 ) , τ ( 3 6 ) ) = ( 4 , 9 , 4 9 )
or:
( τ ( 1 ) , τ ( 9 ) , τ ( 2 5 ) ) = ( 4 , 9 , 4 9 ) ( τ ( 4 ) , τ ( 1 6 ) , τ ( 3 6 ) ) = ( 1 , 2 5 , 3 6 ) ,
where the triples ( 1 , 2 5 , 3 6 ) and ( 4 , 9 , 4 9 ) may assume any order. Because there are 3 ! ways to order each triple, we get that P = = 3 ! 3 ! + 3 ! 3 ! = 7 2 and therefore P > = 2 7 ! − 7 2 = 2 4 8 4 .
The answer is thus 4 8 4 .
I found it easiest to think of the problem in terms of writing down a permutation of the numbers on a piece of paper and finding the number of permutations with the given property. The key is to note that "half" the time, the sum of the numbers in positions 1,3,5 is bigger than the sum of the numbers in positions 2,4,6.
Consider first the number that can go in the last pace (i.e. the image of 49) or τ ( 4 9 ) . It can be any of 1,4,9,16,25,36 or 49. Lets say τ ( 4 9 ) = 3 6
Once we have done this, we then have 6 numbers to distribute in the rest of the places, which we can do in 6 ! ways. In half the cases, we will have the permutations satisfying the required property, and we get 2 6 ! = 3 6 0 permutations that satisfy the condition.
All that we now need to check if there are any permutations in which the sums of the numbers are the same. This actually occurs when τ ( 4 9 ) = 1 6 and τ ( 1 ) , τ ( 9 ) , τ ( 2 5 ) is some permutation of 3 6 , 2 5 , 1 or 4 , 9 , 4 9 .
There are 3 ! × 3 ! × 2 = 7 2 such permutations.
So the total number of such permutations is 2 6 ! × 6 + 2 6 ! − 7 2 = 2 4 8 4
This actually occurs when τ(49)=16 and τ(1),τ(9),τ(25) is some permutation of 36,25,1 or 4,9,49.
And only then.
Problem Loading...
Note Loading...
Set Loading...
By symmetry, the number of permutations such that the problem is satisfied is the same as the number of permutations such that the inequality is reversed, or such that τ ( 1 ) + τ ( 9 ) + τ ( 2 5 ) < τ ( 4 ) + τ ( 1 6 ) + τ ( 3 6 ) To find our answer, we must find the number of ways that either the above inequality or the one in the problem is satisfied, and we can then divide by 2.
There are exactly three possibilities for the inequality sign. It could be > , < , or = . Since the total number of permutations is 7 ! = 5 0 4 0 , we can find the number of ways = can be achieved, and subtract from 5040, and divide.
We must find the number of ways that the sum three distinct elements in τ is also the sum of three other distinct elements in τ . The sum of the elements in τ is 140. Therefore, if two sums are equal, the number left out must be even. We can leave out 4, 16, or 36.
4 left out:
In this case, the sum of each set of three is 68. 1 must be paired with two numbers that add to 67. It is easy to see there is no such pair.
16 left out:
In this case, each sum must be 62. 1 must pair with numbers that add to 61. We find that only 25+36=61, and so one pair of triplets is ( ( 1 , 2 5 , 3 6 ) , ( 4 , 9 , 4 9 ) )
36 is left out:
In this case, each set sums to 52. The set with 1 must have a total of 3 from two other elements. This is not possible.
Therefore, LHS=RHS in exactly one case. However, we can first choose which of the two sets is on the LHS, and then we can permute the elements on both sides. This is a factor of 2 ⋅ 3 ! ⋅ 3 ! = 7 2 Using our logic from above, we find that N = 2 5 0 4 0 − 7 2 = 2 4 8 4 The answer is 4 8 4 .
Sidenote: The cases might appear long, but they are quite simple.