Mathematics Class 9 Chapter 11 Solution available

Chapter 11: The World of Algorithms

Complete step-by-step solutions for Class 9 Mathematics Chapter 11, The World of Algorithms, covering Exercise Sets 11.1, 11.2, 11.3 and the end-of-chapter exercises. All 15 questions are solved clearly.

Exercise 11.1

Exercise Set 11.1

5 Questions
Q1

Add two 4-digit numbers using the steps we have written down. Make sure you follow the steps precisely; do not perform any action that is not explicitly mentioned. Are you able to obtain the correct result?

Solution

Try 1,234 + 8,766. In the units column, 4 + 6 = 10.

The written algorithm says what to do if the sum is less than 10 or more than 10, but gives no instruction for a sum equal to 10.

So, following the steps precisely, this case cannot be completed. The correct sum is 10,000; to obtain it, the rule must say to write the units digit and carry 1 when the sum is 10 or more.

Answer: No—not for every pair as written. The algorithm does not specify what to do when a column sum is exactly 10.
Q2

What happens if you add a 5-digit number to a 3-digit number. Do our steps handle this situation correctly?

Solution

The numbers must be aligned on the right. For example, 12,345 + 678 has missing digits in the thousands and ten-thousands places of 678.

The stated steps do not say how to handle a column with only one digit. If we treat each missing digit as 0, the calculation is 12,345 + 00,678 = 13,023.

Thus the steps need to be extended: treat missing digits as 0 and continue until all places in both numbers have been processed. The carry rule must also cover a column sum of exactly 10.

Answer: Not completely as written; the steps need to specify zero-padding and what to do when a column sum is 10.
Q3

Why is it important to align the columns from right to left?

Solution

In a place-value system, the rightmost digits are units, the next digits are tens, then hundreds, and so on.

Aligning the numbers on the right puts digits with the same place value in the same column.

Without this alignment, digits with different place values could be added together.

Answer: Right alignment ensures that digits with the same place value are added together.
Q4

In Step 3, why cannot the value of carry be more than 1?

Solution

In Step 3, the largest possible column total is 9 + 9 + 1 = 19.

A total of at most 19 contains at most one group of ten to carry to the next column.

Answer: The carry cannot be more than 1 because the greatest possible column total is 19.
Q5

What happens if we do not include the fifth step in the algorithm above? Give examples where the algorithm will work correctly and where it will fail to work.

Solution

Step 5 writes a carry from the leftmost column as a new leading digit.

If the final carry is 0, leaving out Step 5 makes no difference: 473 + 526 = 999.

If the final carry is 1, leaving out Step 5 gives an incomplete answer. For 473 + 695: units give 8; tens give 6 with carry 1; hundreds give 1 with carry 1.

Without Step 5, the written result is 168, but writing the final carry gives the correct sum, 1,168.

Answer: Without Step 5, addition works when there is no final carry but fails when there is one; for example, 473 + 695 would appear as 168 instead of 1,168.
Exercise 11.2

Exercise Set 11.2

3 Questions
Q1

Suppose List 1 and List 2 are two lists of numbers in increasing order. (i) Write an algorithm to find elements in List 1 that are not present in List 2. (ii) Write an algorithm to find elements in List 2 that are not present in List 1.

Solution

(i) Start with an empty output list. For each element x in List 1, check List 2 from left to right. If an element equal to x is found, do not add x. If an element greater than x is reached, stop searching; x is not in List 2, so add it. If the search reaches the end without finding x, add x.

(ii) Use the same procedure with List 2 as the list being checked and List 1 as the list searched.

For the example lists in the solution, the results are [125, 375] for (i) and [11, 33, 55, 165, 275, 825] for (ii).

Answer: (i) [125, 375]; (ii) [11, 33, 55, 165, 275, 825] for the example lists.
Q2

Describe an algorithm to compute the least common multiple (lcm) of two numbers.

Solution

For positive integers m and n, compute d = gcd(m, n).

Use the relation lcm(m, n) = (m × n) ÷ d.

For example, gcd(12, 18) = 6, so lcm(12, 18) = (12 × 18) ÷ 6 = 36.

Answer: lcm(m, n) = (m × n) ÷ gcd(m, n), for positive integers m and n.
Q3

(*) Divisors occur in pairs. For instance, the divisors of 18 are (1, 18), (2, 9) and (3, 6). (i) If we write out divisors in pairs, how many numbers do we have to examine between 1 and n to find all the divisors of n? (ii) If we list out the divisors in pairs, will our gcd algorithm still work in the manner we have described?

Solution

(i) If j divides n, then n ÷ j is its paired divisor. At least one member of each pair is no greater than √n, so check the integers from 1 through ⌊√n⌋: ⌊√n⌋ numbers.

For example, for n = 36, check 1 through 6; the divisor pairs are (1, 36), (2, 18), (3, 12), (4, 9), and (6, 6).

(ii) Listing divisor pairs does not necessarily put all divisors in increasing order. Therefore, the original algorithm’s instruction to take the rightmost common divisor may not give the greatest one.

To make the gcd procedure work, sort the common divisors or select the greatest common divisor explicitly.

Answer: (i) Examine ⌊√n⌋ numbers. (ii) The gcd procedure needs to select the greatest common divisor rather than rely on the rightmost entry.
Exercise 11.3

Exercise Set 11.3

2 Questions
Q1

How would our original algorithm change if we computed the divisors of n by examining the numbers from 1 to n in reverse order, from n down to 1?

Solution

Examining numbers from n down to 1 lists the divisors in decreasing order.

The common divisors will also be encountered in decreasing order. Therefore, the rightmost common divisor is the smallest one, not the greatest.

To find the gcd, report the first (leftmost) common divisor encountered.

Answer: Scan from n down to 1 and report the first common divisor as the gcd.
Q2

What about the last algorithm described above? What happens when we look at common divisors starting from min(m, n) and work backwards to 1?

Solution

Start with k = min(m, n) and check k, k − 1, …, 1 for divisibility by both numbers.

The first common divisor found is the greatest one, since the search starts at the largest possible common divisor.

For example, for gcd(6, 12), start at 6; 6 divides both numbers, so stop.

Answer: Search downward from min(m, n); the first common divisor found is gcd(m, n).
Exercises

End-of-Chapter Exercises

5 Questions
Q1

Compute the following using the improved version of Euclid's algorithm (Āryabhaṭa's division algorithm). (i) gcd(375, 825) (ii) gcd(51000, 81000) (iii) gcd(1789287, 237656) (iv) gcd(2587392, 157656)

Solution

(i) 825 mod 375 = 75; 375 mod 75 = 0. Hence gcd(375, 825) = 75.

(ii) 81,000 mod 51,000 = 30,000; 51,000 mod 30,000 = 21,000; 30,000 mod 21,000 = 9,000; 21,000 mod 9,000 = 3,000; 9,000 mod 3,000 = 0. Hence gcd(51,000, 81,000) = 3,000.

(iii) 1,789,287 mod 237,656 = 125,695; 237,656 mod 125,695 = 111,961; 125,695 mod 111,961 = 13,734; 111,961 mod 13,734 = 2,089; 13,734 mod 2,089 = 1,200; 2,089 mod 1,200 = 889; 1,200 mod 889 = 311; 889 mod 311 = 267; 311 mod 267 = 44; 267 mod 44 = 3; 44 mod 3 = 2; 3 mod 2 = 1; 2 mod 1 = 0. Hence the gcd is 1.

(iv) 2,587,392 mod 157,656 = 64,896; 157,656 mod 64,896 = 27,864; 64,896 mod 27,864 = 9,168; 27,864 mod 9,168 = 360; 9,168 mod 360 = 168; 360 mod 168 = 24; 168 mod 24 = 0. Hence the gcd is 24.

Answer: (i) 75; (ii) 3,000; (iii) 1; (iv) 24
Q2

Assume that m ≥ n. Verify that d divides m and n if and only if d divides both n and m mod n.

Solution

Let r = m mod n. For n > 0, write m = qn + r, where q is an integer and 0 ≤ r < n.

If d divides m and n, then d divides qn and m − qn = r. Thus d divides both n and r.

Conversely, if d divides n and r, then d divides qn and r, so d divides qn + r = m. Thus d divides both m and n.

Therefore, d divides m and n if and only if d divides both n and m mod n.

Answer: d ∣ m and d ∣ n ⇔ d ∣ n and d ∣ (m mod n), for n > 0.
Q3

Write an algorithm prime(n) to check if n is prime. (Hint: A prime number p has exactly two distinct factors, 1 and p. Can you make use of divisors(n) to write out prime(n)?)

Solution

If n < 2, report that n is not prime.

Compute divisors(n).

If divisors(n) contains exactly two distinct numbers, report that n is prime; otherwise, report that it is not prime.

Answer: prime(n): return true exactly when n ≥ 2 and divisors(n) has exactly two distinct elements.
Q4

(*) Write an algorithm primedivisors(n) to compute the list of divisors of n that are prime numbers. (Hint: Compute divisors(n) and then filter out the primes in this list.)

Solution

Compute divisors(n) and start an empty list called prime-divisors.

For each d in divisors(n), use prime(d) to test whether d is prime.

Add d to prime-divisors only when prime(d) is true, then report the list.

For example, divisors(60) = [1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60], so primedivisors(60) = [2, 3, 5].

Answer: primedivisors(n) is the list obtained by keeping only the prime numbers in divisors(n).
Q5

(*) We can also find the gcd of two numbers by computing prime factorisation of both the numbers. Try to write an algorithm to compute the prime factorisation of a number. (i) The prime factorisation of 180 is 2² × 3² × 5¹. How would you represent this? (ii) How would you compare the prime factorisations of two numbers?

Solution

To factor a positive integer n, try divisors d starting at 2. While d² ≤ the current n, repeatedly divide n by d whenever d divides it, recording each occurrence; then try the next d. If the remaining n is greater than 1, record it as a prime factor.

For 180: 180 = 2 × 2 × 3 × 3 × 5 = 2² × 3² × 5¹.

(i) Represent the factorisation as [(2, 2), (3, 2), (5, 1)], with each pair giving a prime and its exponent.

(ii) To compare two factorizations for their gcd, use each prime common to both with the smaller exponent, then multiply those powers.

Answer: (i) [(2, 2), (3, 2), (5, 1)]. (ii) For the gcd, use the smaller exponent of each prime common to both factorizations.

Showing all 15 solved questions across 4 exercises (2026-27 NCERT edition).

Read or download chapter PDFs

Page 1

Chapter solution

Tap below or scroll to open the inline chapter reader. Works smoothly on mobile and desktop.

Frequently asked questions

How many exercises and questions are covered in Chapter 11?

The chapter has four sections with 15 questions: Exercise 11.1 has 5, Exercise 11.2 has 3, Exercise 11.3 has 2, and the end-of-chapter exercises have 5.

Are these solutions suitable for the 2026–27 syllabus?

The solutions are organised according to the topics and exercises specified for the 2026–27 edition.

Can the solutions be used for revision?

Yes. The algorithms, intermediate steps and final results are included for systematic revision.