Courses

# How to Solve Number of Integral Solutions Quant Notes | EduRev

## UPSC : How to Solve Number of Integral Solutions Quant Notes | EduRev

The document How to Solve Number of Integral Solutions Quant Notes | EduRev is a part of the UPSC Course Quantitative Aptitude for SSC CGL.
All you need of UPSC at this link: UPSC
1. Equation type: Ax + By = C

Few rules to find integral solutions of this type of equations.

1. First, reduce the equation in lowest reducible form.
2. After reducing, if coefficients of x and y still have a common factor, the equation will have no solutions.
3. If x and y are co-prime in the lowest reducible form, find any one integral solution. The rest of the solutions can be derived from that integral solution.
4. For each successive integral solutions of the equation, the value x and y will change by a coefficient of the other variable .If the equation is of the type Ax – By=C (after getting the lowest reducible form) ,an increase in x will cause increase in y. If the equation is of the type Ax + By=C,an increase in x will cause a decrease in y.

Let us take an example.

2x + 3y = 39.

(Number of Integral Solutions) Step-1: The equation is already in its reduced form and we can see that coefficients of x and y are co-prime.

(Number of Integral Solutions) Step-2: For a given equation, you should start substituting values (by hit and trial) for the variable that has larger coefficient to find out first integral solution. In this case, it is y. Now, if we take y = 0, we will get x = 39/2(not an integer). Again, if we take y=1, we will get x = 18. So, (18,1) is our first solution.

(Number of Integral Solutions) Step-3:If you understand the 4th point mentioned above, at one of any two consecutive integral values of y, the value of x will come out to be an integer OR at one of the 3 consecutive values of x, the value of y will come out to be an integer. That means, if we add 2n (where n is an integer) to the first value for y, we will have to subtract 3n from the first value of x to get integral solutions. That means,

If y =1 +2(1) = 3 , x= 18-3(1) = 15.

If y= 1 + 2(2) = 5, x= 18 – 3(2) =  12.

If y= 1 + 2(3) = 7, x = 18 – 3(3) = 9 and so on.

(Number of Integral Solutions) Step-4: This equation will have infinite number of integral solutions but finite number of non-negative integral solutions. Let’s see how we can find it.

We can keep increasing the value of y in the positive direction but x will be decreasing simultaneously and become less than 0 at one point. As lowest non negative integral value of y is 1,highest allowable positive value of x is 18 and it is decreasing by 3. So, x can take 7 non negative integral values and they are- 18, 15, 12, 9, 6, 3 and 0.Hence the given equation has 7 non negative integral values.

Note: In equation Ax + By = C, if C is divisible by any of A or B, then number of non-negative integral solutions = {C/LCM(A,B)} + 1

1. Equation type: x1+x2+⋯+xr=n

Case-1: Positive integral solutions.

Let us understand the concept from an example:

X1 + X2 + X3= 8.

To solve this, imagine that there are 8 identical objects placed next to each other with gaps separating them.8 objects have 7 gaps between them. Now, I can select 2 gaps from among the 7 in 7C2 ways. These selected gaps will hold the plus signs of the given equation. Now, the number of objects to the left of the first plus sign, the number of objects between the two plus signs and the number of objects to the right of the second plus sign will be the values of X1, X2 and X3 respectively. Therefore, number of positive integral solutions of equation x1+x2+⋯+xr=n

= Number of ways in which n identical balls can be distributed into r distinct boxes where each box must contain at least one ball

(n-1)C(r-1)

Case-2: Number of Non-negative integral solutions

We will continue with our previous equation. The number of non-negative integral solutions will be different from number of positive integral solutions as the value of variables can be 0 as well.

We will substitute the variables in the question such that this case would become similar to previous case. In previous case, (X1, X2, X3) >= 1. In this case, (X1, X2, X3) >= 0. Therefore, (X1+1, X2+1, X3+1) >= 1. Substitute X1+1=Y1, X2+1=Y2 and X3+1=Y3 in the given equation such that

(X1+1) + (X2+1) +(X3+1) = 11

=> Y1+Y2+Y3=11.

Now this case becomes similar to previous one and number of solutions is 10C2.

Therefore, Number of non-negative integral solutions of equation x1+x2+⋯+xr=n

= Number of ways in which n identical balls can be distributed into r distinct boxes where one or more boxes can be empty.

= (n+r-1)C(r-1)

Case-3.-Constraints on the variables.

Consider following equation-  A+B+C = 13, where, 1=< (A,B,C) <=6.

To solve this, replace A,B,C with P,Q,R such that P= 6-A,  Q=6-B and R=6-C. Then, (6-P)+(6-Q)+(6-R)=13 which implies P+Q+R=5. As A ranges from 1 to 6, P ranges from 0 to 5. Hence, the problem reduces to finding the non-negative solutions of P+Q+R = 5. The number of non-negative solutions is 7C2 = 21.

Another way is to use the following concept. If the linear equation is x1 + x2 +..+ xr= n and 0<= (x1, x2 .… xr ) <=p then the problem can be reduced to finding the exponent of xnin the expression ( 1 + x + x2 + x3..+ xp )r.

1. Equation type: |x| + |y| = n

Let |x|=p and |y|=q, then non-zero integral solutions= n-1C2-1= n-1. Now, for each solution (x1,y1), there would exist 4 values for x and y, They are-> (x1,y1), (-x1,y1) ,(x1,-y1) and (-x1,-y1). Therefore, total number of non-zero integral solutions = 4(n-1).

1. Equation type: X2– Y2= n

When we are asked to calculate how many positive integral solutions are possible for the equation X2– Y2= N, there can be 4 cases.

Case 1: N is an odd number and not a perfect square

In this case, total number of positive integral solutions will be= (Total number of factors of N) / 2

Example: How many positive integral solutions are possible for the equation X2– Y2= 135?

Solution: Total number of factors of 135 is 8.

So, total number of positive integral solutions = 8/2 = 4.

Case 2: N is an odd number and a perfect square

In this case, total number of positive integral solutions will be = [(Total number of factors of N) – 1] / 2

Example: How many positive integral solutions are possible for the equation X2– Y2= 121?

Solution: Total number of factors of 121 is 3.

So, total number of positive integral solutions = (3-1)/2 = 1

Case 3: N is an even number and not a perfect square.

In this case, total number of positive integral solutions will be = [Total number of factors of (N/4)] / 2

Example: How many positive integral solutions are possible for the equation X2– Y2= 160?

Solution: Total number of factors of 40 is 8 (as N=160 and N/4=40)

So, total number of positive integral solutions = 8/2 = 4.

NOTE:If a given number is of the form 4k+2, it cannot be expressed as difference of two squares.

Case 4: N is an even number and a perfect square

In this case, total number of positive integral solutions will be ={[Total number of factors of (N/4)] – 1 } / 2

Example: How many positive integral solutions are possible for the equation X2– Y2= 256?

Solution: Total number of factors of 64 is 7.

So (7-1)/2 = 3 positive integral solutions

Now, let’s see few examples.

Number of Integral Example 1:  Find the number of positive integral solutions of |x| + |y| = 10.

Number of Integral Solution 1:  Let |x|= a and |y|=b. First find the positive integral solution of a+b = 10.

Number of non-zero integral solutions= 10-12-1 = 9 . Now for each solution (a1, b1), the values of (x,y)= (a1, b1), (-a1, b1), (a1, -b1) and (-a1, -b1). So total number of non-zero integral solutions= 4×9 =36.

Number of Integral Example 2: Find the number of positive integral for a,b,c and d such that their sum is not more than 15.

Number of Integral Solution 2: a + b + c + d < 15.

a + b + c + d = 14,13,12,11,10,9,8,7,6,5,4.(Since we need to find positive integral solutions, sum of 4 variables cannot be less than 4)

Total no of positive solution = 13C312C311C3 … 3C3

= 286+220+165+120+84+56+35+20+10+4+1

=1001.

Number of Integral Example 3: Find the total number of integral solutions of IxI + IyI + IzI = 15.

Number of Integral Solution 3: First, let a = |x|, b = |y|, c = |z|.Now, we need to find the number of positive integral solutions of a + b + c = 15. The number of solutions are 14C2 = 91. Now for each value of a,b and c we will have two values of x, y and z each. Therefore, the total number of solutions = 91 x 2 x 2 x 2= 728.

Now let one of the variables be equal to 0. For example, let x = 0 and |y| and |z| be at least equal to 1. Therefore, we need the positive integral solution of b + c = 15, where b = |y| and c = |z|. The number of solutions is 14C1 = 14. Each of these solutions will give two values of y and z and there are 3 ways in which we can keep one of the variables equal to 0. Therefore, total number of ways are 14 x 2 x 2 x 3 = 168.

Now let two of the variables be equal to 0. In this case, the total number of solutions is equal to 6.

Therefore, the total number of integral solutions = 728 + 168 + 6 = 902.

Offer running on EduRev: Apply code STAYHOME200 to get INR 200 off on our premium plan EduRev Infinity!

## Quantitative Aptitude for SSC CGL

54 videos|52 docs|72 tests

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

;