Weird permutations

Find the number of permutations f f on { 1 , 2 , 3 , , 32 } \{1, 2, 3, \ldots, 32\} such that if m m divides n n , then f ( m ) f(m) divides f ( n ) f(n) .


The answer is 240.

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.

3 solutions

Kushal Bose
May 26, 2017

@Khang Nguyen Thanh 's solution is more explanatory.But I will try to make it simplify.

First of all we will find the numbers which can occupy the position 1 1 .Let it will be a a .As 1 1 divides every { 2 , 3 , . . . 32 } \{2,3,...32\} So, a a will divide every numbers in this position.If we consider any number excluding 1 1 then there will be a time when we need to consider greater number than 32 32 .So, 1 1 position will always be occupied by 1 1 .

Now comes to position 2 2 .As 2 2 divides 4 , 6 , 8 , , , , , , , 30 , 32 4,6,8,,,,,,,30,32 .So, there will be a number in position two which will divide all the numbers in even positions.If we take greater than two then one time will come when we need to consider a number which will greater than 32 32 .So, in position two 2 2 will be there always.

The same logic is for all the numbers whose multiples are present in the range.Now consider the primes whose multiples are not present in this range.This primes are { 17 , 19 , 23 , 29 , 31 } \{17,19,23,29,31\} .These can permute with 5 ! = 120 5!=120 ways.

Now , it's time to consider the primes whose number of multiples are same in the given range.So, we can exchange them. These primes are 11 , 13 11,13 and multiples are 22 , 26 22,26 .So, in position 11 , 22 11,22 and 13 , 26 13,26 we can made it fix or exchange them i.e in position 11 , 22 11,22 we can write 13 , 26 13,26 and in position 13 , 26 13,26 we can write 11 , 22 11,22 .So, there will be two ways.

So, total ways 120 × 2 = 240 120 \times 2=240

See my comment in Khang's solution. Essentially you have the right ideas, but they could be better constrained/presented.

Calvin Lin Staff - 4 years ago

Log in to reply

Yeas your logic is more simplified.The main point is to find out the how many number of primes are there whose number of multiples are equal within the range

Kushal Bose - 4 years ago

We write { 1 , 2 , , 32 } \{1, 2, \ldots, 32\} as [ 32 ] [32] . Let f f be a permutation on [ 32 ] [32] for which a b f ( a ) f ( b ) a \mid b \implies f(a) \mid f(b) .

Lemma 1. For all n [ 32 ] n \in [32] , 32 f ( n ) = 32 n \left\lfloor \dfrac{32}{f(n)} \right\rfloor = \left\lfloor \dfrac{32}{n} \right\rfloor .

Proof: Suppose that m [ 32 ] m \in [32] with n m n \mid m . Then f ( n ) f ( m ) f(n) \mid f(m) , so there is an injective mapping from multiples of n n to multiples of f ( n ) f(n) . Thus, f ( n ) f(n) has at least as many multiples in [ 32 ] [32] as n n does, so for all n n , 32 / f ( n ) 32 / n \lfloor 32/f(n) \rfloor \ge \lfloor 32/n \rfloor . But summing over all n n , we get n = 1 32 32 f ( n ) n = 1 32 32 n , \sum_{n=1}^{32} \left\lfloor \dfrac{32}{f(n)} \right\rfloor \ge \sum_{n=1}^{32} \left\lfloor \dfrac{32}{n} \right\rfloor, and equality must hold because f f permutes [ 32 ] [32] . This forces equality for all n n , so 32 f ( n ) = 32 n \left\lfloor \dfrac{32}{f(n)} \right\rfloor = \left\lfloor \dfrac{32}{n} \right\rfloor for all n n .

Lemma 2. For all n n , τ ( f ( n ) ) = τ ( n ) \tau(f(n)) = \tau(n) .

Proof: Suppose that m [ 32 ] m \in [32] with m n m \mid n . Then f ( m ) f ( n ) f(m) \mid f(n) , so there is an injective mapping from divisors of n n to divisors of f ( n ) f(n) . Thus, f ( n ) f(n) has at least as many divisors as n n does, so for all n n , τ ( f ( n ) ) τ ( n ) \tau(f(n)) \ge \tau(n) . But summing over all n n , we get n = 1 32 τ ( f ( n ) ) n = 1 32 τ ( n ) , \sum_{n=1}^{32} \tau(f(n)) \ge \sum_{n=1}^{32} \tau(n), and equality must hold because f f permutes [ 32 ] [32] . This forces equality for all n n , so τ ( f ( n ) ) = τ ( n ) \tau(f(n)) = \tau(n) for all n n .

The power behind Lemmas 1-2 is that, if a a permutes to b b under f f (that is, if f ( a ) = b f(a) = b ), then 32 / a = 32 / b \lfloor 32/a \rfloor = \lfloor 32/b \rfloor and τ ( a ) = τ ( b ) \tau(a) = \tau(b) . This should force many a a to permute to themselves (i.e. to be fixed points under f f ). Our method is as follows: for each n n , compute 32 / n \lfloor 32/n \rfloor , isolate the blocks with equal value of 32 / n \lfloor 32/n \rfloor and use τ ( n ) \tau(n) as a "tiebreaker" of sorts:

n n 1 2 3 4 5 6 7-8 9-10 11-16 17-32
32 / n \lfloor 32/n \rfloor 32 16 11 8 6 5 4 3 2 1

This immediately forces f ( n ) = n f(n) = n for n = 1 , 2 , , 6 n = 1, 2, \ldots, 6 . Now we tiebreak each of the four remaining blocks by computing τ ( n ) \tau(n) for each n n in each block:

n n 7-8 9-10 11-16 17-32
τ ( n ) \tau(n) 2, 4 3, 4 2, 6, 2, 4, 4, 5 2, 6, 2, 6, 4, 4, 2, 8, 3, 4, 4, 6, 2, 8, 2, 8

Due to having unique values of τ \tau , we see that 7 , 8 , 9 , 10 , 12 , 16 , 25 7, 8, 9, 10, 12, 16, 25 must also be fixed points of f f (along with the 1 , 2 , 3 , 4 , 5 , 6 1, 2, 3, 4, 5, 6 we found earlier). For the rest, we'll do a little more work. We have ( 11 , 13 ) (11, 13) , ( 14 , 15 ) (14, 15) , ( 17 , 19 , 23 , 29 , 31 ) (17, 19, 23, 29, 31) , ( 18 , 20 , 28 ) (18, 20, 28) , and ( 22 , 24 , 26 , 27 ) (22, 24, 26, 27) to resolve.

We know that 2 = f ( 2 ) f ( 14 ) 2 = f(2) \mid f(14) , so f ( 14 ) f(14) cannot be 15 15 . Thus, 14 14 is a fixed point, as is 15 15 .

We know that 3 = f ( 3 ) f ( 18 ) 3 = f(3) \mid f(18) and 5 = f ( 5 ) f ( 20 ) 5 = f(5) \mid f(20) , so 18 , 20 , 28 18, 20, 28 are all fixed points as well.

We know that 8 = f ( 8 ) f ( 24 ) 8 = f(8) \mid f(24) and 9 = f ( 9 ) f ( 27 ) 9 = f(9) \mid f(27) , so 24 , 27 24, 27 are also fixed points.

Now all that's left are ( 11 , 13 ) (11, 13) , ( 17 , 19 , 23 , 29 , 31 ) (17,19,23,29,31) , and ( 22 , 26 ) (22,26) (and this is where we can actually start making choices!) Since ( 17 , 19 , 23 , 29 , 31 ) (17,19,23,29,31) are primes with no other multiples in [ 32 ] [32] , any arbitrary permutation of them works for f f , so we have 5 ! = 120 5!=120 choices here. Also, either permutation of ( 11 , 13 ) (11,13) works, but since f ( 11 ) f ( 22 ) f(11) \mid f(22) and f ( 13 ) f ( 26 ) f(13) \mid f(26) , each permutation of ( 11 , 13 ) (11,13) determines which permutation of ( 22 , 26 ) (22,26) must be used. Thus, there are only 2 2 choices for ( 11 , 13 , 22 , 26 ) (11,13,22,26) .

In total, this gives 120 × 2 = 240 120 \times 2 = 240 possible functions f f .

The argument can be simplified via:

  1. f ( 1 ) = 1 f(1) = 1
  2. Let P n P_n denote the set of primes p p such that p n 32 < p n + 1 p ^ n \leq 32 < p^{n+1} . Then, a necessary condition is that f ( P n ) = P n f( P_n ) = P_n (Prove this by induction downwards on n)
  3. This forces P 5 : f ( 2 ) = 2 P_5: f(2) = 2 , P 3 : f ( 3 ) = 3 P_3: f(3) = 3 , P 2 : f ( 5 ) = 5 P_2: f(5) = 5 .
  4. Next, look at P 1 = { 7 , 11 , 13 , 17 , 19 , 23 , 29 , 31 } P_1 = \{ 7, 11, 13, 17, 19, 23, 29, 31 \} . By considering f ( 3 p ) f( 3p ) , we know that f ( 7 ) = 7 f(7) = 7 .
  5. By considering f ( 2 p ) f(2p) , we know that { 11 , 13 } { 11 , 13 } \{ 11, 13 \} \rightarrow \{ 11, 13 \} .
  6. Otherwise, { 17 , 19 , 23 , 29 , 31 } { 17 , 19 , 23 , 29 , 31 } \{ 17, 19, 23, 29, 31 \} \rightarrow \{ 17, 19, 23, 29, 31 \} .
  7. It remains to argue that these maps can be combined, which follow becase 3 × 11 > 32 , 2 × 17 > 34 3 \times 11 > 32, 2 \times 17 > 34 so they have no significant impact.

Calvin Lin Staff - 4 years ago

Log in to reply

That's more or less the logic that I used except I applied the reasoning that f (2) had 16 multiples in the range 1-32, while f (3) requires 10, f (5) requires 6 and f (7) needs 4. By a sort of simple induction these for each of them to be mapped to themselves - forcing the multiples to behave in the same way.

Malcolm Rich - 4 years ago

Step 1

1 is mapped to 1, prime numbers to prime numbers, squares to squares, products of two primes to products of two primes, etc. More rigorously, we can show by induction that if n = p 1 e 1 p 2 e 2 p 3 e 3 , n = p_1^{e_1}\cdot p_2^{e_2}\cdot p_3^{e_3} \cdots, then f ( n ) = f ( p 1 ) e 1 f ( p 2 ) e 2 f ( p 3 ) e 3 . f(n) = f(p_1)^{e_1}\cdot f(p_2)^{e_2}\cdot f(p_3)^{e_3}\cdots. Thus we only need to consider the restriction of the permutation to prime numbers; it determines the rest of the permutation.

Step 2

Prime numbers 2, 3, and 5 can be distinguished from the others based on their powers. The set { 1 , , 32 } \{1,\dots,32\} contains 2 2 2^2 through 2 5 2^5 (but not 2 6 2^6 ); 3 2 3^2 and 3 3 3^3 (but not 3 4 3^4 ); 5 2 5^2 (but not 5 3 5^3 ); and no other powers of primes. Therefore the primes 2, 3, and 5 must be mapped to themselves.

Prime number 7 is distinguishable by the fact that 3 7 3\cdot 7 is contained in the set, but not 3 p 3\cdot p for any greater prime p p . Therefore 7 must be mapped to itself.

Prime numbers 11 and 13 stand out because 2 11 2\cdot 11 and 2 13 2\cdot 13 are in the set, but not 2 p 2\cdot p for any greater prime p p . Thus f ( { 11 , 13 } ) = { 11 , 13 } f(\{11,13\}) = \{11,13\} ; however, we have no way of distinguishing 11 and 13 in this fashion .

Finally, prime numbers 17, 19, 23, 29, and 31 have no multiples in the set. Therefore they can freely be swapped around. All we know is that f ( { 17 , 19 , 23 , 29 , 31 } ) = { 17 , 19 , 23 , 29 , 31 } f(\{17,19,23,29,31\}) = \{17,19,23,29,31\} .

Step 3

Considering f f as a permutation on the prime numbers only, we know it is of the form f ( 2 , 3 , 5 , , 31 ) = ( 2 ) ( 3 ) ( 5 ) ( 7 ) σ ( 11 , 13 ) τ ( 17 , 19 , 23 , 29 , 31 ) , f(2,3,5,\dots,31) = (2)(3)(5)(7)\sigma(11,13)\tau(17,19,23,29,31), where σ \sigma and τ \tau are any permutations of the elements that follow. The number of permutations of this kind is 2 ! 5 ! = 2 120 = 240 . 2!\cdot 5! = 2 \cdot 120 = \boxed{240}.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...