Get ready Part 21

Suppose we have a necklace of n n beads.Each bead is labeled with an integer and the sum of all these labels is n 1 n-1 .Can we cut the necklace to form a string whose consecutive labels x 1 , x 2 , , x n x_1,x_2,\dots,x_n satisfy i = 1 k x i k 1 \displaystyle \sum_{i=1}^k x_i \le k-1 for k = 1 , 2 , , n k=1,2,\dots,n ?

No Yes

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

Mark Hennings
Feb 1, 2019

Let S S be the set of all bead values. If x 1 x \ge 1 for all x S x \in S , then x S x n > n 1 \sum_{x \in S}x \ge n > n-1 . Thus we can find x 1 S x_1 \in S with x 1 0 x_1 \le 0 .

Suppose that 2 K n 2 \le K \le n and we have found distinct x 1 , x 2 , . . . , x K 1 S x_1,x_2,...,x_{K-1} \in S such that j = 1 q x j q 1 \sum_{j=1}^q x_j \le q-1 for all 1 q K 1 1 \le q \le K-1 . If it were true that x + j = 1 K 1 x j K x + \sum_{j=1}^{K-1}x_j \ge K for all x S \ { x 1 , x 2 , . . . , x K 1 } x \in S \backslash \{x_1,x_2,...,x_{K-1}\} , then n 1 = x S x = j = 1 K 1 x j + x ∉ { x 1 , x 2 , . . . , x K 1 } x j = 1 K 1 x j + ( n + 1 K ) ( K j = 1 K 1 x j ) = K ( n + 1 K ) ( n K ) j = 1 K 1 x j ( n K ) j = 1 K 1 x j K ( n + 1 K ) ( n 1 ) = ( K 1 ) ( n K ) + 1 j = 1 K 1 x j K 1 + 1 n K > K 2 \begin{aligned} n-1 & = \; \sum_{x \in S} x \; = \; \sum_{j=1}^{K-1}x_j + \sum_{x \not\in\{x_1,x_2,...,x_{K-1}\}}x \\ & \ge \; \sum_{j=1}^{K-1}x_j + (n+1-K)\left(K - \sum_{j=1}^{K-1}x_j\right) \; = \; K(n+1-K) - (n-K)\sum_{j=1}^{K-1}x_j \\ (n-K)\sum_{j=1}^{K-1}x_j & \ge \; K(n+1-K) - (n-1) \; = \; (K-1)(n-K) + 1 \\ \sum_{j=1}^{K-1}x_j & \ge \; K-1 + \frac{1}{n-K} \; > \; K-2 \end{aligned} which is a contradiction. Thus we can find x K S \ { x 1 , x 2 , . . . , x K 1 } x_K \in S \backslash\{x_1,x_2,...,x_{K-1}\} such that j = 1 K x j K 1 \sum_{j=1}^Kx_j \le K-1 . Hence, by induction, we can label the elements S S as x 1 , x 2 , . . . x n x_1,x_2,...x_n such that j = 1 k x j k 1 \sum_{j=1}^kx_j \le k-1 for all 1 k n 1 \le k \le n .

What do you mean by the backslash of S\~\{x_1,x_2,\dots ,x_{K-1}\} ? Is it division or a typo?

Gia Hoàng Phạm - 2 years, 4 months ago

Log in to reply

I mean the complement of { x 1 , x 2 , . . . , x K 1 } \{x_1,x_2,...,x_{K-1}\} in S S .

Mark Hennings - 2 years, 4 months ago
Patrick Corn
Feb 1, 2019

Let y i = x i 1. y_i = x_i-1. If we label the beads with the y i , y_i, then the labels sum to 1 , -1, and we want to string them out so that the partial sums are always at most 1. -1.

Here is an algorithm for finding the place to cut. Pick a random bead to start at, call it bead 1, and write down the partial sums as we go around. Call those sums s 1 , s 2 , , s n = 1. s_1, s_2, \ldots, s_n = -1. Now, cut just after the bead a a that produced the largest partial sum s a . s_a. (If multiple beads produce the same largest partial sum s a , s_a, cut after the last one.) The partial sums of the resulting series will all be negative: if b > a , b > a, the ( b a ) (b-a) th partial sum of your string will be s b s a , s_b-s_a, and if b a , b \le a, the ( n a + b ) (n-a+b) th partial sum will be 1 + s b s a . -1 + s_b-s_a. These partial sums will always be negative integers by construction, so they'll always be 1. \le -1.

Here's an example: suppose my y i y_i are 2 , 1 , 1 , 4 , 2 , 1 , 1 , 4 , 3 , 0 , 1 , 1. 2,-1,1,4,-2,1,1,-4,-3,0,1,-1. The corresponding partial sums are 2 , 1 , 2 , 6 , 4 , 5 , 6 , 2 , 1 , 1 , 0 , 1. 2,1,2,6,4,5,6,2,-1,-1,0,-1. Cut after the seventh bead (the bead that produced the last 6 6 ). Then the partial sums of the resulting string are 4 , 7 , 7 , 6 , 7 -4,-7,-7,-6,-7 and then 5 , 6 , 5 , 1 , 3 , 2 , 1. -5,-6,-5,-1,-3,-2,-1.

I solved this problem by remembering the brainteaser about starting with an empty tank and driving in a circular loop with gas stations along the way, with just enough gas in the stations to make it around once. The proof above is reminiscent of the proof that you can always find a gas station to start at in order to make it around the loop without running out of gas.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...