UNIQUE STUDY POINT ← Class IX
Home›Class IX›Maths›Ch 11

NCERT Solutions Class 9 Maths Ch 11: The World of Algorithms

Class IX Maths 📘 NCERT Solutions Ch 11: The World of Algorithms NCERT book: Ganita Manjari
Updated 09 Nov 2026

NCERT Solutions · Chapter 11

The World of Algorithms

  • 22Questions solved
  • 4Sections
  • 12Practice MCQs

Prepared by Sumeet Sahu, Unique Study Point, Indore · Every example re-checked

These are the solutions for Class 9 Maths Chapter 11, The World of Algorithms, from the new NCERT textbook Ganita Manjari (Part 1, session 2026-27). All 22 questions are solved step by step: the addition algorithm, divisors, the GCD and LCM, Euclid’s algorithm, primes and prime factorisation.

★ Key takeaways
  1. An algorithm is a precise list of steps. It must say exactly what to do in every case (for example, when a column total is exactly 10).
  2. The addition algorithm works column by column from the right, with a carry of 0 or 1.
  3. To find all the divisors of n, it is enough to check the numbers up to √n, because divisors come in pairs.
  4. Euclid’s algorithm: gcd(m, n) = gcd(n, m mod n). Repeat until the remainder is 0; the last non-zero divisor is the GCD.
🎯 Jump to a question (22 questions)

The addition algorithm (Q1 to Q8)

The steps used in Questions 4 to 8 (in short)
  1. Write the two numbers one below the other, with the digits aligned from the right (units under units).
  2. Start with the rightmost column: add the two digits. If the total is less than 10, write it and set the carry to 0. If it is more than 10, write its units digit and set the carry to 1.
  3. Move one column to the left: add the two digits and the carry from the previous column, and treat the total in the same way.
  4. Repeat Step 3 for every column.
  5. If a carry is left after the leftmost column, write it at the left end of the answer.

Question 1: Why the addition algorithm works

Q1

See if you can complete the argument about grouping by units, tens, hundreds, … to justify why the addition algorithm works.

Answer

Regrouping 10 units as 1 ten, 10 tens as 1 hundred, and so on changes how we write the total but not its value.

  1. Place valuesEvery digit has a place value. We add units to units, tens to tens, hundreds to hundreds, and so on, because only things of the same kind can be added together.
  2. RegroupingIf a column total is 10 or more, we regroup: 10 units = 1 ten, 10 tens = 1 hundred, 10 hundreds = 1 thousand. We write the units digit of the column total and carry 1 to the next column on the left.
  3. Example: 473 + 695
    ColumnDigits addedCarry inTotalWriteCarry out
    Units3 + 50880
    Tens7 + 901661
    Hundreds4 + 611111
    Thousands(none)1110
    473 + 695 = 1168
  4. Why it is correctThe carry is just the “10 units = 1 ten” exchange written down. Exchanging 10 of one kind for 1 of the next kind never changes the total value, so the final answer is right.

Question 2: Adding decimal fractions

Q2

How would you modify the algorithm to add two decimal fractions?

Answer

Line up the decimal points, pad with zeros so both numbers have the same number of decimal places, and then add as before.

  1. The modified steps
    1. Write the numbers one below the other with their decimal points in the same column.
    2. Add zeros at the right end of the decimal part, if needed, so that both numbers have the same number of decimal places.
    3. Treat missing digits on the left as 0.
    4. Start from the rightmost digit and add each column, including the carry (carry 1 if the total is 10 or more, otherwise 0).
    5. Put the decimal point in the answer directly below the other decimal points (it is not a digit to be added).
    6. If a carry remains after the leftmost column, write it at the left.
  2. Example: 12.75 + 3.6Write 3.6 as 3.60 and add.
    ColumnDigits addedCarry inTotalWriteCarry out
    Hundredths5 + 00550
    Tenths7 + 601331
    Units2 + 31660
    Tens1 + 00110
    12.75 + 3.6 = 16.35

Question 3: Divisors of 15, 135 and 775

Q3

Try to execute the algorithm to compute the divisors of 15, 135, and 775. How does the amount of work increase as the numbers grow?

Answer

Divisors of 15: 1, 3, 5, 15. Of 135: 1, 3, 5, 9, 15, 27, 45, 135. Of 775: 1, 5, 25, 31, 155, 775. The number of checks equals n.

  1. The algorithmStart with an empty list. Check every whole number j from 1 to n. Add j to the list only when j divides n exactly.
  2. The results
    nDivisors foundNumber of checks
    151, 3, 5, 1515
    1351, 3, 5, 9, 15, 27, 45, 135135
    7751, 5, 25, 31, 155, 775775
  3. How the work growsThe algorithm makes n checks for the number n, so the work grows in proportion to n. For example, 135 needs 9 times as many checks as 15. A larger number need not have more divisors (135 has 8 divisors, 775 has only 6): the work increases because more numbers are checked, not because more divisors are found.

Question 4: Adding two 4-digit numbers by the steps

Q4

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

It works for most pairs (such as 2468 + 1357 = 3825), but it fails when a column total is exactly 10 (such as 4586 + 3414), because the steps do not say what to do then.

  1. A pair where the steps work: 2468 + 1357
    ColumnDigits addedCarry inTotalWriteCarry out
    Units8 + 701551
    Tens6 + 511221
    Hundreds4 + 31880
    Thousands2 + 10330
    2468 + 1357 = 3825
  2. A pair where they fail: 4586 + 3414In the units column, 6 + 4 = 10. One instruction covers totals less than 10 and the other covers totals more than 10. A total of exactly 10 is not covered, so following only the written steps we cannot go on.
  3. The fixChange “more than 10” to “10 or more”. For a total of 10, write 0 and carry 1. Then 4586 + 3414 = 8000.

Question 5: A 5-digit number plus a 3-digit number

Q5

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

Answer

Not as written. We must add the instruction “treat each missing digit on the left as 0”. Then 12345 + 321 = 12666.

  1. The problemAfter the units, tens and hundreds columns, the 3-digit number has no digits left, so the steps do not tell us what to add in the thousands and ten-thousands columns.
  2. The fixWrite 321 as 00321, that is, treat each missing digit on the left as 0.
    ColumnDigits addedCarry inTotalWriteCarry out
    Units5 + 10660
    Tens4 + 20660
    Hundreds3 + 30660
    Thousands2 + 00220
    Ten-thousands1 + 00110
    12345 + 321 = 12666

Question 6: Why align from right to left?

Q6

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

Answer

So that digits of the same place value are added together.

  1. Place valueThe rightmost digit of a whole number is its units digit. Aligning from the right puts units under units, tens under tens, hundreds under hundreds, and so on.
  2. ExampleIn 12345 + 321, the 1 of 321 is a units digit, so it goes below the 5 of 12345 (units); the 2 goes below the 4 (tens), and the 3 below the 3 (hundreds). If we aligned from the left instead, the 3 of 321 would sit below the 1 of 12345 (ten-thousands), and we would be adding digits of different place values and get a wrong answer.

Question 7: Why is the carry at most 1?

Q7

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

Answer

Because the largest possible column total is 9 + 9 + 1 = 19.

  1. Largest totalWe add only two digits (each at most 9) and a carry coming from the previous column (at most 1): 9 + 9 + 1 = 19.
  2. The tens digitEvery total from 10 to 19 has tens digit 1, so the carry is 0 or 1.
  3. The first columnIn the first column there is no carry in; the largest total is 9 + 9 = 18, so the first carry is also at most 1.

Question 8: What if the fifth step is left out?

Q8

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

Without Step 5 the answer is wrong whenever the leftmost column produces a carry.

  1. Step 5Step 5 writes the final carry at the left of the answer. Without it the answer is right only when there is no final carry.
  2. Where it works1234 + 4321 = 5555. There is no carry out of the leftmost column, so leaving out Step 5 changes nothing.
  3. Where it fails9999 + 9999 = 19998. The columns give 9998 and a final carry of 1. Without Step 5 we would report 9998 instead of 19998.

Lists, LCM and divisors (Q9 to Q14)

Question 9: Elements of one list that are not in the other

Q9

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

Check each element of one list against the other, and keep the ones that do not occur there.

  1. (i) Elements of List 1 not in List 2
    1. Start with an empty list called result.
    2. Take each number x in List 1, from left to right.
    3. Check whether x occurs in List 2.
    4. If x does not occur in List 2, add x at the end of result.
    5. After every number of List 1 has been checked, report result.
  2. (ii) Elements of List 2 not in List 1The same algorithm with the two lists exchanged: take each x in List 2, check whether it occurs in List 1, and add it to result if it does not.
  3. ExampleList 1 = [1, 2, 3, 6] and List 2 = [1, 3, 5, 9]. Answer to (i): [2, 6]. Answer to (ii): [5, 9]. The output is in increasing order because we go through the original list from left to right.

Question 10: An algorithm for the LCM

Q10

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

Answer

List multiples of both numbers and report the first one that appears in both lists.

  1. Algorithm
    1. Make List A of the first n positive multiples of m: [m, 2m, 3m, …, nm].
    2. Make List B of the first m positive multiples of n: [n, 2n, 3n, …, mn].
    3. Check the entries of List A from left to right.
    4. When an entry also occurs in List B, report it as the LCM and stop.
  2. Why it worksBoth lists are in increasing order, so the first common entry is the smallest common multiple. The number mn is in both lists, so a common entry is always found.
  3. Example: lcm(4, 6)List A = [4, 8, 12, 16, 20, 24] and List B = [6, 12, 18, 24]. The first common entry is 12, so lcm(4, 6) = 12.

Question 11: How many numbers must we check?

Q11

Divisors occur in pairs. For instance, the divisors of 18 are (1, 18), (2, 9) and (3, 6). 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

Only the numbers from 1 up to √n (the greatest whole number not exceeding √n).

  1. WhyWhenever j divides n, both j and n ÷ j are divisors. If both numbers of a pair were greater than √n, their product would be greater than n. So every pair has at least one number that is at most √n.
  2. Example: n = 18Since 4² = 16 ≤ 18 < 25 = 5², we check only 1, 2, 3 and 4: 1 gives the pair (1, 18), 2 gives (2, 9), 3 gives (3, 6), and 4 does not divide 18. Only 4 checks instead of 18.
  3. A perfect squareFor n = 36 the pair is (6, 6); count the divisor 6 only once.

Question 12: Does the gcd algorithm still work with pairs?

Q12

Divisors occur in pairs. If we list out the divisors in pairs, will our gcd algorithm still work in the manner we have described?

Answer

Not necessarily. The paired list is not in increasing order, so the last common divisor is not always the greatest.

  1. The original algorithmIt lists the divisors in increasing order, finds the common divisors, and reports the rightmost one as the greatest.
  2. A counter-examplePaired list for 12 = [1, 12, 2, 6, 3, 4]. Paired list for 18 = [1, 18, 2, 9, 3, 6]. Going through the first list from left to right, the common divisors are [1, 2, 6, 3].
  3. The problemThe rightmost entry is 3, but gcd(12, 18) = 6. So we must report the largest common divisor (not the last one), or sort the list first.

Question 13: Checking from n down to 1

Q13

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

The divisor lists come out in decreasing order, and the first common divisor is the gcd.

  1. Modified algorithm
    1. Find the divisors of m by checking m, m − 1, …, 1, adding each divisor at the end of the list.
    2. Find the divisors of n in the same way, checking n, n − 1, …, 1.
    3. Check the divisors of m in their listed order. If an entry also occurs in the list for n, add it to common-divisors.
    4. Report the leftmost entry of common-divisors as the gcd.
  2. ExampleDivisors of 12 in decreasing order = [12, 6, 4, 3, 2, 1]. Divisors of 18 = [18, 9, 6, 3, 2, 1]. Common divisors = [6, 3, 2, 1]. The leftmost entry is 6, so gcd(12, 18) = 6.
  3. A shortcutWe can stop at the first common entry, because it is already the greatest.

Question 14: Starting from min(m, n) and going backwards

Q14

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

The first number that divides both m and n is the gcd, so we can report it and stop.

  1. Algorithm
    1. Let k be the smaller of m and n.
    2. If k divides both m and n, report k as the gcd and stop.
    3. Otherwise reduce k by 1 and go back to Step 2.
  2. Example: m = 12, n = 18Check 12, 11, 10, 9, 8, 7: none divides both numbers. Then 6 divides both, so we stop: gcd(12, 18) = 6.

Euclid’s algorithm (Q15 to Q19)

Euclid’s algorithm: divide the larger number by the smaller one and find the remainder. Then divide the smaller number by this remainder, and so on. The last non-zero divisor is the gcd, because gcd(m, n) = gcd(n, m mod n).

Question 15: gcd(375, 825)

Q15

Compute gcd(375, 825) using the improved version of Euclid’s algorithm.

Answer

gcd(375, 825) = 75.

  1. Put the larger number first
    StepDivisionQuotientRemainder
    1825 = 375 × 2 + 75275
    2375 = 75 × 5 + 050
  2. AnswerThe last non-zero divisor is 75, so gcd(375, 825) = 75.

Question 16: gcd(51000, 81000)

Q16

Compute gcd(51000, 81000) using the improved version of Euclid’s algorithm.

Answer

gcd(51000, 81000) = 3000.

  1. Divisions
    StepDivisionQuotientRemainder
    181000 = 51000 × 1 + 30000130000
    251000 = 30000 × 1 + 21000121000
    330000 = 21000 × 1 + 900019000
    421000 = 9000 × 2 + 300023000
    59000 = 3000 × 3 + 030
  2. AnswerThe last non-zero divisor is 3000, so gcd(51000, 81000) = 3000.

Question 17: gcd(1789287, 237656)

Q17

Compute gcd(1789287, 237656) using the improved version of Euclid’s algorithm.

Answer

gcd(1789287, 237656) = 1 (the numbers are co-prime).

  1. Divisions (13 steps)
    StepDivisionQuotientRemainder
    11789287 = 237656 × 7 + 1256957125695
    2237656 = 125695 × 1 + 1119611111961
    3125695 = 111961 × 1 + 13734113734
    4111961 = 13734 × 8 + 208982089
    513734 = 2089 × 6 + 120061200
    62089 = 1200 × 1 + 8891889
    71200 = 889 × 1 + 3111311
    8889 = 311 × 2 + 2672267
    9311 = 267 × 1 + 44144
    10267 = 44 × 6 + 363
    1144 = 3 × 14 + 2142
    123 = 2 × 1 + 111
    132 = 1 × 2 + 020
  2. AnswerThe last non-zero divisor is 1, so gcd(1789287, 237656) = 1.

Question 18: gcd(2587392, 157656)

Q18

Compute gcd(2587392, 157656) using the improved version of Euclid’s algorithm.

Answer

gcd(2587392, 157656) = 24.

  1. Divisions (7 steps)
    StepDivisionQuotientRemainder
    12587392 = 157656 × 16 + 648961664896
    2157656 = 64896 × 2 + 27864227864
    364896 = 27864 × 2 + 916829168
    427864 = 9168 × 3 + 3603360
    59168 = 360 × 25 + 16825168
    6360 = 168 × 2 + 24224
    7168 = 24 × 7 + 070
  2. AnswerThe last non-zero divisor is 24, so gcd(2587392, 157656) = 24.

Question 19: Why Euclid’s algorithm works

Q19

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

Answer

The common divisors of m and n are exactly the common divisors of n and m mod n, so the gcd does not change.

  1. Set upLet r = m mod n be the remainder when m is divided by n (n > 0). Then m = qn + r with 0 ≤ r < n, so r = m − qn.
  2. If d divides m and n, then d divides n and rWrite m = ad and n = bd. Then r = m − qn = ad − qbd = (a − qb)d. So d divides r, and it already divides n.
  3. If d divides n and r, then d divides m and nWrite n = bd and r = cd. Then m = qn + r = qbd + cd = (qb + c)d. So d divides m, and it already divides n.
  4. ConclusionThe two pairs (m, n) and (n, r) have exactly the same common divisors, so they have the same greatest common divisor: gcd(m, n) = gcd(n, m mod n).

Primes and prime factorisation (Q20 to Q22)

Question 20: An algorithm to check for a prime

Q20

Write an algorithm prime(n) to check if n is prime.

Answer

n is prime exactly when it has two positive divisors, 1 and n.

  1. Algorithm prime(n)
    1. If n < 2, report “not prime” and stop.
    2. Use divisors(n) to find the list of the positive divisors of n.
    3. Count the entries in the list.
    4. If there are exactly two entries, report “prime”. Otherwise report “not prime”.
  2. Examplesdivisors(7) = [1, 7]: exactly two, so 7 is prime. divisors(9) = [1, 3, 9]: three, so 9 is not prime. 1 is not prime, since it has only one divisor.

Question 21: Prime divisors of n

Q21

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

Answer

Find all the divisors of n and keep those that are prime.

  1. 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 from left to right.
    4. Check whether d has exactly two positive divisors, 1 and d (use prime(d)).
    5. If d is prime, add it to prime-divisors.
    6. After all the divisors are checked, report prime-divisors.
  2. Example: n = 180divisors(180) = [1, 2, 3, 4, 5, 6, 9, 10, 12, 15, 18, 20, 30, 36, 45, 60, 90, 180]. The primes among them are 2, 3 and 5, so primedivisors(180) = [2, 3, 5]. For n = 1 the answer is the empty list.

Each prime appears only once in this list. It does not say how many times a prime occurs in the factorisation; that is Question 22.

Question 22: Prime factorisation by an algorithm

Q22

We can also find the gcd of two numbers by computing the 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?

Answer

Represent 180 as the list of pairs [(2, 2), (3, 2), (5, 1)]. For the gcd, take each common prime with the smaller power.

  1. The algorithm
    1. Let the given number be n. Set remaining = n.
    2. Use primedivisors(n) to list its prime divisors.
    3. Start with an empty list called factorisation.
    4. For each prime p in the list: set count = 0; while p divides remaining, divide remaining by p and increase count by 1; then add the pair (p, count) to factorisation.
    5. Report factorisation.
  2. Example: n = 180Prime divisors = [2, 3, 5]. For p = 2: 180 ÷ 2 = 90, 90 ÷ 2 = 45; 45 is not divisible by 2, 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).
  3. (i) Representation[(2, 2), (3, 2), (5, 1)]. A pair (p, k) means that the prime p occurs k times: (2, 2) is 2², (3, 2) is 3², (5, 1) is 5¹. Their product is 4 × 9 × 5 = 180.
  4. (ii) Comparing two factorisationsFind the primes that are in both lists. For each common prime, choose the smaller of its two powers. Multiply these powers: the product is the gcd. If there is no common prime, the gcd is 1.
  5. Example: gcd(180, 252)180 = 2² × 3² × 5 and 252 = 2² × 3² × 7. The common primes are 2 and 3, each with smaller power 2. So gcd = 2² × 3² = 4 × 9 = 36.
  6. Why the smaller power12 = 2² × 3 and 18 = 2 × 3². A common divisor can have only one factor 2 and one factor 3, because those are the numbers of copies that both numbers have. So gcd(12, 18) = 2 × 3 = 6.

Key ideas of Chapter 11

IdeaRule
AlgorithmA precise list of steps that covers every case and ends with the answer
Addition algorithmAdd column by column from the right; carry 1 when the total is 10 or more; treat missing digits as 0; write the final carry
Largest carry9 + 9 + 1 = 19, so the carry is always 0 or 1
Divisors in pairsCheck only 1 to √n; each j that divides n also gives n ÷ j
LCM by listsFirst common entry of the list of multiples
Euclid’s algorithmgcd(m, n) = gcd(n, m mod n); the last non-zero divisor is the gcd
PrimeA number with exactly two positive divisors, 1 and itself
gcd by factorisationMultiply the common primes with the smaller power

Practice: multiple choice questions

Tap an option to check it at once. Your score updates as you answer.

Your score0 / 12
1

When two numbers are added column by column, the carry can only be:

The largest total is 9 + 9 + 1 = 19.
2

gcd(375, 825) is:

825 = 375 × 2 + 75 and 375 = 75 × 5.
3

Euclid’s algorithm uses the fact that gcd(m, n) equals:

The common divisors of m and n are the same as those of n and m mod n.
4

To find all the divisors of n using pairs, we need to check numbers up to:

Each pair has one number that is at most √n.
5

A prime number has exactly how many positive divisors?

1 and the number itself.
6

lcm(4, 6) is:

The first common multiple is 12.
7

The prime factorisation of 180 is:

4 × 9 × 5 = 180.
8

gcd(51000, 81000) is:

The last non-zero divisor in Euclid’s algorithm is 3000.
9

If Step 5 (writing the final carry) is left out, 9999 + 9999 would give:

The final carry 1 is lost.
10

The numbers must be aligned from the right so that:

Units go under units, tens under tens.
11

Assertion (A): gcd(m, n) = gcd(n, m mod n).
Reason (R): The common divisors of m and n are exactly the common divisors of n and m mod n.

Both are true, and R is why the gcd does not change.
12

Assertion (A): In a list of divisors written in pairs, the last common divisor is always the gcd.
Reason (R): The list of divisors written in pairs is not in increasing order.

A is false (for 12 and 18 the last common divisor is 3, but the gcd is 6). R is true.

Frequently asked questions

How many questions are solved in Class 9 Maths Chapter 11?

All 22 questions of The World of Algorithms from the new NCERT Ganita Manjari textbook (2026-27).

What is an algorithm?

A precise, step-by-step procedure that must say what to do in every possible case and must finish with the answer.

How does Euclid’s algorithm find the gcd?

Divide the larger number by the smaller, then divide the smaller by the remainder, and so on, until the remainder is 0. The last non-zero divisor is the gcd.

Why do we check divisors only up to √n?

Divisors come in pairs (j, n ÷ j), and at least one number in each pair is at most √n.

How do I find the gcd using prime factorisation?

Write both numbers as products of prime powers, pick the common primes with the smaller power, and multiply them.

Where can I get the PPT and worksheet for this chapter?

Use the links below, where available, for the free PPT and worksheet on this site.

More free CBSE study material

Notes, worksheets, PPTs and practice papers for Classes 6 to 10 are available at uniquestudyonline.com.

Solutions prepared by Unique Study Point by Sumeet Sahu. The questions are from the NCERT Mathematics textbook Ganita Manjari (Class 9, Part 1).

More study material: Class IX Maths

Sumeet Sahu (14 years of teaching experience), Unique Study Point, Amitesh Nagar, Indore. Free NCERT/CBSE study material for Class VI to X.