NCERT Solutions for Class 9 Maths Ganita Manjari Chapter 11 The World of Algorithms

NCERT Solutions for Class 9 Maths Ganita Manjari Chapter 11 The World of Algorithms is an important chapter in Ganita Manjari Part 2 for the academic session 2026–27. This chapter introduces students to the concept of algorithms through familiar mathematical operations and explains how step-by-step instructions can be used to solve problems accurately and efficiently.

The NCERT Solutions for Class 9 Maths Chapter 11 provide detailed, step-by-step explanations for Exercise Sets 11.1, 11.2 and 11.3, along with the End-of-Chapter Exercises. These solutions help students strengthen their mathematical reasoning, understand algorithmic thinking and develop efficient problem-solving skills.

NCERT Solutions for Class 9 Maths Ganita Manjari Chapter 11 The World of Algorithms

NCERT Class 9 Maths Ganita Manjari Chapter 11 Exercise Set 11.1

1. 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?

Answer:

The printed steps work for some pairs of numbers, but they do not cover every possible column total.

For example:

2468 + 1357

Units: 8 + 7 = 15. Write 5 and carry 1.
Tens: 6 + 5 + 1 = 12. Write 2 and carry 1.
Hundreds: 4 + 3 + 1 = 8. Write 8 and set the carry to 0.
Thousands: 2 + 1 = 3. Write 3.

Therefore,

2468 + 1357 = 3825.

However, consider:

4586 + 3414

In the units column,

6 + 4 = 10.

The printed algorithm gives one instruction when the total is less than 10 and another when it is more than 10. It does not tell us what to do when the total is exactly 10.

Therefore, if we follow only the written instructions, we cannot complete the addition.

Correction: Replace “more than 10” with “10 or more.” When the total is 10, write 0 in that column and carry 1 to the next column.

With this correction,

4586 + 3414 = 8000.

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

Answer:

If we add a 5-digit number to a 3-digit number, the numbers must be aligned according to place value.

For example:

45,672 + 389

Write them as:

45,672
389

The units, tens, and hundreds digits line up. Since 389 has no thousands or ten-thousands digits, those missing places can be treated as 0.

Units: 2 + 9 = 11. Write 1 and carry 1.
Tens: 7 + 8 + 1 = 16. Write 6 and carry 1.
Hundreds: 6 + 3 + 1 = 10. Write 0 and carry 1.
Thousands: 5 + 0 + 1 = 6.
Ten-thousands: 4 + 0 = 4.

Therefore,

45,672 + 389 = 46,061.

If our written steps only explain how to add numbers with the same number of digits, then they do not completely handle this situation.

Correction: The algorithm should say to align the numbers by their units place and treat any missing digits on the left as 0. Then continue adding until all place-value columns have been processed.

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

Answer:

It is important to align the columns from right to left because each digit must be placed under the digit with the same place value.

The rightmost digit is always the units digit. So, when numbers are aligned from the right, units come under units, tens under tens, hundreds under hundreds, and so on.

For example, when adding 45,672 and 389, we write:

45,672
389

This ensures that 2 and 9 are both in the units column, 7 and 8 are in the tens column, and 6 and 3 are in the hundreds column.

If we align the numbers from the left instead, digits with different place values may be added together, which gives an incorrect result.

Therefore, aligning from right to left preserves place value and makes the addition algorithm work correctly.

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

Answer:

In Step 3, we are adding two digits and possibly a carry from the previous column.

The largest possible digit is 9, and the carry can be at most 1. So the greatest possible total in any column is:

9 + 9 + 1 = 19

Since 19 contains only 1 group of ten, the carry to the next column can only be 1.

Therefore, when adding two numbers, the value of the carry can never be more than 1.

5. 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.

Answer:

If we do not include the fifth step, the algorithm will fail whenever there is a carry left after adding the leftmost column.

For example, consider:

2468 + 1357

The addition gives:

2468
+1357
─────
3825

There is no carry left after adding the thousands column, so the algorithm still gives the correct answer even without the fifth step.

Now consider:

6789 + 5678

Units: 9 + 8 = 17. Write 7 and carry 1.
Tens: 8 + 7 + 1 = 16. Write 6 and carry 1.
Hundreds: 7 + 6 + 1 = 14. Write 4 and carry 1.
Thousands: 6 + 5 + 1 = 12. Write 2 and carry 1.

If the fifth step is missing, there is no instruction to write the final carry 1. The algorithm would give 2467 instead of the correct answer, 12,467.

Therefore, the fifth step is necessary because it tells us to write any carry that remains after the leftmost column has been added.

NCERT Class 9 Maths Ganita Manjari Chapter 11 Exercise Set 11.2

1. 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.

Answer:

(i) Write an algorithm to find elements in List 1 that are not present in List 2.

Solution:

  1. Start with an empty list called only-in-1.
  2. Start from the first element of List 1 and the first element of List 2.
  3. Compare the two elements.
  4. If both elements are equal, move to the next element in both lists.
  5. If the element in List 1 is smaller, add it to only-in-1 and move to the next element in List 1.
  6. If the element in List 2 is smaller, move to the next element in List 2.
  7. Repeat these steps until one of the lists ends.
  8. If List 2 ends first, add all the remaining elements of List 1 to only-in-1.
  9. Report only-in-1.

(ii) Write an algorithm to find elements in List 2 that are not present in List 1.

Solution:

  1. Start with an empty list called only-in-2.
  2. Start from the first element of List 1 and the first element of List 2.
  3. Compare the two elements.
  4. If both elements are equal, move to the next element in both lists.
  5. If the element in List 1 is smaller, move to the next element in List 1.
  6. If the element in List 2 is smaller, add it to only-in-2 and move to the next element in List 2.
  7. Repeat these steps until one of the lists ends.
  8. If List 1 ends first, add all the remaining elements of List 2 to only-in-2.
  9. Report only-in-2.

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

Answer:

To find the least common multiple (LCM) of two positive numbers:

  1. Let the two numbers be a and b.
  2. Start with the larger of the two numbers.
  3. Check whether this number is divisible by both a and b.
  4. If it is divisible by both, it is the LCM.
  5. If not, move to the next multiple of the larger number.
  6. Keep checking successive multiples until one is divisible by both numbers.
  7. Report that number as the LCM.

Example: Find the LCM of 4 and 6.

Multiples of 6 are: 6, 12, 18, 24, …

12 is the first multiple of 6 that is also divisible by 4.

Therefore, LCM(4, 6) = 12.

3. 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?

Answer:

(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?

Answer:

Divisors of n occur in pairs. If d is a divisor of n, then n ÷ d is also a divisor of n, and their product is n.

Therefore, we do not need to check every number from 1 to n. We only need to examine the integers from 1 up to √n. After that, the divisors are simply the partners of the divisors already found.

For example, for n = 18:

√18 ≈ 4.24

So, we need to check only 1, 2, 3 and 4.

We find that 1, 2 and 3 divide 18, giving the pairs:

(1, 18), (2, 9), (3, 6)

Therefore, to find all the divisors of n, we need to examine only the integers up to √n, that is, ⌊√n⌋ numbers.

(ii) If we list out the divisors in pairs, will our gcd algorithm still work in the manner we have described?

Answer:

The divisors themselves remain the same when they are written in pairs, so the greatest common divisor does not change.

However, if the gcd algorithm we described requires the divisors to be listed in increasing order, then the divisor pairs must first be arranged appropriately before applying that algorithm.

For example, the divisors of 18 written as pairs are:

(1, 18), (2, 9), (3, 6)

These contain exactly the same divisors:

1, 2, 3, 6, 9, 18

Thus, listing divisors in pairs does not affect which divisors are common to the two numbers or what their GCD is. The algorithm will still work as long as the divisors are compared in the order required by the algorithm.

NCERT Class 9 Maths Ganita Manjari Chapter 11 Exercise Set 11.3

1. 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?

Answer:

If we examine the numbers from n down to 1, we will still find all the divisors of n, but they will be listed in decreasing order.

For example, the divisors of 18 would be:

18, 9, 6, 3, 2, 1

Thus, the algorithm for finding the divisors remains the same except that we check the numbers in reverse order.

If these divisor lists are then used to find the GCD of two numbers, the first common divisor we encounter will be the GCD, because the divisors are arranged from greatest to smallest.

So, the main change is:

  • divisors are obtained in decreasing order; and
  • for finding the GCD, we take the first common divisor instead of the last common divisor.

2. 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?

Answer:

If we start checking numbers from min(m, n) and work backwards to 1, the first number that divides both m and n will be their GCD.

This is because min(m, n) is the largest possible value that a common divisor can have. Therefore, as we move downwards, the first common divisor we find must be the greatest common divisor.

So, the algorithm can stop as soon as the first common divisor is found.

For example, let:

m = 18 and n = 24

We start from min(18, 24) = 18 and check:

18, 17, 16, …, 6

The first number that divides both 18 and 24 is 6.

Therefore:

gcd(18, 24) = 6

This method can be more efficient because once the first common divisor is found, there is no need to check any smaller numbers.

NCERT Class 9 Maths Ganita Manjari Chapter 11 End-of-Chapter Exercises

1. Compute the following using the improved version of Euclid’s algorithm.

(i) gcd(375, 825)
(ii) gcd(51000, 81000)
(iii) gcd(1789287, 237656)
(iv) gcd(2587392, 157656)

Answer:

1. Compute the following using the improved version of Euclid’s algorithm.

(i) gcd(375, 825)

825 = 375 × 2 + 75
375 = 75 × 5 + 0

Therefore, gcd(375, 825) = 75.

(ii) gcd(51000, 81000)

81000 = 51000 × 1 + 30000
51000 = 30000 × 1 + 21000
30000 = 21000 × 1 + 9000
21000 = 9000 × 2 + 3000
9000 = 3000 × 3 + 0

Therefore, gcd(51000, 81000) = 3000.

(iii) gcd(1789287, 237656)

1789287 = 237656 × 7 + 125695
237656 = 125695 × 1 + 111961
125695 = 111961 × 1 + 13734
111961 = 13734 × 8 + 2089
13734 = 2089 × 6 + 1200
2089 = 1200 × 1 + 889
1200 = 889 × 1 + 311
889 = 311 × 2 + 267
311 = 267 × 1 + 44
267 = 44 × 6 + 3
44 = 3 × 14 + 2
3 = 2 × 1 + 1
2 = 1 × 2 + 0

Therefore, gcd(1789287, 237656) = 1.

(iv) gcd(2587392, 157656)

2587392 = 157656 × 16 + 64896
157656 = 64896 × 2 + 27864
64896 = 27864 × 2 + 9168
27864 = 9168 × 3 + 360
9168 = 360 × 25 + 168
360 = 168 × 2 + 24
168 = 24 × 7 + 0

Therefore, gcd(2587392, 157656) = 24.

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

Answer:

Solution:

Assume m ≥ n, and let

m = qn + r,

where r = m mod n.

We need to show that:

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

Forward direction:

Suppose d divides both m and n.

Then there exist integers a and b such that:

m = ad
n = bd

Since

r = m − qn,

we get:

r = ad − qbd
r = d(a − qb)

Therefore, d divides r = m mod n.

Hence, if d divides m and n, then d divides both n and m mod n.

Reverse direction:

Now suppose d divides both n and r, where r = m mod n.

Then:

n = bd
r = cd

for some integers b and c.

Since

m = qn + r,

we get:

m = qbd + cd
m = d(qb + c)

Therefore, d divides m.

Hence, if d divides both n and m mod n, then d divides both m and n.

Therefore,

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

3. 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)?)

Answer:

A prime number has exactly two distinct positive divisors: 1 and the number itself.

Algorithm prime(n):

  1. If n < 2, report “not prime” and stop.
  2. Use divisors(n) to find the list of positive divisors of n.
  3. Count the number of divisors in the list.
  4. If there are exactly two divisors, report “prime”.
  5. Otherwise, report “not prime”.

Examples:

divisors(7) = [1, 7]

There are exactly two divisors, so 7 is prime.

divisors(9) = [1, 3, 9]

There are three divisors, so 9 is not prime.

Also, 1 is not prime because it has only one positive divisor.

4. Write an algorithm prime divisors(n) to compute the list of divisors of n that are prime numbers.

Answer:

Algorithm primedivisors(n):

  1. Use divisors(n) to find all the positive divisors of n.
  2. Start with an empty list called prime-divisors.
  3. Take each divisor d in the list, one at a time.
  4. Use prime(d) to check whether d is a prime number.
  5. If d is prime, add d to prime-divisors.
  6. After checking all the divisors, report prime-divisors.

Example: Let n = 180.

divisors(180) = [1, 2, 3, 4, 5, 6, 9, 10, 12, 15, 18, 20, 30, 36, 45, 60, 90, 180]

The prime divisors in this list are 2, 3 and 5.

Therefore,

primedivisors(180) = [2, 3, 5]

Each prime divisor is listed only once. This list gives the prime numbers that divide n; it does not indicate how many times each prime occurs in the prime factorisation.

For n = 1,

primedivisors(1) = [ ]

because 1 has no prime divisors.

5. 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.

Answer:

Algorithm for prime factorisation:

  1. Let the given positive integer be n. Set remaining = n.
  2. Use primedivisors(n) to find the list of prime divisors of n.
  3. Start with an empty list called factorisation.
  4. For each prime p in the list of prime divisors:
    • Set count = 0.
    • While p divides remaining, divide remaining by p and increase count by 1.
    • Add the pair (p, count) to factorisation.
  5. After all the prime divisors have been processed, report factorisation.

The first number in each pair is a prime factor, and the second number tells us how many times that prime occurs.

For n = 1, the factorisation list is empty because 1 has no prime factors.

Example: n = 180

Prime divisors of 180 = [2, 3, 5]

For p = 2:

180 ÷ 2 = 90
90 ÷ 2 = 45

So, record (2, 2).

For p = 3:

45 ÷ 3 = 15
15 ÷ 3 = 5

So, record (3, 2).

For p = 5:

5 ÷ 5 = 1

So, record (5, 1).

Therefore,

factorisation = [(2, 2), (3, 2), (5, 1)]

and

180 = 2² × 3² × 5.

(i) The prime factorisation of 180 is 2² × 3² × 5¹. How would you represent this?

Represent it as:

[(2, 2), (3, 2), (5, 1)]

Here, each pair gives the prime factor and the number of times it occurs.

(ii) How would you compare the prime factorisations of two numbers?

  1. Find the prime factorisation of both numbers.
  2. Identify the prime factors common to both.
  3. For each common prime, take the smaller of its two powers.
  4. Multiply these common prime powers.
  5. The product is the GCD.

For example:

180 = 2² × 3² × 5
252 = 2² × 3² × 7

The common prime factors are 2 and 3.

Therefore,

gcd(180, 252) = 2² × 3² = 36.

If there is no common prime factor, the GCD is 1.

Related Links: