Count it!

Find the number of ways of choosing 2 distinct integers from 1 to 100 inclusive such that the difference between them is at most 10?


The answer is 945.

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.

3 solutions

Kushal Bose
Jan 10, 2017

Let , two distinct numbers are a , b a,b .

According to the question 1 a b 10 1 \leq |a-b| \leq 10

Let, a b = k a = b + k a-b=k \implies a=b+k .Then b b will vary from 1 ( 100 k ) 1 \to (100-k) .So, total numbers of b b is = 100 k 1 + 1 = 100 k =100-k-1+1=100-k .This every b b will create a pair with a a .

So, total number of pairs are k = 1 10 ( 100 k ) = 100 × 10 ( 1 + 2 + 3 + . . . . + 10 ) = 1000 55 = 945 ) \sum_{k=1}^{10} (100-k)=100 \times 10 -(1+2+3+....+10)=1000-55=945) which is our required number.

excellent method ; this is exactly the solution i was waiting for

Ujjwal Mani Tripathi - 4 years, 5 months ago

The number of ways of choosing 2 distinct integers from 1 1 to 100 100 inclusive such that their difference is exactly 10 10 :

( 1 , 11 ) ; ( 2 , 12 ) ; ( 3 , 13 ) ; ( 4 , 14 ) . . . . . . . ( 90 , 100 ) = 90 (1,11); (2,12); (3,13); (4,14) .......(90,100) = 90 ways

The number of ways of choosing 2 distinct integers from 1 1 to 100 100 inclusive such that their difference is exactly 9 9 :

( 1 , 10 ) ; ( 2 , 11 ) ; ( 3 , 12 ) ; ( 4 , 13 ) . . . . . . . ( 91 , 100 ) = 91 (1,10); (2,11); (3,12); (4,13) .......(91,100) = 91 ways

The number of ways of choosing 2 distinct integers from 1 1 to 100 100 inclusive such that their difference is exactly 8 8 :

( 1 , 9 ) ; ( 2 , 10 ) ; ( 3 , 11 ) ; ( 4 , 12 ) . . . . . . . ( 92 , 100 ) = 92 (1,9); (2,10); (3,11); (4,12) .......(92,100) = 92 ways

The number of ways of choosing 2 distinct integers from 1 1 to 100 100 inclusive such that their difference is exactly 7 7 :

( 1 , 8 ) ; ( 2 , 9 ) ; ( 3 , 10 ) ; ( 4 , 11 ) . . . . . . . ( 93 , 100 ) = 93 (1,8); (2,9); (3,10); (4,11) .......(93,100) = 93 ways

The number of ways of choosing 2 distinct integers from 1 1 to 100 100 inclusive such that their difference is exactly 6 6 :

( 1 , 7 ) ; ( 2 , 8 ) ; ( 3 , 9 ) ; ( 4 , 10 ) . . . . . . . ( 94 , 100 ) = 94 (1,7); (2,8); (3,9); (4,10) .......(94,100) = 94 ways

The number of ways of choosing 2 distinct integers from 1 1 to 100 100 inclusive such that their difference is exactly 5 5 :

( 1 , 6 ) ; ( 2 , 7 ) ; ( 3 , 8 ) ; ( 4 , 9 ) . . . . . . . ( 95 , 100 ) = 95 (1,6); (2,7); (3,8); (4,9) .......(95,100) = 95 ways

The number of ways of choosing 2 distinct integers from 1 1 to 100 100 inclusive such that their difference is exactly 4 4 :

( 1 , 5 ) ; ( 2 , 6 ) ; ( 3 , 7 ) ; ( 4 , 8 ) . . . . . . . ( 96 , 100 ) = 96 (1,5); (2,6); (3,7); (4,8) .......(96,100) = 96 ways

The number of ways of choosing 2 distinct integers from 1 1 to 100 100 inclusive such that their difference is exactly 3 3 :

( 1 , 4 ) ; ( 2 , 5 ) ; ( 3 , 6 ) ; ( 4 , 7 ) . . . . . . . ( 97 , 100 ) = 97 (1,4); (2,5); (3,6); (4,7) .......(97,100) = 97 ways

The number of ways of choosing 2 distinct integers from 1 1 to 100 100 inclusive such that their difference is exactly 2 2 :

( 1 , 3 ) ; ( 2 , 4 ) ; ( 3 , 5 ) ; ( 4 , 6 ) . . . . . . . ( 98 , 100 ) = 98 (1,3); (2,4); (3,5); (4,6) .......(98,100) = 98 ways

The number of ways of choosing 2 distinct integers from 1 1 to 100 100 inclusive such that their difference is exactly 1 1 :

( 1 , 2 ) ; ( 2 , 3 ) ; ( 3 , 4 ) ; ( 4 , 5 ) . . . . . . . ( 99 , 100 ) = 99 (1,2); (2,3); (3,4); (4,5) .......(99,100) = 99 ways

total number of ways = 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 = 945 90 + 91 + 92 +93 +94 + 95 +96 +97 +98 + 99 = 945

This is Starman walking (" waiting "?) on the sky...

Between 1 and 100 (inclusive), let's start with 1, then there are 10 10 subsets with 2 elements, whose difference is at most 10 with respect to 1( from 1 to 11), ( { 1 , 2 } , . . . . , { 1 , 11 } \space \{1,2\},...., \{1,11\} ).

Without counting the number 1 because we have already counted it,let's start with 2, then there are 10 10 subsets with 2 elements, whose difference is at most 10 10 with respect to 2 (from 2 to 12), ( { 2 , 3 } , . . . . , { 2 , 12 } \space \{2,3\},...., \{2,12\} )...

Let's continue this way until the number 90 90 , then there are 10 10 subsets with 2 elements, whose difference is at most 10 (from 90 to 100), ( { 90 , 91 } , . . . . , { 90 , 100 } \space \{90,91\},...., \{90,100\} ). Now ,we can continue with the number 91, then there are 9 9 subsets with 2 elements,whose difference is at most 10, ( { 91 , 92 } , . . . , { 91 , 100 } \space \{91,92\}, ... , \{91,100\} ).

With the number 92, then there are 8 8 subsets with 2 elements, whose difference is at most 10 ( { 92 , 93 } , . . . , { 92 , 100 } \space \{92,93\}, ... , \{92,100\} )...

With the number 99, then there are 1 1 subset with 2 elements ( { 99 , 100 } \{99,100\} )

Therefore, the final answer is 90 10 + 9 + 8 + . . . + 1 = 900 + 45 = 945 90 \cdot 10 + 9 + 8 + ... + 1 = 900 + 45 = 945

Nice choice of song....

Ujjwal Mani Tripathi - 4 years, 5 months ago

I hope this solution also gets featured. :p

Ujjwal Mani Tripathi - 4 years, 5 months ago

How does this answer the question?

Pi Han Goh - 4 years, 5 months ago

Log in to reply

Pi, I have edited my solution, do you have some question? or something for me?

Guillermo Templado - 4 years, 5 months ago

Log in to reply

No, your solution is correct

Pi Han Goh - 4 years, 5 months ago

Log in to reply

@Pi Han Goh thank you very much, Pi

Guillermo Templado - 4 years, 5 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...