11
Chapter 11: The World of Algorithms
Ganita Manjari (Part II) — Exercise Sets 11.1, 11.2 & 11.3 — Suggested Marks Distribution
Exercise Set 11.1 — What is an Algorithm?
Q1
Define an algorithm. Write an algorithm to find the largest of three numbers A, B, and C.
4 Marks
✓ Suggested Step-by-Step Solution
Algorithm: A finite, step-by-step procedure to solve a problem or accomplish a task.
Algorithm to find largest of A, B, C:
Step 1: Input A, B, C.
Step 2: If A > B and A > C, then Largest = A. Go to Step 5.
Step 3: If B > C, then Largest = B. Go to Step 5.
Step 4: Largest = C.
Step 5: Output Largest.
Step 6: Stop.
Step 1: Input A, B, C.
Step 2: If A > B and A > C, then Largest = A. Go to Step 5.
Step 3: If B > C, then Largest = B. Go to Step 5.
Step 4: Largest = C.
Step 5: Output Largest.
Step 6: Stop.
Suggested Marks Distribution
Definition of algorithm1 Mark
Correct logical steps covering all cases3 Marks
Exercise Set 11.2 — GCD and Euclid’s Algorithm
Q1
Use Euclid’s algorithm to find HCF(252, 105).
4 Marks
✓ Suggested Step-by-Step Solution
Figure 11.1: Flowchart Logic for Euclid's Division Algorithm to Find HCF(a, b)
Euclid’s Algorithm: HCF(a, b) = HCF(b, a mod b) until remainder = 0.
Step 1: 252 = 105 × 2 + 42 → HCF(252,105) = HCF(105, 42)
Step 2: 105 = 42 × 2 + 21 → HCF(105, 42) = HCF(42, 21)
Step 3: 42 = 21 × 2 + 0 → HCF(42, 21) = 21
HCF(252, 105) = 21
Suggested Marks Distribution
Algorithm stated correctly1 Mark
Steps 1 and 2 correct2 Marks
Final HCF = 211 Mark
Q2
Use Euclid’s algorithm to find HCF(455, 42).
3 Marks
✓ Suggested Step-by-Step Solution
455 = 42 × 10 + 35 → HCF(455,42) = HCF(42,35)
42 = 35 × 1 + 7 → HCF(42,35) = HCF(35,7)
35 = 7 × 5 + 0 → HCF = 7
Suggested Marks Distribution
Each correct step (×3)1 Mark each
Exercise Set 11.3 — Addition Algorithms and Patterns
Q1
The Fibonacci sequence starts: 1, 1, 2, 3, 5, 8, ... Each term is the sum of the two before it. Write the next 5 terms and find the ratio of consecutive terms to 2 decimal places for the last 3 pairs.
4 Marks
✓ Suggested Step-by-Step Solution
Next 5 terms: 13, 21, 34, 55, 89
Ratios (next/previous):
34/21 ≈ 1.62
55/34 ≈ 1.62
89/55 ≈ 1.62
34/21 ≈ 1.62
55/34 ≈ 1.62
89/55 ≈ 1.62
These ratios approach the Golden Ratio φ ≈ 1.618, a famous mathematical constant.
Suggested Marks Distribution
5 correct terms: 13, 21, 34, 55, 892 Marks
Three ratios calculated ≈ 1.621 Mark
Mention of Golden Ratio1 Mark
Q2
Write an algorithm (step-by-step procedure) to find whether a given positive integer n is even or odd.
2 Marks
✓ Suggested Step-by-Step Solution
Step 1: Start.
Step 2: Input a positive integer n.
Step 3: Compute remainder r = n % 2.
Step 4: If r == 0, display "n is Even"; Else display "n is Odd".
Step 5: Stop.
Suggested Marks Distribution
Clear input, remainder check, conditional branch2 Marks
Q3
Use Euclid's Division Algorithm to find the HCF of 135 and 225.
2 Marks
✓ Suggested Step-by-Step Solution
Since 225 > 135, apply division: 225 = 135 × 1 + 90
Remainder 90 ≠ 0, apply to 135 and 90: 135 = 90 × 1 + 45
Remainder 45 ≠ 0, apply to 90 and 45: 90 = 45 × 2 + 0
Since remainder is now 0, divisor is 45. Hence, HCF(135, 225) = 45.
Suggested Marks Distribution
Steps of Euclid division lemma shown1 Mark
Final HCF = 451 Mark
Q4
Find the HCF of 867 and 255 using Euclid's algorithm.
2 Marks
✓ Suggested Step-by-Step Solution
867 = 255 × 3 + 102
255 = 102 × 2 + 51
102 = 51 × 2 + 0
The remainder is 0, so HCF(867, 255) = 51.
Suggested Marks Distribution
Division steps correctly written1 Mark
HCF = 511 Mark
Q2
Write an algorithm to compute the factorial of a positive integer n (n!).
2 Marks
✓ Suggested Step-by-Step Solution
Step 1: Start.
Step 2: Input integer n. Set fact = 1, i = 1.
Step 3: Repeat while i ≤ n: fact = fact × i; i = i + 1.
Step 4: Output fact.
Step 5: Stop.
Suggested Marks Distribution
Initialization and loop condition correctly specified2 Marks
🎯 Competency-Based Questions (CBQ) & HOTS — Chapter 11CBSE / NEP 2020
📝 Case Study & Real-Life Modeling
Computer Science & Cryptography (Euclidean Algorithm): A cybersecurity protocol requires computing the greatest common divisor of two large encryption keys, 1147 and 899, to establish a coprime shared key.
(a) Apply Euclid's Division Algorithm to find gcd(1147, 899).
(b) State the number of division steps taken to reach the remainder zero.
(c) Express the final gcd as a linear combination of 1147 and 899 (Bézout's identity).
(a) Apply Euclid's Division Algorithm to find gcd(1147, 899).
(b) State the number of division steps taken to reach the remainder zero.
(c) Express the final gcd as a linear combination of 1147 and 899 (Bézout's identity).
(a) Step 1: 1147 = 899 × 1 + 248
Step 2: 899 = 248 × 3 + 155
Step 3: 248 = 155 × 1 + 93
Step 4: 155 = 93 × 1 + 62
Step 5: 93 = 62 × 1 + 31
Step 6: 62 = 31 × 2 + 0.
The last non-zero remainder is 31. Thus, gcd(1147, 899) = 31.
(b) It took 6 division steps.
(c) Back substitution: 31 = 93 - 62 = 93 - (155 - 93) = 2(93) - 155 = 2(248 - 155) - 155 = 2(248) - 3(155) = 2(248) - 3(899 - 3×248) = 11(248) - 3(899) = 11(1147 - 899) - 3(899) = 11(1147) - 14(899) = 31.
Step 2: 899 = 248 × 3 + 155
Step 3: 248 = 155 × 1 + 93
Step 4: 155 = 93 × 1 + 62
Step 5: 93 = 62 × 1 + 31
Step 6: 62 = 31 × 2 + 0.
The last non-zero remainder is 31. Thus, gcd(1147, 899) = 31.
(b) It took 6 division steps.
(c) Back substitution: 31 = 93 - 62 = 93 - (155 - 93) = 2(93) - 155 = 2(248 - 155) - 155 = 2(248) - 3(155) = 2(248) - 3(899 - 3×248) = 11(248) - 3(899) = 11(1147 - 899) - 3(899) = 11(1147) - 14(899) = 31.
🧠 HOTS & Assertion-Reasoning
Assertion (A): The Euclidean algorithm for finding the GCD of any two positive integers always terminates in a finite number of steps.
Reason (R): The sequence of remainders r₁, r₂, r₃... forms a strictly decreasing sequence of non-negative integers bounded below by zero.
Choose: (a) Both A and R are true and R is the correct explanation. (b) Both A and R are true, but R is not correct explanation. (c) A is true, R is false. (d) A is false, R is true.
Reason (R): The sequence of remainders r₁, r₂, r₃... forms a strictly decreasing sequence of non-negative integers bounded below by zero.
Choose: (a) Both A and R are true and R is the correct explanation. (b) Both A and R are true, but R is not correct explanation. (c) A is true, R is false. (d) A is false, R is true.
Correct Choice: (a) Both A and R are true and R is the correct explanation.
Explanation: Since b > r₁ > r₂ > ... ≥ 0, each remainder is strictly smaller than the preceding one. Any strictly decreasing sequence of non-negative integers must reach zero in at most b steps.
Explanation: Since b > r₁ > r₂ > ... ≥ 0, each remainder is strictly smaller than the preceding one. Any strictly decreasing sequence of non-negative integers must reach zero in at most b steps.