Inequalities + Combinatorics = Combinequalities

x + y 100 x + y \leq 100

Find the number of ordered pairs ( x , y ) (x, y) of non-negative integers x , y x,y which satisfy the inequality above is fulfilled.


The answer is 5151.

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.

5 solutions

Rajen Kapur
Jun 1, 2015

Let z be any non-negative integer, such that x + y + z = 100 \displaystyle x + y + z = 100 . The number of solutions then using "Stars and Bars" funda equals ( 102 2 ) = 5151. \dbinom{102}{2}= 5151.

Moderator note:

Well done for converting the inequality to make the Stars and Bars applicable!

That was cool

Ujjwal Mani Tripathi - 6 years ago

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.

Shubham Bhargava - 5 years, 10 months ago
Nihar Mahajan
Jun 1, 2015

Consider an inequality like:

i = 1 k 1 a i n \Large\displaystyle\sum_{i=1}^{k-1} a_i \leq n

We can transform this to equality by adding a non-negative integer a k a_{k} to the L . H . S L.H.S like this:

i = 1 k a i = n \Large\displaystyle\sum_{i=1}^k a_i = n

By the technique of stars and bars we have total solutions for a i i , 1 i k a_i \ \forall i \ , \ 1\leq i \leq k given by : ( n + k 1 k 1 ) \Large {{n+k-1\choose k-1}}

Here , k = 3 , n = 100 k=3 \ , \ n=100 , hence substituting the values we have :

( 3 + 100 1 3 1 ) = ( 102 2 ) = 5151 \Large {3+100-1\choose 3-1} = {102\choose 2} = 5151

Moderator note:

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 100 \huge x + y \leq 100 Hence, x + y x+y can take all possible values between 0 0 and 100 100 .

If x + y = 0 x+y=0 , no. of solutions = ( 1 1 ) \dbinom{1}{1} ,

if x + y = 1 x+y=1 , no. of solutions = ( 2 1 ) \dbinom{2}{1} ,

if x + y = 2 x+y=2 , no. of solutions = ( 3 1 ) \dbinom{3}{1} ,
. . . ...
if x + y = 100 x+y=100 , no. of solutions = ( 101 1 ) \dbinom{101}{1} .

Summing up all the possibilities,

( 1 1 ) + ( 2 1 ) + ( 3 1 ) + . . . + ( 101 1 ) = ( 2 2 ) + ( 2 1 ) + ( 3 1 ) + . . . + ( 101 1 ) \dbinom{1}{1}+\dbinom{2}{1}+\dbinom{3}{1}+...+\dbinom{101}{1}\\=\dbinom{2}{2}+\dbinom{2}{1}+\dbinom{3}{1}+...+\dbinom{101}{1}

Applying the formula ( n r 1 ) + ( n r ) = ( n + 1 r ) \boxed {\dbinom{n}{r-1}+\dbinom{n}{r}=\dbinom{n+1}{r}} , we get

( 3 2 ) + ( 3 1 ) + ( 4 1 ) + . . . + ( 101 1 ) = ( 4 2 ) + ( 4 1 ) + ( 5 1 ) + . . . + ( 101 1 ) = ( 102 2 ) \dbinom{3}{2}+\dbinom{3}{1}+\dbinom{4}{1}+...+\dbinom{101}{1}\\=\dbinom{4}{2}+\dbinom{4}{1}+\dbinom{5}{1}+...+\dbinom{101}{1}\\\huge =\dbinom{102}{2}

Rohit Ner - 6 years ago

Log in to reply

Very nicely done!!!

Nihar Mahajan - 6 years ago

Log in to reply

c h e e r s ! \large\color{skyblue}{cheers!}

Rohit Ner - 6 years ago
Sravanth C.
Jun 1, 2015

Well, we can calculate this using just one formula(just like rajen sir),

According to the inequality, we need to express all numbers < 100 <100 as the sum of two numbers, so consider this,

0 = 0 + 0 0=0+0


1 = 1 + 0 1 = 0 + 1 1=1+0 \\ 1=0+1


2 = 0 + 2 2 = 2 + 0 2 = 1 + 1 2=0+2\\ 2=2+0 \\ 2=1+1


3 = 0 + 3 3 = 3 + 0 3 = 1 + 2 3 = 2 + 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 1 more than the number, so we can generalize this to n t h n^{th} number.

Any number n n can be expressed in n + 1 n+1 ways.

So, the inequality can be expressed as ( 0 + 1 ) + ( 1 + 1 ) + ( 2 + 1 ) + ( 3 + 1 ) . . . . . . ( n + 1 ) (0+1)+(1+1)+(2+1)+(3+1). . . . . .(n+1) , as the last number in this question is 100 100 , the number of ordered pairs is:

1 + 2 + 3 + 4 + 5 + . . . . 101 = 101 × 102 2 = 5151 1+2+3+4+5+. . . . 101 \\ = \dfrac{101×102}{2} \\=\boxed{5151}

Moderator note:

Review the other solutions to understand how we can approach this directly with a simple bijection.

U have used the formula S n = n ( n + 1 ) 2 S_n = \dfrac{n(n+1)}{2} , so how can you say "without using any formulas at all" ?

Anyways I didn't think of this approach.Thanks for this idea.

Nihar Mahajan - 6 years ago
Michael Fuller
Jun 4, 2015

Let x = 0 x=0 . We can see that y = 0 , 1 , 2 , . . . , 100 y=0,1,2,...,100 , which is 101 101 possible solutions.

Let x = 1 x=1 . We can see that y = 0 , 1 , 2 , . . . , 99 y=0,1,2,...,99 , which is 100 100 possible solutions.

Repeating for values of x x up to 100, we see the total combinations comes to:

r = 1 101 r = 1 2 n ( n + 1 ) = 1 2 ( 101 ) ( 102 ) = 5151 \large {\sum _{ r=1 }^{ 101 }{ r } \\ =\frac { 1 }{ 2 } n\left( n+1 \right) \\ =\frac { 1 }{ 2 } \left( 101 \right) \left( 102 \right) \\ = \color{#20A900}{\boxed { 5151 }}}

Abhishek Ramnath
Jun 4, 2015

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.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...