3

there are $2^{n+1}$ coins ($n$ is a natural number). Each coin has a non-negative integer value. The coins are not necessarily distinct. Prove that it is possible to bring exactly $2^n$ coins such that the total value of earnings is divisible by $2^n$.

My thoughts: So you can only bring back half of the coins, so I think we need to prove this somehow by induction or pigeonhole principle?

With induction on $n$. Base case: $n=0$, so there are $2$ coins total and can only bring back $1$ coin. Any natural number is divisible by $2^0=1$ so base case holds.

IH: Assume claim holds true for $n=k$.

IStep: Prove claim holds true for $n=k+1$. So there are $2\cdot{2^{k+1}}$ coins. We can split this up using algebra: $2^{k+1}+2^{k+1}$ Consider any of the $2^{k+1}$ coins. By IH, we can bring $2^{k}$ coins back that fits the claim.

  • "Each coin is of value greater than or equal to $0$ that is an integer" - could you explain this part a little more? It seems a little vague to me – WaveX Oct 28 '19 at 15:59
  • @WaveX I edited for clarity. Incidentally, it isn't relevant that the values are non-negative. – Théophile Oct 28 '19 at 16:10
  • Induction is a good instinct on powers of two. What happens when you try it? – Théophile Oct 28 '19 at 16:13
  • @Théophile I edited my post above to show my work, but I do not know how to proceed. – Harold Smith Oct 28 '19 at 17:20
  • Is it correct that the coins can have a value of zero? I mean, if $n=1$ then you have 4 coins and you bring back 2, what if those coins have a value of $0$ and, let's say, $3$, in that case it doesn't hold. Am I misunderstanding something? – NotAMathematician Oct 28 '19 at 17:27
  • @NotAMathematician bringing back half the coins relies on what all the coins' values are. so say the $4$ coins are $0, 0, 3, 3$, I can bring back $3, 3$ to get a total value of $6$ which is divisible by $2^1$. – Harold Smith Oct 28 '19 at 17:30
  • 1
    In your attempt you found a fourth of the coins whose sum is divisible by a fourth of the number of coins. We were asked to find half of the coins whose sum is divisible by half of the number of coins. You stopped just a bit too soon. Be careful though. $24$ is divisible by $2$ and so is $26$, but $24+26$ is not divisible by $4$. – JMoravitz Oct 28 '19 at 19:21
  • @jack537 In the question I suggest as a duplicate, the answer's comment has a link to the original paper of Erdős, Ginzburg and Ziv. In this paper, the latter part shows how to prove it's true for $uv$ if it's true for $u$ & $v$. In my now deleted answer, I used a variation of this to show when using induction that with $2^{k+2}$ coins, there are at least $3$ groups of $2^{k}$ coins, each with a sum which is a multiple of $2^{k}$. Do you see how to do this, and from this how to finish the induction procedure? – John Omielan Oct 28 '19 at 21:11
  • Although this problem is clearly answered by the proposed duplicate, it seems likely that this special case could be handled by a simpler argument, possibly along the line of induction that the OP considers. – hardmath Oct 28 '19 at 22:00
  • @JohnOmielan aren't there at least 4 groups of $2^k$ coins? – Harold Smith Oct 28 '19 at 23:04
  • 1
    @hardmath I agree with your suggestion that a simpler argument can be used here instead. Thus, I've undeleted my answer (after adding more details based on my comment above), including a link to the other question & the paper. Also, I've retracted my vote to close as a duplicate. – John Omielan Oct 28 '19 at 23:48
  • @jack537 There are of course $4$ groups of $2^{k}$ coins among $2^{k+2}$ coins. However, my answer (which I've now undeleted) shows you can always select $3$ distinct subgroups of $2^{k}$ coins where each one sums to a multiple of $2^{k}$. Note the final $2^{k}$ coins will not, in general, sum to a multiple of $2^{k}$, with its sum not necessarily being even. – John Omielan Oct 28 '19 at 23:51

1 Answers1

1

You have already handled the base case of $n = 0$. Next, assume it's true for $n = k$ for some integer $k \ge 0$, i.e., among any $2^{k+1}$ coins, there are $2^{k}$ coins which sum to a multiple of $2^k$.

With $n = k + 1$, consider the $2^{k+2}$ coins. From the assumption for $n = k$, since $2^{k+2} \gt 2^{k+1}$, there are $2^{k}$ coins which sum to a multiple of $2^{k}$, say $a\left(2^{k}\right)$. Remove those coins, leaving $3\left(2^{k}\right)$. As this is still $\gt 2^{k+1}$, there are another $2^{k}$ coins which sum to a multiple of $2^{k}$, say $b\left(2^{k}\right)$. Once again, remove those coins, leaving $2^{k+1}$ coins remaining. For one more time, there are $2^k$ coins among these which sum to a multiple of $2^k$, say $c\left(2^{k}\right)$. Remove these set of coins again.

There are now $3$ sets of $2^{k}$ coins, with sums of $a\left(2^{k}\right)$, $b\left(2^{k}\right)$ and $c\left(2^{k}\right)$. Now, among $a$, $b$ and $c$, since there are only $2$ parity values (i.e., even or odd) but $3$ values, by the Pigeonhole principle, there are at least $2$ which have the same parity, i.e., they are both even or both odd. WLOG, say these are $a$ and $b$, so $a + b$ is even, meaning $a\left(2^{k}\right) + b\left(2^{k}\right) = (a + b)2^{k}$ has a factor of $2^{k+1}$. As this comes from $2^{k} + 2^{k} = 2^{k+1}$ coins, this means the question is true for $n = k + 1$ as well, finishing the induction procedure.

In summary, this proves that among any $2^{n+1}$ coins, for an integer $n \ge 0$, there are $2^{n}$ which sum to a multiple of $2^{n}$. Note this doesn't use, or need, that the coin values are non-negative, but only that they are integral.

Also, there's a more general question, with an answer, at Show that in any set of $2n$ integers, there is a subset of $n$ integers whose sum is divisible by $n$.. The answer's comment has a link to the original paper of Erdős, Ginzburg and Ziv. In this paper, the latter part shows how to prove the more restrictive requirement of there being among $2n - 1$ integers a subset of $n$ integers with a sum divisible by $n$ is true for $n = u$ and $n = v$, then it's also true for $n = uv$. Note I use a variation of this idea in my proof above.

John Omielan
  • 52,653