Absolute Value and 1998 integers

Here's Problem 1 from the 1998 USAMO:

Suppose that the set {1, 2, ..., 1998} has been partitioned into disjoint pairs {aj, bj}, j = 1, 2, ..., 999, so that for all j, |aj - bj| is either 1 or 6. Prove that the sum

|a1 - b1| + |a2 - b2| + ... + |a999 - b999|

ends in the digit 9.

Discussion

|Contact| |Front page| |Contents| |Algebra| |Store|

Copyright © 1996-2012 Alexander Bogomolny

Suppose that the set {1, 2, ..., 1998} has been partitioned into disjoint pairs {aj, bj}, j = 1, 2, ..., 999, so that for all j, |aj - bj| is either 1 or 6. Prove that the sum

|a1 - b1| + |a2 - b2| + ... + |a999 - b999|

ends in the digit 9.

Solution 1

Let the number of pairs with |aj - bj| = 6 be m. Then the number of pairs with |aj - bj| = 1 is 999 - m. The sum of all the difference is

6m + (999 - m) = 5m + 999.

The statement will follow from the observation that m is necessarily even. This follows from a general property of partitions of the sets that comprise elements of two kinds.

Write the 1998 numbers in two rows with the designated pairs in the same column. Think of odd numbers as blue and of even numbers as red. If two numbers in the same column are of the same color join them by a line of that color. There will be as many blue lines as there are red lines. In other words, there are as many odd/odd pairs as there are even/even pairs.

In order that the difference of two numbers was even (6, in particular), the two numbers must have the same parity. It thus follows that the number of pairs whose difference is 6 is indeed even, and we are done.

One natural generalization of the problem is to prove that if 1998 is replaced with, say, 2L, then the difference

|a1 - b1| + |a2 - b2| + ... + |aL - bL|

ends in the same digit regardless of the partition into the a, b pairs. In fact, it is not at all important that the integer are exactly 1, 2, ..., 2L. Any set of 2L integers will do that admits a partition in which the absolute differences are 1 and 6. In this generality, 1 and 6 are not important in themselves, only the fact that their difference is 5 is. Say, if the absolute differences were 3 and 8 then, letting m to be the number of even differences, we would have

8m + 3(999 - m) = 5m + 2997,

from which the sum in question would be bound to end with the digit 7.

Solution 2

If necessary, by swapping aj and bj, we may assume that aj > bj so that

|aj - bj| = aj - bj.

The sum in question is then A - B, where A = ∑aj and B = ∑bj. Now, A + B = 1998·1999/2 is an odd number. If A - B = X, then X = A + B - 2B, making X also odd. This implies that the number of odd differences, say k, in X is odd and the number of the remaining ones (999 - k) is even. Letting m = 999 - k, we conclude with the same argument as in the previous solution.

References

  1. A Decade of the Berkeley Mathematical Circle, The American Experience, Volume I, Z. Stankova, Tom Rike (eds), AMS/MSRI, 2008, pp. 82-83

Absolute Value

|Contact| |Front page| |Contents| |Algebra| |Store|

Copyright © 1996-2012 Alexander Bogomolny

 41162509

A math books store at a unique math study site. Shopping at the store helps maintain the site. Thank you.
Sites for teachers
Sites for parents
Terms of use
Awards
Interactive Activities

CTK Exchange
CTK Wiki Math
CTK Insights - a blog
Math Help
Games & Puzzles
What Is What
Arithmetic
Algebra
Geometry
Probability
Outline Mathematics
Make an Identity
Book Reviews
Stories for Young
Eye Opener
Analog Gadgets
Inventor's Paradox
Did you know?...
Proofs
Math as Language
Things Impossible
Visual Illusions
My Logo
Math Poll
Cut The Knot!
MSET99 Talk
Old and nice bookstore
Other Math sites
Front Page
Movie shortcuts
Personal info
Privacy Policy

Guest book
News sites

Recommend this site

Sites for parents

Education & Parenting

Search:
Keywords:

Google
Web CTK
Supported by
3wVentures