Educational Galaxy shield logo

Educational Galaxy

LEARN • THINK • SPEAK • GROW

Ganita Manjari — Part 2 • Chapter 11

The World of Algorithms

An algorithm leaves nothing to guesswork: exact steps, every case covered, and it must always stop — the same discipline computers still use.

Original notes — ready CBSE (NCERT, English Medium) • Class 9 • Mathematics • Book: Ganita Manjari — Part 2

Print lets you save as PDF from the browser. This is not a textbook PDF.

Chapter 11: The World of Algorithms — EG's own notes, in simple words

Book: Ganita Manjari — Part 2 (CBSE, Class 9)  |  Chapter 11  |  Medium: English

Labelled diagram for The World of Algorithms

Diagram (labels are printed on the image): A flowchart: Start, then a step box, then a decision diamond, then an end box, showing the shape of an algorithm.

Illustration for The World of Algorithms

Following a path step by step — an algorithm is a path that never leaves you guessing.

What the chapter is about

An algorithm is a set of instructions so exact that anyone — or any machine — following them step by step gets the right answer, every time. You already follow algorithms: a recipe is one, and so is the method for long division. What this chapter adds is precision: every step must be clear, every case must be covered, and the instructions must eventually stop.

The chapter's star examples come from number theory. Adding two numbers digit by digit, with carries handled properly, is an algorithm. Finding all the divisors of a number is another. And Euclid's ancient method for the greatest common divisor — repeatedly replacing the larger number by the remainder — is an algorithm over two thousand years old that computers still use.

Writing an algorithm forces you to understand a method completely. If a step is vague, the algorithm fails — and finding that vagueness is often how you discover what you did not yet understand.

The chapter improves its algorithms instead of just running them. Listing divisors of two numbers separately scans m + n candidates; computing both lists together, and pairing divisors (for 36, the pairs are (1, 36), (2, 18), (3, 12), (4, 9) and (6, 6)), means you only need to test numbers up to the square root — once a pair repeats, every divisor has been found. Fewer tests, same answer: that is what makes one algorithm better than another.

The chapter also names how algorithms store their working: in data structures. When Euclid's method runs, the divisors of m and the divisors of n are kept as two lists, arranged in increasing order, with names like divisors-of-m so they can be referred to later. A list is a data structure — a way of organising information so the algorithm can use it efficiently — and the chapter promises more of them, such as stacks and queues, in higher grades.

What you should learn

Key Terms

  • Algorithm — A finite, exact sequence of steps that solves a problem and always stops.
  • Step — One clear instruction in an algorithm, with no ambiguity about what to do.
  • Carry — In addition, the ten passed to the next digit when a column adds to 10 or more.
  • Divisor — A number that divides another number exactly, with no remainder.
  • Greatest common divisor (GCD) — The largest number that divides two or more numbers exactly.
  • Data structure — A way of organising information for an algorithm, such as a list of numbers in increasing order kept under a name.
  • List — An ordered collection of values, such as divisors-of-m, that an algorithm can build, name and refer to later.

Remember

  • An algorithm must be exact — no step may be guessed at.
  • An algorithm must stop after a finite number of steps.
  • Euclid's GCD method: replace the larger number by the remainder on division, and repeat until the remainder is 0.
  • Test an algorithm on small examples before trusting it.
  • Divisors come in pairs: once the pair repeats, you have found them all.
  • Name your intermediate values — an unnamed list cannot be referred to later.

Exam Tip / Common Mistake

Common mistake: writing an algorithm that works on your example but forgets a case — such as a carry in the last column, or a remainder of zero. Always check the edge cases.

Chart / Table: Euclid's algorithm for GCD(48, 36)

PointDetail
Step 148 ÷ 36 gives remainder 12 — replace 48 by 12
Step 236 ÷ 12 gives remainder 0 — stop
ResultGCD(48, 36) = 12, the last non-zero remainder
Check12 divides both 48 and 36, and no larger number does
Why it worksEach step keeps the same common divisors, shrinking the numbers

Worked method: Euclid's algorithm for GCD(72, 60)

  1. Divide the larger by the smaller: 72 ÷ 60 leaves remainder 12. Replace 72 by 12.
  2. Now divide 60 by 12: remainder 0. Stop — the last non-zero remainder is the GCD.
  3. GCD(72, 60) = 12. Check: 12 divides both 72 and 60, and no larger number does.

Practice set — try it yourself

  1. Write the steps to add 47 + 35 digit by digit, showing the carry.
    Hint: Hint: Add the ones first, then carry the ten.
  2. List all divisors of 24 using a step-by-step method.
    Hint: Hint: Test numbers from 1 upwards in order.
  3. Use Euclid's algorithm to find GCD(60, 45).
    Hint: Hint: 60 ÷ 45 leaves remainder 15.
  4. Why must an algorithm stop? Give an example of instructions that do not stop.
    Hint: Hint: Think of a step that repeats for ever.
  5. Describe an algorithm to check whether a number is even.
    Hint: Hint: What single test decides it?

Questions with Answers

  1. What is an algorithm?
    An algorithm is a finite list of exact steps that solves a problem. Following it carefully always gives the correct answer, and it always finishes.
  2. Find GCD(54, 24) by Euclid's algorithm.
    54 ÷ 24 leaves remainder 6; 24 ÷ 6 leaves remainder 0. So GCD(54, 24) = 6.
  3. Why is a recipe an algorithm, but 'add salt to taste' is not an exact step?
    A recipe is a sequence of steps, but 'to taste' is vague — different people add different amounts. An algorithm's steps must be exact enough that everyone following them does the same thing.
  4. How does digit-by-digit addition handle a carry?
    When a column adds to 10 or more, you write down the ones digit and carry the tens digit to the next column, so no column ever exceeds a single digit in the answer.
  5. What makes Euclid's algorithm better than listing all divisors?
    Listing divisors needs many tests, while Euclid's method shrinks the numbers quickly with a few divisions — it is far faster, especially for large numbers.

Extension questions

  1. Use Euclid's algorithm to find GCD(72, 60).
    72 ÷ 60 leaves remainder 12; 60 ÷ 12 leaves remainder 0. So GCD = 12.
  2. List the divisor pairs of 36. Up to which number must you test?
    Pairs: (1, 36), (2, 18), (3, 12), (4, 9), (6, 6). You need test only up to 6, the square root of 36.
  3. Find LCM(12, 18) using GCD: LCM = (12 × 18) ÷ GCD.
    GCD(12, 18) = 6, so LCM = 216 ÷ 6 = 36.
  4. Add 487 + 356 digit by digit, showing every carry.
    Ones: 7 + 6 = 13, write 3, carry 1. Tens: 8 + 5 + 1 = 14, write 4, carry 1. Hundreds: 4 + 3 + 1 = 8. Answer: 843.
  5. Why is a list a data structure, and why keep it in increasing order?
    A list organises values under one name so the algorithm can refer to them. Increasing order makes comparing two lists — for example, finding common divisors — easy and fast.
  6. Give an algorithm, in steps, to test whether a number is a multiple of 3.
    Step 1: add the digits of the number. Step 2: if the digit-sum is divisible by 3, the number is a multiple of 3; otherwise it is not. (The steps are exact, cover every case, and stop.)
Recap

Exact steps, every case, always stopping — and better steps beat more steps: pair the divisors, name the lists, and let Euclid shrink the numbers.

How to use this page: Read the summary, say the Key Terms in your own words, then try the practice set without looking. Use the Questions with Answers to check yourself afterwards. Ask your teacher or parent to check your answers.

← Previous chapterNext chapter →