Daniel's divisible sums

Consider the sets A = { 15 , 22 , 31 , 45 , 56 , 67 , 79 } B = { 2 , 3 , 5 , 6 , 7 , 9 , 12 , 24 } C = { 14 , 21 , 31 , 40 , 53 , 62 , 78 , 81 , 90 } D = { 11 , 12 , 17 , 23 , 54 , 55 , 62 , 98 , 110 , 111 } . \begin{aligned} A &= \{15, 22, 31, 45, 56, 67, 79 \} \\ B &= \{2, 3, 5, 6, 7, 9,12, 24 \} \\ C &= \{14, 21, 31, 40, 53, 62, 78, 81, 90 \} \\ D &= \{11,12, 17,23,54,55,62,98,110,111 \}. \end{aligned}

How many ways are there to choose a number out of each set such that the sum of the four numbers is a multiple of 8 8 ?

This problem is posed by Daniel W .


The answer is 630.

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.

9 solutions

David Altizio
Dec 8, 2013

Note that set B B , when reduced modulo eight, yields every possible residue modulo 8 8 , in the order { 2 , 3 , 5 , 6 , 7 , 1 , 4 , 0 } \{2,3,5,6,7,1,4,0\} . Hence, for every one of the 7 × 9 × 10 = 630 7\times 9\times 10=\boxed{630} ways there are to pick three numbers, one from each of the sets A , C , D A,C,D , there exists exactly one number B B that can be used to fill in the remaining gap such that the sum of the four numbers is divisible by 8 8 .

Jamie Coombes
Dec 8, 2013

A powerful way to solve this is using modulo arithmetic. First step is to rewrite (and sort) the four sets modulo 8.

A = 3 , 2 , 1 , 1 , 1 , 0 , 3 A = {-3,-2,-1,-1,-1,0,3}

B = 3 , 2 , 1 , 0 , 1 , 2 , 3 , 4 B = {-3,-2,-1,0,1,2,3,4}

C = 3 , 3 , 2 , 2 , 2 , 1 , 0 , 1 , 2 C = {-3,-3,-2,-2,-2,-1,0,1,2}

D = 2 , 2 , 2 , 1 , 1 , 1 , 1 , 2 , 3 , 4 D = {-2,-2,-2,-1,-1,-1,1,2,3,4}

Notice that set B contains every possible remainder modulo 8, so the sum of the other three is irrelevant. Multiplying the number of elements in A, C and D gives

A × C × D = 7 × 9 × 10 = 720 |A| \times |C| \times |D| = 7 \times 9 \times 10 = 720

(Note that although we found duplicates when we rewrote the remainder modulo 8, each element is still distinct so we can simply multiply the sizes of each set)

Wonderful, never thought of that. I thought we would have to write cases considering all possible ways in which we could get a sum of 8 from the modulo 8 sets.

Meet Udeshi - 7 years, 6 months ago

Log in to reply

That was my first thought too! Such a cunning trick hidden in plain sight.

Calvin Lin Staff - 7 years, 6 months ago

I reduced all the sets to modulo 8, but just didn't get the observation after that.

Siddharth Kumar - 7 years, 5 months ago

just a small correction 7 * 9 * 10=630

Sambit Padhi - 7 years, 5 months ago
Pranshu Gaba
Dec 11, 2013

This problem can be easily solved using modular arithmetic. Let the required sum be x x .

Then,

x 0 ( mod 8 ) x \equiv 0\ (\textrm{mod}\ 8) , that is, x x leaves a remainder of 0 0 when divided by 8 8 .

The given sets can be rewritten ( mod 8 ) (\textrm{mod}\ 8) as follows:

A = { 7 , 6 , 7 , 5 , 0 , 3 , 7 } A = \{7, 6, 7, 5, 0, 3, 7\}

B = { 2 , 3 , 5 , 6 , 7 , 1 , 4 , 0 } B = \{2, 3, 5, 6, 7, 1, 4, 0\}

C = { 6 , 5 , 7 , 0 , 5 , 6 , 6 , 1 , 2 } C = \{6, 5, 7, 0, 5, 6, 6, 1, 2\}

D = { 3 , 4 , 1 , 7 , 6 , 7 , 6 , 2 , 6 , 7 } D = \{3, 4, 1, 7, 6, 7, 6, 2, 6, 7\}

If you notice, set B B contains numbers which leave all possible remainders when divided by 8 8 . So, an appropriate number from B B can be added to to sum of numbers from A , C A, C and D D to obtain a multiple of 8 8 .

For example, if the numbers chosen from A , C A, C and D D are 15 , 21 15, 21 and 17 17 respectively, then they can be rewritten as 7 , 5 , 7, 5, and 1 1 ( mod 8 ) (\textrm{mod}\ 8) respectively.

Their sum is 53 53 , that is 5 5 ( mod 8 ) \textrm{mod}\ 8) , so 3 3 will be chosen from set B B , which is 3 ( mod 8 ) 3 (\textrm{mod}\ 8) to ensure sum is 0 0 ( mod 8 ) (\textrm{mod}\ 8) .

Note that for every combination of element from sets A , C A, C and D D , there is exactly one element in set B B which satisfies the required condition.

So, to find the total number of ways, we just need to find the number of combinations of elements possible from sets A , C A, C and D D .

Since no term is repeated in any set, the total number of ways to choose the three elements would be:

n ( A ) × n ( C ) × n ( D ) n(A) \times n(C) \times n(D)

= 7 × 9 × 10 = 7 \times 9 \times 10

= 630 = \boxed{630}

Walter Li
Dec 8, 2013

We convert all the numbers to mod 8. Then we see that B contains all the residue classes mod 8. Hence for any 3 numbers we pick from A,C,D, there is a unique B that makes the sum of the four numbers 0 mod 8. Hence there are $|A| * |C| * |D| = 7 9 10 = 630$ ways.

Michael Tang
Jan 1, 2014

Notice that in modulo 8 , 8, set B B contains every residue exactly once. Thus, if we choose any three elements, one from each of A , C , D , A, C, D, there will be exactly one possible element to pick from B . B. There are 7 × 9 × 10 = 630 7 \times 9 \times 10 = 630 ways to pick elements from A , C , A, C, and D , D, so there are 630 \boxed{630} ways total.

Really nice...I completed this by a little tedious calculations

Eddie The Head - 7 years, 4 months ago
Andres Fabrega
Dec 9, 2013

First, analyze each element from every set modulo 8. After this, let´s pay special attention to set B. Rewriting each element modulo 8 yields:

B = { 2 , 3 , 5 , 6 , 7 , 1 , 4 , 0 ). After this, we see that every possible remainder when a number is divided by 8 is in this set.

Now, let´s say the sum after choosing the other three numbers from the other three sets is n. Regradless of the remainder of n when divided by 8, there will always be an element from B that we can choose so that [n + (element from B)] is divisible by 8, since the exact 8 possible congruences modulo 8 are in the set B.

Therefore, we see that the numbers from sets A,C,D can be chosen in any way, but the element from B can only be chosen in 1 way (depending on the remainder when the sum of the other three elements is divided by 8).

Since there are 7 elements in A, 9 in C, and 10 in D, the answer is: 7 * 9 * 10 * 1=630

awesome solution !!

Sukrut Waghmare - 7 years, 6 months ago
Jared Low
Dec 18, 2013

Note that set B B contains all the different residues modulo 8 8

( 9 1 ( m o d 8 ) , 12 4 ( m o d 8 ) , 24 0 ( m o d 8 ) 9 \equiv 1\pmod{8}, 12\equiv 4\pmod{8}, 24 \equiv 0\pmod{8} ). This means that for every triplet of numbers taken from sets A , C , D A,C,D , there will be exactly one number from B B where their sum will be divisible by 8. There are 7 , 9 , 10 7, 9, 10 elements in sets A , C , D A,C,D respectively, giving the number of triplets and consequently the number of ways to choose the numbers to be 7 × 9 × 10 = 630 7 \times 9 \times 10= \fbox{630}

Boaz Guberman
Dec 20, 2013

These sets have a LOT of numbers. This might look a bit frightening at first.. Until you start looking at it more closely.

Let's look at set B. If we find the numbers in that set (mod 8), we get:

B = 2 , 3 , 5 , 6 , 7 , 1 , 4 , 0 B = {2, 3, 5, 6, 7, 1, 4, 0}

If we rearrange the numbers in that set, we get:

B = 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 B = {0, 1, 2, 3, 4, 5, 6, 7}

Hey! That's interesting, isn't it? The set B B has all of the possible remainders when dividing by 8.

This means that no matter what number we choose from sets A, C, and D.... there will always be one (and ONLY one) number from set B such that when you add the numbers together you get a multiple of 8.

So instead of checking all the possibilities that add up to a multiple of 8, we can check the amount of combinations of choosing numbers from sets A, C, and D. This is a lot easier to do!

The amount of combinations for sets A, C, and D, is the product of the amount of numbers in each of the sets.

The amount of numbers in set A is 7 .

The amount of numbers in set C is 9 .

The amount of numbers in set D is 10 .

So, the amount of combinations is:

7 9 10 = 63 10 = 630 7 \cdot 9 \cdot 10 = 63 \cdot 10 = \boxed {630}

Brad Morin
Dec 12, 2013

Set B has 8 elements. Each happens to equal to a unique value mod 8. So no matter what integer you are given, exactly one element of set B can be added to it to create a multiple of 8.

Sets A, C, and D have 7, 9, and 10 elements. So there are 630 ways to choose elements from those sets. Each combination of elements from A, C, and D leaves only one choice from set B to create a sum that is a multiple of 8. Thus, a total of 620 possibilities

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...