Absolute integer sequences

How many sequences of integers S = ( s 1 , s 2 , , s 8 ) S = (s_1, s_2, \ldots, s_8) are there such that i = 1 8 s i = 0 \sum\limits_{i=1}^{8} s_i = 0 and i = 1 8 s i = 4 ? \sum\limits_{i=1}^{8} \lvert s_i \rvert= 4?


The answer is 812.

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.

10 solutions

Daniel Chiu
Sep 15, 2013

Let the sum of the positive integers in S S be p p , and let the sum of the negative integers be q q . We know that p + q = 0 p+q=0 p q = 4 p-q=4 Therefore, p = 2 , q = 2 p=2, q=-2 . Now, positive integers that add to 2 are either 2 2 or 1 , 1 1,1 , and similarly, negative integers that add to -2 are either 2 -2 or 1 , 1 -1,-1 . This gives us the following four possibilities: ( 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 ) (-1,-1,1,1,0,0,0,0) ( 1 , 1 , 2 , 0 , 0 , 0 , 0 , 0 ) (-1,-1,2,0,0,0,0,0) ( 2 , 1 , 1 , 0 , 0 , 0 , 0 , 0 ) (-2,1,1,0,0,0,0,0) ( 2 , 2 , 0 , 0 , 0 , 0 , 0 , 0 ) (-2,2,0,0,0,0,0,0) Each of these can be permuted, since S S is order-dependent. This gives us the answer 8 ! 2 ! 2 ! 4 ! + 8 ! 2 ! 5 ! + 8 ! 2 ! 5 ! + 8 ! 6 ! = 420 + 168 + 168 + 56 = 812 \dfrac{8!}{2!2!4!}+\dfrac{8!}{2!5!}+\dfrac{8!}{2!5!}+\dfrac{8!}{6!}=420+168+168+56=\boxed{812}

Quotations from Wikipedia:

"In mathematics, informally speaking, a sequence is an ordered list of objects (or events). Like a set, it contains members (also called elements, or terms). The number of ordered elements (possibly infinite) is called the length of the sequence. Unlike a set, order matters ."

and

"A sequence is usually defined as a function whose domain is a countable totally ordered set ".

Then, strictly speaking, this solution - and all solutions given here - are correct if the word "sequences" were replaced by "sets" in the problem wording.

Anyway, best compliments for your elegant formulation.

Luciano Riosa - 7 years, 8 months ago

I think what you meant in the second paragraph was p = 2 , q = 2 p=2,q=-2 . Other than that, well done.

Sotiri Komissopoulos - 7 years, 9 months ago

Log in to reply

Yep, I messed up there. Thanks!

Daniel Chiu - 7 years, 9 months ago

It is Exactly my logic

Rohit Kanrar - 7 years, 8 months ago

did the same way

Mayank Kaushik - 7 years, 8 months ago
Michael Tang
Sep 16, 2013

Take the second condition, that i = 1 8 s i = 4. \displaystyle\sum_{i =1}^8 \left|s_i\right| = 4. Since s i \left|s_i\right| is a nonnegative integer, there are a limited number of possible tuples ( s 1 , s 2 , , s 8 ) . \left( \left|s_1\right|, \left|s_2\right|, \ldots, \left|s_8\right|\right). Taken without regard to order, this tuple must be one of the following:

  • ( 4 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ) (4, 0, 0, 0, 0, 0, 0, 0)

  • ( 3 , 1 , 0 , 0 , 0 , 0 , 0 , 0 ) (3, 1, 0, 0, 0, 0, 0, 0)

  • ( 2 , 2 , 0 , 0 , 0 , 0 , 0 , 0 ) (2, 2, 0, 0, 0, 0, 0, 0)

  • ( 1 , 1 , 2 , 0 , 0 , 0 , 0 , 0 ) (1, 1, 2, 0, 0, 0, 0, 0)

  • ( 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 ) (1, 1, 1, 1, 0, 0, 0, 0)

Now we need to consider the first condition for each tuple: we must see if it is possible to change the signs of some of the numbers in each tuple to produce a sum of 0. 0.

  • It's impossible for ( 4 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ) , (4, 0, 0, 0, 0, 0, 0, 0), because the only possible sums are ± 4. \pm 4.

  • It's impossible for ( 3 , 1 , 0 , 0 , 0 , 0 , 0 , 0 ) , (3, 1, 0, 0, 0, 0, 0, 0), because the only possible sums are ± 4 , \pm 4, ± 2. \pm 2.

  • It is possible for ( 2 , 2 , 0 , 0 , 0 , 0 , 0 , 0 ) , (2, 2, 0, 0, 0, 0, 0, 0), if the sequence is a permutation of ( 2 , 2 , 0 , 0 , 0 , 0 , 0 , 0 ) . (2, -2, 0, 0, 0, 0, 0, 0).

  • It is possible for ( 1 , 1 , 2 , 0 , 0 , 0 , 0 , 0 ) , (1, 1, 2, 0, 0, 0, 0, 0), if the sequence is a permutation of ( 1 , 1 , 2 , 0 , 0 , 0 , 0 , 0 ) . (1, -1, 2, 0, 0, 0, 0, 0).

  • It is possible for ( 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 ) , (1, 1, 1, 1, 0, 0, 0, 0), if the sequence is a permutation of ( 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 ) . (1, 1, -1, -1, 0, 0, 0, 0).

Therefore, the sequence ( s 1 , s 2 , , s 8 ) (s_1, s_2, \ldots, s_8) must be a permutation of one of the following:

( 2 , 2 , 0 , 0 , 0 , 0 , 0 , 0 ) ( 1 , 1 , 2 , 0 , 0 , 0 , 0 , 0 ) ( 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 ) \begin{aligned} &(2, -2, 0, 0, 0, 0, 0, 0) \\ &(1, -1, 2, 0, 0, 0, 0, 0) \\ &(1, 1, -1, -1, 0, 0, 0, 0) \end{aligned}

There are 8 7 = 56 8 \cdot 7 = 56 ways to order the first sequence, 8 7 6 = 336 8 \cdot 7 \cdot 6 = 336 ways to order the second one, and ( 8 2 ) ( 6 2 ) = 420 \binom{8}{2} \binom{6}{2} = 420 ways to order the third one. Therefore, there are 56 + 336 + 420 = 812 56 + 336 + 420 = \boxed{812} such sequences.

Oops! One of the sequences ( 1 , 1 , 2 , 0 , 0 , 0 , 0 , 0 ) . (-1, -1, 2, 0, 0, 0, 0, 0). Can someone please edit it?

Michael Tang - 7 years, 8 months ago

Log in to reply

Also note that ( 1 , 1 , 2 , 0 , 0 , 0 , 0 , 0 ) (1,-1,2,0,0,0,0,0) doesn't work.

The two you want are

( 1 , 1 , 2 , 0 , 0 , 0 , 0 , 0 ) (-1,-1,2,0,0,0,0,0) ( 1 , 1 , 2 , 0 , 0 , 0 , 0 , 0 ) (1,1,-2,0,0,0,0,0)

Daniel Chiu - 7 years, 8 months ago

wow nice

Bob Yang - 7 years, 8 months ago
Ganesh Sundaram
Sep 17, 2013

There are only three types of possibilities in the sense described below in which s i s_i are non-zero.

  1. Four of them non-zero. In this case each non-zero s i = 1 |s_i| = 1 . Then two of the are +1 and the other two are -1. The number of possibilities are ( 8 4 ) × ( 4 2 ) = 420 {8 \choose 4}\times {4 \choose 2} = 420 The first factor is for choosing 4 from 8, the second factor is for choosing two 1's from 4 chosen numbers.

  2. Three of them are non-zero. In this case two of them are such that s i = 1 |s_i| = 1 and the third is s i = 2 |s_i| = 2 . The number of possibilites are ( 8 3 ) × ( 3 2 ) × 2 = 336 {8 \choose 3}\times {3 \choose 2} \times 2 = 336 The first factor is for choosing 3 from 8, the second factor is for choose two 1's or 1 -1 's and the third factor is for sign revesal.

  3. Two of them are non-zero. In this case one of them is 2 and the other is 2 -2 . Given a section of 2 of 8, there are two ways. Thus the number of possibilites are ( 8 2 ) × 2 = 56 {8 \choose 2}\times 2 = 56

Summing them gives the answer.

good job

Bob Yang - 7 years, 8 months ago
Danny He
Sep 16, 2013

i = 1 8 S i = 4 4 n 6 , \sum_{i=1}^{8} |S_i| = 4 \Rightarrow 4 \leq n \leq 6, where n n is the number of 0 s 0's

Case 1: n = 6 , n = 6, so S 1 = S 2 = S 3 = S 4 = S 5 = S 6 = 0 S_1=S_2=S_3=S_4=S_5=S_6= 0

S 7 = S 8 S_7 =-S_8 and S 7 + S 8 = 4 |S_7| + |S_8| = 4 so they are 2 , 2 2,-2

Case 2: n = 5 , n = 5, so S 1 = S 2 = S 3 = S 4 = S 5 = 0 S_1=S_2=S_3=S_4=S_5 = 0

S 6 + S 7 + S 8 = 0 S_6+S_7+S_8 = 0 and S 6 + S 7 + S 8 = 4 |S_6|+|S_7|+|S_8| = 4 so they are 1 , 1 , 2 1,1,-2 or 1 , 1 , 2 -1,-1,2

Case 3: n = 4. n=4. so S 1 = S 2 = S 3 = S 4 = 0 S_1=S_2=S_3=S_4 =0

S 5 + S 6 + S 7 + S 8 = 0 S_5+S_6+S_7+S_8 = 0 and S 5 + S 6 + S 7 + S 8 = 4 |S_5|+|S_6|+|S_7|+|S_8| = 4

So they are 1 , 1 , 1 , 1 1,1,-1,-1 in some order.

Total number of possible sequences = 8 ! 4 ! 2 ! 2 ! + 8 ! 2 5 ! 2 ! + 8 ! 6 ! \frac{8!}{4!*2!*2!} + \frac{8!*2}{5!*2!} + \frac{8!}{6!}

= 420 + 336 + 56 = 812 420 + 336 + 56 = 812

Felipe Hofmann
Sep 16, 2013

To satisfy the second condition, we have:

(1) - Or 4 of the numbers are +/-1, and the other 4 numbers are 0. (2) - Or 2 of the numbers are +/-1 and 1 of them is +/-2, and the other 5 numbers are 0. (3) - Or 1 of them is +/1 and 1 of them is +/-3, and the other 6 numbers are 0. (4) - Or 2 of the numbers are +/- 2, and the other 6 numbers are 0. (5) - Or 1 of the numbers is +/- 4, and the other 7 numbers are 0.

Well, to satisfy the first condition, we can use, of the numbers above:

(1) - If two of the numbers are 1, two are -1 and 4 are 0 (2) - If two of the numbers are 1, one is -2 and 5 are 0 (2") - If two of the numbers are -1, one is 2 and 5 are 0 (4) - If one of the numbers is 2, one is -2 and 6 are 0

Now, we need to calculate the permutations of each of the possibilities. So, (1) - 8 ! / 4 ! . 2 ! . 2 ! 8!/4!.2!.2! = 420 (2) - 8 ! / 5 ! . 2 ! 8!/5!.2! = 118 (2") - 8 ! / 5 ! . 2 ! 8!/5!.2! = 118 (4) - (8!/6!) = 56

Adding them, you find 812, the solution of the problem.

From given, sum of 8 numbers is 0 and sum of their absolute values is 4. => that each integer of S is less than 4. possibilities for a sum of 4 are as follows: 1,1,1,1 -- OK(can be 2 1's and 2 -1's) so possible sequences for this are {8 \choose 4} * {4 \choose 2} 1,1,2 -- OK(can be 2,-1,-1 or -2,1,1) so possible sequences for this are {8 \choose 3} * {3 \choose 1} * 2 2,2 -- OK(can be 2,-2) so possible sequences for this are {8 \choose 2} * {2 \choose 1} 3,1 -- NOT OK

Hence final answer is sum of all the possible number of sequences as mentioned above which is 812

Fengyu Seah
Sep 17, 2013

From the condition of i = 1 8 s i = 4 \sum_{i=1}^8 |s_i| = 4 , we can narrow down the selection to ( 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 ) , (1, 1, -1, -1, 0, 0, 0, 0), ( 1 , 1 , 2 , 0 , 0 , 0 , 0 , 0 ) , (1, 1, -2, 0, 0, 0, 0, 0), ( 1 , 1 , 2 , 0 , 0 , 0 , 0 , 0 ) , (-1, -1, 2, 0, 0, 0, 0, 0), ( 2 , 2 , 0 , 0 , 0 , 0 , 0 , 0 ) (2, -2, 0, 0, 0, 0, 0, 0)

For ( 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 ) , (1, 1, -1, -1, 0, 0, 0, 0), there are 8 ! 4 ! × 2 ! × 2 ! = 420 \frac{8!}{4! \times 2! \times 2!} = 420 permutations. For ( 1 , 1 , 2 , 0 , 0 , 0 , 0 , 0 ) , (1, 1, -2, 0, 0, 0, 0, 0), there are 8 ! 5 ! × 2 ! = 168 \frac{8!}{5! \times 2!} = 168 permutations. For ( 1 , 1 , 2 , 0 , 0 , 0 , 0 , 0 ) , (-1, -1, 2, 0, 0, 0, 0, 0), there are 8 ! 5 ! × 2 ! = 168 \frac{8!}{5! \times 2!} = 168 permutations. For ( 2 , 2 , 0 , 0 , 0 , 0 , 0 , 0 ) , (2, -2, 0, 0, 0, 0, 0, 0), there are 8 ! 6 ! = 56 \frac{8!}{6!} = 56 permutations.

Adding all these up, the total number of sequences is 812 812 .

Gabriela Fs
Sep 21, 2013

Existem 3 possibilidades de algarismo para atender as premissas:

1) Aparecerem 4 zeros, dois "-1" e dois "1"

2) Aparecerem 6 zeros, um -"2" e um "2"

3) Aparecerem 5 zeros, ou (dois "-1" e um "2") ou (dois "1" e um "-2")

Com isso, basta encontrar o número de permutações em cada caso:

1) 8!/(4! 2! 2!) = 420

2) 8!/6! = 56

3) 8!/(5!*2!) x 2 = 336 (Obs.: multipliquei por 2 para contar a troca de sinal entre os "1" com o "2")

Assim: 1 + 2 + 3 = 812

Bill Huang
Sep 21, 2013

We can see that s i 2 |s_i| \le 2 for all i i , since if there is a s i > 2 |s_i| > 2 , then i = 1 8 s i > 4 \sum_{i = 1}^8 s_i > 4 , a contradiction. Now, if there are two nonzero elements s i s_i , the two nonzero elements must be 2 -2 and 2 2 , giving a total of ( 8 2 ) = 28 \binom{8}{2} = 28 sets. If there are three nonzero elements s i s_i , one nonzero element must be ± 2 \pm 2 and the other two 1 \mp 1 , which gives 2 ( 8 1 ) ( 8 2 ) = 336 2\binom{8}{1}\binom{8}{2} = 336 sets. If there are four nonzero elements s i s_i , the four elements must be ± 1 \pm1 , yielding ( 8 2 ) ( 6 2 ) = 420 \binom{8}{2}\binom{6}{2} = 420 sets. There cannot be zero or more than four nonzero elements, or i = 1 8 s i > 4 \sum_{i = 1}^8|s_i| > 4 , a contradiction. The total number of sets is then 28 + 336 + 420 = 812 28 + 336 + 420 = \fbox{812} sets.

Gypsy Singer
Sep 21, 2013

S={ 2,-2,0,0,0,0,0,0 } could be a possible sequence but we can arrange integer of this sequence in 8!/6!=56 way,so we get 56 sequence

similarly,for S={1,1,-1,-1,0,0,0,0} we get 8!/(4! 2! 2!)=420 sequence;
for S={2,-1,-1,0,0,0,0,0} we get 8!/(5! 2!)=168 sequence;
for S={-2,1,1,0,0,0,0,0} we get 8!/(5!
2!)=168 sequence;

any sequence other than above mentioned sequence is not possible.

so,total no of sequence=56+420+168+168=812 (Ans).

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...