Skip to content

LearnIPMAT Quant: Number System

IPMAT Quant: Number System

Integral Solutions

IPMAT Indore Quant, MCQ and short answer · 97 min read · 21 worked examples · 45 practice questions

1 What an integral solution is

A rice trader has 38 kg of rice. He packs all of it into 3 kg bags and 5 kg bags.

Every bag is full and nothing is left over. How many bags of each can he use?

Say he uses xx bags of 3 kg and yy bags of 5 kg. Then 3x+5y=383x + 5y = 38.

Fractions would fit easily: x=2x = 2 and y=6.4y = 6.4 give 6+32=386 + 32 = 38. But 6.4 bags is not a packing. Only whole numbers of bags count.

So try every possible yy. Seven 5 kg bags hold 35 kg and eight would hold 40, so yy is 0 to 7.

yy5y5y38−5y38 - 5ya multiple of 3?xx
0038no
1533yes11
21028no
31523no
42018yes6
52513no
6308no
7353yes1

Three packings work: 11 small bags and 1 big, 6 and 4, or 1 and 7.

1 2 3 4 5 6 7 8 9 10 11 12 13 1 2 3 4 5 6 7 8 O x y (1, 7) (6, 4) (11, 1) (2, 6.4): on the line, not whole 3x + 5y = 38
Figure 1 The line 3x + 5y = 38 passes through endless points, but only three lattice points: (1, 7), (6, 4), (11, 1). The point (2, 6.4) is on the line, but 6.4 bags is not a packing

On a graph, 3x+5y=383x + 5y = 38 is a straight line. It passes through endless points, but only three of them have whole-number coordinates.

Words to know

  • An integer is a whole number with a sign: …,−2,−1,0,1,2,…\dots, -2, -1, 0, 1, 2, \dots No fractions, no decimals.
  • Whole numbers are 0,1,2,3,…0, 1, 2, 3, \dots They are also called non-negative integers: integers that are not below 0.
  • Positive integers are 1,2,3,…1, 2, 3, \dots Zero is not positive. They are also called natural numbers.
  • A solution is a set of values that makes the equation true. (6,4)(6, 4) is a solution of 3x+5y=383x + 5y = 38, because 18+20=3818 + 20 = 38.
  • An integral solution (or integer solution) is a solution in which every unknown is an integer.
  • An ordered pair (x,y)(x, y) lists xx first and yy second. (6,4)(6, 4) and (4,6)(4, 6) are different pairs: (4,6)(4, 6) gives 12+30=4212 + 30 = 42, not 38.
  • A lattice point is a point on a graph whose two coordinates are both integers. Each integral solution is a lattice point on the line.

Which numbers are allowed

The same equation can have a different count with a different word. So read the word first.

The question saysAllowed valuesDoes 0 count?
integers, integral solutions…,−1,0,1,…\dots, -1, 0, 1, \dotsyes, and negatives too
whole numbers, non-negative integers0,1,2,…0, 1, 2, \dotsyes
positive integers, natural numbers1,2,3,…1, 2, 3, \dotsno
"at least one of each"1,2,3,…1, 2, 3, \dotsno
a count of bags, coins or people, nothing more said0,1,2,…0, 1, 2, \dotsyes

Try the unknown with the bigger coefficient

A coefficient is the number in front of an unknown: in 3x+5y3x + 5y, 3 is the coefficient of xx and 5 is the coefficient of yy.

5y5y grows in jumps of 5, so yy has only 8 values to try. xx would have 13 (xx from 0 to 12).

  • aa and bb are the coefficients of xx and yy, and cc is the number on the right. Here they are all positive. Try y=0,1,2,…y = 0, 1, 2, \dots up to cb\frac{c}{b}.
  • Why it works: once yy is fixed, ax=c−byax = c - by, so x=c−byax = \frac{c - by}{a}. Keep the yy for which c−byc - by divides exactly by aa.
  • Use it for a first look, when cb\frac{c}{b} is small: up to about 10 values to try.
  • Tiny use: 3x+5y=383x + 5y = 38: y=4y = 4 leaves 38−20=1838 - 20 = 18, and 18÷3=618 \div 3 = 6, so (6,4)(6, 4) is a solution.
  • The common slip: stopping at the first solution you find. The question nearly always asks how many.

Example 1Basic

Find all the solutions of 2x+7y=402x + 7y = 40 in whole numbers. How many of them are in positive integers?

See the solution

Step 1: 7×6=427 \times 6 = 42 is more than 40, so yy runs from 0 to 5

yy is at most cb\frac{c}{b}

Step 2: 2x=40−7y2x = 40 - 7y must be even. 40 is even, so 7y7y must be even, and yy must be even

even − even = even

Step 3: y=0y = 0: x=402=20x = \frac{40}{2} = 20. y=2y = 2: x=40−142=13x = \frac{40 - 14}{2} = 13. y=4y = 4: x=40−282=6x = \frac{40 - 28}{2} = 6

x=c−byax = \frac{c - by}{a}

Step 4: Whole numbers: (20,0)(20, 0), (13,2)(13, 2), (6,4)(6, 4): 3 solutions

0 is allowed

Step 5: Positive integers: (20,0)(20, 0) has y=0y = 0, so it is out: 2 solutions

0 is not positive

Check: 2×13+7×2=26+14=402 \times 13 + 7 \times 2 = 26 + 14 = 40

put one pair back

Answer: 3 in whole numbers; 2 in positive integers

When one coefficient is even and the other odd, look at odd and even first. It cuts the tries in half, as step 2 did.

Example 2Exam level

A school hall has benches that seat 4 and benches that seat 6, but only 6 benches of the six-seat kind. 50 students sit, every seat on the benches used is filled, and at least one bench of each kind is used. What is the fewest benches that can be used?

See the solution

Step 1: Let xx benches seat 4 and yy benches seat 6: 4x+6y=504x + 6y = 50

write the equation

Step 2: Every term is even, so halve it: 2x+3y=252x + 3y = 25

divide every term by 2

Step 3: 2x=25−3y2x = 25 - 3y must be even, so 3y3y is odd and yy is odd

odd − odd = even

Step 4: Only 6 six-seat benches exist, so yy is 1, 3 or 5

the limit on yy

Step 5: y=1,3,5y = 1, 3, 5 give x=11,8,5x = 11, 8, 5, so x+y=12,11,10x + y = 12, 11, 10

x=25−3y2x = \frac{25 - 3y}{2}

Check: 4×5+6×5=20+30=504 \times 5 + 6 \times 5 = 20 + 30 = 50; y=7y = 7 would give 9 benches, but needs 7 six-seat benches

put it back

Answer: 10 benches: 5 of each kind

Try it

Pencils cost ₹6 and pens cost ₹11. Sahil spends exactly ₹100 on them (he may buy none of one kind). In how many ways can he do it?

The rest of the chapter turns this trying into a method.

Section 2 tells you when there is no solution at all. Section 3 finds all of them from one.

Check yourself · 5 questions

Question 1 of 5Easy

Which of these pairs (x,y)(x, y) is a solution of 5x+4y=405x + 4y = 40 in positive integers?

Loading the rest of the chapter…

Focused

Read the whole chapter

11 more sections: 21 worked examples, 11 graphs and figures, the question types IPMAT asks, 45 practice questions with full solutions.

Unlock with Focused Aspirant