x + y ≤ 1 0 0
Find the number of ordered pairs ( x , y ) of non-negative integers x , y which satisfy the inequality above is fulfilled.
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.
Well done for converting the inequality to make the Stars and Bars applicable!
That was cool
Log in to reply
What is stars and bars. Yet once again, everyone posts solutions I don't understand. Thankfully, I can do such problems in my head.
Consider an inequality like:
i = 1 ∑ k − 1 a i ≤ n
We can transform this to equality by adding a non-negative integer a k to the L . H . S like this:
i = 1 ∑ k a i = n
By the technique of stars and bars we have total solutions for a i ∀ i , 1 ≤ i ≤ k given by : ( k − 1 n + k − 1 )
Here , k = 3 , n = 1 0 0 , hence substituting the values we have :
( 3 − 1 3 + 1 0 0 − 1 ) = ( 2 1 0 2 ) = 5 1 5 1
You can simplify your work by a little by using Rajen Kapur's explanation. Nevertheless, nice job Nihar!
Bonus question : Can you find an alternative approach that don't require the addition of a non-negative integer?
In Response To Challenge Master : The alternative method is as follows, x + y ≤ 1 0 0 Hence, x + y can take all possible values between 0 and 1 0 0 .
If x + y = 0 , no. of solutions = ( 1 1 ) ,
if x + y = 1 , no. of solutions = ( 1 2 ) ,
if
x
+
y
=
2
, no. of solutions =
(
1
3
)
,
.
.
.
if
x
+
y
=
1
0
0
, no. of solutions =
(
1
1
0
1
)
.
Summing up all the possibilities,
( 1 1 ) + ( 1 2 ) + ( 1 3 ) + . . . + ( 1 1 0 1 ) = ( 2 2 ) + ( 1 2 ) + ( 1 3 ) + . . . + ( 1 1 0 1 )
Applying the formula ( r − 1 n ) + ( r n ) = ( r n + 1 ) , we get
( 2 3 ) + ( 1 3 ) + ( 1 4 ) + . . . + ( 1 1 0 1 ) = ( 2 4 ) + ( 1 4 ) + ( 1 5 ) + . . . + ( 1 1 0 1 ) = ( 2 1 0 2 )
Log in to reply
Very nicely done!!!
Well, we can calculate this using just one formula(just like rajen sir),
According to the inequality, we need to express all numbers < 1 0 0 as the sum of two numbers, so consider this,
0 = 0 + 0
1 = 1 + 0 1 = 0 + 1
2 = 0 + 2 2 = 2 + 0 2 = 1 + 1
3 = 0 + 3 3 = 3 + 0 3 = 1 + 2 3 = 2 + 1 . . . . . .
We find that each of the number can be expressed as 1 more than the number, so we can generalize this to n t h number.
Any number n can be expressed in n + 1 ways.
So, the inequality can be expressed as ( 0 + 1 ) + ( 1 + 1 ) + ( 2 + 1 ) + ( 3 + 1 ) . . . . . . ( n + 1 ) , as the last number in this question is 1 0 0 , the number of ordered pairs is:
1 + 2 + 3 + 4 + 5 + . . . . 1 0 1 = 2 1 0 1 × 1 0 2 = 5 1 5 1
Review the other solutions to understand how we can approach this directly with a simple bijection.
U have used the formula S n = 2 n ( n + 1 ) , so how can you say "without using any formulas at all" ?
Anyways I didn't think of this approach.Thanks for this idea.
Let x = 0 . We can see that y = 0 , 1 , 2 , . . . , 1 0 0 , which is 1 0 1 possible solutions.
Let x = 1 . We can see that y = 0 , 1 , 2 , . . . , 9 9 , which is 1 0 0 possible solutions.
Repeating for values of x up to 100, we see the total combinations comes to:
r = 1 ∑ 1 0 1 r = 2 1 n ( n + 1 ) = 2 1 ( 1 0 1 ) ( 1 0 2 ) = 5 1 5 1
Put x=0 y can be anything from 0 to 100 i.e 101 possibilities for y .Then increase x to 1.Now y can go from 1 to 100 i.e 100 possibilities.Looking at the pattern the answer is the sum of natural numbers from 1 to 101 which gives 5151.
Problem Loading...
Note Loading...
Set Loading...
Let z be any non-negative integer, such that x + y + z = 1 0 0 . The number of solutions then using "Stars and Bars" funda equals ( 2 1 0 2 ) = 5 1 5 1 .