SolveNCERT
SolveNCERT
HomeSolutionsMathsCh 11Exercise Set 11.2
Class 9 · MathsNCERT 2026 Revised Syllabus

Chapter 11: The World of Algorithms (0904CH11)

Exercise Set 11.2 — 3 questions with step-by-step notebook-style answers.

Exercise Set 11.2(3 questions)

1
Suppose 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.

School Level Solution

Algorithm for List 1 \ List 2 (indices i=j=0): 1. While i is within List 1 and j is within List 2: if L1[i] < L2[j], output L1[i] and increment i; if L1[i] > L2[j], increment j; if equal, increment both i and j. 2. Output all remaining elements of L1.Algorithm for List 2 \ List 1: exchange the roles of the lists. If duplicate values are allowed, first specify whether “elements” means distinct values or occurrences; for set difference, output each distinct missing value once. The increasing order makes these scans efficient.
2
Describe an algorithm to compute the least common multiple (lcm) of two numbers.

School Level Solution

A correct algorithm is: ```text LCM(m,n): g := GCD(m,n) return (m / g) * n ``` Here `GCD` can be Euclid’s division algorithm. Since m and n share exactly their gcd as common prime-factor content, dividing m by g before multiplying by n avoids counting shared factors twice. The answer is the least positive integer divisible by both m and n.
3
Divisors 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?

School Level Solution

(i) If j divides n, the paired factor is $\dfrac{n}{j}$. At least one of the pair is at most √n, since if both were larger their product would exceed n. Therefore check j=1,2,…,⌊√n⌋. Whenever j divides n, record both j and $\dfrac{n}{j}$ (record only one copy if j=√n).(ii) Yes, the common-divisor method still works if the divisors are paired. However, the list may no longer be in increasing order. So one cannot automatically report the rightmost/last common divisor as the gcd; instead compare all common divisors and report the largest, or use a descending search that stops at the first common divisor.

Other Chapters