Chapter 20 of 20 · 5 min · 13 प्रश्न

Chapter video5:01
Take quiz →

Largest and smallest: optimising with whole numbers

Some questions ask "what is the greatest value?" or "what is the least value?" There are many possible cases, and you have about ninety seconds. You cannot try them all, and you do not need to. The greatest and the least answers sit in the extreme cases: the numbers as equal as the question allows, or as far apart as it allows. Find those cases, test them, and stop.

Fixed sum: equal numbers give the biggest product

Take two positive whole numbers that add up to 20. Look at their products.

  • 19 × 1 = 19
  • 15 × 5 = 75
  • 12 × 8 = 96
  • 10 × 10 = 100

As the numbers come closer, the product grows. So for positive numbers with a fixed sum, the product is greatest when the numbers are as equal as possible, and least when they are as far apart as possible.

This is why a square garden holds the most space. With 40 metres of fence, length plus breadth is 20 metres. A 10 by 10 square gives 100 square metres. A 19 by 1 strip gives only 19.

If the sum cannot be split equally, go as close as you can. Three positive whole numbers that add up to 10 give the greatest product as 3 × 3 × 4 = 36.

Fixed product: equal numbers give the smallest sum

Now fix the product of two positive whole numbers at 36 and look at the sum.

  • 36 + 1 = 37
  • 18 + 2 = 20
  • 9 + 4 = 13
  • 6 + 6 = 12

The rule flips. For positive numbers with a fixed product, the sum is least when the numbers are as equal as possible, and greatest when they are as far apart as possible.

Read the fence words

A few small words in the question decide how far the numbers may go. Underline them before you calculate.

  • Distinct means no two numbers are equal. With sum 20, the pair 10 and 10 is out. The closest pair allowed is 11 and 9, so the greatest product is 99, not 100.
  • Positive means no zero and no negatives. The smallest whole number allowed is 1. The least product for sum 20 is 19 × 1 = 19. If zero were allowed, it would be 0.
  • Non-negative allows zero. Non-zero shuts zero out but may still allow negatives.
  • At least 3 allows 3 itself. More than 3 starts at 4. Read at most and less than with the same care.

Worked example: UPSC 2023

If p, q, r and s are distinct single digit positive numbers, then what is the greatest value of (p + q)(r + s)?

Step 1. We want the greatest value, so take the four biggest digits: 9, 8, 7 and 6. Their total is 30.

Step 2. The expression is a product of two brackets, and the two brackets together add up to 30. Sum fixed, so make the brackets equal: 15 and 15. That is (9 + 6)(8 + 7) = 15 × 15 = 225.

The trap is to put the two biggest digits together: (9 + 8)(7 + 6) = 17 × 13 = 221. That option was on the paper too.

Worked example: adapted from UPSC 2026

x, y and z take distinct values from 2, 3, 4 and 5. M is the largest and N the smallest value of (x × y) + z. Find M − N.

Multiplying matters more than adding. For the largest value, multiply the two biggest numbers and add the next: 5 × 4 + 3 = 23. For the smallest, multiply the two smallest and add the next smallest: 2 × 3 + 4 = 10. So M − N = 13.

Test the edges in other questions

A difference. UPSC 2025 gave x from 4 to 8 and y from 2 to 7. The greatest x + y is 8 + 7 = 15. The least x − y needs the smallest x and the biggest y: 4 − 7 = −3. The question asked for the ratio of the two: 15 ÷ (−3) = −5. That was not among the options, so the answer was "None of the above".

The smallest number that fits. UPSC 2020 asked for the least four-digit number that leaves remainder 2 when divided by 3, 4, 5 and 6. The LCM is 60. Four-digit numbers begin at 1000. The first multiple of 60 after 1000 is 60 × 17 = 1020. Add the remainder: 1022.

Largest number with a digit condition. For the largest 3-digit number with three different digits, fill from the left with the biggest digits allowed: 987, not 999.

Summary

The question saysFor the greatestFor the least
Sum fixed, positive numbers, find the productnumbers as equal as possiblenumbers as far apart as possible
Product fixed, positive numbers, find the sumnumbers as far apart as possiblenumbers as equal as possible
A sum such as x + ybiggest x, biggest ysmallest x, smallest y
A difference such as x − ybiggest x, smallest ysmallest x, biggest y
xy + z with distinct positive valuesmultiply the two biggestmultiply the two smallest
A number with a remainder conditionlast multiple of the LCM below the limit, plus the remainderfirst multiple of the LCM past the limit, plus the remainder

Where students slip

  • Missing the word distinct, and using the same number twice.
  • Treating zero as positive. Positive whole numbers start at 1.
  • Putting the biggest numbers together in one bracket when the brackets should be balanced.
  • Taking the smallest of both numbers for the least difference. Subtract the biggest instead.
  • Listing every case. Two or three extreme cases are enough.
  • Stopping at a value that looks small without testing the edge itself. If zero is allowed, check whether zero can be reached.

How to practise

Pick a sum, say 24, and write the greatest and least product of two positive whole numbers. Do it again with the word distinct added. Then pick a product, say 60, and write the least and greatest sum. Take any four digits and find the greatest and least value of (a + b)(c + d) and of ab + c. In every past-paper question that says greatest, least, maximum or minimum, underline the fence words first, and decide which edge you will test before you calculate.

अपनी पढ़ाई सहेजें और रात 9 बजे की अखिल भारतीय टेस्ट दें।

साइन अप करें