One day, Fidel find a large box, with some red balls and black balls in it. He know that the total number of the balls is less than 1000. Fidel wants to take exactly two balls randomly. The probability that he will take exactly two red balls is p and the probability that he will take exactly two black balls is q . Fidel notices that p − q = 3 7 2 3 . Fidel wants to find the largest possible difference between the number of red balls and the number of the black balls. Can you help Fidel by finding it?
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.
Let the number of red balls be r, the number of black balls be b and the total number of balls be n.
Then:
r = n − b
p = n n − b × n − 1 ( n − b ) − 1
q = n b × n − 1 b − 1
p − q = n ( n − 1 ) ( n − b ) ( ( n − b ) − 1 ) − b ( b − 1 ) = n ( n − 1 ) n 2 − 2 b n + b 2 − n + b − b 2 + b =
= n ( n − 1 ) n 2 − n − 2 b n + 2 b = n ( n − 1 ) ( n − 2 b ) ( n − 1 ) = n n − 2 b = 1 − n 2 b
Now:
1 − n 2 b = 3 7 2 3
n b = 3 7 7 ⇒ b = 3 7 7 n ⇒ r = 3 7 3 0 n
D = r − b = 3 7 2 3 n
Since n < 1000 and b and r are integers :
D max = 3 7 2 3 n max = 3 7 2 3 × ⌊ 3 7 1 0 0 0 ⌋ × 3 7 = 3 7 2 3 × 9 9 9 = 6 2 1
We can also find that:
n max = 9 9 9 ⇒ r max = 8 1 0 , b max = 1 8 9
Problem Loading...
Note Loading...
Set Loading...
Let the number of red balls be x and the number of black balls be y p q p − q ⟹ x + y x − y ( x − y ) Since x and y ( x − y ) ⟹ ( x − y ) ⟹ ( x − y ) = ( 2 x + y ) ( 2 x ) = ( 2 x + y ) ( 2 y ) = ( 2 x + y ) ( 2 x ) − ( 2 y ) = ( x + y ) ( x + y − 1 ) x ( x − 1 ) − y ( y − 1 ) = ( x + y ) ( x + y − 1 ) ( x 2 − y 2 ) − ( x − y ) = ( x + y ) ( x + y − 1 ) ( x − y ) ( x + y − 1 ) = x + y x − y x + y = 1 ,As we need at least 2 balls of each color for p and q to be nonzero = 3 7 2 3 p − q = 3 7 2 3 = 3 7 2 3 ⋅ ( x + y ) are positive integers and x + y < 1 0 0 0 we have ≤ 2 3 ⋅ ⌊ 3 7 1 0 0 0 ⌋ ≤ 2 3 × 2 7 ≤ 6 2 1