Class 9 (CBSE) · Mathematics
The World of Algorithms
29 practice questions with full step-by-step solutions, quick revision notes — free, no sign-up.
Reviewed by Kaustav Basak (19 years teaching)Written with AI helpReport a mistake
This chapter has
The World of Algorithms — quick revision notes
- An algorithm must have clear steps, must stop after finitely many steps, and must give the correct output for every valid input.
- Building blocks: basic steps, loops (repeat until a condition holds) and conditional steps (if ... then ... otherwise ...).
- In digit-by-digit addition the carry into any column is at most 1, and the work grows with the number of digits.
- First gcd algorithm: list the divisors of each number, find the common divisors, take the largest.
- Divisors come in pairs (d and n/d), so to find all divisors of n you only need to test numbers up to the square root of n.
- Euclid's subtraction algorithm: replace the larger number by the difference of the two until both are equal; that common value is the gcd. It works because (a, b) and (a - b, b) have exactly the same common divisors.
- Division method: replace (a, b) by (b, r), where r is the remainder of a divided by b; the divisor at the step where the remainder becomes 0 is the gcd.
- One division step does the work of many subtractions, so the division method is far more efficient (e.g. gcd(1000, 1) needs 999 subtractions but one division).
- Aryabhata's kuttaka ('pulveriser'), described in the Aryabhatiya, uses repeated division to find whole-number solutions of equations like ax + by = c.
Common mistakes to avoid
- Stopping the division method one step early and giving a remainder that is not the last non-zero remainder.
- Replacing the larger number by the quotient instead of the difference (subtraction method) or the remainder (division method).
- Forgetting the carry when adding digit by digit, or assuming a carry can be 2 or more.
- Thinking an algorithm is correct just because it worked on one example, without checking that it always stops and always gives the right answer.
The World of Algorithms — solved practice questions
7 Class 9 Mathematics questions with step-by-step solutions. Attempt each, then reveal the answer.
These worked examples are not in the timed test, so you can study them first.
- Q1easyReport
Which of the following best describes an algorithm?
- AA formula that must be written only using letters
- BA finite, step-by-step procedure with clearly defined steps that solves a problem
- CAny guess that sometimes gives the right answer
- DA calculation that can be done only by a computer
Show answer & solution
Correct answer: (B) A finite, step-by-step procedure with clearly defined steps that solves a problem
An algorithm is a systematic procedure made of clear steps that, when followed, solves a problem and stops after a finite number of steps. It can be carried out by a person with pen and paper as well as by a computer. - Q2easyReport
In an algorithm, a group of steps that is carried out again and again until some condition is met is called:
- Aa carry
- Ba loop (repetition)
- Ca list
- Da conditional step
Show answer & solution
Correct answer: (B) a loop (repetition)
Repeating a set of steps until a stopping condition holds is called a loop or repetition. For example, Euclid's algorithm repeats the subtraction step until the two numbers become equal. - Q3easyReport
The instruction 'If the remainder is 0, stop; otherwise, go to the next step' is an example of:
- Aa carry
- Ba conditional step
- Ca data structure
- Dan input
Show answer & solution
Correct answer: (B) a conditional step
A conditional step chooses what to do next depending on whether a condition is true. Here the action depends on whether the remainder is 0, so it is a conditional step. - Q4mediumReport
While adding 478 and 365 digit by digit, what digit is written in the tens place of the answer, and what carry goes to the hundreds column?
- A3, with a carry of 1
- B5, with a carry of 1
- C4, with a carry of 0
- D4, with a carry of 1
Show answer & solution
Correct answer: (D) 4, with a carry of 1
Units: 8 + 5 = 13, write 3 and carry 1. Tens: 7 + 6 + 1 = 14, write 4 and carry 1 to the hundreds. The hundreds give 4 + 3 + 1 = 8, so the sum is 843. - Q5easyReport
When two numbers are added digit by digit, the carry into any column is never more than:
- A1
- B8
- C2
- D9
Show answer & solution
Correct answer: (A) 1
The largest possible column total is 9 + 9 + 1 (carry) = 19. So the carry passed on is at most 1, and this stays true for every column. - Q6easyReport
How many divisors does 36 have?
- A8
- B10
- C6
- D9
Show answer & solution
Correct answer: (D) 9
The divisors of 36 are 1, 2, 3, 4, 6, 9, 12, 18 and 36, which makes 9 divisors. They pair up as 1 × 36, 2 × 18, 3 × 12, 4 × 9, with 6 × 6 paired with itself. - Q7easyReport
What is the greatest common divisor (gcd) of 48 and 36?
- A6
- B24
- C12
- D4
Show answer & solution
Correct answer: (C) 12
48 = 12 × 4 and 36 = 12 × 3, and 4 and 3 have no common divisor other than 1. So 12 is the largest number dividing both. 24 does not divide 36.
Ready to test yourself? Take the 22-question The World of Algorithms test →