Skip to content

Class 9 · Maths · Ganita Manjari Part II

Chapter 11: The World of Algorithms Notes

The big idea

An algorithm is a precise step-by-step method to solve a problem; using addition and the gcd as examples, we see how algorithms are justified, improved and compared for efficiency.

Things to remember

  • An algorithm is a step-by-step procedure that uses basic steps we can already do. The addition algorithm: align digits from the right, add each column with a carry (0 or 1, never more), repeat leftwards, and write a final carry 1 if needed. It works by grouping units, tens and hundreds.
  • Efficiency matters: counting dots makes work grow 10 times for each extra digit, but column addition needs only one more column. Counting 3347 + 2729 at one dot per second takes over 1 hour 40 minutes; digit by digit takes about a minute.
  • Divisors algorithm: start with an empty list and for each j from 1 to n, add j if j divides n. For 18 the list is [1, 2, 3, 6, 9, 18]. Naming values (like list-of-divisors) and using lists, a basic data structure, keeps the steps clear.
  • First gcd algorithm: find the divisor lists of m and n, keep the common ones and report the rightmost (largest). For 375 and 825 the common divisors are [1, 3, 5, 15, 25, 75], so gcd = 75. It follows directly from the definition, so correctness is easy to justify.
  • Improvements: scan both numbers together up to min(m, n), then keep only the most recent common divisor instead of a list. This is simpler but still examines every number up to min(m, n), so work grows with the value of the numbers.
  • Euclid's subtraction algorithm uses gcd(m, n) = gcd(n, m − n) for m ≥ n: any divisor of m and n also divides m − n and vice versa. Stop when n = 0 and report m. It still needs about k steps for gcd(2k + 1, 2), proportional to the value.
  • Aryabhata's division algorithm replaces subtraction by remainders: gcd(m, n) = gcd(n, m mod n). For 99 and 2 it needs two steps instead of fifty. Example: gcd(60, 16) → gcd(16, 12) → gcd(12, 4) → gcd(4, 0) = 4. The steps match long division.
  • The word algorithm comes from Al-Khwarizmi (c. 820 CE), whose book spread Indian place-value arithmetic; 'algorismus' first meant an Indian method of calculation. Every algorithm must be justified as correct and analysed for how many steps it needs.

Words to know

Tap a card to see what it means

Quick quiz

⭐ 0 / 5
  1. What is gcd(60, 16) using Aryabhata's division (remainder) algorithm?

  2. What is 33 mod 7?

  3. Which is the list of divisors produced by the divisors algorithm for n = 18?

  4. Why is Aryabhata's remainder method faster than Euclid's subtraction method for gcd(99, 2)?

  5. Assertion (A): Adding digit by digit is much faster than counting dots. Reason (R): Adding a digit to a number adds only one more column but counting needs ten times as many dots. Which is correct?

Match the pairs

Match the idea with its meaning.

Try this at home

Write down the steps to make tea or find the largest of three numbers, as exact instructions. Ask a family member to follow them literally and note any step that is unclear.

All Ganita Manjari Part II notesChapter page and exercisesGanita Manjari Part II syllabus