Back to chapter
Class 9 · Chapter notes

The World of Algorithms

Log in to track progress
00

Overview & Prerequisites

What this chapter is about, why it matters, and what you need to know before starting.

This chapter introduces the idea of an algorithm, which is a finite sequence of clear and unambiguous steps used to solve a well-defined problem. Students connect this idea with familiar school methods such as long division and then study one important mathematical algorithm: the Euclidean algorithm for finding HCF.

The chapter also shows that an algorithm is not just about getting the correct answer, but about doing so in a systematic and efficient way. Through examples, repeated division, and simple flowcharts, students learn how mathematical thinking can be organised into steps, decisions, and loops.

By the end of the chapter, students should be able to recognise whether a procedure is an algorithm, use the Euclidean algorithm to find gcd⁡(a,b)\gcd(a,b), and understand that two different methods for the same problem may require different amounts of work.

Before you start, you should know
  • Meaning of HCF of two whole numbers
  • Division algorithm in the form a=bq+ra=bq+r with 0≤r<b0 \le r < b
  • Finding remainders in division
  • Basic idea of step-by-step procedures such as long division
  • Reading simple diagrams with arrows and boxes
01

What Is an Algorithm?

An algorithm is a finite list of clear steps used to solve a well-defined problem. For a set of instructions to be an algorithm, every step must be unambiguous and the process must end after a finite number of steps.

Meaning of an Algorithm

In everyday life, we often follow a method step by step. In mathematics, such a method is called an algorithm when it is precise enough that anyone following it gets the intended result.

An algorithm is a finite sequence of unambiguous steps for solving a well-defined problem.

The words in the definition are important.

A well-defined problem is a problem that is clearly stated. For example, find the HCF of 4848 and 1818 is a well-defined problem.

A step is unambiguous if it has only one meaning. A step like add 7\text{add }7 is clear, but a step like make it big\text{make it big} is vague.

The word finite means the process must end after a limited number of steps. If the instructions can continue forever, they do not form a proper algorithm.

Clear Instructions and Vague Instructions

To decide whether something is an algorithm, we ask three questions: Is the problem clear? Are the steps clear? Does the process end?

Instructions such as add 7\text{add }7, divide by 2\text{divide by }2, or multiply by 3\text{multiply by }3 are clear because each one has exactly one meaning.

Instructions such as make it nice\text{make it nice}, do it quickly\text{do it quickly}, or continue until it looks correct\text{continue until it looks correct} are not clear enough for mathematics because different people may interpret them differently.

So, every algorithm is a recipe, but not every recipe is an algorithm. A recipe becomes algorithm-like only when each step is exact and unambiguous.

Algorithms in Everyday Mathematics

You already use algorithms in school mathematics. The method of addition, subtraction, multiplication, and long division all follow fixed steps.

For example, in long division, each step tells you exactly what to do next. There is no guessing. That is why long division is an algorithm.

Different algorithms can solve the same problem. Some may take fewer steps and some may take more. Later, this is why we compare algorithms for efficiency.

At this stage, remember that the main idea is not the machine or computer. The main idea is a clear, step-by-step method.

Formula · Definition of an Algorithm
Algorithm=finite sequence of unambiguous steps for a well-defined problem\text{Algorithm} = \text{finite sequence of unambiguous steps for a well-defined problem}

This statement gives the mathematical meaning of an algorithm. The problem must be clearly stated, the steps must be exact, and the process must stop after finitely many steps.

When to use: Use this definition when deciding whether a given set of instructions is an algorithm or not.

Example · Recognising a Simple Algorithm
easy

Is the instruction set add 7, then double the result\text{add }7\text{, then double the result} an algorithm?

Example · Identifying a Vague Instruction
easy

Is the instruction pick any number and shout\text{pick any number and shout} an algorithm?

Example · Testing Whether Instructions Form an Algorithm
medium

Consider the instructions: Take a number. If it is even, divide by 2. If it is odd, add 1. Stop after one step.\text{Take a number. If it is even, divide by }2\text{. If it is odd, add }1\text{. Stop after one step.} Is this an algorithm?

Example · Why Vague Words Do Not Form an Algorithm
medium

Explain why the instruction keep changing the answer until it looks correct\text{keep changing the answer until it looks correct} is not an algorithm.

Common mistake
Thinking that any list of steps is automatically an algorithm.
A list of steps is an algorithm only if the problem is well-defined, each step is unambiguous, and the process is finite.

Why: Some instructions may be vague or may never end. Such instructions do not satisfy the definition of an algorithm.

Common mistake
Believing that words like quickly\text{quickly}, nicely\text{nicely}, or correctly\text{correctly} are precise enough in mathematics.
In mathematics, instructions must be exact, such as add 5\text{add }5 or divide by 3\text{divide by }3.

Why: Vague words can be understood differently by different people, so they do not give a unique procedure.

Check yourself

Which of the following is an algorithm?

Check yourself

State one necessary condition for a set of instructions to be an algorithm.

02

Algorithms in Everyday Mathematics

Many school methods are already algorithms because they follow fixed, clear, step-by-step rules. Procedures such as long division, addition with carry, and finding a remainder show how mathematics uses algorithms in everyday work.

Everyday mathematics already uses algorithms

In daily mathematics, we often follow a fixed method without thinking about it. When we add numbers, subtract with borrowing, multiply, or do long division, we are using an algorithm.

An algorithm is a sequence of steps that tells us exactly what to do. In school mathematics, this is useful because each step is clear and gives the same result whenever it is followed correctly.

So, a school method is an algorithm if it is step-by-step, unambiguous, and finite. It must not depend on guessing or personal choice.

Long division as an algorithm

Long division is a familiar example of an algorithm. We divide from left to right, write the quotient digit by digit, multiply, subtract, and bring down the next digit.

Each step in long division has a fixed meaning. For example, when we ask how many times one number goes into another, we choose the greatest whole number that does not make the product too large. Then we continue in the same way.

Because the steps are always done in order, long division is a good example of how an algorithm works in mathematics. If two students follow the method correctly, they get the same quotient and remainder.

Simple number operations also follow fixed rules

Addition with carry and subtraction with borrowing are also algorithms. In addition, we add digits place by place, write the unit digit, and carry the extra value to the next place if needed.

In subtraction, if the top digit is smaller than the bottom digit, we borrow from the next place value. This is not a random trick; it is a fixed rule.

Even a simple instruction like “add 77, then double” can be an algorithm if the steps are clear and always done in the same order. But an instruction such as “do something nice with the number” is not an algorithm, because it is not precise.

Formula · General form of a step-by-step number rule
Output=2(n+7)\text{Output} = 2(n+7)

If the rule is “add 77, then double”, we first form n+7n+7 and then multiply by 22. The order of steps matters.

When to use: Use this when a verbal rule gives operations in a fixed sequence and we want to write the result algebraically.

Example · Addition with carry as an algorithm
easy

Show that adding 278278 and 145145 is an algorithm by carrying out the steps.

Example · Long division as a fixed procedure
medium

Use the long division algorithm to divide 156156 by 1212.

Example · A number rule as an algorithm
medium

Is “add 77, then double” an algorithm? Apply it to the number 55.

Example · Order of steps matters
hard

Compare the two procedures: (i) add 77, then double, and (ii) double, then add 77. Apply both to 44. Are these the same algorithm?

Common mistake
Thinking that any set of instructions is an algorithm.
Only a finite sequence of clear and unambiguous steps is an algorithm.

Why: If an instruction is vague, such as “do it neatly” or “pick a good number”, different people may do different things. Then the method is not a proper algorithm.

Common mistake
Changing the order of steps in a number rule and expecting the same result.
Follow the steps in the given order.

Why: Algorithms depend on sequence. For example, “add 77, then double” is not the same as “double, then add 77”.

Check yourself

Which of the following is an algorithm?

Check yourself

Why is long division called an algorithm?

03

The Euclidean Algorithm for HCF

The Euclidean algorithm is a quick method to find the HCF of two numbers by repeated division. At each step, we replace the pair by the divisor and the remainder, and continue until the remainder becomes 00.

Idea of the Euclidean Algorithm

To find the HCF of two numbers, we keep dividing the larger number by the smaller number.

Instead of listing all factors, we use remainders. The key idea is that the HCF does not change if we replace the larger number by the remainder after division.

So, if we know the HCF of one pair of numbers, we can reduce the problem to a smaller pair. Repeating this again and again gives the HCF quickly.

The process stops when the remainder becomes 00. Then the last non-zero remainder, or equivalently the last divisor, is the HCF.

How the Rule Works

Suppose a>ba>b. When we divide aa by bb, we get quotient qq and remainder rr. Then a=bq+ra=bq+r, where 0≤r<b0 \le r < b.

Any common factor of aa and bb must also divide rr, because r=a−bqr=a-bq. Also, any common factor of bb and rr must divide aa, because a=bq+ra=bq+r.

So the common factors of aa and bb are exactly the common factors of bb and rr. Therefore their greatest common factor is the same.

This gives the Euclidean rule: replace the pair (a,b)(a,b) by (b,r)(b,r) and continue.

Steps of the Algorithm

Step 1: Divide the larger number by the smaller number.

Step 2: Write the remainder.

Step 3: Replace the old pair by ((divisor, remainder)).

Step 4: Repeat the division.

Step 5: When the remainder becomes 00, the divisor at that step is the HCF.

This method is especially useful for large numbers because it reduces the calculation very fast.

Formula · Euclidean Algorithm Rule
gcd⁡(a,b)=gcd⁡(b, a mod b)\gcd(a,b)=\gcd(b,\,a \bmod b)

If aa is divided by bb, then a mod ba \bmod b means the remainder. The HCF of aa and bb is the same as the HCF of bb and the remainder.

When to use: Use this when you want to find the HCF of two numbers by repeated division instead of listing factors.

Theorem · Why the Euclidean Algorithm is Correct

If a=bq+ra=bq+r, then gcd⁡(a,b)=gcd⁡(b,r)\gcd(a,b)=\gcd(b,r).

Example · Find the HCF of 4848 and 1818
easy

Use the Euclidean algorithm to find the HCF of 4848 and 1818.

Example · Find the HCF of 105105 and 3030
easy

Use the Euclidean algorithm to find the HCF of 105105 and 3030.

Example · Find the HCF of 252252 and 105105
medium

Use repeated division to find the HCF of 252252 and 105105.

Example · Find the HCF of two consecutive integers 1414 and 1515
medium

Use the Euclidean algorithm to find the HCF of 1414 and 1515.

Common mistake
Stopping after the first division and taking the first remainder as the HCF.
Continue dividing until the remainder becomes 00. The last divisor is the HCF.

Why: A remainder in the middle is not necessarily the HCF. The algorithm ends only when remainder 00 appears.

Common mistake
Dividing in the wrong order and writing 18=48×0+1818=48\times 0+18, then stopping.
Always divide the larger number by the smaller number first, or continue correctly with the non-zero remainder.

Why: The method works by reducing the numbers. If the process does not reduce properly, you may not reach the HCF clearly.

Check yourself

In the Euclidean algorithm, when do we stop?

Check yourself

If 56=24×2+856=24\times 2+8, then gcd⁡(56,24)\gcd(56,24) is equal to which of the following?

04

Worked Examples on Finding HCF

To find the HCF of two numbers by the Euclidean algorithm, divide the larger number by the smaller and keep replacing the pair by divisor and remainder. Continue until the remainder becomes 00; the last non-zero remainder is the HCF.

How to Work Step by Step

In worked examples of the Euclidean algorithm, we do the same action again and again: divide, write the remainder, and repeat.

Start with the larger number and divide it by the smaller number. Then take the divisor and the remainder as the new pair of numbers.

When the remainder becomes 00, the process stops. The HCF is the last non-zero remainder.

This method is very useful because the numbers become smaller quickly, so the answer is reached in only a few steps.

What to Write in a Solution

In CBSE-style solutions, each division step should be written clearly in the form a=bq+ra=bq+r. Here, aa is the dividend, bb is the divisor, qq is the quotient and rr is the remainder.

After each division, write the next line using the divisor and the remainder from the previous step.

At the end, do not forget to state the final conclusion: the HCF is the last non-zero remainder.

Formula · Euclidean Algorithm for HCF
gcd⁡(a,b)=gcd⁡(b, a mod b)\gcd(a,b)=\gcd(b,\,a\bmod b)

If aa is divided by bb, then the HCF of aa and bb is the same as the HCF of bb and the remainder. Repeating this step again and again gives the HCF.

When to use: Use this when you have to find the HCF of two whole numbers, especially when listing all factors is long or inconvenient.

Example · Find the HCF of 48 and 18
easy

Use the Euclidean algorithm to find the HCF of 4848 and 1818.

Example · Find the HCF of 105 and 30
easy

Use the Euclidean algorithm to find the HCF of 105105 and 3030.

Example · Find the HCF of 56 and 24
medium

Use the Euclidean algorithm to find the HCF of 5656 and 2424.

Example · Find the HCF of 180 and 150
medium

Use the Euclidean algorithm to find the HCF of 180180 and 150150.

Common mistake
Stopping after the first division step and taking the first remainder as the HCF.
Continue dividing until the remainder becomes 00. Then take the last non-zero remainder as the HCF.

Why: A remainder in the middle of the process is not always the HCF. The algorithm is complete only when a remainder of 00 is reached.

Common mistake
Dividing in the wrong order, such as dividing the smaller number by the larger number first.
Start by dividing the larger number by the smaller number.

Why: This keeps the remainder smaller than the divisor and makes the steps correct and easy to follow.

Check yourself

Using the Euclidean algorithm, what is the HCF of 100100 and 7575?

Check yourself

How many division steps are needed to reach gcd⁡(21,14)\gcd(21,14) by the Euclidean algorithm?

05

Flowcharts and Sequential Thinking

A flowchart is a simple picture of an algorithm. It shows actions, decisions, and the direction of steps clearly, so we can follow a process in the correct order.

Flowcharts and algorithms

A flowchart is a visual way to show an algorithm. Instead of writing only sentences, we draw standard shapes and connect them with arrows.

In a flowchart, each shape has a special meaning. This makes the steps easy to read and easy to check.

Flowcharts are useful in mathematics because many procedures happen in order. For example, finding HCF by the Euclidean algorithm, solving a simple rule, or checking whether a remainder is 00 can all be shown clearly by a flowchart.

A good flowchart must match the idea of an algorithm. So the steps should be finite, clear, and unambiguous. At every stage, we should know exactly what to do next.

Main parts of a flowchart

A box or rectangle shows an action. An action means a step to be carried out, such as a←ba \leftarrow b or 'divide aa by bb'.

A diamond shows a decision. A decision asks a question with answers such as Yes/No or True/False. For example, 'Is the remainder 00?' is a decision.

Arrows show the direction of flow. They tell us which step comes next. Without arrows, the order may become confusing.

Usually, a flowchart also has a Start and a Stop. These show where the algorithm begins and where it ends.

So a flowchart does not just show the steps. It also shows the choices and the order in which those choices are checked.

Sequential thinking

Sequential thinking means arranging steps in the correct order so that the result is obtained properly.

In many problems, the order matters. For example, 'add 77, then double' is not the same as 'double, then add 77'. A flowchart helps us see this order clearly.

A decision can also create a loop. A loop means some steps are repeated until a condition is satisfied. In the Euclidean algorithm, we keep dividing and checking the remainder until the remainder becomes 00.

This is why flowcharts are helpful. They make long procedures easier to follow, reduce confusion, and help us check whether any step is missing.

Formula · Basic flow of a decision step
Condition true→follow one branch,Condition false→follow the other branch\text{Condition true} \rightarrow \text{follow one branch}, \qquad \text{Condition false} \rightarrow \text{follow the other branch}

A decision in a flowchart splits the algorithm into two possible paths. The next step depends on whether the condition is true or false.

When to use: Use this whenever an algorithm requires a choice, such as checking whether a remainder is 00, whether a number is even, or whether one step should be repeated.

Example · Reading a simple flowchart rule
easy

An algorithm says: start with a number, add 77, then double. What is the output when the input is 55?

Example · Identify the decision in an HCF flowchart
easy

In a flowchart for the Euclidean algorithm, which step should be written inside the decision diamond?

Example · Write the flow of steps for finding HCF
medium

Write the sequence of steps that a flowchart would show for finding the HCF of two numbers by the Euclidean algorithm.

Example · Why order matters in a flowchart
medium

Compare the two algorithms for input 33: Algorithm A: add 77, then double. Algorithm B: double, then add 77. Are the outputs the same?

Common mistake
Using a box for a question like 'Is the remainder 00?'
Use a diamond for a question or decision.

Why: A rectangle is for an action step. A decision must show two possible paths such as Yes and No, so it is represented by a diamond.

Common mistake
Drawing the steps without arrows because the order seems obvious.
Always use arrows to show the direction of flow.

Why: A flowchart must show exactly which step comes next. Without arrows, the algorithm may become unclear or may be read in the wrong order.

A simple flowchart for the Euclidean algorithm
Check yourself

Which shape in a flowchart is used for a decision?

Check yourself

A flowchart shows: input 44, multiply by 33, then subtract 22. What is the output?

06

Why Efficiency Matters

Different algorithms can solve the same problem, but the number of steps may be very different. So in mathematics we prefer methods that give the correct answer with less work, such as the Euclidean algorithm for HCF.

Why do we care about efficiency?

An algorithm is useful only if it gives the correct answer in a clear sequence of steps. But when two algorithms both give the correct answer, we still ask an important question: which one takes less work?

This idea is called efficiency. An efficient algorithm uses fewer steps, less repeated calculation, and reaches the answer faster.

For small numbers, even a slow method may seem fine. But for bigger numbers, an inefficient method becomes tiring and time-consuming. So mathematicians and computer scientists prefer methods that are both correct and efficient.

Same problem, different amount of work

The same mathematical problem can often be solved in more than one way. For example, to find the HCF of two numbers, one method is to list all factors of both numbers and then choose the greatest common factor.

Another method is the Euclidean algorithm, where we repeatedly divide and use remainders. Both methods give the same HCF, but the amount of work is usually very different.

For larger numbers, listing factors can become long and messy, while the Euclidean algorithm quickly reduces the problem to smaller numbers. That is why the Euclidean algorithm is considered more efficient.

Efficiency in the Euclidean algorithm

In the Euclidean algorithm, each step replaces the original pair of numbers by a smaller pair. So the problem becomes easier step by step.

Suppose we want to find gcd⁡(a,b)\gcd(a,b) with a>ba>b. Instead of checking many factors, we divide aa by bb, take the remainder, and continue. Since the remainder is smaller than bb, the numbers reduce quickly.

This is why the Euclidean algorithm is a powerful method for finding HCF. It avoids unnecessary work and reaches the answer in only a few steps, even when the numbers are large.

Formula · Efficiency idea for HCF
gcd⁡(a,b)=gcd⁡(b, a mod b)\gcd(a,b)=\gcd(b,\,a\bmod b)

This tells us that we can replace the pair a,ba,b by the smaller pair b,a mod bb, a \bmod b without changing the HCF. Repeating this reduces the work.

When to use: Use this while applying the Euclidean algorithm to find the HCF of two numbers efficiently.

Example · Comparing two methods for gcd⁡(105,30)\gcd(105,30)
easy

Show that two different algorithms can find the HCF of 105105 and 3030, and decide which one is more efficient.

Example · Why Euclid is better for bigger numbers
medium

Find gcd⁡(252,105)\gcd(252,105) and explain why the Euclidean algorithm is efficient here.

Example · Same result, but not the same effort
medium

A student says, "Any correct method is equally good." Explain with the example of finding the HCF of 180180 and 150150.

Example · Judging efficiency without full calculation
hard

Without finding all factors, decide which method is better for finding the HCF of two large numbers: listing factors or the Euclidean algorithm. Give a reason.

Common mistake
Since two methods give the same answer, they are equally efficient.
Two methods may be equally correct but not equally efficient.

Why: Efficiency is about the amount of work, number of steps, and time taken, not only about getting the correct answer.

Common mistake
Efficiency means skipping steps and writing less.
Efficiency means using a better method, not leaving out necessary steps.

Why: An efficient algorithm still follows clear and correct steps. If steps are skipped carelessly, the method may become incorrect or unclear.

Check yourself

Which statement best explains why the Euclidean algorithm is preferred for finding HCF?

Check yourself

True or false: If two algorithms give the same correct answer, then both are equally efficient.

07

Practice, Reasoning, and Simple Judgement Questions

This topic gives practice in using the Euclidean algorithm, counting the number of steps, and deciding whether a given procedure is truly an algorithm. It also helps us notice simple patterns, such as the HCF of two consecutive integers.

How to Practise Algorithm Questions

In this topic, we do not learn a new rule. We practise how to apply an algorithm correctly and how to judge whether a procedure is really an algorithm.

For HCF questions, the main idea is simple: divide, write the remainder, and repeat with the smaller number and the remainder. Stop when the remainder becomes 00. The last non-zero remainder is the HCF.

In reasoning questions, we check whether each step is finite, clear, and unambiguous. If a step can be interpreted in different ways, then it is not a proper algorithm.

Counting Steps in the Euclidean Algorithm

A step of the Euclidean algorithm means one division in which we write dividend == divisor ×\times quotient ++ remainder.

So, if we write 21=1×14+721 = 1\times 14 + 7 and then 14=2×7+014 = 2\times 7 + 0, the algorithm takes 22 steps.

While counting steps, include the final division that gives remainder 00, because that is the step where the process stops.

Special Observation: Consecutive Integers

Two consecutive integers, such as 1414 and 1515, differ by 11. Their HCF is always 11.

This happens because if a number divides both consecutive integers, then it must also divide their difference. But the difference of consecutive integers is 11, and the only positive integer dividing 11 is 11.

So, the HCF of any two consecutive integers is 11. This is a useful observation in simple reasoning questions.

Formula · Euclidean Algorithm for HCF
gcd⁡(a,b)=gcd⁡(b, a mod b)\gcd(a,b)=\gcd(b,\,a \bmod b)

To find the HCF of two numbers, divide the larger number by the smaller number and take the remainder. Then replace the pair by the smaller number and the remainder. Repeat this until the remainder becomes 00. The last non-zero remainder is the HCF.

When to use: Use this when you have to find the HCF of two integers quickly and systematically.

Theorem · HCF of Two Consecutive Integers

The HCF of any two consecutive integers is 11.

Example · Find the HCF of 5656 and 2424 by Euclid's algorithm
easy

Find the HCF of 5656 and 2424 using the Euclidean algorithm.

Example · Find the HCF of 100100 and 7575 by Euclid's algorithm
easy

Find the HCF of 100100 and 7575 using the Euclidean algorithm.

Example · How many steps does Euclid's algorithm take for 2121 and 1414?
medium

Find the number of steps needed to reach gcd⁡(21,14)\gcd(21,14) by the Euclidean algorithm.

Example · Judge whether the procedure is an algorithm
medium

Is the instruction 'pick any number and shout' an algorithm? Give a reason.

Example · Find the HCF of two consecutive integers 1414 and 1515
hard

Find the HCF of 1414 and 1515. Also state the general observation for consecutive integers.

Common mistake
Stopping after the first division in Euclid's algorithm.
Continue the divisions until the remainder becomes 00.

Why: The HCF is the last non-zero remainder, not the first remainder obtained.

Common mistake
Saying that a vague instruction such as 'do it nicely' is part of an algorithm.
Every step of an algorithm must be clear and unambiguous.

Why: Different people may interpret vague words differently, so such instructions do not satisfy the idea of an algorithm.

Check yourself

Find the HCF of 180180 and 150150.

Check yourself

Which of the following is an algorithm?

08

Revision & Exam Focus

Everything to remember for the exam, the classic traps, and a final self-check.

Quick revision
  • 01An algorithm is a finite sequence of clear and unambiguous steps to solve a well-defined problem.
  • 02Every step of an algorithm must have only one meaning.
  • 03Long division is a familiar example of an algorithm.
  • 04If a process is vague, it is not a proper mathematical algorithm.
  • 05The Euclidean algorithm is used to find the HCF of two numbers.
  • 06In the Euclidean algorithm, divide the larger number by the smaller number and use the remainder.
  • 07The key idea is gcd⁡(a,b)=gcd⁡(b,a mod b)\gcd(a,b)=\gcd(b,a\bmod b).
  • 08Repeat the division process until the remainder becomes 00.
  • 09The last non-zero remainder is the HCF.
  • 10A flowchart shows the order of steps using boxes, arrows and decision points.
  • 11Different algorithms can solve the same problem.
  • 12Efficiency matters because some algorithms need fewer steps than others.
  • 13For two consecutive integers such as 1414 and 1515, the HCF is 11.
  • 14A valid algorithm must stop after a finite number of steps.
Exam focus

From this chapter, questions are usually short and direct. You may be asked to identify whether a process is an algorithm, apply the Euclidean algorithm to find HCF, or count the number of steps in a simple case.

Board-style questions often test correct reasoning more than long calculations. Learn the meaning of finite, unambiguous, and well-defined, and practise writing Euclidean steps neatly in order.

  • Find the HCF of two numbers using the Euclidean algorithm.
  • State whether a given set of instructions is an algorithm or not.
  • Explain why a vague instruction is not an algorithm.
  • Count how many Euclidean steps are needed in a simple example.
  • Find the HCF of two consecutive integers.
  • Complete missing steps in a Euclidean algorithm.
  • Identify the role of a decision box in a flowchart.
Common mistake
Stopping the Euclidean algorithm after the first division and taking the first remainder as the HCF.
Continue dividing until the remainder becomes 00. The last non-zero remainder is the HCF.

Why: A remainder in the middle of the process is not always the HCF. The method works only when the process is continued fully.

Common mistake
Calling any list of instructions an algorithm, even if the steps are vague, like 'do it nicely' or 'pick any number and shout'.
A process is an algorithm only if its steps are clear, unambiguous and finite.

Why: Mathematics requires exact instructions. If different people can interpret a step differently, it is not a proper algorithm.

Common mistake
Using gcd⁡(a,b)=gcd⁡(a,a mod b)\gcd(a,b)=\gcd(a,a\bmod b) in the Euclidean algorithm.
Use gcd⁡(a,b)=gcd⁡(b,a mod b)\gcd(a,b)=\gcd(b,a\bmod b), where a>ba>b.

Why: After division, the new pair is the divisor and the remainder, not the original first number and the remainder.

Check yourself

Which of the following is a necessary property of an algorithm?

Check yourself

Find the HCF of 100100 and 7575 using the Euclidean algorithm.

Check yourself

How many Euclidean steps are needed to reach gcd⁡(21,14)\gcd(21,14)?

Check yourself

Is 'pick any number and shout' an algorithm?

Gyaan Maths — CBSE Class 6-12, built for board-toppers.
v1.1 · Sept 2026