Ganita Manjari Class 9 Chapter 11: All Exercises Solutions
Step-by-step solutions for The World of Algorithms, written in the way examiners expect: given data, working, and a clear final answer.
- Class 9
- Maths
- Ganita Manjari
- 4 Exercises
- 15 Questions
Exercise 11.1: The column-addition algorithm
Testing the step-by-step algorithm for adding two numbers column by column, with a carry.
Key ideas before you start
- Algorithm: a finite list of precise steps that always gives the correct result.
- Column addition: add digits from right to left; if a column sum is 10 or more, write the units digit and carry 1 to the next column.
- The last step writes down any carry left after the leftmost column.
Exercise 11.1, Question 1: Add two 4-digit numbers by following the steps of the algorithm. Is the result correct?
Show step-by-step solution
| Column | Units | Tens | Hundreds | Thousands |
|---|---|---|---|---|
| 2468 + 1357 | 8 + 7 = 15 → 5, carry 1 | 6 + 5 + 1 = 12 → 2, carry 1 | 4 + 3 + 1 = 8 | 2 + 1 = 3 |
Exercise 11.1, Question 2: What happens when a 5-digit number is added to a 3-digit number using the algorithm?
Show step-by-step solution
The shorter number has no digits in the thousands and ten-thousands columns. Treat those missing digits as 0.
Exercise 11.1, Question 3: Why must the numbers be aligned from the right?
Show step-by-step solution
Exercise 11.1, Question 4: Why can the carry never be more than 1?
Show step-by-step solution
Exercise 11.1, Question 5: What happens if the last step (writing down the final carry) is left out? Give an example where the answer is still right and one where it goes wrong.
Show step-by-step solution
| Example | What happens | Result |
|---|---|---|
| 1234 + 4321 | No carry out of the thousands column | 5555 (correct anyway) |
| 9999 + 9999 | A carry of 1 is left after the last column | 9998 without the step; 19998 with it |
Exercise 11.2: Algorithms on lists; LCM and divisors
Designing algorithms that compare sorted lists, find the LCM, and list divisors efficiently.
Key ideas before you start
- divisors(n): check each j from 1 to n and keep j if n mod j = 0.
- Divisors come in pairs (j, nj), so it is enough to check j with j² ≤ n.
- LCM: the smallest number that is a multiple of both numbers.
Exercise 11.2, Question 1: List 1 and List 2 are in increasing order. Write an algorithm to find (i) the elements of List 1 that are not in List 2, (ii) the elements of List 2 that are not in List 1.
Show step-by-step solution
(i) Put a pointer at the start of each list. Repeat while List 1 has elements left:
- If List 2 is finished, or the current element of List 1 is smaller than that of List 2: output it and move the List 1 pointer.
- If the two elements are equal: move both pointers (it is common, so do not output it).
- If the List 1 element is bigger: move the List 2 pointer.
(ii) Use the same algorithm with the roles of the two lists swapped.
Exercise 11.2, Question 2: Describe an algorithm to find the LCM of two numbers m and n.
Show step-by-step solution
- List the multiples of m: m, 2m, 3m, …, nm.
- List the multiples of n: n, 2n, …, mn.
- Use the algorithm for common elements of two sorted lists; the first common element is the LCM.
Exercise 11.2, Question 3: Divisors of n occur in pairs. (i) How many numbers between 1 and n must be checked to find all divisors? (ii) Does the GCD algorithm still work if the divisors are listed in pairs?
Show step-by-step solution
(i) If j divides n, so does nj, and one of the pair is at most √n. So we only need to check j = 1, 2, … while j² ≤ n, and write both j and nj.
(ii) The GCD algorithm takes the last common divisor, which works only if the lists are in increasing order. Listing in pairs breaks the order: for 12 and 18 the paired lists give common divisors [1, 2, 6, 3], and the last one is 3, not the GCD 6.
Exercise 11.3: Improving the GCD algorithm
Changing the order in which divisors are checked to reach the GCD faster.
Key ideas before you start
- The GCD is the largest common divisor, so searching from the top lets us stop at the first one found.
Exercise 11.3, Question 1: How does the algorithm change if the divisors of n are checked from n down to 1?
Show step-by-step solution
Exercise 11.3, Question 2: What happens if common divisors are checked from min(m, n) down to 1?
Show step-by-step solution
Check d = min(m, n), min(m, n) − 1, … and stop at the first d that divides both m and n.
End of Chapter: Euclid’s algorithm and primes
Using the improved Euclid’s algorithm and writing algorithms for primes and prime factorisation.
Key ideas before you start
- Improved Euclid’s algorithm: gcd(m, n) = gcd(n, m mod n), repeated until the remainder is 0. The last non-zero divisor is the GCD.
- Prime: a number n ≥ 2 with exactly two divisors, 1 and n.
End of Chapter, Question 1: Using the improved Euclid’s algorithm, find: (i) gcd(375, 825) (ii) gcd(51000, 81000) (iii) gcd(1789287, 237656) (iv) gcd(2587392, 157656)
Show step-by-step solution
(i)
(ii)
(iii) Remainders
(iv) Remainders
End of Chapter, Question 2: Let m ≥ n. Show that d divides both m and n if and only if d divides both n and (m mod n).
Show step-by-step solution
Write m = qn + r, where r = m mod n.
- If d | m and d | n, then d | (m − qn) = r. So d divides n and r.
- If d | n and d | r, then d | (qn + r) = m. So d divides m and n.
End of Chapter, Question 3: Write an algorithm prime(n) that checks whether n is prime. (Hint: use divisors(n).)
Show step-by-step solution
- If n < 2, return “not prime”.
- Compute L = divisors(n).
- If L has exactly two elements (1 and n), return “prime”; otherwise return “not prime”.
End of Chapter, Question 4: Write an algorithm primedivisors(n) that lists the prime divisors of n. (Hint: filter divisors(n).)
Show step-by-step solution
- Compute L = divisors(n).
- Keep only those d in L for which prime(d) says “prime”.
End of Chapter, Question 5: Write an algorithm for the prime factorisation of n. (i) How can the factorisation of 180 be represented? (ii) How can two factorisations be compared to find the GCD?
Show step-by-step solution
- For each prime p in primedivisors(n): count how many times p divides n (keep dividing by p until it no longer divides).
- Record the pair (p, count).
For each prime in both lists, take the smaller count: 2², 3² (5 and 7 are not common).
Common questions on Chapter 11
What is an algorithm?
A finite sequence of clear steps that solves a problem and always stops with the correct answer.
Why is Euclid’s algorithm faster than listing divisors?
It replaces (m, n) by the smaller pair (n, m mod n) at every step, so the numbers shrink very quickly. Listing divisors needs checking up to n numbers.
Why is the carry in column addition never more than 1?
The largest possible column sum is 9 + 9 + 1 = 19.
Practise more with Abhyaskul
Join our Telegram channel for new solutions, PDFs and exam updates.
