SOLUTION: Your suitcase has 4-digit code lock. You forgot the code, but you do remember that the sum of first two digits was equal to the sum of two second digits. How many combinations do

Algebra.Com
Question 1030635: Your suitcase has 4-digit code lock. You forgot the code, but you do
remember that the sum of first two digits was equal to the sum of
two second digits. How many combinations do you need to check in
the worst possible scenario?

Answer by Edwin McCravy(20054)   (Show Source): You can put this solution on YOUR website!
There is 1 way the first two digits can sum to 0.  
{00}
There are 2 ways the first two digits can sum to 1.
{01,10}
There are 3 ways the first two digits can sum to 2.
{02,11,20}
There are 4 ways the first two digits can sum to 3.
{03,12,21,30}
There are 5 ways the first two digits can sum to 4.
{04,13,22,31,40}
There are 6 ways the first two digits can sum to 5.
{05,14,23,32,41,50}
There are 7 ways the first two digits can sum to 6.
{06,15,24,33,42,51,60}
There are 8 ways the first two digits can sum to 7.
{07,16,25,34,43,52,61,70}
There are 9 ways the first two digits can sum to 8.
{08,17,26,35,44,53,62,71,80}
There are 10 ways the first two digits can sum to 9.
{09,18,27,36,45,54,63,72,81,90}
There are 9 ways the first two digits can sum to 10.
{19,28,37,46,55,64,73,82,91}
There are 8 ways the first two digits can sum to 11.
{29,38,47,56,65,74,83,92}
There are 7 ways the first two digits can sum to 12.
{39,48,57,66,75,84,93} 
There are 6 ways the first two digits can sum to 13.
{49,58,67,76,85,94}
There are 5 ways the first two digits can sum to 14.
{59,68,77,86,95}
There are 4 ways the first two digits can sum to 15.
{69,78,87,96}
There are 3 ways the first two digits can sum to 16.
{79,88,97}
There are 2 ways the first two digits can sum to 17.
{89,98}
There is 1 way the first two digits can sum to 18.
{99}

For each of those possible ways for the sum there are that same 
number of ways for the last two digits.  Therefore, the number
of possible trials in the worst possible scenario, is the sum of 
the squares:

1²+2²+3²+4²+5²+6²+7²+8²+9²+10²+9²+8²+7²+6²+5²+4²+3²+2²+1²

The formula for the sum of the first n squares is n(n+1)(2n+1)/6

So the sum of 1²+2²+3²+4²+5²+6²+7²+8²+9² = 

9(9+1)(2*9+1)/6 = 9(10)(19)/6 = 285

And the sum 10²+9²+8²+7²+6²+5²+4²+3²+2²+1² is 10² or 100 more or 385

Total 285+385 = 670

Edwin

RELATED QUESTIONS

Anna forgot the code of a 3-digit lock on her case (all digits ranging from 0 to 9).... (answered by anand429)
A boy forgot his PIN CODE which is composed of 5 digits, but luckily he remembered some... (answered by stanbon)
Jess has a 4-digit code for her lock, but she has forgotten two of the digits. (answered by ankor@dixie-net.com,kelvin nyawali)
. Someone has arrived at a hotel and his suitcase is locked with a three-digit... (answered by ikleyn)
If each of the 10 digits is chosen at random, how many ways can you choose the following (answered by stanbon)
Let the world telecommunication body decides to follow the norm to assign a number. The... (answered by edjones)
A briefcase lock opens with the correct 4-digit code. If the digits can be any number... (answered by Alan3354,ikleyn)
6. A security code consists of a person’s first and last initials followed by four... (answered by Fombitz)
Most ATMs require that you enter a four-digit code, using the digits 0 to 9. How many... (answered by solver91311)