Sums Less Than 25

How many ordered pairs of non-negative integers ( M , N ) (M, N) are there which satisfy the inequality M + N 25 M + N \leq 25 ?


The answer is 351.

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.

23 solutions

Kevin Sun
May 20, 2014

Let A = 25 M N A = 25-M-N . Then A , M A, M , and N N are non-negative integers that sum to 25 [i,e, A + M + N = 25 A+M+N=25 - Calvin]. This is equivalent to the number of ways to make A A stars, then a bar, then M M stars, a bar, and N N stars, which is ( 27 2 ) = 351 {27 \choose 2} = 351 .

All other solutions considered cases where M + N = k M+N=k , and summed over k k . By creating this additional variable A = 25 M N A=25-M-N , we simplified all the cases.

For a detailed explanation of the stars and bars procedure, refer to this blog post .

Calvin Lin Staff - 7 years ago
Karthik Tadinada
May 20, 2014

If m and n are integers, then so must be m+n

m+n could be 25. In this case we have 26 possible solution pairs (m=0, to m=25)

m+n could also be 24, with 25 solution pairs

and so on all the way to

m+n=0 with only 1 solution pair

We use the pairing trick to add 1+2+3+...26 to give 13 pairs that each add to 27 (pair 1 with 26, 2 with 25 and so on)

so the total is 27*13=351

Aradhya Kasera
Dec 15, 2013

Basically, we can either brute force this with casework, or consider a much simpler solution. I'm going to go through the simpler solution for obvious purposes.

Consider an integer 0<= K<= 25. Now, consider the equation M + N + K = 25 M+N+K=25 . Note for any M+N, K is uniquely determined, and the minimum of K is 0 when M+N is 25, and the maximum 25 when M+N=0 (try some examples and convince yourself of the one-to-one correspondence). Therefore we must solve M + N + K = 25 M+N+K=25 over the non-negative integers and by stars and bars (or whatever) the answer is ( 25 2 ) = 351 \binom{25}{2}=351 .

25 choose 2 is not 351

Sheldon Collier - 7 years, 5 months ago

I mistyped should be 27C2

Aradhya Kasera - 7 years, 5 months ago

25+3-1C25= 27C25= 351

Michael Wood - 7 years, 4 months ago
Zi Song Yeoh
May 20, 2014

We will prove that for m+n=k, there are k+1 pairs of nonnegative integers that satisfy the equation.

. . . . . ... . . .(k dots) Note that the number of ways to put a plus symbol between any two dots, behind the first dot or after the last dot is k+1.

Note that this is equal to the number of pairs of nonnegative solutions to m+n=k.

Therefore, the number of pairs (m, n) of solutions to m+n <= 25 is equal to 1+2+3+...+25+26=351.

If M=0, N can be 0,1,2...25--------26 values If M=1, N can be 0,1,2...24--------25 values etc. If M=25, N can be 0-------1 value No. of values that N can be is the answer to the question, so the answer is: 26*25/2=325

Pebrudal Zanu
Dec 8, 2013

M + N 25 M+N \leq 25

There is P 0 P \geq 0 such that:

M + N + P = 25 M+N+P=25

So, the solution are:

C ( 25 + 3 1 , 3 1 ) = 351 C(25+3-1,3-1)=\fbox{351}

I like the application of stars and bars for this problem. It makes the solution a lot simpler (it avoids the awkward explanation of "well when M = 0 then N can be 26 things and then when M = 1 then N can be 25 things...")

Michael Tong - 7 years, 6 months ago

Log in to reply

Stars and bars is the typical approach to the problem, while your approach is little different, even though its lengthy.

Mirza Baig - 7 years, 6 months ago

Log in to reply

Well, I haven't seen it before :P

Michael Tong - 7 years, 6 months ago

Yes, Star bars aplication...

pebrudal zanu - 7 years, 6 months ago
Vipul Nair
Dec 16, 2013

let M =25 then N can only be equal to 0 i.e. there is only 1 option for N

if M=24 then N can take two values 0 and 1 i.e there are two options for N

going on like this...

if M= 0 then N can take 26 values..

so the sum is 1+2+3+...26 =351

its same as i did !!

Rishabh Jain - 7 years, 5 months ago

Log in to reply

same too

math dude - 7 years, 2 months ago
Alexander Sludds
Dec 15, 2013

We note that if we consider M + N = 25 M+N=25 that there are 26 26 non-negative integer solutions to this. For M + N = 24 M+N=24 there are 25 25 integer solutions. Continuing this pattern we see that there are 26 + 25 + 24 + + 1 = 351 26+25+24+\cdots+1=351 solutions. This works since the solutions to the cases can not overlap.

Michael Tong
Dec 8, 2013

Let's take a graphical approach. Label the horizontal axis M and the vertical axis N. The line connecting the points ( 25 , 0 ) (25, 0) and ( 0 , 25 ) (0, 25) , the M-axis and the N-axis enclose our solution set. Now we need to count the lattice points in this region. There are 26 26 points lying on the M-axis from ( 0 , 0 ) (0, 0) to ( 25 , 0 ) (25, 0) , 25 25 points lying on the line above that, and so forth until we get to 1 1 point lying on the line y = 25 y = 25 . Thus, the number of points is equal to n = 1 26 n = ( 27 2 ) = 351 \sum_{n = 1}^{26} n = {27 \choose 2} = 351 .

I solved using the standard approach(i.e by ball and stars or whatever way), but man, Michael your solution is really creative! Great approach buddy!! On second thoughts, as the answer is 27 C 2 27C_{2} , there must be a combinatorial explanation of this and in particular for n n , the answer is n + 2 C 2 n+2C_{2} . If you find the explanation for this result, post it okay? I'll also be thinking about it.

Piyal De - 7 years, 6 months ago

Log in to reply

Note that ( n + 2 2 ) = ( n + 2 ) ! 2 ! × ( n + 2 2 ) ! \dbinom{n+2}{2}=\frac {(n+2)!}{2! \times (n+2-2)!} = ( n + 2 ) × ( n + 1 ) 2 = \frac {(n+2) \times(n+1)}{2} which is the desired no. of solutions.

Bhargav Das - 7 years, 6 months ago

Log in to reply

I know this gives the number of solutions, but I'm asking for a combinatorial interpretation of n C 2 nC_{2} .

Piyal De - 7 years, 6 months ago

Log in to reply

@Piyal De Well, let's give it a try by writing out what we want.

The combinatorial interpretation of ( 27 2 ) { 27 \choose 2} is picking 2 numbers out of the first 27. Let's call these pairs of numbers { a , b } \{a,b\} with a < b a < b .

How does this lead to creating a bijection with ordered pairs of non-negative integers such that M + N 25 M + N \leq 25 ?

Calvin Lin Staff - 7 years, 6 months ago

Awesome.......Really creative solution

Kishlaya Jaiswal - 7 years, 6 months ago

The possible sums of M+N can be 0, 1, 2........25.

Possible values for (M,N) if M+N=0 is (0.0). Thus a total possibility of 1.

Possible values for (M,N) if M+N=1 are (1.0) and (0,1). Thus a total possibility of 2.

Similarly, possible values for (M,N) if M+N=k are (0.k), (1, k-1).......(c,k-c) (k,0) for 0<=c<=k. Thus a total possibility of k+1 for each value of k where 0<=k<=25.

Thus the total possible values for (M,N) is 1+2+.....+26=(26*27)/2=351.

Bhargav Das
Dec 9, 2013

Note that M + N M+N can be 25 , 24 , 23 , 22 , . . . . . . . , 0 25,24,23,22,.......,0 We get a total of 26 possible sums. Hence, one by one we find the no. of ordered pairs by the famous Stars and Bars Method .

First, when M + N = 25 M+N=25 , then the no. of ordered pairs is: ( 25 + 2 1 25 ) = ( 26 25 ) \dbinom{25+2-1}{25}=\dbinom{26}{25}

Then, when M + N = 24 M+N=24 , then the no. of ordered pairs is: ( 24 + 2 1 24 ) = ( 25 24 ) \dbinom{24+2-1}{24}=\dbinom{25}{24}

Continuing this way, the total no. of solutions or ordered pairs,satisfying the given inequality is:

= ( 26 25 ) + ( 25 24 ) + . . . . . . . . . . . . . . . + ( 1 0 ) = ( 26 + 25 + . . . . . . . . . . . . . . . + 1 ) =\dbinom{26}{25}+\dbinom{25}{24}+...............+\dbinom{1}{0}=(26+25+...............+1)

= 26 × 27 2 =\frac{26\times 27}{2}

= 13 × 27 = 351 =13\times 27=\boxed{351} .

Same method!

Akshat Jain - 7 years, 6 months ago
Lokesh Sharma
Dec 15, 2013

Python solution:

res = 0
for m in range(100):
    for n in range(100):
        if m + n <= 25:
            res += 1
print res

bruto force xD

Ramin Taghizada - 7 years, 5 months ago
Noonoo Wang
Dec 8, 2013

If M is 0, then N could be any integer between 0 and 25. M is 1, then N could be any integer between 0 and 24. M is 2, then N could be any integer between 0 and 23. . . . M is 25, then N is 0.

So, if M is 0, then there are 26 possible values for N, and if M is 25, then there is 1 possible value for N. Thus we do 26+25+24.......+1= 27x26/2 =351.

Why is this level 5?

Prasanna Muthuraman - 7 years, 6 months ago
Daniel Chiu
Dec 8, 2013

For a given 0 M 25 0\le M\le 25 , there are 26 M 26-M possible values of N N such that M + N 25 M+N\le 25 , since N N can range from 0 to 25 M 25-M .

Therefore, the answer is M = 0 25 26 M = 26 + 25 + + 1 = 26 27 2 = 351 \sum_{M=0}^{25} 26-M=26+25+\cdots+1=\dfrac{26\cdot 27}{2}=\boxed{351}

Generalization: The number of non-negative pairs of integers ( M , N ) (M,N) such that M + N X M+N\le X is ( X + 1 ) ( X + 2 ) 2 \dfrac{(X+1)(X+2)}{2} .

Anuj Varshneya
Oct 3, 2018

Imagine this problem in XY-plane (M as X; N as Y), Now x+y<=25; X>=0 and Y>=0 will enclose the area formed by the x-axis, y-axis, and x+y=25 line(including the boundary). now clearly the intercept made by our equation x/25+y/25=1 are 25 on both x and y-axis. Every such integer points/coordinates lying within the area will satisfy our problem hence the solution to our problems is actually the number of such integer points. To calculate the no. of points consider the square formed by coordinates (0,0) (0,25) (25,0) (25,25), the line x+y=25 dissects the square in equal halves regions so do the no. of equally spaced integer coordinates considering the points on the diagonal line in both the regions. so, (26X26-26)/2 +26 = 351 "Total no. of points in the square= 26X26" "Points on the diagonal line i.e (x+y=25) =26"

Jochem Jonges
Jan 2, 2018

Ervery solution ( A , B , C ) (A,B,C) such that A + B + C = 25 A+B+C= 25 is also a unique solution to A + B 25. A+B\leq 25.

The variable C C is a dummy variable.

The problem is therefore equivalent with dividing 25 25 balls over 3 3 urns A , B , C A,B,C : ( 25 + 3 1 25 ) = 351 \ \ \ {25+3-1 \choose 25} = \boxed{351}

Nandni Jotwani
Jul 13, 2016
  • Since we are given that m + n >= 25 therefore ,

For M + N = 25 , we can find 26 solutions with the help of the stars and bars method For M+ N = 24 we have 25 solution Till for M+N = 1 we have 1 solution Therefore we add 1 + 2 + 3.........24+ 25+26 and get the final answer as 351

We have 2 case in here. First, M + N = 25. So the solution is 26C1. Second, M + N < 25. The solution is 26C2. Sum of the solution is 26C1 + 26C2.

Saurabh Ghosh
Feb 27, 2014

ordered pair (a,b)

so (0,0) , (1,0) , (0,1), (1,1) all are taken as ordered pair

now a+b <=25

for a=0 , b={0,1,2, ....25} total 26

for a=1 , b={0,1,2, ....24} total 25

for a=2 , b={0,1,2, ....23} total 24

.

.

.

.

for a=24 , b={0,1} total 2

for a=25 , b={0} total 1

therefore, total is 1+2+3+........+24+25+26

n(n+1)/2= 26 ( 26 + 1) / 2= 13 x 27 = 351

Bedadipta Bain
Feb 25, 2014

there are two urn M M and N N . let the sum of the ball in the both the urn is X X . X X can be 0 0 to 25 25 . therefore when X = 0 X=0 both the urn contain 0 0 balls. when X = 1 X=1 then M M can be fill up by this way i.e. no ball or 1 1 ball . similarly for X = i X=i M M can be fill up by ( i + 1 ) C 1 (i+1)C1 way therefore in general s u m i = 0 25 ( i + 1 ) C 1 = 351 sum _{ i=0 }^{ 25 }{ (i+1)C1=351 }

Sheldon Collier
Dec 16, 2013

If M=25, there is one possible value of N, namely N=0. If M=24, there are two possible values of N, namely N=0,1. In total there are 1 + 2 + ... + 26 = 351 solutions.

To satisfy the inquality M + N 25 M+N\leq25 ,and M M , N N are non-negative integers, M M and N N are numbers from 0 0 to 25 25 (inclusive).

Constant the value of M M .

If M = 0 M=0 , then N N can be any number from 0 0 to 25 25 (inclusive).There are 26 26 possibilities for N N , so the number of ordered pairs ( M , N ) = 26 (M,N)=26 .

If M = 1 M=1 , then N N can be any number from 0 0 to 24 24 (inclusive).There are 25 25 possibilities for N N , so the number of ordered pairs ( M , N ) = 25 (M,N)=25 .

If M = 2 M=2 , then N N can be any number from 0 0 to 23 23 (inclusive). By the same way, there are 24 24 ordered pairs......And so on!

Note that If M M increases by 1 1 , then the number of ordered pairs will decrease by 1 1 .

M M can be 0 , 1 , 2 , 3 25 0,1,2,3\dots25 , so the number of ordered pairs each would be 26 , 25 , 24 , 23 , 1 26,25,24,23,\dots1 .So the total number of ordered pairs ( M , N ) (M,N)

= 26 + 25 + 24 + 23 + + 2 + 1 = ( 26 + 1 ) 26 2 = 27 × 13 = 351 =26+25+24+23+\dots+2+1=(26+1)\frac{26}{2}=27\times13=\boxed{351}

I used the same method.

Ishbir Singh - 7 years, 6 months ago
Jubayer Nirjhor
Dec 8, 2013

Let's fix a value for M M and proceed with N N ... We have 25 + 1 = 26 25+1=26 choices for each of M M and N N ...

M = 0 0 N 25 ( 25 + 1 ) = 26 pairs M=0 ~~~\Longrightarrow ~~~ 0\le N\le 25 ~~~\Longrightarrow ~~~ (25+1)=26~\text{pairs}

M = 1 0 N 24 ( 24 + 1 ) = 25 pairs M = 1~~~\Longrightarrow ~~~ 0 \le N \le 24 ~~~ \Longrightarrow ~~~ (24+1)=25~\text{pairs}

M = 2 0 N 23 ( 23 + 1 ) = 24 pairs M = 2 ~~~ \Longrightarrow ~~~ 0\le N \le 23 ~~~ \Longrightarrow ~~~ (23 + 1) = 24~\text{pairs}

\cdot\cdot\cdot

\cdot\cdot\cdot

M = 25 0 N 0 ( 0 + 1 ) = 1 pairs M = 25 ~~~ \Longrightarrow ~~~ 0\le N \le 0 ~~~ \Longrightarrow ~~~ (0+1)=1~\text{pairs}

In total, we have...

n = 1 26 n = 26 × 27 2 = 351 possible pairs \sum_{n=1}^{26} n = \dfrac{26\times 27}{2}=\boxed{351}~\text{possible pairs}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...