Tis the season to be color-coded

How many ordered pairs of positive integers ( r , s ) (r, s) , subject to 1000 r , s 2000 1000 \leq r, s \leq 2000 , are there such that if r r red Christmas balls and s s silver Christmas balls are randomly placed in a row, then the probability that the 2 Christmas balls, which are located at opposing ends of the row (i.e. the first and the last ball), have the same color is exactly 1 2 \frac {1}{2} ?


The answer is 34.

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.

11 solutions

Yang Conan Teh
May 20, 2014

The question is similar with asking that ( r + s 2 ) = 2 ( ( r 2 ) + ( s 2 ) ) \dbinom{r+s}{2}=2(\dbinom{r}{2}+\dbinom{s}{2}) , which is equivalent to ( r s ) 2 = r + s (r-s)^{2}=r+s . W.l.o.g. we let s r s\ge r and write s = r + k , k N 0 s=r+k, k\in\mathbb N_{0} . We have k 2 = 2 r + k r = k ( k 1 ) 2 k^{2}=2r+k\Rightarrow r=\frac{k(k-1)}{2} and s = k ( k + 1 ) 2 s=\frac{k(k+1)}{2} . But for r , s [ 1000 , 2000 ] r, s\in [1000, 2000] and 990 = 44 × 45 2 < 1000 45 × 46 2 = 1035 990=\frac {44 \times 45}{2} <1000 \leq \frac {45 \times 46}{2} =1035 and 1953 = 62 × 63 2 < 2000 < 63 × 64 2 = 2016. 1953 = \frac {62 \times 63}{2} <2000 <\frac {63 \times 64}{2} =2016. So ( r , s ) = ( k ( k 1 ) 2 , k ( k + 1 2 ) (r, s) = (\frac {k(k-1)}{2}, \frac {k(k+1}{2} ) , for k = 46 , 47 , , 62 k=46, 47,\ldots , 62 , which are 17 choices of k k . Up to permutation, we have 17 2 = 34 17\cdot 2=34 choices ordered pair ( r , s ) . (r, s).

All solutions neglected to explain what WLOG means, and explain why we can multiply by 2 at the end. Some go as far to claim that if ( r , s ) (r,s) is a solution, then ( s , r ) (s,r) must be another solution that should be counted, which assumes that they are 2 distinct solutions. We can only do so because k 0 k \neq 0 .

A lot of solutions also failed to explain why the solutions that they calculated were valid / within the bounds, esp when they have to reject other solutions which arose in their calculations.

Calvin Lin Staff - 7 years ago
Ejia Efah
May 20, 2014

The first task is to convert words into algebra.

We get 2[r(r+1)+s(s+1)]=(r+s)(r+s-1).

Simplifying after expanding, we eventually get r^2+s^2-2rs=r+s, or:

(r-s)^2=r+s.

Clearly, we have 1000+1000<=r+s<=2000+2000.

This gives us 45<=|r-s|<=63.

For each possible value of r-s, there exists solutions in the form of:

r=[(r-s)^2+|r-s|]/2, s=[(r-s)^2+|r-s|]/2, as well as that given by swapping r and s.

All these are integers given that (r-s)^2 and |r-s| have the same parity.

It is easy, albeit tedious to verify that for r-s between 46 and 62, all values are in range, made slightly easier by the observation that r and s are increasing functions with respect to |r-s|, and that |r-s| gives values out of range for |r-s|=45 and 63.

This gives us (62-46+1) solutions where r>=s and the same number where r<=s, for a total of 34 solutions, since r=s is in fact a null case. (The ball at the other end is clearly less likely to be of the same colour.)

Ryandk St
May 20, 2014

first , we can count out that there are p a = ( r + s 2 r ) + ( r + s 2 s ) pa={ r+s-2 \choose r}+{ r+s-2 \choose s} ways lead to the same ball in the end of row. There are p b = ( r + s r ) pb={r+s \choose r} ways to place the ball.

And the probability is p a p b = 1 2 \frac{pa}{pb}=\frac{1}{2} .Simplify the equation we can get ( r s ) 2 s r = 0 (r-s)^2-s-r=0 . Assume r = s + t , t 0 r=s+t , t≥0 , so we can get t 2 t 2 s = [ t ( a + 1 ) ] ( t + a ) = 0 t^2-t-2s=[t-(a+1)](t+a)=0 , so s = a ( a + 1 ) 2 , r = s + t = ( a + 1 ) ( a + 2 ) 2 s=\frac{a(a+1)}{2},r=s+t=\frac{(a+1)(a+2)}{2} , notice that 1000 s r 2000 1000≤s≤r≤2000 , solve this inequality we can get 45 a 61 45≤a≤61 .

Finally there are ( 61 45 + 1 ) × 2 (61-45+1) \times 2 ordered pairs of ( r , s ) (r,s) .

Pratyush Kumar
May 20, 2014

for our betterment we will consider, no. of red balls =x no. of silver balls =y

total no of arrangements of the balls = (x+y)!/x!.y!

no. of arrangements such that the 2 Christmas balls, which are located at opposing ends of the row , have the same color =

no. of arrangements such that the 2 red balls are located at opposing ends of the row+no. of arrangements such that the 2 silver balls are located at opposing ends of the row

Let its probability be p(s)

no. of arrangements such that the 2 red balls are located at opposing ends of the row= (x+y-2)!/(x-2)!.y! (we have to fix ttwo red balls at the two opposite ends . so their position is fixed . so no of red balls participating in the arrangements =x-2)

similarly, no. of arrangements such that the 2 silver balls are located at opposing ends of the row = (x+y-2)!/(y-2)!.x!

their sum =[(x+y-2)!/(x-2)!.y! ]+[(x+y-2)!/(y-2)!.x!] =[(x+y-2)!(x^2+y^2-x-y)]/x!y!

so p(s)={[(x+y-2)!(x^2+y^2-x-y)]/x!y!}/{(x+y)!/x!.y!} =1/2 by solving we will get it as , (x^2+y^2-x-y)/(x^2+y^2+2xy-x-y) =1/2 by solving we will get =x^2+y^2-2xy-x-y =0 (where 1000<=x,y <=2000) or (x-y)^2-(x+y)=0 let x-y =a x+y=b so 0<=a<=1000 & 2000<=b<4000

so a^2=b so b is a perfect square so in between 2000 to 4000 there are 19 perfect square starting from 2025 to 3969

so a will start from 45 to 63 but the values of a as 45 and b as 2025 & a as 63 and b as 3969 will not satisfy the condition that(1000≤x,y≤2000) so no of solution is 17 *2=34( because they can be alterchanged)

Noel Lo
May 20, 2014

The given scenario can have two possibilities: either 2 red balls at the ends or 2 silver balls at the ends.

For 1 red ball to be at one end, the chance is r/(r+s) and for another red ball to be at the opposite end, the chance is (r-1)/(r+s-1).

On the other hand, for 1 silver ball to be at one end, the chance is s/(r+s) and for another red ball to be at the opposite end, the chance is (s-1)/(r+s-1).

The total probability can be expressed as r/(r+s) x (r-1)/(r+s-1) + s/(r+s) x (s-1)/(r+s-1) which equals 1/2. We have 2s(s-1) + 2r(r-1) = (r+s)(r+s-1) 2s^2- 2s +2r^2 - 2r = r^2+ 2rs+ s^2 -r-s and then r^2 - 2rs+ s^2 = r+s which gives us a relatively friendly equation: (r-s)^2 = r+s. Now, 2000 <= r+s <= 4000 which means 2000<= (r-s)^2 <= 4000. For the moment, we can at least conclude that 45<= r-s <= 63 (19 possible values).

However, r-s = 45 and r+s = 45^2 = 2025 would yield s= 990. r-s = 63 and r+s = 63^2 = 3969 would yield r= 2016, resulting in us having to reject two values for (r-s), leaving only 17 possible values. Since r and s can exchange values, there are actually 17 x 2= 34 ordered pairs.

Rishav Roy
May 20, 2014

First we consider the number of arrangements in which balls of same colour appear at the ends. Case1: When 2 red balls are at the end. No. of such arrangements,x=(s+r-2)!/(s!(r-2)!). Case 2: When 2 silver balls are at the end/ No. of such arrangements,y=(s+r-2)!/((s-2)!r!) Total no. of arrangements(without any restrictions),z=(s+r)!/(s!r!) So, probability of getting balls of same colour at the end=(x+y)/z=1/2 Simplifying we get (s-r)^2=s+r. Since s and r are natural numbers, we suppose that (s-r)^2=n^2 and s+r=n^2. s=r is not possible. Notice that if (s,r) is a solution then (r,s) will also be a solution. .......(1) Assume that s> r. So, s-r= n and s+r=n^2. Solving we get, s=n(n+1)/2 and r=n(n-1)/2. Using the constraints 1000<=r,s<=2000, we finally get 46<=n<=62 giving us 17 solutions. Using fact (1) we will get 17 other solutions( these actually correspond to the case r>s). thus, total no. of ordered pairs =17+17=34.

Hemang Sarkar
May 20, 2014

the balls at the end of the row can either be both red or both silver.

if they are both red, then we have to arrange the rest of the (r+s-2) balls between them.

if they are blue, we have to arrange the rest of the (r+s-2) balls between them.

but balls of the same colour are identical.

so the number of ways to arrange (r+s-2) balls in a row where (r-2) are red and s are silver is -

$\frac{(r+s-2)!}{(r-2)!*(s)!}$ ...(1)

the number of ways to arrange s-2 silver and r red balls will be

$\frac{(r+s-2)!}{(s-2)!*(r)!}$ ...(2)

the total number of ways to arrange the balls are $\frac{(r+s)!}{(r)!*(s)!}$

...(3)

the required probability will be $\frac{(1) + (2) }{ (3) } = \frac{1}{2}$

on solving and rearranging a bit. we get -

$r^2 + s^2 - r - s = 2rs$

or, $(r-s)^2 = (r+s)$

clearly $r+s$ is a perfect square.

if $r + s = n^2$ then $r - s = n$

this gives us ,

$r = \frac{n(n+1)}{2}$ and $s = \frac{n(n-1)}{2}$

or vice versa.

$1000 \le r \le 2000$

$1000 \le s \le 2000$

if $n = 45$, $r = 1035$ and $s = 990$

if $n = 46$, $r > 1000$ and $s > 1000$ so $n = 46$ gives us the smallest solution.

for the largest solution needed, we use the upper bound - 2000.

$n = 63$ gives us $r > 2000$

$n = 62$ gives us $r < 2000$ and $s < 2000$

hence $n = 62$ will give the largest solution needed.

therefore, for every $n$ from $46$ to $62$, we get two pair $(r,s)$

(remember that vice versa thing).

hence the answer is $2(62 - 46 + 1) = 34$

since we have to include both $46$ and $62$.

Mihir Sheth
May 20, 2014

Total no. of arrangements of (r+s) balls = (r+s)! / r!s! = a Keeping 2 red balls fixed at opposite ends, no. of arrangements of the remaining balls = (r+s-2)! / (r-2)!s! = b Keeping 2 silver balls fixed at opposite ends, no. of arrangements of the remaining balls = (r+s-2)! / (s-2)!r! = c So we have an eqaution: (b+c) / a = 0.5 Simplifying this, we get (r-s)^2 = (r+s) Since 2000<(r+s)<4000 we have 44<(r-s)<64; but for 45 & 63, we get the values for r & s out of the given range. Therefore we have 17 possible values for (r-s) (from 46 to 62) & hence we have 34 possible ordered pairs of (r,s).

Aakash Kansal
May 20, 2014

Sample space=(r+s)!/(r! s!) Favorable event = (r+s-2)!/{r! (s-2)!} + (r+s-2)!/{s! (r-2)!} On soving probability to 0.5 we get (r-s)^2=r+s Now let modulus(r-s) =k Then let s=r+k Also k^2 lies in b/w 2000 to 4000 As r+s is from 2000+k to 4000-k Contaning perfect square of 45 to 63 But at 45 ,45 45=2025<2000+k or (45) Also 63 63=3969>4000-63 or k So neglecting 45 and 63 we are left with 17 values of k Also for each k there are two orderedpair so 17 2=34answer

Russell Few
May 20, 2014

We have to calculate the probability that both of them are red and the probability that both of them are silver.

If the first ball is red, then the last ball must also be red for the 2 Christmas balls, which are located at opposing ends of the row to have the same color.

There are r+s balls, so the chance that the first ball is red is r/(r+s) and the chance that the last ball is red (assuming that the first ball is already red) is (r-1)/(r+s-1). The probability for both of the balls becoming red is ((r/(r+s))*((r-1)/(r+s-1)))=((r^2-r)/((r+s)^2-(r+s)).

Similarly, the probability for both of the balls becoming silver is ((s^2-s)/((r+s)^2-(r+s)).

The probability for the first and the last balls to be both red or both silver is ((r^2+s^2-r-s)/(r^2+2rs+s^2-r-s))=1/2.

Thus, 2r^2+2s^2-2r-2s=r^2+2rs+s^2-r-s --> r^2-2rs+s^2=r+s --> (r-s)^2=r+s.

The parity of r-s is the same as r+s, so the parity of (r-s)^2 is the same as r+s.

WLOG, let r>=s. (anyway, we could just multiply the number of cases we have at the end by 2 because another case is formed by simply switching the r and s values.)

We know that the range of r+s is from 2000 to 4000, so the range of (r-s) is from 45 to 63.

IF r-s=45, r+s=2025, so 2r=2070, r=1035,s=990 --> invalid IF r-s=46, r+s=2116, so 2r=2162, r=1081,s=1035 --> valid, also s=1081,r=1035 is valid. ALL values of r-s from 47-62 would be valid because the parity of r-s and r+s is the same, and 62^2=3844. However, when r-s=63, r+s=3969, so 2r>4000 and r>2000.

The possible values of r-s is from 46-62, which is 17 cases.

However, each cases actually accounts for two different cases because another case could be formed by simply switching the r and s values, so there are 17*2=34 ordered pairs in all .

Calvin Lin Staff
May 13, 2014

Since r , s > 2 r, s > 2 , the probability that the two end balls will be red is r ( r 1 ) ( r + s ) ( r + s 1 ) \frac{r(r-1)}{(r+s)(r+s-1)} and similarly the probability that the two end balls will be silver is s ( s 1 ) ( r + s ) ( r + s 1 ) \frac{s(s-1)}{(r+s)(r+s-1)} . Thus, by the rule of sum, the probability that the two end balls will have the same color is r ( r 1 ) + s ( s 1 ) ( r + s ) ( r + s 1 ) = 1 2 \frac {r(r-1) + s(s-1)}{ (r+s)(r+s-1)} = \frac {1}{2} . Expanding and combining like terms, this simplifies to ( r s ) 2 = r + s (r-s)^2=r+s .

Let us assume that r s r\geq s , so r s = n r-s = n is a non-negative integer, and r + s = n 2 r+s = n^2 . Solving for r r and s s , we have ( r , s ) = ( 1 2 ( n 2 + n ) , 1 2 ( n 2 n ) ) (r,s)=\left(\frac {1}{2} (n^2+n), \frac {1}{2} (n^2-n)\right) . Note that since n 2 n^2 and n n have the same parity, r r and s s will be integers for all integers n n . Since s 1000 s \geq 1000 thus 1 2 ( n 2 n ) 1000 \frac{1}{2}(n^2-n) \geq 1000 and using the quadratic formula we have n 45.224 n 46 n \geq 45.224\ldots \Rightarrow n \geq 46 . Since r 2000 r \leq 2000 thus 1 2 ( n 2 + n ) 2000 \frac{1}{2}(n^2+n) \leq 2000 and using the quadratic formula we have n 62.748 n 62 n \leq 62.748\ldots \Rightarrow n \leq 62 . Hence 46 n 62 46 \leq n \leq 62 . It is clear that every integer n n in this range will yield a unique integer solution ( r , s ) (r,s) , so there are 62 46 + 1 = 17 62-46+1 =17 solutions for r s r \geq s . Since n 0 n \neq 0 , we will have r > s r>s . By symmetry, when s > r s > r there are 17 possibilities. Thus, the total number of solutions are 17 × 2 = 34 17\times 2 = 34 .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...