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 , and understand that two different methods for the same problem may require different amounts of work.
- Meaning of HCF of two whole numbers
- Division algorithm in the form with
- Finding remainders in division
- Basic idea of step-by-step procedures such as long division
- Reading simple diagrams with arrows and boxes
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 and is a well-defined problem.
A step is unambiguous if it has only one meaning. A step like is clear, but a step like 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 , , or are clear because each one has exactly one meaning.
Instructions such as , , or 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.
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.
Is the instruction set an algorithm?
Is the instruction an algorithm?
Consider the instructions: Is this an algorithm?
Explain why the instruction is not an algorithm.
Why: Some instructions may be vague or may never end. Such instructions do not satisfy the definition of an algorithm.
Why: Vague words can be understood differently by different people, so they do not give a unique procedure.
Which of the following is an algorithm?
State one necessary condition for a set of instructions to be an algorithm.
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 , 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.
If the rule is “add , then double”, we first form and then multiply by . 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.
Show that adding and is an algorithm by carrying out the steps.
Use the long division algorithm to divide by .
Is “add , then double” an algorithm? Apply it to the number .
Compare the two procedures: (i) add , then double, and (ii) double, then add . Apply both to . Are these the same 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.
Why: Algorithms depend on sequence. For example, “add , then double” is not the same as “double, then add ”.
Which of the following is an algorithm?
Why is long division called an algorithm?
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 .
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 . Then the last non-zero remainder, or equivalently the last divisor, is the HCF.
How the Rule Works
Suppose . When we divide by , we get quotient and remainder . Then , where .
Any common factor of and must also divide , because . Also, any common factor of and must divide , because .
So the common factors of and are exactly the common factors of and . Therefore their greatest common factor is the same.
This gives the Euclidean rule: replace the pair by 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 , the divisor at that step is the HCF.
This method is especially useful for large numbers because it reduces the calculation very fast.
If is divided by , then means the remainder. The HCF of and is the same as the HCF of 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.
If , then .
Use the Euclidean algorithm to find the HCF of and .
Use the Euclidean algorithm to find the HCF of and .
Use repeated division to find the HCF of and .
Use the Euclidean algorithm to find the HCF of and .
Why: A remainder in the middle is not necessarily the HCF. The algorithm ends only when remainder appears.
Why: The method works by reducing the numbers. If the process does not reduce properly, you may not reach the HCF clearly.
In the Euclidean algorithm, when do we stop?
If , then is equal to which of the following?
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 ; 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 , 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 . Here, is the dividend, is the divisor, is the quotient and 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.
If is divided by , then the HCF of and is the same as the HCF of 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.
Use the Euclidean algorithm to find the HCF of and .
Use the Euclidean algorithm to find the HCF of and .
Use the Euclidean algorithm to find the HCF of and .
Use the Euclidean algorithm to find the HCF of and .
Why: A remainder in the middle of the process is not always the HCF. The algorithm is complete only when a remainder of is reached.
Why: This keeps the remainder smaller than the divisor and makes the steps correct and easy to follow.
Using the Euclidean algorithm, what is the HCF of and ?
How many division steps are needed to reach by the Euclidean algorithm?
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 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 or 'divide by '.
A diamond shows a decision. A decision asks a question with answers such as Yes/No or True/False. For example, 'Is the remainder ?' 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 , then double' is not the same as 'double, then add '. 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 .
This is why flowcharts are helpful. They make long procedures easier to follow, reduce confusion, and help us check whether any step is missing.
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 , whether a number is even, or whether one step should be repeated.
An algorithm says: start with a number, add , then double. What is the output when the input is ?
In a flowchart for the Euclidean algorithm, which step should be written inside the decision diamond?
Write the sequence of steps that a flowchart would show for finding the HCF of two numbers by the Euclidean algorithm.
Compare the two algorithms for input : Algorithm A: add , then double. Algorithm B: double, then add . Are the outputs the same?
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.
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.
Which shape in a flowchart is used for a decision?
A flowchart shows: input , multiply by , then subtract . What is the output?
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 with . Instead of checking many factors, we divide by , take the remainder, and continue. Since the remainder is smaller than , 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.
This tells us that we can replace the pair by the smaller pair 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.
Show that two different algorithms can find the HCF of and , and decide which one is more efficient.
Find and explain why the Euclidean algorithm is efficient here.
A student says, "Any correct method is equally good." Explain with the example of finding the HCF of and .
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.
Why: Efficiency is about the amount of work, number of steps, and time taken, not only about getting the correct answer.
Why: An efficient algorithm still follows clear and correct steps. If steps are skipped carelessly, the method may become incorrect or unclear.
Which statement best explains why the Euclidean algorithm is preferred for finding HCF?
True or false: If two algorithms give the same correct answer, then both are equally efficient.
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 . 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 quotient remainder.
So, if we write and then , the algorithm takes steps.
While counting steps, include the final division that gives remainder , because that is the step where the process stops.
Special Observation: Consecutive Integers
Two consecutive integers, such as and , differ by . Their HCF is always .
This happens because if a number divides both consecutive integers, then it must also divide their difference. But the difference of consecutive integers is , and the only positive integer dividing is .
So, the HCF of any two consecutive integers is . This is a useful observation in simple reasoning questions.
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 . 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.
The HCF of any two consecutive integers is .
Find the HCF of and using the Euclidean algorithm.
Find the HCF of and using the Euclidean algorithm.
Find the number of steps needed to reach by the Euclidean algorithm.
Is the instruction 'pick any number and shout' an algorithm? Give a reason.
Find the HCF of and . Also state the general observation for consecutive integers.
Why: The HCF is the last non-zero remainder, not the first remainder obtained.
Why: Different people may interpret vague words differently, so such instructions do not satisfy the idea of an algorithm.
Find the HCF of and .
Which of the following is an algorithm?
Revision & Exam Focus
Everything to remember for the exam, the classic traps, and a final self-check.
- 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 .
- 08Repeat the division process until the remainder becomes .
- 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 and , the HCF is .
- 14A valid algorithm must stop after a finite number of steps.
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.
Why: A remainder in the middle of the process is not always the HCF. The method works only when the process is continued fully.
Why: Mathematics requires exact instructions. If different people can interpret a step differently, it is not a proper algorithm.
Why: After division, the new pair is the divisor and the remainder, not the original first number and the remainder.
Which of the following is a necessary property of an algorithm?
Find the HCF of and using the Euclidean algorithm.
How many Euclidean steps are needed to reach ?
Is 'pick any number and shout' an algorithm?