Close

If you have been preparing for a standardised test for a while now, you must have come across a Data Sufficiency question which is similar to the following:

Question: A boy goes to a supermarket and buys some pencils and erasers. The cost of each pencil is USD0.3 and cost of each eraser is USD0.5. If he bought at least one pencil and at least one eraser and the number of pencils he bought was not four, how many pencils did he buy?

Statement I: He paid a total of USD4.20

Statement II: He bought three erasers

**Solution:** I am sure, by using the first statement, most of you will be able to come up with the following equation: and then, by multiplying both sides by 10, you will get

( – the number of pencils, – the number of erasers)

What next? This is the equation of a line and has infinite solutions i.e. for every value of , exists a value of .

e.g. When , ; when , ; when , and so on… Then, should I say that from this statement alone, he can buy the pencils and erasers in an infinite number of ways e.g. 0 pencils and erasers or 0.1 pencils and erasers or 1 pencil and erasers etc? Does it mean we need statement 2 as well to get the number of pencils? Actually, no! We don’t need the second statement to get our answer. Let’s see why.

There are certain constraints to the acceptable solutions. Can I buy erasers? I can buy 8 erasers or 9 erasers but how can I buy 8.4 erasers? So what we are looking for is integral values of and . Even though it is not mentioned, our common sense says it has to be so. This is a constraint on possible solutions and will narrow down the acceptable values.

Consider the equation again:

One set of integral solutions to this equation is , (I will discuss how I got to this later.)

When you put and above, you get . Here, and and they add up to give 42. What if I want to get 42 in another way? I can decrease by some amount and will have to increase by the same amount to get the same sum of 42 e.g. we decrease by 1 and increase by 1 to get . So was 42, but now we want to be 41. What should be? should be but this is not an integral value! We are looking for integral solutions only. Then let’s try to decrease instead of to ensure that we get integral values of . If instead of its previous value of 14, we get . (We decreased by 3.)

Now, I must increase by 3 to get the same sum of 42. was 0 and needs to be 3 now. What will be now? . Unfortunately, the problem is still the same. We need integral values of and , both. I can increase in blocks of 5 only i.e. if , ; , ; , etc.

Now the problem is that can be decreased only in blocks of 3 and can be increased only in blocks of 5. But the decrease in has to be offset by the increase in ! Therefore, we should decrease/increase them in blocks of 15 (lowest common multiple of 3 and 5). So when I try to decrease by 15, decreases by 5 (the second term, , has 5 as the co-efficient) and when I try to increase by 15, increases by 3 (the co-efficient of the first term). The table given below will make it clearer.

and so on…

Note that in second, third and fourth rows, we have been decreasing and increasing . We could do the opposite as done in the last two rows of the table above. We could increase by 5 and decrease by 3 to get more solutions. Once we have one solution, we can figure out an infinite number of solutions. Then is our answer still infinite? Why the heck did we do all this work then? We should have just marked our answer as (C) and moved on.

Actually, there is another constraint. Can the number of pencils or erasers be negative? Also, since he buys at least one pencil and at least one eraser, and cannot be 0 (so we discard the first solution) Then, a solution is one where values of and are positive integers.

Go back to the table. After the third row of solutions, if you keep decreasing , will be negative every time. Look at the last row – if you keep decreasing , will remain negative. Therefore, there are only two solutions (, ) and (, ). Since our question stem mentions that is not equal to 4, we discard the second solution and retain just the first one.

This means that statement (1) above is sufficient to get the answer.

Now we come back to ‘How do you get the first solution’. Simple – by brute force. Here it is easy since 42 is a multiple of 3. Then we know that can be 14 to give 42 and can be 0.

An equation such as is trickier.

First, I check for . Reduce 49 by 5 to get 44 and then check – is 44 divisible by 3? – No.

Then check for . Reduce 44 by 5 again to get 39 – is 39 divisible by 3? – Yes!

This means can be 39 and can be 10 giving us and . This would be our first solution and would lead us to more, possibly. How many positive integral solutions will this equation have?

Let me leave you here with some other things to ponder upon:

– What if I replace the equation above by ?

– Should coefficients of and be co-prime?

– And, a trickier thing to think about – how many integral solutions would have?