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?
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.
excellent method ; this is exactly the solution i was waiting for
The number of ways of choosing 2 distinct integers from 1 to 1 0 0 inclusive such that their difference is exactly 1 0 :
( 1 , 1 1 ) ; ( 2 , 1 2 ) ; ( 3 , 1 3 ) ; ( 4 , 1 4 ) . . . . . . . ( 9 0 , 1 0 0 ) = 9 0 ways
The number of ways of choosing 2 distinct integers from 1 to 1 0 0 inclusive such that their difference is exactly 9 :
( 1 , 1 0 ) ; ( 2 , 1 1 ) ; ( 3 , 1 2 ) ; ( 4 , 1 3 ) . . . . . . . ( 9 1 , 1 0 0 ) = 9 1 ways
The number of ways of choosing 2 distinct integers from 1 to 1 0 0 inclusive such that their difference is exactly 8 :
( 1 , 9 ) ; ( 2 , 1 0 ) ; ( 3 , 1 1 ) ; ( 4 , 1 2 ) . . . . . . . ( 9 2 , 1 0 0 ) = 9 2 ways
The number of ways of choosing 2 distinct integers from 1 to 1 0 0 inclusive such that their difference is exactly 7 :
( 1 , 8 ) ; ( 2 , 9 ) ; ( 3 , 1 0 ) ; ( 4 , 1 1 ) . . . . . . . ( 9 3 , 1 0 0 ) = 9 3 ways
The number of ways of choosing 2 distinct integers from 1 to 1 0 0 inclusive such that their difference is exactly 6 :
( 1 , 7 ) ; ( 2 , 8 ) ; ( 3 , 9 ) ; ( 4 , 1 0 ) . . . . . . . ( 9 4 , 1 0 0 ) = 9 4 ways
The number of ways of choosing 2 distinct integers from 1 to 1 0 0 inclusive such that their difference is exactly 5 :
( 1 , 6 ) ; ( 2 , 7 ) ; ( 3 , 8 ) ; ( 4 , 9 ) . . . . . . . ( 9 5 , 1 0 0 ) = 9 5 ways
The number of ways of choosing 2 distinct integers from 1 to 1 0 0 inclusive such that their difference is exactly 4 :
( 1 , 5 ) ; ( 2 , 6 ) ; ( 3 , 7 ) ; ( 4 , 8 ) . . . . . . . ( 9 6 , 1 0 0 ) = 9 6 ways
The number of ways of choosing 2 distinct integers from 1 to 1 0 0 inclusive such that their difference is exactly 3 :
( 1 , 4 ) ; ( 2 , 5 ) ; ( 3 , 6 ) ; ( 4 , 7 ) . . . . . . . ( 9 7 , 1 0 0 ) = 9 7 ways
The number of ways of choosing 2 distinct integers from 1 to 1 0 0 inclusive such that their difference is exactly 2 :
( 1 , 3 ) ; ( 2 , 4 ) ; ( 3 , 5 ) ; ( 4 , 6 ) . . . . . . . ( 9 8 , 1 0 0 ) = 9 8 ways
The number of ways of choosing 2 distinct integers from 1 to 1 0 0 inclusive such that their difference is exactly 1 :
( 1 , 2 ) ; ( 2 , 3 ) ; ( 3 , 4 ) ; ( 4 , 5 ) . . . . . . . ( 9 9 , 1 0 0 ) = 9 9 ways
total number of ways = 9 0 + 9 1 + 9 2 + 9 3 + 9 4 + 9 5 + 9 6 + 9 7 + 9 8 + 9 9 = 9 4 5
This is Starman walking (" waiting "?) on the sky...
Between 1 and 100 (inclusive), let's start with 1, then there are 1 0 subsets with 2 elements, whose difference is at most 10 with respect to 1( from 1 to 11), ( { 1 , 2 } , . . . . , { 1 , 1 1 } ).
Without counting the number 1 because we have already counted it,let's start with 2, then there are 1 0 subsets with 2 elements, whose difference is at most 1 0 with respect to 2 (from 2 to 12), ( { 2 , 3 } , . . . . , { 2 , 1 2 } )...
Let's continue this way until the number 9 0 , then there are 1 0 subsets with 2 elements, whose difference is at most 10 (from 90 to 100), ( { 9 0 , 9 1 } , . . . . , { 9 0 , 1 0 0 } ). Now ,we can continue with the number 91, then there are 9 subsets with 2 elements,whose difference is at most 10, ( { 9 1 , 9 2 } , . . . , { 9 1 , 1 0 0 } ).
With the number 92, then there are 8 subsets with 2 elements, whose difference is at most 10 ( { 9 2 , 9 3 } , . . . , { 9 2 , 1 0 0 } )...
With the number 99, then there are 1 subset with 2 elements ( { 9 9 , 1 0 0 } )
Therefore, the final answer is 9 0 ⋅ 1 0 + 9 + 8 + . . . + 1 = 9 0 0 + 4 5 = 9 4 5
Nice choice of song....
I hope this solution also gets featured. :p
How does this answer the question?
Log in to reply
Pi, I have edited my solution, do you have some question? or something for me?
Log in to reply
No, your solution is correct
Problem Loading...
Note Loading...
Set Loading...
Let , two distinct numbers are a , b .
According to the question 1 ≤ ∣ a − b ∣ ≤ 1 0
Let, a − b = k ⟹ a = b + k .Then b will vary from 1 → ( 1 0 0 − k ) .So, total numbers of b is = 1 0 0 − k − 1 + 1 = 1 0 0 − k .This every b will create a pair with a .
So, total number of pairs are ∑ k = 1 1 0 ( 1 0 0 − k ) = 1 0 0 × 1 0 − ( 1 + 2 + 3 + . . . . + 1 0 ) = 1 0 0 0 − 5 5 = 9 4 5 ) which is our required number.