Just the Right number of Forks

There's a randomly ordered line of 15 forks and 15 spoons on the counter. Chef Nidhi only needs 5 forks and 5 spoons.

Can she always pick up exactly what she needs by selecting 10 consecutive utensils starting from somewhere in the line-up?

The forks and spoons are <strong>not necessarily</strong> in this order.  They can be in <strong>any</strong> order. The forks and spoons are not necessarily in this order. They can be in any order.

No, not necessarily Yes, always

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.

24 solutions

Uros Stojkovic
Jun 4, 2018

Divide 30 utensils into 30 10 + 1 = 21 30-10+1 = 21 groups of 10 consecutive utensils (groups 1-10, 2-11, etc).

Let f ( n ) f(n) be a function which returns the number of forks in the n t h n^{th} group of utensils. The function is obviously continuous since the difference between number of forks of two consecutive groups cannot be greater than 1.

Consider now f ( 1 ) f(1) , f ( 11 ) f(11) and f ( 21 ) f(21) and let's say that none of them equals 5. In that case, since f ( 1 ) + f ( 11 ) + f ( 21 ) = 15 f(1) + f(11) + f(21) = 15 , at least one of them must be greater than 5 and one of them less than 5. Then, we can apply logic of Intermediate value theorem and say that there must be some n n between these so that f ( n ) = 5 f(n) = 5 .

Oh, how neat!

Ben Mitchell - 3 years ago

"Expected value of f ( n ) f(n) is intuitively 5" is a vague statement. You should rather note that if one of f ( 1 ) , f ( 11 ) f(1), f(11) and f ( 21 ) f(21) equals 5 we are done. Otherwise: f ( 1 ) + f ( 11 ) + f ( 21 ) = 15 f(1) + f(11) + f(21) = 15 so at least one of them is greater than 5 and one of them is less than 5. Now apply the intermediate value theorem between the n n where f ( n ) < 5 f(n) <5 and f ( n ) > 5 f(n)>5 .

Antoine G - 3 years ago

Log in to reply

You are right, I had some difficulties to translate my thoughts to language. I will modify my solution as soon as I can.

Uros Stojkovic - 3 years ago

Nice proof!

Mark Billingham - 3 years ago

Nice, just one problem; 30-20+1 is not equal to 21, you probably mean 30-10+1. It would suffice to say that there are 21 different sequences of 10 consecutive elements, each one uniquely idenitfied by their starting element, 1 through 21.

Thomas Langerwerf - 3 years ago

Log in to reply

30 10 + 1 = 21 30-10+1 = 21 that's what I meant, thanks for correction.

Uros Stojkovic - 3 years ago

SSSSFFFFFFSSSSFFFFFFSSSSSSSFFF That’s 15 Ss, 15 Fs and no sequence of 10 has five of each. What am I missing?

Samuel Coldicutt - 3 years ago

Log in to reply

Sam, there is a sequence of 10 with 5 of each: you have a string of 6 Fs followed by a string of 6 Ss, so use the last 5 of those Fs and the first 5 of those Ss. In other words start with position 16 and go right 9 more positions on the sequence ypu provided.

Jeremy Fischman - 3 years ago

S S S S F F F F F F S S S S F F F F F F S S S S S S S F F F SSSSFFFFFFSSSSF\boxed{FFFFFSSSSS}SSFFF

Uros Stojkovic - 3 years ago

The wording is vague such that I took "yes, always" to mean "always, no matter which ten consecutive utensils she picks." Obviously that is false because you could (however unlikely) find all 15 forks in a row then all 15 spoons in a row.

The intended question is much more interesting: "For every random distribution, will there always be a series of ten consecutive utensils composed of exactly five forks and five spoons?". That answers to that is yes though I can't summarize a proof.

Dave Toms - 3 years ago

Log in to reply

Yes, it it much different problem to show that a specific subsequence with the desired property must exist than to show that a single random 10-member subsequence will be that specific subsequence. This site needs better vetting of problem statements to ensure the problem posed is actually the one solved by the given answers.

Dwayne Knirk - 3 years ago

That's what I thought at first when I approached the problem. However, solution of that interpretation is too obvious and easy -- of course you cannot guarantee you will always pick 5 forks by randomly selecting 10 consecutive utensils, so I didn't consider it.

Uros Stojkovic - 3 years ago

Log in to reply

Ooh! Isn't Tom daft. Shouldn't finding the answer be the test, not decoding the question.

Peter Parker - 3 years ago

I agree the wording of "always" is confusing.

Pleayo Tovaranonte - 3 years ago

I agree. This is not the first poorly worded question.

Peter Parker - 3 years ago

Yeah I got this wrong because I thought it meant any 10 consecutive utensils. Since it's possible to have 10 or more of one type in a row, I said that it would not always be possible.

Tristan Goodman - 3 days, 12 hours ago

This is the best explanation of the three

Chris Naylor - 3 years ago

Very nice. Maybe you want to refer to the discrete version of the intermediate value theorem, e.g. https://anuragbishnoi.wordpress.com/2015/06/25/discrete-version-of-the-intermediate-value-theorem/

Pieter odb - 3 years ago

YOUR SOLUTION IS VERY NEAT!! But suppose that the question was 6 forks and 6 spoons out of 12. I suspect that this would also be possible somewhere, but then how would you proceed, because 12 is not divisible by 30. I believed that the answer was 'possible' because supposing that the first lot of 12 was 'more forks than spoons' there would be more spoons in the following 18. And so 'sooner or later' you would have to come to a place where the number of forks was half of the number of utensils taken. I just don't know how you would show this precisely, if the number of utensils taken was not divisible by the total number of utensils. But again yours is a very neat method for when this is the case. Regards, David

David Fairer - 3 years ago

Log in to reply

Here's one idea. We could widen the domain of our function to take values above, in this case, 19. To do this, we could prolong the sequence like this a 1 a 2 a 3 a 29 a 30 a 1 a 2 a 11 a_{1}a_{2}a_{3}\cdots a_{29}a_{30}|a_{1}a_{2}\cdots a_{11} . We now divide our new sequence into 41 12 + 1 = 30 41-12+1 = 30 groups of 12 consecutive utensils. Observe how each a n a_{n} is counted 12 times. It follows that: n = 1 30 f ( n ) = 12 15 = 180. \sum_{n = 1}^{30}f(n) = 12 \cdot 15 = 180. Now, assuming that is each f ( n ) f(n) in range n = [ 1 , 19 ] n = [1,19] is strictly greater or less than 6 and using the dependence of f ( 20 ) , f ( 21 ) , , f ( 30 ) f(20), f(21), \cdots, f(30) on value of function of other n's we can prove by contradiction that there must be some n n less than 20 such that f ( n ) = 6 f(n) = 6 . However, I'm not really satisfied with this method, I will try to think of another, more intuitive and elegant proof.

Uros Stojkovic - 3 years ago

Log in to reply

So, I think this argument cannot work. Because it would also work in other situations where it should not. Take

FFFFSSSSSSFFFFSSSSSSFFFF

(that's 4 forks, 6 spoons, 4 forks, 6 spoons 4 forks). If you take a sequence of 10 consecutive utensils, then you will never get a balanced set. However, 8 utensils and 12 utensils work for any line-up (since 8 and 12 divide 24).

On the other hand divisibility is not enough! The easiest case that in a line-up of 6 utensils, you can always pick up 4. Other examples are lines of 14 utensils (you can always pick up 4, 6 or 8 utensils in a row).

Antoine G - 2 years, 12 months ago

Log in to reply

@Antoine G Actually, I think it would or better said: it couldn't provide a proof that there will be group of 10 consecutive utensils with equal number of forks and spoons in line of 12 spoons and forks randomly ordered.

For this case, we have: n = 1 24 f ( n ) = 10 12 = 120 = n = 1 15 f ( n ) + n = 16 24 f ( n ) . \sum_{n = 1}^{24}f(n) = 10 \cdot 12 = 120 = \sum_{n = 1}^{15}f(n) + \sum_{n = 16}^{24}f(n). Let's assume that each f ( n ) f(n) in range n = [ 1 , 15 ] n = [1,15] is strictly, say, less than 5. Then, the most this series can contribute to the total sum is 15 4 = 60 15\cdot 4 = 60 when each f ( n ) f(n) in this range equals 4. On the other hand, the most the other series can contribute is 5 + 6 + 7 + 8 + 8 + 8 + 7 + 6 + 5 = 60 5+6+7+8+8+8+7+6+5 = 60 since it has to obey rule of gradual increase and dependence on the values of function of n's with which it shares utensil(s). However, by summing these two numbers we indeed get 120, so theoretically this arrangement is possible because it doesn't violate rules we previously set.

In practice, it turns out that the described order of utensils is exactly the one you wrote. Observe how, for combination of 4 F 6 S 4 F 6 S 4 F 4F-6S-4F-6S-4F each f ( n ) f(n) in range n = [ 1 , 15 ] n = [1,15] is equal to 4 and how the sum of the rest is exactly 60.

Uros Stojkovic - 2 years, 12 months ago

Log in to reply

@Uros Stojkovic Sorry, I did sound very categorical although I did not have a counterexample! I was trying to emit doubt that the method you describe would give a simple characterisation of the numbers which work...

In the meantime, I did find a counterexample:

FFFFFSSSSSSSFFFFFSSSSSSSSFFFFF

So that's 5 forks, 7 spoons , 5 forks, 8 spoons and 5 forks. If you pick any sequence of 12 utensils, then you will have at most 5 forks in them.

This is basically the counterexample of 24 utensils adapted. Now here is the funny thing: you can push up this example to 28 or 30 utensils, but for 26 utensils there is no counterexample (that is you can always pick 2 k 2k utensils in a row so that there are k k forks and k k spoons, as long as k 14 k \leq 14 ).

My feeling at the moment is that the counterexamples are themselves subject to very small effects so that it's going to be hard to find a simple description of the relation between the total number of utensils and the number of utensils to pick for which the trick works. Actually I posted a problem in this direction:

https://brilliant.org/problems/chef-nidhi-strikes-back/

Antoine G - 2 years, 12 months ago

Log in to reply

@Antoine G I also saw a flaw in my method. By what I had derived to this point (if it's correct), it proves that the task is doable for all k < 2 k + 1 k < \sqrt{2k+1} and certainly not doable for k = 2 k + 1 k = \sqrt{2k+1} . However, it guarantees nothing when k > 2 k + 1 k > \sqrt{2k+1} . As I wrote, I was never really satisfied with this method because it lacks determinism and exactness. I also saw your problem in the morning and answered correctly, but I think that your solution is also bounded to some values and doesn't hold for every ( n , k ) (n,k) . I agree with you that it's going to be hard to find unique relation and that right now it seems maybe even impossible, but I have some feeling that we're missing something, that we neglect something during our reasoning...very interesting problem.

Uros Stojkovic - 2 years, 12 months ago

Log in to reply

@Uros Stojkovic @Arjen Vreugdenhil could you help us with this? If you haven't read the problem and discussion here it is:

Given n n forks and n n spoons randomly ordered, one tries to pick a group of 2 k 2k consecutive utensils such that it consists of k k spoons and k k forks. We are trying to derive a general relation (if it, after all, can be derived) between n n and k k for which this is always possible. If it cannot be derived, I'd like to see proof of that. Thanks in advance!

Uros Stojkovic - 2 years, 12 months ago

@Uros Stojkovic I am "at peace" with your k < 2 n + 1 k < \sqrt{2n+1} bound because there is an easy family of cases where the task is not doable.

Assume n = j a = ( j + 1 ) b n = j a = (j+1) b where j j is some integers and a a and b b are even. Then you can make the following example: ( F b S a ) j F b (F^bS^a)^j F^b . Now any choice of 2 k = a + b 2 k = a +b utensils will return an unequal number of forks and spoons. To see how these example behave asymptotically, note that there is some d d so that n = 2 j ( j + 1 ) d n = 2 j (j+1) d , a = 2 j d a = 2jd and b = 2 ( j + 1 ) d b = 2(j+1)d . This means k = ( 2 j + 1 ) d k = (2j+1)d . Now note that 2 n + 1 = 4 j 2 + 4 j + 1 = 2 j + 1 = k \sqrt{2n+1} = \sqrt{ 4j^2+4j+1 } = 2j+1 =k .

The thing I find difficult, is to check how cases where the task is not doable adapt to nearby cases... Taking with j = 2 j=2 in the above set up give you that the task is not doable for n = 12 n=12 and k = 5 k=5 . This can be adapted to n = 14 n=14 and k = 6 k=6 as well as n = 15 n=15 and k = 6 k=6 . But somehow, the task is always doable for n = 13 n=13 (as long as k 7 k \leq 7 ). So my feeling at the moment, is that if there is no "easy" line-up as above (alternating blocks of forks and spoons), then the task is doable.

As for "my method" in the solution of the other problem, it is very limited and only shows the trick is doable when k k divides n n . There is basically no difference to the method you did here. In the problem, I had to limit to n 11 n \leq 11 because that's when the first undoable line-up (with j > 1 j >1 ) pops-up.

Antoine G - 2 years, 12 months ago

Log in to reply

@Antoine G I get lost when you introduce d d . Can you explain your reasoning in detail? Also, shouldn't it be a = 2 ( j + 1 ) d a = 2(j+1)d and b = 2 j d b = 2jd if you already defined n = j a = ( j + 1 ) b = 2 j ( j + 1 ) d n = ja = (j+1)b = 2j(j+1)d ? Next, when you plug in k = ( 2 j + 1 ) d k = (2j+1)d to my root expression, where does d d disappear?

Uros Stojkovic - 2 years, 12 months ago

Log in to reply

@Uros Stojkovic Sure: One needs a a and b b to be such that k = 1 2 ( a + b ) k = \tfrac{1}{2} (a+b) is an integer. This means a + b a+b is even. Further note that a a and b b can't both be odd (since one of j j and j + 1 j+1 is odd and the other is even). So a a and b b are both even

Next, since j j and j + 1 j+1 are coprime and j a = ( j + 1 ) b ja = (j+1)b , j j divides b b and j + 1 j+1 divides a a . This means b = 2 j d b = 2j d where d d is some integer. Using again that j a = ( j + 1 ) b ja = (j+1)b , one has that a = 2 ( j + 1 ) d a = 2(j+1)d for the same integer d d .

In this construction j j and d d are any positive integers (they are the two parameters of the construction). When I plugged n n into your formula I just used d = 1 d=1 because that's the value which gives the smallest pair ( n , k ) (n,k) , so it was (from my perspective) the best one to check your statement about k < 2 n + 1 k < \sqrt{2n+1} .

As a last note, I think that these counterexamples work better and better when n n gets bigger. In fact, these undoable cases gets "larger" (in the sense that they work for more values of k k ) and more stable. As an example F 40 S 60 F 40 S 60 F 40 F^{40}S^{60}F^{40}S^{60}F^{40} (which corresponds to n = 120 n= 120 and is just "ten times" F 4 S 6 F 4 S 6 F 4 F^4S^6F^4S^6F^4 ) is not a doable task for k = 50 k =50 but also for 41 k 59 41 \leq k \leq 59 .

Antoine G - 2 years, 12 months ago

Log in to reply

@Antoine G I'm still confused with a = 2 j d a = 2jd and b = 2 ( j + 1 ) d b = 2(j+1)d . If expression j a = ( j + 1 ) b ja = (j+1)b and j Z + j \in \mathbb{Z}^{+} , then a a must be bigger than b b . However, by your formula that's not the case.

Also, I stated my method guarantees that the task is doable when k < 2 n + 1 k <\sqrt{2n+1} , but doesn't say anything about the cases when k > 2 n + 1 k >\sqrt{2n+1} . So, to break my method we need to find ( n , k ) (n,k) such that k < 2 n + 1 k <\sqrt{2n+1} and task is not doable.

Uros Stojkovic - 2 years, 12 months ago

Log in to reply

@Uros Stojkovic oh sorry, it's the other way around: a = 2 ( j + 1 ) d a= 2(j+1)d and b = 2 j d b = 2jd . I'll edit the post...

Also, I agree with your second statement: I think your method is right. Also, I'm pretty sure it works for the range you state ( k < 2 n + 1 k <\sqrt{2n+1} ). I was just doing a "sanity check" if you wish (sometimes it's easier to find a counterexample than to find a mistake in an argument).

I was just trying to point at the fact that it might be hard to show that for some other range the task is doable, and hence, it might be more reasonable to start by looking at the ranges when one is certain that the task is not doable.

Antoine G - 2 years, 12 months ago

Am i wrong? 15 spoons in a row and then 15 forks in a row and she starts to picking utensils from the beginning and happen to pick only spoons. Why that's not possible?

Ilya Halturin - 2 years, 11 months ago

Log in to reply

Chef Nidhi is allowed to choose which 10 consecutive utensils he will pick up. You can think of it in this way: Is there some ordering of 15 forks and 15 spoons such that Chef Nidhi cannot pick 10 consecutive utensils of 5 forks and 5 spoons? It turns out there's not. So, no matter what ordering he's challenged with, he can always pull of exactly what he needs.

Uros Stojkovic - 2 years, 11 months ago

I am in love with your solution <3 First time is saw Intermediate value theorem really needed.

Hani Haddad - 2 years, 9 months ago
Michael Mendrin
Jun 3, 2018

We can partition the 30 30 utensils into thirds of 10 10 utensils each. Assuming none of them have 5 5 forks, then there will be at least one adjacent pair where one has more than 5 5 forks and the other less than 5 5 . If any scoop has x x number of forks, then an adjacent scoop one utensil over will change the number of forks by 1 -1 , 0 0 , or 1 1 . Hence, there exists at least one scoop within that adjacent pair that will have exactly 5 5 forks.

Try this random sequence

0 , 1 , 1 , 0 , 1 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 , 1 , 0 , 0 , 0 , 1 , 1 , 1 , 0 , 1 , 0 , 1 , 1 , 1 , 1 0,1,1,0,1,0,0,1,0,0,0,0,1,0,1,0,1,0,0,0,1,1,1,0,1,0,1,1,1,1

where the 1st partition has 4 4 forks, the 2nd has 3 3 forks, and the 3rd has 8 8 forks. A good scoop would be 0 , 1 , 0 , 1 , 0 , 0 , 0 , 1 , 1 , 1 0,1,0,1,0,0,0,1,1,1

I didn't get a least of it; first of all, she needs 5 forks and 5 spoons and even after that what about the sequence 1,1,1,1,1,1,.....15 times followed by 0,0,0,0,0,0,.....15 times If you take a scoop of ten items only once from the beginning you always end up with items of only one kind

Ariijit Dey - 3 years ago

Log in to reply

The chef chooses where she'll start the scoop.

Log in to reply

I also didn't quite get it. Where in the problem did it state that the chef chooses where to start?

Anna Veronica Cortes - 3 years ago

Log in to reply

@Anna Veronica Cortes It's implied by the statement "Can she pick up exactly what she needs by selecting 10 consecutive utensils?" The chef is selecting which 10 consecutive utensils to pick up.

then the chef would pick from the last 5 ones to the first 5 zeros. I was also confused by the question because I didn't realize the chef could see the actual arrangement before choosing.

Roger AB - 3 years ago

Log in to reply

this explains my confusion with the problem! so the chef gets 30 random utensils and choose 10 consecutive line of the needed parts. Not 10 random utensils from 30 lines of equal parts.

bayu wahyuadi - 3 years ago

I tried to calculate the probability of having 5spoons and 5forks it was 1001/3335 different from 1/3. But we have 3*10 items so the probability must be 1/3. Can you please solve this problem with probability :)

Hani Haddad - 3 years ago

great reasoning!

Larry Gu - 3 years ago

What if the first 15 utensils happens to be all forks?

Brian Wolfe - 3 years ago

Log in to reply

Then grab 10 utensils right in the middle, with 5 forks on the left, 5 spoons on the right.

Michael Mendrin - 3 years ago

This does not make any sense. Suppose the random sort yields 1S15F14S. She selects the first 10 objects. It yields one spoon and 9 forks!!!!

p a - 3 years ago

Log in to reply

Chef Nidhi is not picking up 10 utensils at random. The problem asks if it's possible if the chef could pick up 10 utensils in a row anywhere that will have exactly 5 forks 5 spoons.

Michael Mendrin - 3 years ago

Then she can pick up the 11th fork and get FFFFFSSSSS, yielding 5 forks and 5 spoons.

Matthew Sun - 3 years ago

The text needs to be redefined!!!!!!!!! You must state that the chef can see the configuration after random sort and select the 10 consecutives from anywhere!!!!

p a - 3 years ago

Log in to reply

I misunderstood the question as well.

Brandon Harrell - 3 years ago

Upvote for text redefinition! It’s misleading!

Piotr Zientara - 3 years ago

Log in to reply

You have my vote!

Elazar Newman - 3 years ago

Since the most difficult arrangement is possible, random arrangement is irrelevant. Probability is irrelevant.

The effective problem is, "Is it possible to arrange the 15 forks & 15 spoons so that no adjacent 10 utensils contains 5 of each=either=both?" (Does my rewording clarify the problem?)

Attempting to thwart the chef, we can start with 4s,6f,4s,6f,4s,3f,3s. The 2nd group of spoons must also be less than 5. Starting with the first utensil, the selected 10, shifted along, cannot balance the selection for at least the first 10 shifts which will always be f dominant. So we must always avoid 5 of either in any 10 span, <5 of one and >5 of the other in every run of 10. By the 3rd run of remaining 3 forks, the preventive arrangement fails, forcing the 19th 10 span to include 5s.

Adjusting the spoons around does not prevent running out of forks required to continue a preventive arrangement.

Oddly, if we had an infinite number of utensils, we could prevent an even selection!

J B - 3 years ago

Log in to reply

No, it isn't possible. First, let's say we have 3 unknowns that add up to 15, or a+b+c=15. Is it possible that there is no adjacent pair a,b or b,c where one is less than 5 and the other greater than 5? Either two of them are greater than 5 and the last less than 5, or two of them are less than 5 and the last greater than 5. So, one that is less than 5 is going to be next to one that greater than 5. Once we've established that, we can use the Intermediate Value Theorem to prove that there has to exist a scoop that has exactly 5 forks and 5 spoons.

Look at Uros Stojkovic's proof of this, done in a different way but with the same idea.

Michael Mendrin - 3 years ago

Log in to reply

I agree. Several ways to skin this cat. Does my re-wording (in quotes) clarify?

J B - 3 years ago

Log in to reply

@J B Your argument seems to echo Louis Ulman's argument. And, yes if we had an infinite number of utensils, lots of interesting things can happen... for example, it might be possible that the ratio between the forks and spoons becomes 1, and yet one may never find a good grab? Let me think about that... how to do that.

Michael Mendrin - 3 years ago

Excellent explanation! I was trying to put myself in my high-school students' shoes in solving this. I did understand the question as stated, but it seemed overwhelming to think of all of the possibilities of arranging the 30 utensils and try to come up with an idea of whether or not NONE of the possible combinations offered a sequence of 5 spoons and 5 forks next to each other. However, when you specifically TRY to "thwart the chef" and begin thinking along that line, it narrows it down quickly. If I start with your 4s,6f,4s,6f,4s,3f,3s, I see that as soon as there are only 3f between spoons, I can grab 10 in that area and get 5f and 5s. Starting with your sequence, I realize that moving any of the forks or spoons to a different place only makes it easier on the chef. The only way to thwart him (in my mind) is to put 3 more forks on the 3f in your sequence... but then we are using 18 forks and we only have 15.

Scott Sterling - 3 years ago

Your rewording does not CLARIFY the problem. Your rewording defines a NEW problem to which the answer "yes always" is correct. As explained in all the later comments, the CORRECT answer to the problem AS IT IS WORDED is "no not always". Those who chose the answer "yes always" , did so because they assumed that the answer cannot be so obvious and there must be some "catch" in the problem otherwise it would not be "interesting". Such reasoning is not mathematical and the author of this problem should admit this and apologize.

Elazar Newman - 3 years ago

I did almost the same thing. This is very similar to intermediate value property for continuous functions. Here we are dealing with sequences.

Srikanth Tupurani - 3 years ago

horribly stated... there are way to many assumptions...

Matthew Radice - 3 years ago

Log in to reply

What sorts of assumptions are you referring to?

Justin Park - 3 years ago

I agree that the question is rather dubious. I do not argue with the fact that it is always possible to pick up 5 forks and 5 spoons, but I challenge the assumption that she will always pick up exactly what she needs. Can she pick up exactly what she needs by selecting 10 consecutive utensils. Yes, but also no. She can pick up the wrong sequence, e.g. because she is distracted or for some other reason (blindfolded, choosing at random,…). For me the answer is clearly “Not necessarily” The question should be reworded: Is there always a sequence of 10 consecutive items that has exactly 5 forks and 5 spoons?

Koen B - 3 years ago

Log in to reply

the utensils are arranged randomly, but she will not pick them up randomly.. she will need to deliberate which 10 consecutive utensils are the right ones.. but the question is whether she CAN.. and so the answer is yes, regardless of the order of the utensils, she can always pick the ones she needs

ric vega - 3 years ago

NO! The answer is NOT Necessarily. The utensils are RANDOMLY placed. If the order happens to be 15 forks then 15 spoons. Choosing 10 consecutive from one end or the other will not result in 5 spoons and 5 forks.

Reginald Carey - 3 years ago

Log in to reply

The problem as stated requires that there be at least ONE configuration that does not result in the desired outcome. The answer is obviously NO. Not Necessarily.

Reginald Carey - 3 years ago

Log in to reply

The 10 utensils do not necessarily have to be chosen from one end or the other; the utensils can be chosen from the middle of the line.

Justin Park - 3 years ago

The problem is actually asking that we show that every combination/sequence has at least ONE sequence of 10 utensils that will allow the chef to pick out 5 forks and 5 spoons, not that every sequence has one that doesn't work; if it were to be that case, there would only be three different layouts that would always work: alternating fives (5 forks, 5 spoons, 5 forks, etc.), alternating ones (spoon, fork, spoon, fork, etc.), and alternating twos (2 forks, 2 spoons, 2 forks, etc.).

Matthew Sun - 3 years ago

Please show one such configuration to prove your point. I find the reasoning perfectly good.

Larry Gu - 3 years ago

The problem didn't say that the consecutive sequence of 10 utensils has to start from one end or the other. If the order is 15 forks and then 15 spoons, you can pick the ten utensils in the middle and get 5 forks and 5 spoons.

Daniel Jackson - 3 years ago

The underlying question is whether or not there exists a configuration of the 30 utensils in which no consecutive group of 10 utensils contains five spoons and five forks. There will always be such a sequence in any random configuration, and so the chef always CAN pick up exactly what she needs by identifying the location of the sequence in the random configuration.

Michael Tobias - 3 years ago

Because of this exact same configuration, I selected no.

Tehillah _ - 3 years ago

Agreed, and there are plenty more configurations in which the answer still will be "no, not necessarily".

Lucas Avellar - 3 years ago

The answer is "Not necessarily" and "yes sometimes if lucky" but certainly not "yes always".

romain prenoud - 3 years ago

Log in to reply

The 10 consecutive utensils aren't chosen from a random point. The solution holds.

Brian Egedy - 3 years ago

I did almost the same thing that is converting objects into numbers

TANMAY GOYAL - 3 years ago

The correct answer is NO, or the English used to present the problem has errors.

Log in to reply

I think we've read it as "from some random point in the lineup" rather than "by choosing a point in the lineup." The English is technically correct.

Brian Egedy - 3 years ago

The answer can be yes or no depending on how you interpreted it. The question needs to be more descriptive.

Jake Statefarm - 3 years ago
Alex Li
May 24, 2018

Suppose a configuration without this pattern was possible. Consider some arbitrary setup of spoons and fork. Now, consider only the first 10 elements, and count the number of spoons, X. It of course can't be 5, so WLOG, let's say X<5. Now, consider the 2nd-11th elements in the setup. So, 1 element is removed, and 1 is added. The new number of spoons must be either X+1, X-1, or X. However, X can't equal 5, and since X<5, X must continue to be less than 5, for every possible sub sequence of spoons and forks.

However, this cannot be possible, as then we would not have seen enough spoons. Throughout our process, we've looked at (25-10+1) = 16 different sequences of 10 elements. At most, we have seen 16*4 = 60 spoons (16 sequences with 4 spoons each). Now, it is not enough to say that, since that is less than half, we have proven it impossible, as the spoons on the end will be counted in the sequences less often than the ones in the middle. To prove this is too low, I must go a bit more in depth. To minimize the number of spoons used, we want to position them in the edges. However, we can only place at most 4 spoons on each edge, because X is always <5. On each edge, in the best case, we count the spoons (1+2+3+4) = 10 times. Then we have 7 spoons that must go in the middle, which we count 10 times each. So in total, we must count at least 90 spoons - but we've said we only count 16! This is a contradiction, so the setup must not exist.

NOTES: 1). It is interesting that 90 is more than half the total spoons that have been counted. If this setup truly existed (it does not need to exist, since I am just setting a lower bound), it would mean there is a setup with only 70 forks counted, making it seem that the 90 was derived from a logical error, since we can get 70. However, since we've assumed X<5, the situation is no longer symmetric, and the logic holds.

2). This type of pattern is not always impossible. Consider 24 utensils (12 each), no 5|5 pattern. SSSSFFFFFFSSSSFFFFFFSSSS

Is this problem based on peigon hole method??

sangwn harsh - 3 years ago

I tried to calculate the probability of having 5spoons and 5forks it was 1001/3335 different from 1/3. But we have 3*10 items so the probability must be 1/3. Can you please solve this problem with probability :)

Hani Haddad - 3 years ago

Log in to reply

This is not a probability problem. It is guaranteed that she can find a sub segment. Perhaps I'm not understanding what you want to say.

Alex Li - 3 years ago

Errrr what about: SSSSFFFFFFSSSSFFFFFFSSSSSSSFFF That’s 15 Ss, 15 Fs and no sequence of 10 has five of each.

Samuel Coldicutt - 3 years ago

Log in to reply

That's not true. Try starting from the middle and going to the right.

Kai Oderso - 3 years ago

spots 16-25, FFFFFSSSSS

Chris Naylor - 3 years ago

what about ssfsssfssssssssfssffffffffffff

Seth Colquhoun - 2 years, 6 months ago

Why can't you use SSSSSSSSSSSSSSSFFFFFFFFFFFFFFF if you pick numbers 1-10?

Log in to reply

The idea of the problem is that, independently of the combination, there will always EXIST a sequence of 10 consecutive utensils that satisfy the constraints. So even though some subsequences don't satisfy, AT LEAST ONE always does.

Alex Li - 3 years ago

you got it in ssssssssss[SSSSSFFFFF]f f f f f f f f f f

chris wild - 2 years, 12 months ago

Log in to reply

The wordings of the problem don't exactly convey that. It's like from wherever she starts she will always get 5 spoons and 5 forks

Mohit Rathi - 2 years, 7 months ago

there is a problem in the wording of the problem. The word always implies that no matter where she starts she would get five and five. There always is a solution but not every starting point gives the solution.

Asher Levitsky - 3 years ago

Log in to reply

Yes - I agree 100% - problem statement should have been clearer.

Ewaryst Polch - 3 years ago

It's more than a wording problem, the question is completely misleading.

Augusto Ribeiro - 2 years, 11 months ago

I can't understand the solution.please help

Yokesh Waran - 2 years, 12 months ago

Log in to reply

I was confused for a while too because I misunderstood what the problem was asking. I better way of stating what the question is asking is to think of the opposite question. Is there a way to arrange 15 forks and 15 spoons so that no sequence of 10 contains 5 spoons and 5 forks. The answer is no, there is always 1 sequence that will contain 5 spoons and 5 forks. The questions is not asking if she can start anywhere and get 5 of each, but whether there is at least one spot she can start and get 5 of each.

Jenny Crim - 2 years, 12 months ago

what happens if there is 15 forks in a row and she pick it at the start?

Seth Colquhoun - 2 years, 10 months ago
Kirill Butin
Jun 5, 2018

If the answer is "No", that would require a setup where every possible set of 10 utensils contains more of "one" then the "other"

If you started on the left with N s p o o n s > N f o r k s N_{spoons} > N_{forks} and you move by one position to the right, you cannot transition to the situation where N s p o o n s < N f o r k s N_{spoons} < N_{forks} without hitting the intermediate state of N s p o o n s = = N f o r k s N_{spoons} == N_{forks}

==========

Lemma1 (Inspired by comment from Tom Verhoeff ) : It is impossible to have a setup of M utensils that contains equal amounts of spoons and forks and where M mod 10 == 0, so that every possible subset of 10 utensils contains more spoons then forks.

Proof: Let's split a setup on a consequent subsets of non intersected tens (1 to 10, 11 to 20, ... ). Since M mod 10 == 0, there is no utensils left after the split. Let's assume that it is possible to forge a setup where every subset contain N s p o o n s > N f o r k s N_{spoons} > N_{forks} . In such case after summing them together we will have to conclude that 1 M m o d 10 N s p o o n s > 1 M m o d 10 N f o r k s \sum_{1}^{M mod 10} N_{spoons} > \sum_{1}^{M mod 10} N_{forks} which is a contradiction.

Elegant solution!

Peter Lawrence - 3 years ago

Agreed very elegant

Ben Mills - 3 years ago

That is not correct! If there were only 12 spoons and 12 forks, then the sequence ssssffffffssssffffffssss has no consecutive 10 utensils with 5 of each type. So, the number 30 must play a role. In fact, 30 = 3x10. Thus, if all subsequences have a surplus of one type over the other, then in particular the first, second and third disjoint (!) subsequences of length 10 have that surplus. Consequently, their totals are not equal, contradicting the given.

Tom Verhoeff - 3 years ago

Log in to reply

Excellent comment

Nathan Sproul - 3 years ago

Nice catch! Actually there is nothing "incorrect" in the original post. You perfect example is totally fit to the first part (every possible set of 10 utensils contains more of "one" then the "other")

The beauty of your example is that it is absolutely cont intuitive that such setup exists. And it exists because we have a chain, not a cycle and utensils on the side participate in smaller amount of sets making distribution not uniform.

To make the original post a proper proof by contradiction of the task we also need to proof that such setup is impossible for the case of 30 utensils ( or any number that have 10 as divisor, such as 20, 30, 40, etc... ). Which is actually easy to proof, but it will destroy the elegancy of the original post. Since non elegant but correct proof is still better then elegant, but misleading, I will update the original post with the proof of intermediate lemma with the reference of your brilliant example.

Kirill Butin - 3 years ago
Louis Ullman
May 24, 2018

Let's try to find a solution where Nidhi won't be able to find 10 consecutive items with 5 of them being forks and the other 5 being spoons.

We'll want to get as close as possible to 50% of the items being forks and the other 50% being spoons as possible, as we only gave 15 of each.

Let's start with a fork (K) and a spoon (S). If we repeat the pattern as long as possible, we end up with KSKSKSKSK. Adding another spoon would result in 5 being forks and the other 5 being spoons. Thus, we should add another fork to get KSKSKSKSKK. Making sure there aren't 5 forks/spoons in a row, we can continue the pattern like this: KSKSKSKSKKKSKS... having a group of 3 forks every now and then. However, if we try to continue this pattern, we end up running out of forks before we run out of spoons!

If we try other patterns (e.g. KKKKSSSSSS), we'll still end up with the same result - we run out of one utensil far before we run out of the other. Therefore, it's logical to conclude that there will always be 10 consecutive items, in which 5 are forks and the other 5 are spoons.

I tried to calculate the probability of having 5spoons and 5forks it was 1001/3335 different from 1/3. But we have 3*10 items so the probability must be 1/3. Can you please correct me :)

Hani Haddad - 3 years ago

Am I missing something? If they are in random order, it is possible that 10 forks are in order. I am assuming that the person selecting cannot see the order, and the question does not say that is not so.

tony burton - 3 years ago

Log in to reply

This was my thinking too. If there are 15 of each, and they are randomly ordered, they could be FFFFFFFFFFFFFFFSSSSSSSSSSSSSSSS in which pattern only the very middle renders the required amounts.

I'm missing something, but I don't know what

Owen Jones - 3 years ago

Log in to reply

The person can see the order. So in that case they’d take the middle ten.

Ben Mills - 3 years ago

Agreed. The way the question is worded, I assumed random order, random starting point. Given the answer it seems to be “given a random order is there any way that no starting point can contain 10 consecutive items”, which is completely different

Elias Pouloyiannis - 3 years ago

The quesrion lacks specification, as it is put the answer is No

Ian Thomson - 3 years ago

It says nothing about a pattern!

Kevin Galotti - 3 years ago
Tom Meyuhas
Jun 4, 2018

mb it's not the right answer, but i said yes, because u didn't state she can't just choose whatever she wants, and she probably wants what she needs.

Consecutive

Lance Kuanwu - 3 years ago

Log in to reply

there's no reason for her to do otherwise

tom meyuhas - 3 years ago

The problem is not stated unequivocally. Of course if she can choose where to start she can always find somewhere where the combination is right - but that is such a trivial solution as to be pointless. In reality, a chef just wants to grab the first 10 starting from wherever. To this question, the answer is clearly no.

Steve Gagen - 2 years, 12 months ago
Ariijit Dey
Jun 7, 2018

Let's clear the confusion since I too had faced the same mistake, I can feel the annoyance related to the question.

In such Questions where a possibility is concerned, it is customary to assume the possibility of the existence of a path to the solution rather than the solution itself. This adheres to the uniqueness of the Problem.

Andrew Gidney
Jun 10, 2018

You could simplify the problem by dividing each number in the problem by 5. The question would then read:

There's a randomly ordered line of 3 forks and 3 spoons on the counter. Chef Nidhi only needs 1 fork and 1 spoon.

Can she always pick up exactly what she needs by selecting 2 consecutive utensils starting from somewhere in the line-up?

This makes the problem easier to visualise, and you can easily determine the answer is yes , because at least one fork and spoon must sit next to each other in the lineup. The answer will still be yes if we scale the problem up.

Please correct me if my logic is not sound

WOW. The division part makes sense cause the question is based on optimisation.So logic looks pretty good and this is the simplest answer here so GJ

ju lu - 3 years ago
Alex Z
Jun 9, 2018

Suppose there exists configuration where it's impossible to choose 10 consecutive utensils with 5 spoons and 5 forks. Then each 10 consecutive utensils must include 0-4 or 6-10 spoons. And when we move from 10 consecutive utensils 1 step left or right, the number of spoons can only increase/decrease by one or remain the same. If then the first 10 utensils have number of spoons in range 0-4, then all other 10 consecutive utensils have number of spoons also in that range, because otherwise to get to 6 spoons we would have to get there from a row 5 spoons in a row of 10 utensils. Let's then consider 1-10, 11-20, 21-30 - three groups of consecutive utensils. Note, that those 3 groups are mutually exclusive. And each of them have at most 4 spoons, that means that we have in total at most 12 spoons, which is less than 15. Then our assumption about impossibility must have been not true. If first 10 utensils have 6-10 spoons, then there are 4-10 forks and the argument goes the same.

Lumino Wei
Jun 7, 2018

3B1B has a wonderful video about this: https://youtu.be/FhSFkLhDANA

Mike Perry
Jun 6, 2018

We start by selecting the first 10 utensils. The difference between forks and spoons will be an even number, or zero. If we slide our frame to the right one utensil, the difference will change by either zero or two. Since at some point during the process of moving across the entire group of utensils, we either have zero every time, or we go from above zero to below zero, always moving by even numbers through the even numbers, at some point it is clear that the difference has to be zero.

That argument is incomplete. It does not use the fact that there are 30 utensils. In case of only 12 of each, the answer is no: ssssffffffssssffffffssss.

Tom Verhoeff - 3 years ago
Andy Banks
Jun 6, 2018

She can always look at what she's picking up. It's not in the dark and she isn't blindfolded.

János Rátkai
Jun 5, 2018

I would like to draw your attention to the view that this exercise is analogous to a theorem that states that if a function is continuous in an interval/convex area then the function takes every value between the function's values at any two points of this interval/area. Therefore if at one point the function value is positive and at another point it is negative, then somewhere it is 0, i.e. there is a zero-point. Although here the domain of the function is a finite set (the first of the 10 consecutive utensils can be 1..21), in a wider sense it is analogous. It cannot be that all 21 groups contain more than 5 spoons, because then the 1-10, 11-20, 21-30 groups would all contain more, so their sum, which covers the whole 30, would contain more than 15. As two adjacent groups have 9 overlapping (i.e. same) elements and only differ in their left/right 1 element, that 1 element can only make a 0 or 1 difference in the value of the function (the number of spoons out of the 10 consecutive utensils starting from the xth utensil). If we do not start from 5 spoons in the first or last group, but from more than 5, and some group's spoon number must be less than 5, and can only change by +-1 or 0 at a step, then somewhere it must be 5, just like when a continuous function must go through 0 somewhere if it must go positive from negative (or vice versa). The generalised theorem would be that if the difference between the function values of any two adjacent points is a constant or zero, then every integer number of steps=differences will be taken between any two function values. E.g. if somewhere the number of spoons is 10 out of 10 consecutive utensils, then somewhere it must be 9, somewhere it must be 8, 7, 6, 5, 4: every step must be taken till the other side of the average 5.

Yes, thank you for pointing this out. I like to call this the "Discrete Intermediate Value Theorem"

Peter Macgregor
Jun 4, 2018

We will assume that there are no successful scoops and derive a proof by contradiction.

Label the utensils consecutively, left to right, with the integers 1 to 30. The first 21 of these labels let us refer to the different scoops which we can make. Scoop number one takes utensils 1 to 10, scoop number four takes utensils 4 to 13 and so on. We want to show that there is (at least!) one scoop with an equal number of forks and spoons.

By our assumption scoop 1 fails.

So suppose however that scoop one has more forks (it might have more spoons, then just swap 'spoons' and 'forks' in the argument that follows) and move on to consider scoop number two. Now scoop number two might still have more forks, so we might fail again. But could it fail by having more spoons? No, because scoop number one must have at least two more forks than spoons (6 forks and 4 spoons or an even worse imbalance). In moving from scoop one to scoop two we could loose a fork from the left hand end, and gain a spoon at the right hand end. This might not lead to success, but it certainly can't lead to scoop two failing by having too many spoons.

So if we assume that there is no successful scoop we can repeat this argument and move through the scoops asserting that each one fails by having too many forks.

But this leads to an easy contradiction! If all the scoops have more forks than spoons then in particular scoops 1,11 and 21 have more forks than spoons. But these three scoops contain between them all 30 utensils, implying there are more forks than spoons, contrary to the conditions of the problem.

So, invoking the principle of proof by contradiction, there must be at least one successful scoop.

EXTENSION

With very slight modifications my proof actually solves two harder problems -

With only 10+10=20 utensils it is still true that with one scoop of ten you can get five of each type!

Also with an imbalance of 17 to 13 utensils it is still possible to get five of each in a single scoop. Because if not you can get six more forks (or spoons) in the three disjoint scoops which is impossible.

David Fairer
Jun 10, 2018

I think that this should be a 'comment' on its own rather than merely a reply to another comment. The comment that I replied to used the fact that 10 is divisible to 30. And so the 'first 10' plus the 'second lot of 10' plus the '3rd lot of 10' had to be the whole lot of 15 forks and 15 spoons. But what if the question had been such that the total number of forks and spoons were not exactly divisible to the number of forks and spoons chosen? Regards, David Ps I was supposing that the answer would have still been 'yes it is possible to find a place to start where the number of forks equals the number of spoons. But I would like to know how to show this?

Fabricio Kolberg
Jun 9, 2018

Consider the number of forks among the first ten consecutive items. If that number is five, we can stop. Let F ( j ) F(j) represent the number of forks in the sequence that goes from j ( 1 j 21 ) (1 \le j \le 21) to j + 9 j+9 .

Suppose, without loss of generality, that F ( 1 ) > 5 F(1)>5 (that is, there are more forks than spoons). That implies there are at least eleven spoons among the last twenty items. Note that either F ( 11 ) < 5 F(11)<5 or F ( 21 ) < 5 F(21)<5 (if F ( 11 ) 5 F(11)\ge 5 , that implies there are at least six spoons in the sequence from the 21st to the 30th item, meaning F ( 21 ) < 5 F(21)<5 ).

Furthermore, note that, for every 1 j 20 1 \le j \le 20 , F ( j ) 1 F ( j + 1 ) F ( j ) + 1 F(j)-1 \le F(j+1) \le F(j)+1 , that is, upon shifting the beginning of the sequence one spot foward, the number of forks does one of three things:

  • Increases by 1 (if the j j 'th item is a spoon and the ( j + 10 ) (j+10) 'th item is a fork),
  • remains constant (if the j j 'th and the ( j + 10 ) (j+10) 'th item are the same),
  • or diminishes by 1 (if the j j 'th item is a fork and the ( j + 10 ) (j+10) 'th item is a spoon).

Therefore, if k > j k>j , F ( j ) > 5 F(j)>5 and F ( k ) < 5 F(k)<5 , there exists a value j < l < k j<l<k such that F ( l ) = 5 F(l)=5 .

Therefore, if F ( 21 ) < 5 F(21)<5 or F ( 11 ) < 5 F(11)<5 , then there exists a value of 1 < j < 21 1<j<21 such that F ( j ) = 5 F(j)=5 .

Mustafa Alelg
Jun 8, 2018

Relevant wiki: Parity of Integers

Assume that there exist such a figure where we can't find 5 spoons in one scoop of 10 consecutive utensils. Number the places of the utensils by 1 , 2 , 3 , . . . , 30 {1, 2, 3, ..., 30} . Let's define f ( x ) f(x) as #spoons - #forks in the places x , x + 1 , x + 2 , . . . , x + 9 {x, x+1, x+2, ..., x+9} . Initially, since #forks \ne #spoons let's assume W.L.O.G that #forks > #spoons in the first scoop. f ( 1 ) = k < 0 \Rightarrow f(1) = k < 0 Note that k k must be even because f + s = 10 f+s = 10 and f s , f + s f-s, f+s have the same parity (f = #forks, s = #spoons). Now f ( x + 1 ) f(x+1) changes from f ( x ) f(x) by 2 , 0 , 2 {-2, 0, 2} this is simply from taking cases of the change when shifting the scoop by one utensil.

Starting with f ( 1 ) f(1) negative even number then f ( x ) f(x) is even x = 1 , 2 , . . . , 20 \forall x = {1, 2, ..., 20} . If f ( x ) < 0 f(x) < 0 for all values of x x we get a contradiction by noting that the total number of spoons would be smaller than the total number of forks. Which means that at some point we must reach f ( y ) > 0 f(y) > 0 but the change is even each time, and we started with an even number so there must be point which f ( x ) = 0 f(x) = 0 which gives us the answer.

This argument is incomplete! In case of only 12 spoons and 12 forks there is a counterexample: ssssffffffssssffffffssss. You need to use a property if 30.

Tom Verhoeff - 3 years ago
John Dixon
Jun 7, 2018

Intermediate Value Theoren

forks must be < 5 at one point and > 5 at another, so it must cross 5 at some point since it can only change by 0 or 1 each time

Not true, as evidenced by ssssffffffssssffffffssss. You also need to exploit the fact that there 30 in total!

Tom Verhoeff - 3 years ago
Binky Mh
Jun 6, 2018

Look at the leftmost 10 utensils: Either they're 5:5, or there are more of one than the other. The difference between the two numbers must be even, as you can't make 10 by adding an odd and an even number.

Now remove the far left utensil, and add in the next one along. The difference either stays the same, increases by 2, or decreases by 2. Continue this pattern until you find a 5:5 set.

If there are more of the same type in every set of 10 utensils (the only way you could avoid encountering a 5:5 - you can't go directly from a 4:6 ratio to a 6:4 ratio by removing and adding a single utensil), there must be more of that utensil than the other in the full set. As it is established that there are 15 of each, that means at some point, there will be more of the other utensil in the set of 10, and so you will pass over a set of 10 with a 5:5 ratio.

there's an excellent solution and an expantion to this problem in the link here [https://www.youtube.com/watch?v=FhSFkLhDANA)

Einsteiner Lee
Jun 6, 2018

random e.g: 0101110110 0111001101 1001010000 (divide by order)

count 1: 6,6,3 count 0:4,4,7

Let's put the series end by end. We can always move split line deducting 1 and let count -1.

When split line moves to right by one number

count 1:6+0,6+1,6-1 count 0:4+0,4-1,7+1

again moves by one number, we notice that when count 1 doing +1,count 0 doing -1.

count 1:6+0,7-1,5+1 count 0:4+0,3+1,8-1

again

count 1:6+1,6-1,5+0 count 0:4-1,4+1,7+0

and now for middle series we have 5 1s and 5 0s -- 1001101100

No matter what series we have we can always using +1,0,-1 to get the middle one 5 1s and 5 0s.

Mark Elishaev
Jun 5, 2018

I used an intuition to reduce the problem to smaller one, don't know if it's correct. Instead of 10 consecutive from a set of 15 forks and 15 spoons I'll take 2 consecutive from a 3 forks 3 spoons set. In the smaller scaled case you can see that you will always have a transition from fork to spoon where you can pick there your consecutive utensils.

Stephan Hensel
Jun 5, 2018

We have 30 objects. If we count +1 for each spork and -1 for each spoon, the sum of all packs of 10 objects (1-10, 11-20, 21-30) will be 0. Furthermore one pack will have an even value. If all of these packs have a value unlike zero, then there will be a pack with a negative value and a pack with a positive value. Let us assume, the pack with the negative value is left and the pack with the positive value is right. Let us move the pack one object to the right. The value of the pack will not change if there will be exchanged the same objects or the value will be changed by 2 if the exchanged objects differ. But we know, that we will reach a positive value if reach our pack from our assumption. So the value changed from negative to positive only changing by 2 and only using even value. This is only possible, if we have a pack with value 0. So there must be a pack with value 0.

Michael Genius
Jun 4, 2018

Let f n f_n and s n s_n be the amount of forks and spoons amongst the utensils from position n n to ( n + 9 ) (n+9) , where 1 n 21 1\leq n\leq 21 .

Let d n = f n s n d_n=f_n-s_n . Consider d 1 d_1 , d 11 d_{11} and d 21 d_{21} . If one of these three values is equal to 0, we’re already done.

Suppose now that none of these 3 values is equal to 0. Notice it is impossible that all 3 values are positive or negative, since this would imply that there are more forks than spoons or the other way round. Contradiction!

Thus, without loss of generality, we may assume that d 1 < 0 < d 11 d_1<0<d_{11} . (Analogue argumentation is applicable to the other cases.)

Since d n = f n s n = f n 10 + f n = 2 f n 10 d_n=f_n-s_n=f_n-10+f_n=2f_n-10 is an even number and d n d_n and d n + 1 d_{n+1} differ by either -2 or 0 or 2, the sequence d k d_k where k = 2 , 3 , . . . , 10 k={2,3,...,10} must take on any even integral value between d 1 d_1 and d 11 d_{11} , in particular the value 0.

Take these 10 consecutive utensils and we are done.

The most extreme case of contiguous random ordering limiting the selection options would be the first 15 pieces are spoons or forks and pieces 16-30 are the other opposite piece. Even with that extreme case there is the single solution of selecting pieces 11 through 20 for the 5 forks and 5 spoons.

All other random distributions would then provide 1 or more selection solutions.

Radical Pragmatist - 3 years ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...