Skip to content
MathsCBSE Class 9 · Chapter 11

The World of Algorithms Class 9: Notes, Euclid's and Āryabhaṭa's Methods

Updated 15 October 2026 · Fact-checked

Not in the CBSE annual exam course structure. Not in CBSE's Class IX course structure (which was released before Part II); ask the school whether it is examined. Its ideas support the computational-thinking competencies (CG-9).

The World of Algorithms in Class 9 explains that an algorithm is a precise, step-by-step procedure for solving a problem. Using column addition and the gcd (HCF) of two numbers, it shows how to write steps exactly, justify that they work, and compare efficiency, ending with Euclid's subtraction method and Āryabhaṭa's faster division method.

What The World of Algorithms is about

This chapter of *Ganita Manjari* Part II is not listed in CBSE's Class 9 course structure for 2026-27 (the syllabus was released before Part II), so ask your school whether it will be examined. Its ideas support CBSE's computational-thinking goal: describing, following and designing step-by-step procedures. This page is a short study guide without exam-style practice.

The chapter asks: what exactly is an algorithm, and what makes one better than another?

  • Addition, done well: counting dots works but is slow; adding column by column with carries is an algorithm whose work grows with the number of digits, not with the size of the numbers.
  • GCD from the definition: list all divisors of each number, find the common ones, take the largest. Correct but slow. Improvements combine the scans.
  • Data structures: keeping intermediate results (such as sorted lists) organised makes algorithms easier to write and faster.
  • Euclid's subtraction algorithm: .
  • Āryabhaṭa's division algorithm: use the remainder instead, ; the number of steps grows only with the number of digits.

The word 'algorithm' itself comes from the name of Al-Khwārizmī, whose book spread the Indian methods of arithmetic to Europe.

Key concepts

What an algorithm is
NCERT section 11.1 Adding Numbers

An algorithm is a systematic, step-by-step procedure that solves every problem of a certain kind. Its steps must be precise: someone (or a computer) following them exactly, doing nothing that is not written, must reach the right answer.

Algorithms are built from basic steps we can already do (such as adding two single digits). They often repeat a step (for each column…) and include conditions (if the sum is 10 or more, carry 1). For every algorithm we should also:
1. justify that it always gives the correct answer, and
2. analyse how much work it needs as the input grows.

Worked example

Write the column-addition algorithm as precise steps and follow it for .

Try it first, then show the solutionSolution
  1. Steps: (1) write the numbers with digits aligned from the right; (2) add the rightmost digits, write the units digit, set carry to 1 if the sum is 10 or more, else 0; (3) move left, add the two digits and the carry, and do the same; (4) repeat until no digits are left; (5) if carry is 1, write 1 at the left.
  2. Units: : write 5, carry 1.
  3. Tens: : write 4, carry 1.
  4. Hundreds: : write 2, carry 1.
  5. Thousands: : write 6, carry 0. Answer 6245.

Answer: 6245

Why column addition works, and why it is fast
NCERT section 11.1 Adding Numbers

Correctness: place value groups each number into units, tens, hundreds, … Adding column by column adds each group separately; when a group reaches ten, the ten is carried as one unit of the next group. The carry can never be more than 1, because the largest column sum is .

Efficiency: counting dots for 4-digit numbers needs about 10 times the work of 3-digit numbers, but the column method needs just one more column. So the work grows with the number of digits, not with the value. NCERT's estimate: counting one dot a second, takes over 1 hour 40 minutes; adding columns at 15 seconds each takes about a minute.

Worked example

Why can the carry in column addition never be 2? What would go wrong if the last step ('if carry is 1, write 1 on the left') were left out?

Try it first, then show the solutionSolution
  1. The biggest column total is two 9s plus a carry of 1: , which is less than 20, so the carry is at most 1.
  2. Without the last step, a final carry would be lost: would give 200 instead of 1200.
  3. Additions with no final carry, like , would still come out right.

Answer: The largest column sum is 19; without the last step, sums with a final carry lose their leading 1.

A first gcd algorithm, from the definition
NCERT section 11.2 Greatest Common Divisor

The gcd (greatest common divisor, also called HCF) of m and n is the largest number dividing both. Breaking the problem into smaller pieces gives an algorithm:
1. List the divisors of m (check each number from 1 to m).
2. List the divisors of n.
3. Keep the numbers that are in both lists (common divisors).
4. Report the largest (the rightmost in the ascending list).

It is clearly correct, because it follows the definition. Improvements: scan both numbers in one pass, then stop at and remember only the most recent common divisor, so no lists are needed. Even so, the work grows with the size of the numbers.

Worked example

Use the definition-based algorithm to find gcd(36, 84).

Try it first, then show the solutionSolution
  1. Divisors of 36: 1, 2, 3, 4, 6, 9, 12, 18, 36.
  2. Divisors of 84: 1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 84.
  3. Common divisors: 1, 2, 3, 4, 6, 12.
  4. Largest: 12.

Answer: gcd(36, 84) = 12

Data structures: lists
NCERT section 11.3 Data Structures

While an algorithm runs, it produces intermediate values, such as the list of divisors of m. Giving them names (divisors-of-m, common-divisors) lets later steps refer to them. Organising them in a sensible form, such as a list in increasing order, is called using a data structure.

A good data structure can make an algorithm simpler and faster: with two sorted lists you can find common elements by moving through both lists together once, instead of comparing every pair.

Worked example

List 1 = [2, 5, 8, 11, 14] and List 2 = [3, 5, 9, 11, 15], both in increasing order. Describe a one-pass method to find the elements of List 1 that are not in List 2, and give the answer.

Try it first, then show the solutionSolution
  1. Point to the first element of each list.
  2. If the List 1 element is smaller, it cannot appear later in List 2: record it and move along List 1.
  3. If the elements are equal, it is common: skip it and move along both lists.
  4. If the List 2 element is smaller, move along List 2.
  5. Result: 2, 8, 14.

Answer: 2, 8 and 14

Euclid's subtraction algorithm
NCERT section 11.3 Data Structures

Key fact: if , then . Any d that divides m and n also divides (as ), and any d that divides n and also divides their sum m. So the two pairs have exactly the same common divisors. In pictures: blocks of size d that tile m and n also tile .

Algorithm (written down in Euclid's *Elements*):
1. If , swap them.
2. If , the answer is m.
3. Otherwise, replace the pair by and repeat.

It is correct, but can be slow: gcd(99, 2) needs about 49 subtractions.

Worked example

Use Euclid's subtraction algorithm to find gcd(84, 36). How many reductions are needed?

Try it first, then show the solutionSolution
  1. (84, 36) → (36, 48); swap to (48, 36).
  2. (48, 36) → (36, 12).
  3. (36, 12) → (12, 24); swap to (24, 12).
  4. (24, 12) → (12, 12) → (12, 0).
  5. n = 0, so the answer is 12, after 5 reductions.

Answer: gcd = 12, after 5 reductions

Āryabhaṭa's division algorithm
NCERT section 11.3 Data Structures

Repeatedly subtracting n from m until you cannot any more leaves the remainder of m divided by n, written (for example, ). So one division does many subtractions at once:

The steps are the same as Euclid's, except step 3 uses the remainder. This is the long-division method for the gcd found in Āryabhaṭa's Āryabhaṭīya (499 CE). The number of steps grows only with the number of digits, like column addition.

The word algorithm comes from Al-Khwārizmī (c. 820 CE), who learnt Sanskrit and wrote about Indian arithmetic; the Latin form of his name came to mean an Indian method of calculation.

Worked example

Find gcd(252, 198) with Āryabhaṭa's division algorithm, and gcd(99, 2), counting the reductions in each.

Try it first, then show the solutionSolution
  1. : (198, 54).
  2. : (54, 36).
  3. : (36, 18).
  4. : (18, 0), so the gcd is 18 after 4 reductions.
  5. gcd(99, 2): gives (2, 1), then (1, 0): gcd 1 in 2 reductions, instead of about 49 by subtraction.

Answer: gcd(252, 198) = 18 (4 reductions); gcd(99, 2) = 1 (2 reductions).

Maths in real life: The World of Algorithms

Each concept, met in an everyday situation. Read the situation, try the problem, then check the solution. The one-line hook is what to remember.

Precise steps

Suppose you write instructions for a friend to make tea, and your friend follows them exactly, doing nothing that is not written.

Why might 'boil water and add tea leaves' fail as an algorithm?

Try it first, then show the solutionSolution
  1. It does not say how much water, when to add milk and sugar, how long to boil, or when to strain.
  2. An algorithm must state every step and decision clearly, in order.

Answer: It is not precise enough; every quantity, step and condition must be stated.

Memory hook: If a step is not written, it does not happen.

Efficiency

Suppose you must find a name in a class register of 40 names sorted alphabetically.

Compare checking every name from the top with opening near the middle and moving towards the right letter.

Try it first, then show the solutionSolution
  1. Checking from the top may need up to 40 looks.
  2. Using the sorted order lets you jump close to the name and check only a few.
  3. The sorted list is a data structure that makes the search faster.

Answer: Using the sorted order is far quicker; organised data speeds up algorithms.

Memory hook: Sorted lists save steps.

Euclid's and Āryabhaṭa's gcd

Suppose you want to tile a 252 cm by 198 cm floor with the largest possible equal square tiles, without cutting any tile.

What tile size should you choose?

Try it first, then show the solutionSolution
  1. The tile side must divide both lengths, and be as large as possible: gcd(252, 198).
  2. , , , .
  3. gcd = 18.

Answer: 18 cm square tiles (14 by 11 tiles).

Memory hook: Largest equal tiles = gcd of the sides.

Topics in this chapter

The World of Algorithms formula sheet

Definition
Must be justified (correct) and can be analysed (efficient).
Carry in addition
Euclid's reduction
Āryabhaṭa's reduction
Stopping rule
Remainder notation
e.g. .
Work needed

Tricks to remember The World of Algorithms

Short memory aids. Say each one aloud once, then use it on a question the same day.

  • Precise, Correct, Quick

    A good algorithm is Precise (no guessing), Correct (justified) and Quick (efficient).

    Use it when: Judging or describing any algorithm.

  • Subtract many times = divide once

    What is left after subtracting n again and again is just the remainder.

    Use it when: Seeing why Āryabhaṭa's method is a fast version of Euclid's.

  • Zero means done

    When the second number becomes 0, the first number is the gcd.

    Use it when: The stopping rule of both gcd algorithms.

  • Al-Khwārizmī gave us the word

    Algoritmi (Latin for Al-Khwārizmī) became 'algorithm'.

    Use it when: Remembering the history of the word.

NCERT exercise guide: The World of Algorithms

What each exercise in the NCERT chapter tests, how to approach it, and a question of the same kind solved step by step. Questions here are written in our own words.

Exercise Set 11.1

What it tests: Following the addition algorithm exactly, adding numbers with different numbers of digits, why the columns are aligned from the right, why the carry is at most 1, and what happens without the final step.

How to approach it: Follow each written step literally, as a machine would, and note any situation the steps do not cover.

Exercise Set 11.2

What it tests: Writing algorithms for elements of one sorted list missing from another, and for the lcm of two numbers; (starred) listing divisors in pairs.

How to approach it: Break the task into steps you already know, name the intermediate lists, and use the sorted order to move through the lists once.

Exercise Set 11.3

What it tests: How the gcd algorithms change when the divisors are examined in reverse order, from n down to 1, or from min(m, n) down to 1.

How to approach it: Scanning downwards, the first common divisor you meet is already the largest, so the algorithm can stop there.

End-of-chapter Exercises

What it tests: Computing gcds with the improved (division) version of Euclid's algorithm.

How to approach it: Repeat: swap if needed, stop when the second number is 0, otherwise replace (m, n) by (n, m mod n).

Test your recall

Answer in your head or on paper first, then open the card. Pulling an answer out of memory makes it stick far better than re-reading.

  1. 1.What is an algorithm?Show answer

    A precise, step-by-step procedure that solves every problem of a given type.

  2. 2.Name two things we should do for every algorithm, besides writing its steps.Show answer

    Justify that it is correct, and analyse how efficient it is.

  3. 3.Why is the carry in column addition at most 1?Show answer

    The largest column sum is 9 + 9 + 1 = 19.

  4. 4.State Euclid's key fact for the gcd.Show answer

    For , .

  5. 5.How does Āryabhaṭa's method improve on Euclid's subtraction?Show answer

    It uses the remainder, , doing many subtractions in one division.

  6. 6.What is gcd(m, 0)?Show answer

    m

  7. 7.What is a data structure?Show answer

    A way of organising intermediate values (such as a sorted list) so an algorithm can use them easily.

  8. 8.Where does the word 'algorithm' come from?Show answer

    From the Latin form of the name of Al-Khwārizmī, who wrote about Indian arithmetic.

Best order to study it

  1. Write the column-addition algorithm in your own words and follow it exactly on two examples (Exercise Set 11.1).
  2. Explain why it works (place value and carrying) and why it is faster than counting.
  3. Find a gcd by listing divisors, then improve the method (Exercise Sets 11.2 and 11.3).
  4. Learn Euclid's subtraction step and why it keeps the same common divisors.
  5. Learn Āryabhaṭa's division step and compare the number of steps on gcd(99, 2).
  6. Try the end-of-chapter gcd computations with the improved algorithm.

Quick revision checklist

The night before the exam: can you do each of these without looking?

  • Can you define an algorithm in one sentence?
  • Can you follow the addition algorithm on a 5-digit plus 3-digit sum?
  • Can you explain why the carry is never 2?
  • Can you find gcd(48, 180) by listing divisors?
  • Can you prove that a common divisor of m and n also divides m − n?
  • Can you find gcd(210, 98) with Āryabhaṭa's division algorithm?
  • Can you explain why the division method needs fewer steps?

The World of Algorithms: frequently asked questions

Is 'The World of Algorithms' in the CBSE Class 9 exam?

It is not listed in CBSE's Class 9 course structure for 2026-27, which was released before Ganita Manjari Part II. Ask your school whether it will be examined. Its ideas support CBSE's computational-thinking goal, so it may appear in activities or internal assessment.

Is the gcd the same as the HCF?

Yes. Greatest common divisor (gcd) and highest common factor (HCF) mean the same thing: the largest number that divides both numbers.

Is Āryabhaṭa's division algorithm the same as Euclid's division algorithm?

It is the same idea: replace the pair (m, n) by (n, remainder of m ÷ n) until the remainder is 0. NCERT presents Euclid's original subtraction version and the faster division version found in Āryabhaṭa's Āryabhaṭīya (499 CE).

Do I need to know computer programming for this chapter?

No. Algorithms here are written as numbered steps in plain words. The focus is on precise steps, correctness and efficiency.

Based on: CBSE Mathematics syllabus, Class IX 2026-27; NCERT Ganita Manjari, Part II, Mathematics Textbook for Grade 9 (First Edition 2026)