Total Marks: 40 | Time: 90 minutes
Instructions: All questions are compulsory. Marks are indicated against each question. Read each question carefully before answering.
Section A — Multiple Choice Questions (1 mark each)
What is an algorithm?
[1 mark]A step-by-step procedure to solve a problem
A method of counting dots to add numbers
A type of data structure
A Greek method for finding prime numbers
Show answer
Answer: A — A step-by-step procedure to solve a problem
The chapter defines an algorithm as a step-by-step procedure to arrive at an answer.
In the addition algorithm, after adding two digits and the carry, if the sum is 10 or more, what do we do?
[1 mark]Write the whole sum and set carry to 1
Write the units digit and set carry to 1
Write the tens digit and set carry to 0
Ignore the carry and write the sum directly
Show answer
Answer: B — Write the units digit and set carry to 1
According to the algorithm, if the sum is more than 10, we write the units digit below and set the carry to 1.
Assertion (A): The addition algorithm is much faster than counting dots for large numbers.
Reason (R): The time taken by the addition algorithm is proportional to the number of digits, while counting dots takes time proportional to the value of the numbers.
Both A and R are true and R is the correct explanation of A.
Both A and R are true but R is not the correct explanation of A.
A is true but R is false.
A is false but R is true.
Show answer
Answer: A — Both A and R are true and R is the correct explanation of A.
The chapter explicitly states that addition algorithm is faster and explains that counting dots grows with value while digit addition grows with number of digits.
Assertion (A): The divisor list method for finding gcd is efficient for very large numbers.
Reason (R): It scans all numbers from 1 to the smaller number to find common divisors.
Both A and R are true and R is the correct explanation of A.
Both A and R are true but R is not the correct explanation of A.
A is true but R is false.
A is false but R is true.
Show answer
Answer: D — A is false but R is true.
A is false because the method is not efficient for large numbers. R is true as it scans up to min(m,n). So D.
What is the gcd of 375 and 825 according to the passage?
[1 mark]25
75
125
375
Show answer
Answer: B — 75
The passage states that the common divisors are [1, 3, 5, 15, 25, 75], so the gcd is 75.
In the method described in the passage, what is the first step to find the gcd of two numbers?
[1 mark]Find the prime factorization of both numbers
List all divisors of each number
Use Euclid's algorithm
Subtract the smaller number from the larger
Show answer
Answer: B — List all divisors of each number
The passage says we list all divisors of each number and then find the largest common divisor.
What is the key difference between Euclid's subtraction algorithm and Aryabhata's division algorithm?
[1 mark]Euclid uses subtraction, Aryabhata uses division with remainder
Euclid uses multiplication, Aryabhata uses addition
Euclid uses prime factorization, Aryabhata uses lists
Euclid uses lists, Aryabhata uses subtraction
Show answer
Answer: A — Euclid uses subtraction, Aryabhata uses division with remainder
The chapter states that Aryabhata's method uses remainder instead of repeated subtraction.
What is the value of 17 mod 5?
[1 mark]2
3
5
12
Show answer
Answer: A — 2
17 divided by 5 gives remainder 2, so 17 mod 5 = 2.
What is a data structure, as described in the chapter?
[1 mark]A way to organise information to help make an algorithm more efficient
A type of number system
A step in an algorithm
A mathematical proof
Show answer
Answer: A — A way to organise information to help make an algorithm more efficient
The chapter states that a data structure organises information to help make an algorithm more efficient.
Which algorithm's number of steps is proportional to the number of digits?
[1 mark]Divisor list method
Euclid's subtraction algorithm
Aryabhata's division algorithm
Counting dots
Show answer
Answer: C — Aryabhata's division algorithm
The chapter states that Aryabhata's division algorithm has steps proportional to the number of digits.
Section B — Short Answer Questions (3 marks each)
Explain why the addition algorithm is more efficient than counting dots for adding large numbers.
[3 marks]Show answer
The addition algorithm takes time proportional to the number of digits, while counting dots takes time proportional to the value of the numbers. For example, adding 4-digit numbers requires only one more column than 3-digit numbers, whereas counting dots would require 10 times as many dots.
Write the steps of the addition algorithm to add two numbers.
[3 marks]Show answer
- Write the numbers one below the other with digits aligned from right to left.
- Add the rightmost digits. If sum < 10, write sum and set carry to 0; else write units digit and set carry to 1.
- Move to the next column, add the two digits and the carry. Apply the same rule.
- Repeat step 3 until no more digits on the left.
- If carry is 1, write 1 to the left of the bottom row.
Describe the algorithm to find the divisors of a number n.
[3 marks]Show answer
Start with an empty list. For each number j from 1 to n, if j divides n, add j to the list. At the end, the list contains all divisors of n in increasing order.
Explain the key observation behind Euclid's subtraction algorithm.
[3 marks]Show answer
The key observation is that gcd(m,n) = gcd(n, m-n). This holds because any common divisor of m and n also divides m-n, and vice versa. Thus the problem reduces to smaller numbers.
Section C — Long Answer Questions (6 marks each)
Write a detailed algorithm to find the gcd of two numbers using the divisor list method, and explain each step. Then compute gcd(375, 825) using this algorithm.
[6 marks]Show answer
Algorithm:
- Compute the list of divisors of m by checking each number from 1 to m.
- Compute the list of divisors of n similarly.
- Create an empty list common-divisors.
- For each divisor in the first list, if it also appears in the second list, add it to common-divisors.
- Report the rightmost element of common-divisors as gcd(m,n).
Computation for 375 and 825:
Divisors of 375: [1, 3, 5, 15, 25, 75, 125, 375]
Divisors of 825: [1, 3, 5, 11, 15, 25, 33, 55, 75, 165, 275, 825]
Common divisors: [1, 3, 5, 15, 25, 75]
Largest common divisor = 75. So gcd(375, 825) = 75.
Explain how the gcd algorithm can be improved by (i) combining scans, (ii) directly computing common divisors, and (iii) avoiding lists. Illustrate with an example.
[6 marks]Show answer
(i) Combining scans: Instead of scanning 1 to m and then 1 to n, scan 1 to max(m,n). For each j, if it divides m add to divisors of m, if divides n add to divisors of n.
(ii) Directly computing common divisors: Scan 1 to min(m,n). If j divides both m and n, add to common-divisors list.
(iii) Avoiding lists: Keep a variable most-recent-common-divisor, initially 1. Scan from 2 to min(m,n). If k divides both, update variable to k. At end, variable is gcd.
Example: m=6, n=12. min=6. Start with 1. k=2 divides both, update to 2. k=3 divides both, update to 3. k=4 doesn't divide 6. k=5 doesn't divide 6. k=6 divides both, update to 6. gcd=6.
Describe Euclid's subtraction algorithm and Aryabhata's division algorithm. Compare their efficiency with an example.
[6 marks]Show answer
Euclid's subtraction algorithm: If m<n, swap. If n=0, answer is m. Else reduce to gcd(n, m-n).
Aryabhata's division algorithm: If m<n, swap. If n=0, answer is m. Else reduce to gcd(n, m mod n).
Comparison: For gcd(99,2), Euclid's method requires about 49 subtractions, while Aryabhata's method requires only 2 steps. Thus Aryabhata's algorithm is much more efficient for numbers where one is much larger than the other.