Except for some special vehicles (like military vehicles), all other vehicles have license plates with four digits (lower digit numbers can be assumed to be four digit numbers with preceding zeros). Assume that these numbers are uniformly distributed among the vehicles of a city and also assume that vehicles with number plate 0000 also exist.
Now for every number plate , we consider the difference and average this answer over a large number of vehicles. What is the integer part of the average that is obtained?
Note: For example, for a number plate , we have ).
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.
This is more of an intuitive approach. Since the numbers represented by a b and c d are uniformly distributed over the range 0 0 to 9 9 this problem is in essence equivalent to that of finding the expected distance between two randomly positioned points on a line segment of a given length L . This is known to be L / 3 , and so the desired solution in this case is 9 9 / 3 = 3 3 .
EDIT: O.k., now for a proper solution.
The sum of absolute differences between any number a b and all the other numbers equals
k = 0 ∑ a b ( k ) + k = 0 ∑ 9 9 − a b ( k ) .
(I included k = 0 so as to cover the case when a b = 0 .) The average absolute difference associated with this number will then be this sum divided by 9 9 . We then need to sum all of these averages over the range for a b and then divide this sum by 1 0 0 , as there are 1 0 0 numbers in this range. Exploiting some inherent symmetries, the sum of average absolute differences can be simplified to
( 1 / 9 9 ) ∗ 2 ∗ n = 0 ∑ 9 9 k = 0 ∑ n ( k ) =
( 2 / 9 9 ) ∗ n = 0 ∑ 9 9 ( n ∗ ( 1 0 0 − n ) ) =
( 2 / 9 9 ) ∗ ( 1 0 0 ∗ n = 0 ∑ 9 9 ( n ) − n = 0 ∑ 9 9 ( n 2 ) ) .
Using the appropriate summation formulae, this comes out to
( 2 / 9 9 ) ∗ ( ( 1 0 0 ∗ 9 9 ∗ 1 0 0 / 2 ) − ( 9 9 ∗ 1 0 0 ∗ 1 9 9 / 6 ) ) = 1 0 0 0 0 − ( 1 9 9 0 0 / 3 ) = 1 0 1 0 0 / 3 .
Finally, we just need to divide this value by 100 to find the overall average and then take the integer part as our solution. Doing this, we obtain the solution ⌊ 1 0 1 / 3 ⌋ = 3 3 .