Skip to content

NCERT Solutions for Class 9 Maths Chapter 11 The World of Algorithms (PDF) – 2027

NCERT Solutions for Class 9 Maths Chapter 11 The World of Algorithms – step-by-step answers to every exercise and in-text question of the chapter, as per the latest NCERT syllabus for 2027. Read them online or download the free question-answer PDF.

Chapter 11 explains what an algorithm is: a precise, step-by-step procedure built from basic steps we can already do. It starts with the column method of addition, then builds algorithms for listing divisors and finding the gcd, improves them one by one, and compares how much work each needs. It ends with Euclid’s subtraction method and Āryabhaṭa’s much faster division method. You will learn to write algorithms clearly, execute them, check that they are correct and judge how efficient they are.

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

All the answers are on this page below. The PDF also explains every answer – why it is right and how to check it – so download it for revision.

PDFChapterDownload
Solutions PDFThe World of AlgorithmsView PDF

NCERT Solutions for Class 9 Maths Chapter 11 The World of Algorithms – Questions and Answers

All 19 questions of the chapter (textbook pages Part II, 37 – 50) are answered below, in the order of the book – in-text questions, activities and the end-of-chapter exercises. Each answer is written the way you would write it in the exam.

Exercise Set 11.1 — Page 38Section 11.1.1 Adding Numbers Digit by Digit

Q1Add 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?
Algorithm to add two numbers
  1. Write the numbers one below the other in the Indian base-ten place-value system so that the digits are aligned from right to left.
  2. Add the rightmost digits.
    • If the sum is less than 10, write the sum directly below the two digits. Set the value of carry to 0.
    • If the sum is more than 10, write the units digit of the sum directly below the two digits. Set the value of carry to 1.
  3. Move to the next column of digits on the left. Add the two digits and the current value of carry.
    • If the sum is less than 10, write the sum directly below the two digits. Set the value of carry to 0.
    • If the sum is more than 10, write the units digit of the sum directly below the two digits. Set the value of carry to 1.
  4. Repeat Step 3 until there are no more digits on the left.
  5. If the value of carry is 1, write 1 to the left of the bottom row.
The algorithm as written in the book, pages 37–38
Answer

Example 1: 3486 + 2759

Step 1: write 3486 above 2759, right digits aligned
Step 2: 6 + 9 = 15, more than 10 → write 5, carry = 1
Step 3: 8 + 5 + 1 = 14 → write 4, carry = 1
Step 3: 4 + 7 + 1 = 12 → write 2, carry = 1
Step 3: 3 + 2 + 1 = 6, less than 10 → write 6, carry = 0
Step 5: carry is 0, nothing more to write → 6245 ✓

Example 2: 2735 + 4175. Step 2 gives 5 + 5 = 10. The steps cover only “less than 10” and “more than 10”, so a strict follower is stuck.

So we get the correct result only when no column adds up to exactly 10. To make the steps always work, the second case should read “if the sum is 10 or more”. With this fix, 2735 + 4175 = 6910.

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

Example: 45678 + 789 (right digits aligned)

Units: 8 + 9 = 17 → write 7, carry 1
Tens: 7 + 8 + 1 = 16 → write 6, carry 1
Hundreds: 6 + 7 + 1 = 14 → write 4, carry 1
Thousands: 5 + (no digit) + 1 → ?

Step 3 says “add the two digits”, but the thousands and ten-thousands columns have only one digit. So, strictly, our steps do not handle this case.

They work if we treat each empty place as the digit 0, that is, write 789 as 00789:

Thousands: 5 + 0 + 1 = 6 → write 6, carry 0
Ten-thousands: 4 + 0 + 0 = 4 → write 4
45678 + 789 = 46467 ✓

So we must add a rule: “if a column has only one digit, take the missing digit as 0”.

Q3Why is it important to align the columns from right to left?
Answer

Because the rightmost digit of every whole number is its units digit. Lining up the right ends puts units under units, tens under tens, hundreds under hundreds, and so on. The algorithm adds one column at a time, so each column must hold digits of the same place value. This matters most when the numbers have different numbers of digits.

52 + 314, aligned on the right: 2 + 4 = 6, 5 + 1 = 6, 0 + 3 = 3 → 366 ✓
52 + 314, aligned on the left: 5 under 3, 2 under 1 → 520 + 314 = 834 ✗

Aligning on the left treats 52 as if it were 520.

Q4In Step 3, why cannot the value of carry be more than 1?
(Step 3: Move to the next column of digits on the left. Add the two digits and the current value of carry.)
Answer

The largest possible column sum is

largest digit + largest digit + largest carry
= 9 + 9 + 1 = 19

Since a column sum is never 20 or more, its tens digit is at most 1, so the carry is at most 1.

This works step by step. In Step 2 there is no carry yet, so the sum is at most 9 + 9 = 18 and the carry is 0 or 1. Then each Step 3 column is at most 9 + 9 + 1 = 19, so it again passes on a carry of 0 or 1, and so on for every column.

Q5What 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.
(Step 5: If the value of carry is 1, write 1 to the left of the bottom row.)
Answer

Without Step 5, a carry of 1 left over from the leftmost column is thrown away, so the answer loses its first digit.

Works correctly when the leftmost column adds up to less than 10, so the final carry is 0:

3486 + 2759 → 6245 ✓
2105 + 3462 → 5567 ✓

Fails when the leftmost column produces a carry of 1:

473 + 695: 3 + 5 = 8; 7 + 9 = 16 → 6, carry 1; 4 + 6 + 1 = 11 → 1, carry 1
Bottom row = 168, but 473 + 695 = 1168 ✗
5 + 7: 12 → write 2, carry 1 → answer 2 instead of 12 ✗

Think and Reflect — Page 39Section 11.1 Adding Numbers

Think and Reflect
Q1See if you can complete the argument about grouping by units, tens, hundreds, … to justify why the addition algorithm works.
Answer

Write each number as groups of units, tens and hundreds, and add like groups:

473 = 4 hundreds + 7 tens + 3 units
695 = 6 hundreds + 9 tens + 5 units
Sum = 10 hundreds + 16 tens + 8 units
= 10 hundreds + (1 hundred + 6 tens) + 8 units [carry 1]
= 11 hundreds + 6 tens + 8 units
= 1 thousand + 1 hundred + 6 tens + 8 units [carry 1]
= 1168

The algorithm makes exactly these moves. Each column is one group (units, tens, hundreds, …). Each carry exchanges ten of one group for one of the next group, since 10 units = 1 ten, 10 tens = 1 hundred, and so on. Exchanging never changes the total. So the digits we write give the same total as counting all the dots.

Q2How would you modify the algorithm to add two decimal fractions?
Answer

Change Step 1: line up the decimal points (not the rightmost digits). If one number has fewer digits after the decimal point, write zeros at its right end so both have the same number of decimal places. Then add the columns from the right exactly as before (Steps 2–5), and put the decimal point in the answer directly below the other decimal points.

3.75 + 12.6 → write as 3.75 + 12.60
Hundredths: 5 + 0 = 5
Tenths: 7 + 6 = 13 → write 3, carry 1
Units: 3 + 2 + 1 = 6
Tens: 0 + 1 = 1
Answer: 16.35

The carry works across the decimal point because 10 hundredths = 1 tenth and 10 tenths = 1 unit.

Think and Reflect — Page 41Section 11.2.1 Computing the Divisors of a Number

Think and Reflect
Q1Try 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

Executing for 15 (list-of-divisors starts empty, [ ]):

j = 1 divides 15 → [1]
j = 2 does not divide 15 → [1]
j = 3 divides 15 → [1, 3]
j = 4 does not → [1, 3]
j = 5 divides 15 → [1, 3, 5]
j = 6, 7, …, 14 do not → [1, 3, 5]
j = 15 divides 15 → [1, 3, 5, 15]

In the same way:

divisors(15) = [1, 3, 5, 15] — 15 checks
divisors(135) = [1, 3, 5, 9, 15, 27, 45, 135] — 135 checks
divisors(775) = [1, 5, 25, 31, 155, 775] — 775 checks

Work: the algorithm tests every j from 1 to n, so it makes n checks for the number n. The work grows in proportion to the number itself: 135 needs 9 times as many checks as 15. Each extra digit makes the work about 10 times bigger, just like adding by counting dots.

Exercise Set 11.2 — Pages 43–44Sections 11.2 Greatest Common Divisor and 11.3 Data Structures

Q1Suppose 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)

Algorithm to find the elements of List 1 not in List 2
  1. Start with an empty list only-in-1.
  2. For each number x in List 1
    • if x does not appear in List 2, add x to only-in-1.
  3. Report only-in-1.

(ii) The same algorithm with the lists swapped:

Algorithm to find the elements of List 2 not in List 1
  1. Start with an empty list only-in-2.
  2. For each number x in List 2
    • if x does not appear in List 1, add x to only-in-2.
  3. Report only-in-2.

Example: List 1 = divisors(375) = [1, 3, 5, 15, 25, 75, 125, 375], List 2 = divisors(825) = [1, 3, 5, 11, 15, 25, 33, 55, 75, 165, 275, 825]. Then (i) gives [125, 375] and (ii) gives [11, 33, 55, 165, 275, 825], both in increasing order.

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

The lcm of m and n is the smallest number that both m and n divide. Straight from this definition: go through the multiples of the larger number in order, and stop at the first one that the other number divides.

Algorithm to find lcm(m, n)
  1. If m < n, swap the numbers, so that m is the larger one.
  2. For each number k in the sequence 1, 2, 3, …, n
    • if n divides k × m, report k × m as lcm(m, n) and stop.

The algorithm always stops by k = n, because n × m is a multiple of both numbers.

lcm(12, 18): m = 18, n = 12
k = 1: 12 does not divide 18
k = 2: 12 divides 36 → lcm(12, 18) = 36
*Q3Divisors 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) In each pair (j, n ÷ j), the smaller number is at most √n; if both were bigger than √n, their product would be bigger than n. So we only examine j = 1, 2, 3, … up to √n, that is, up to the largest whole number whose square is not more than n. Each j that divides n gives a pair (j, n ÷ j).

n = 18: √18 ≈ 4.24 → examine 1, 2, 3, 4 only (4 numbers, not 18)
→ pairs (1, 18), (2, 9), (3, 6)

(ii) Not as described. Written in pairs, the list is not in increasing order: [1, 18, 2, 9, 3, 6]. But the last step, “report the rightmost element of common-divisors”, needs increasing order.

gcd(18, 9): divisors-of-18 = [1, 18, 2, 9, 3, 6], divisors-of-9 = [1, 9, 3]
common-divisors = [1, 9, 3] → rightmost = 3 ✗ (true gcd = 9)

Fix: report the largest element of common-divisors instead.

Exercise Set 11.3 — Page 45Section 11.3.1 Improving the Algorithm

Q1How 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?
Algorithm to find gcd(m, n)
  1. Let divisors-of-m be the list obtained by computing divisors(m)
  2. Let divisors-of-n be the list obtained by computing divisors(n)
  3. Start with an empty list common-divisors
  4. For each number x in the list of divisors-of-m
    • If x also appears in the list of divisors-of-n, add x to the list common-divisors
  5. Report the rightmost element of the list common-divisors as gcd(m, n)
The original gcd algorithm, pages 42–43. It uses: Algorithm to find the divisors of n — 1. Start with an empty list-of-divisors. 2. For each number j in the sequence 1, 2, 3, …, n: if j divides n, add j to the list-of-divisors.
Answer

The divisor lists would come out in decreasing order, for example divisors(375) = [375, 125, 75, 25, 15, 5, 3, 1]. Then common-divisors is also in decreasing order, so the gcd is its leftmost (first) element, not the rightmost. Step 5 must change to: “Report the leftmost element of the list common-divisors as gcd(m, n).” If Step 5 were left unchanged, it would always report 1.

gcd(375, 825):
divisors-of-375 = [375, 125, 75, 25, 15, 5, 3, 1]
divisors-of-825 = [825, 275, 165, 75, 55, 33, 25, 15, 11, 5, 3, 1]
common-divisors = [75, 25, 15, 5, 3, 1] → leftmost = 75 ✓
Q2What about the last algorithm described above? What happens when we look at common divisors starting from min(m, n) and work backwards to 1?
Do away with lists (page 45)
Start with most-recent-common-divisor set to 1. Then scan all numbers from 2 to min(m, n):
  • For each k from 2 to min(m, n), if k divides both m and n, update most-recent-common-divisor to k.
At the end of this scan, most-recent-common-divisor directly gives us the gcd.
The last algorithm of Section 11.3.1, page 45
Answer

Going downwards, the first k that divides both m and n is the largest common divisor, that is, the gcd. So we can stop as soon as we find it. We no longer need most-recent-common-divisor at all.

Algorithm to find gcd(m, n), scanning downwards
  1. For each k from min(m, n) down to 1
    • if k divides both m and n, report k as gcd(m, n) and stop.

It always stops, because k = 1 divides both numbers.

gcd(6, 12): min(6, 12) = 6
k = 6 divides both 6 and 12 → gcd(6, 12) = 6, after just 1 check
(scanning upwards needed 5 checks, k = 2 to 6)

This is much faster when the gcd is large. But when the gcd is small, for example gcd(35, 36) = 1, we still go all the way down to 1, so in the worst case it is no better.

In-text Questions — Page 48Section 11.3.4 Āryabhaṭa’s Division Algorithm

Q1Using the improved algorithm (reduce gcd(m, n) to gcd(n, m mod n)), gcd(99, 2) needed only two reduction steps: gcd(99, 2) → gcd(2, 1) → gcd(1, 0), answer 1. Check that this would happen for any similar problem of the form gcd(2k + 1, 2).
Answer

For k ≥ 1, 2k + 1 is bigger than 2, so no reversal is needed.

gcd(2k + 1, 2): 2k + 1 = k × 2 + 1, so (2k + 1) mod 2 = 1 → reduce to gcd(2, 1)
gcd(2, 1): 2 = 2 × 1 + 0, so 2 mod 1 = 0 → reduce to gcd(1, 0)
gcd(1, 0): n = 0 → answer 1

An odd number always leaves remainder 1 when divided by 2, whatever k is. So every problem gcd(2k + 1, 2) takes exactly two reductions and gives the answer 1.

Example: gcd(2001, 2) → gcd(2, 1) → gcd(1, 0) = 1. The subtraction version would need 1002 reductions here.

End-of-Chapter Exercises — Page 50Whole chapter

Q1Compute 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)
Improved (division) version of Euclid’s algorithm for gcd(m, n)
  1. If m < n, reverse the numbers and compute gcd(n, m)
  2. If n = 0, report the answer as m
  3. Otherwise, reduce the problem to computing gcd(n, m mod n)
As printed on page 48. Here m mod n is the remainder when m is divided by n.
Answer

By Step 1, the larger number goes first. Each row gcd(m, n) reduces to gcd(n, m mod n), which is the next row. When m mod n = 0, we have reached gcd(n, 0), so the gcd is n.

(i) gcd(375, 825) = 75

mnm mod n
82537575
375750

(ii) gcd(51000, 81000) = 3000

mnm mod n
810005100030000
510003000021000
30000210009000
2100090003000
900030000

(iii) gcd(1789287, 237656) = 1

mnm mod n
1789287237656125695
237656125695111961
12569511196113734
111961137342089
1373420891200
20891200889
1200889311
889311267
31126744
267443
4432
321
210

(iv) gcd(2587392, 157656) = 24

mnm mod n
258739215765664896
1576566489627864
64896278649168
278649168360
9168360168
36016824
168240
Q2Assume that m ≥ n. Verify that d divides m and n if and only if d divides both n and m mod n.
Answer

Divide m by n: m = q × n + r, where q is the quotient and r = m mod n, with 0 ≤ r < n.

If d divides m and n: write m = ad and n = bd for whole numbers a, b. Then

r = m − q × n = ad − qbd = (a − qb)d

so d divides r, that is, d divides m mod n. It already divides n.

If d divides n and m mod n: write n = bd and r = cd. Then

m = q × n + r = qbd + cd = (qb + c)d

so d divides m. It already divides n.

Both directions hold, so d divides m and n if and only if d divides n and m mod n. The two pairs have the same common divisors, hence gcd(m, n) = gcd(n, m mod n).

Q3Write 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
Algorithm prime(n)
  1. Let divisors-of-n be the list obtained by computing divisors(n).
  2. Count the number of elements in divisors-of-n.
  3. If the count is exactly 2, report “n is prime”. Otherwise, report “n is not prime”.
prime(31): divisors(31) = [1, 31] → 2 elements → 31 is prime
prime(15): divisors(15) = [1, 3, 5, 15] → 4 elements → 15 is not prime
prime(1): divisors(1) = [1] → 1 element → 1 is not prime

Why it works: every number n greater than 1 has at least the two divisors 1 and n. It is prime exactly when there are no others, so its list has exactly 2 elements. The number 1 has only one divisor, so it is correctly reported as not prime.

*Q4Write 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.)
Answer
Algorithm primedivisors(n)
  1. Let divisors-of-n be the list obtained by computing divisors(n).
  2. Start with an empty list prime-divisors.
  3. For each number x in divisors-of-n
    • if prime(x) reports “x is prime”, add x to prime-divisors.
  4. Report prime-divisors.
n = 180:
divisors(180) = [1, 2, 3, 4, 5, 6, 9, 10, 12, 15, 18, 20, 30, 36, 45, 60, 90, 180]
keep only the primes → primedivisors(180) = [2, 3, 5]

Similarly, primedivisors(825) = [3, 5, 11]. The answer list is in increasing order, because divisors(n) is.

*Q5We 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 22 × 32 × 51. How would you represent this?
(ii) How would you compare the prime factorisations of two numbers?
Answer
Algorithm factorise(n)
  1. Let x = n, and start with an empty list factors.
  2. For each prime p in primedivisors(n), from left to right
    • set count to 0;
    • while p divides x: replace x by x ÷ p and add 1 to count;
    • add the pair (p, count) to factors.
  3. Report factors.
n = 180, primedivisors = [2, 3, 5]
p = 2: 180 → 90 → 45, count = 2
p = 3: 45 → 15 → 5, count = 2
p = 5: 5 → 1, count = 1

(i) As a list of pairs (prime, power), primes in increasing order: 180 → [(2, 2), (3, 2), (5, 1)].

(ii) Compare the lists prime by prime (a missing prime has power 0). For the gcd, take each prime with the smaller power.

375 → [(3, 1), (5, 3)], 825 → [(3, 1), (5, 2), (11, 1)]
gcd = 31 × 52 × 110 = 75 ✓

Chapter 11 of 14 – Maths

Also for This Chapter

NCERT Solutions Class 9 Maths Chapter 11 The World of Algorithms – Overview

ClassClass 9
SubjectMaths
Chapter11 – The World of Algorithms
Textbook pagesPart II, 37 – 50
Questions solved19
Session2027
FormatFull answers on this page + PDF

NCERT Solutions Class 9 Maths Chapter 11 – FAQs

Where can I download NCERT Solutions Class 9 Maths Chapter 11 The World of Algorithms PDF?

Read every answer on this page, or download the free PDF from the table at the top.

Is this for the 2027 session?

Yes, it follows the latest NCERT Class 9 Maths book for 2027.

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

All 19 questions of the chapter (textbook pages Part II, 37 – 50) – the in-text questions, activities and the end-of-chapter exercises.

How should I use these solutions?

Read the chapter in the NCERT book first, attempt the questions yourself, then check your answers here.

Official website: ncert.nic.inNational Council of Educational Research and Training publishes date sheets, admit cards and results here
Visit

Ask a question

?

Loading comments…