SAT1000 - P915

Let N = 2 n ( n N + , n 2 ) N=2^n\ (n \in \mathbb N^+, n \geq 2) , N N distinct numbers denoted as x 1 , x 2 , , x N x_1,x_2,\cdots,x_N are put into N N positions labeled 1 , 2 , , N 1,2,\cdots,N , then we will get the permutation P 0 = x 1 x 2 x N P_0=x_1 x_2 \cdots x_N .

The transform C C on the permutation P P is as follows:

  • Separate the terms on the odd and even positions, and put them to the first N 2 \dfrac{N}{2} , last N 2 \dfrac{N}{2} positions respectively, keeping the original order.

If we apply C C to P 0 P_0 once, we will get P 1 = x 1 x 3 x N 1 x 2 x 4 x N P_1=x_1 x_3 \cdots x_{N-1} x_2 x_4 \cdots x_N .

After that, we divide P 1 P_1 into 2 2 consecutive segments consisting of N 2 \dfrac{N}{2} numbers, and apply C C to each segment, we will get P 2 P_2 .

For example, if n = 3 , N = 8 n=3,\ N=8 , we will get P 2 = x 1 x 5 x 3 x 7 x 2 x 6 x 4 x 8 P_2=x_1 x_5 x_3 x_7 x_2 x_6 x_4 x_8 , at this time, x 7 x_7 is on 4 t h 4\ th position of P 2 P_2 .

From then on, when 2 i n 2 2 \leq i \leq n-2 , we divide P i P_i into 2 i 2^i consecutive segments consisting of N 2 i \dfrac{N}{2^i} numbers, and apply C C to each segment to get P i + 1 P_{i+1} .

Then when n = 32 , N = 2 32 n=32,\ N=2^{32} , x 173 x_{173} is on the M t h M\ th position of P 4 P_4 . Submit M M .


Have a look at my problem set: SAT 1000 problems


The answer is 805306379.

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.

2 solutions

David Vreken
Jul 2, 2020

173 1 ( m o d 2 ) 173 \equiv 1 \pmod{2} so x 173 x_{173} is in the front half of P 1 P_1 .

173 1 ( m o d 4 ) 173 \equiv 1 \pmod{4} so x 173 x_{173} is in the front quarter of P 2 P_2 .

173 5 ( m o d 8 ) 173 \equiv 5 \pmod{8} so x 173 x_{173} is in the second half of the front quarter (in other words, the second eighth) of P 3 P_3 .

173 13 ( m o d 16 ) 173 \equiv 13 \pmod{16} so x 173 x_{173} is in the second half of the second eighth (in other words, the fourth sixteenth) of P 4 P_4 .

173 = 16 10 + 13 173 = 16 \cdot 10 + 13 , so x 173 x_{173} is the 10 + 1 = 1 1 th 10 + 1 = 11^{\text{th}} term in the fourth sixteenth of P 4 P_4 . The first three sixteenths have 2 32 16 = 2 28 \frac{2^{32}}{16} = 2^{28} terms each.

Therefore, x 173 x_{173} is in position M = 3 2 28 + 11 = 805306379 M = 3 \cdot 2^{28} + 11 = \boxed{805306379} of P 4 P_4 .

For given n n , we have N = 2 n N = 2^n distinct numbers x 1 , x 2 , x 3 , , x N x_1\,,\,x_2\,,\,x_3\,,\,\cdots\,,\,x_N labeled at position 1 , 2 , 3 , , N 1\,,\,2\,,\,3\,,\,\cdots\,,\,N to form a permutation

P 0 = x 1 x 2 x 3 x N P_0 = x_1x_2x_3\cdots x_N

For n = 32 n = 32 we have N = 2 32 N = 2^{32} . On applying transformation C C to P 0 P_0 we get,

P 1 = x 1 x 3 x 5 x 7 x 2 32 1 x 2 x 4 x 6 x 2 32 P_1 = x_1x_3x_5x_7\cdots x_{2^{32}-1}x_2x_4x_6\cdots x_{2^{32}}

Since 173 173 is an odd number we conclude that x 173 x_{173} must be in the first half of P 1 P_1 . Let x 173 x_{173} be at n n th position from left. Then

2 n 1 = 173 n = 87 2n - 1 = 173\newline\Rightarrow n = 87

So, x 173 x_{173} is at 87 t h 87th position of P 1 P_1 .

Dividing P 1 P_1 into 2 1 = 2 2^1 = 2 segments and then again applying C C to each segment of P 1 P_1 we get,

Since 87 87 is again an odd number we get that x 173 x_{173} occurs at odd position in first segment of P 1 P_1 . So it occurs at left part of first segment in P 2 P_2 formed by transformation C C to P 1 P_1 . Position of x 173 x_{173} in P 2 P_2 is determined by

2 n 1 87 n = 44 2n - 1 - 87\newline\Rightarrow n = 44

So, x 173 x_{173} is at 44 t h 44th position of P 2 P_2 .

Dividing P 2 P_2 into 2 2 = 4 2^2 = 4 segments each of length 2 30 2^{30} and then again applying C C to each segment of P 2 P_2 we get,

Since 44 44 is an even number and less than 2 30 2^{30} length of each segment of P 2 P_2 we get that x 173 x_{173} occurs at even position in first segment of P 2 P_2 . So it occurs at right part of first segment in P 3 P_3 formed by transformation C C to P 2 P_2 . Left part of first segment of P 3 P_3 consists of (half of the length of segment) numbers. So number of numbers in left part of first segment of P 3 P_3 is 2 30 2 = 2 29 \displaystyle\frac{2^{30}}{2} = 2^{29} . Position of x 173 x_{173} in right part of first segment of P 3 P_3 is determined by

2 n = 44 n = 22 2n = 44\newline\Rightarrow n = 22 .

So, x 173 x_{173} is at ( 2 29 + 22 ) t h (2^{29} + 22)th position of P 3 P_3 .

Dividing P 3 P_3 into 2 3 = 8 2^3 = 8 segments each of length 2 29 2^{29} and then again applying C C to each segment of P 3 P_3 we get,

We see that x 173 x_{173} is at ( 2 29 + 22 ) t h (2^{29} + 22)th position of P 3 P_3 . So, it means that x 173 x_{173} occurs in the second segment of P 3 P_3 because each segment is of length 2 29 2^{29} . Now in the second segment x 173 x_{173} is at 22 n d 22nd position from left.

Since 22 22 is again an even number we get that x 173 x_{173} occurs at even position in the second segment of P 3 P_3 . So it occurs at the right part of second segment of P 4 P_4 formed by transformation C C to P 3 P_3 . Left part of second segment of P 4 P_4 consists of (half of the length of segment) numbers. So number of numbers in left part of second segment of P 4 P_4 is 2 29 2 = 2 28 \displaystyle\frac{2^{29}}{2} = 2^{28} . Position of x 173 x_{173} in right part of second segment of P 4 P_4 is determined by

2 n = 22 n = 11 2n = 22\newline \Rightarrow n = 11

So, x 173 x_{173} is at ( 2 29 + 2 28 + 11 ) t h = 805306379 t h (2^{29} + 2^{28} + 11)th = 805306379th position of P 4 P_4 .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...