Skip to content
CLASS 9 • MATHEMATICS • CHAPTER 11

The World of Algorithms

Explore the published notes, key concepts and questions for this chapter.

Quick answer
The World of Algorithms is Chapter 11 in NCERT Class 9 Mathematics, Ganita Manjari. It introduces algorithms, procedures and systematic problem solving.
Key points
  • An algorithm is a finite, well-defined sequence of instructions that transforms inputs into outputs to solve a problem.
  • Inputs are the values supplied to a procedure; outputs are the results it produces.
  • Each step must be unambiguous and executable by the intended person or machine.
  • A sequence of instructions executes in order, where later steps can depend on earlier results.
  • An if/else rule chooses actions based on a true/false condition.
  • A loop repeats instructions until a stopping condition is met; a valid loop needs to terminate for its intended inputs.
  • Variables store values that may change while the procedure runs.
  • Flowcharts represent processes with action steps, decisions and arrows showing control flow.
  • Pseudocode describes a procedure using structured natural-language instructions without requiring a programming language.
  • Track the maximum while comparing each input; handle equality consistently.
  • For positive integers a,b, repeatedly replace (a,b) with (b,a mod b) until b=0; then a is gcd.
  • Test ordinary inputs, boundary values and special cases, and compare actual with expected outputs.

Use these notes alongside your current textbook. Check important formulas, worked answers and syllabus coverage with your teacher or official learning material.

The World of Algorithms — Class 9 Mathematics

Textbook edition: Ganita Manjari 2026–27, Part II, Chapter 11. This belongs to the Ganita Manjari (2026–27) sequence.

Introduction: An algorithm is a finite, well-defined sequence of instructions that transforms inputs into outputs to solve a problem.

Original supplementary notes: the precise numbered textbook exercises, diagrams and activities have not been verified page-by-page against the complete official NCERT textbook. The following practice questions are original, not represented as verbatim NCERT exercise solutions.

Learning objectives

  • Explain concepts and definitions accurately.
  • Apply formulas and algorithms with stated conditions.
  • Interpret data or geometry using correct units.
  • Show full calculations and verify answers.

What is an algorithm?

An algorithm is a finite, well-defined sequence of instructions that transforms inputs into outputs to solve a problem.

Worked example

To find larger of a,b: compare and output the greater, or report equality.

Reasoning check

Explain each step, state assumptions and verify the result independently where possible.

Inputs and outputs

Inputs are the values supplied to a procedure; outputs are the results it produces.

Worked example

For addition, inputs 4 and 7 produce output 11.

Reasoning check

Explain each step, state assumptions and verify the result independently where possible.

Precise instructions

Each step must be unambiguous and executable by the intended person or machine.

Worked example

'Add 1 to x' is precise; 'make x better' is not.

Reasoning check

Explain each step, state assumptions and verify the result independently where possible.

Sequence

A sequence of instructions executes in order, where later steps can depend on earlier results.

Worked example

Start x=3, double x, add 1: result 7.

Reasoning check

Explain each step, state assumptions and verify the result independently where possible.

Conditionals

An if/else rule chooses actions based on a true/false condition.

Worked example

If n is even output 'even'; otherwise output 'odd'.

Reasoning check

Explain each step, state assumptions and verify the result independently where possible.

Loops and iteration

A loop repeats instructions until a stopping condition is met; a valid loop needs to terminate for its intended inputs.

Worked example

To sum 1 to n, add each integer from 1 through n.

Reasoning check

Explain each step, state assumptions and verify the result independently where possible.

Variables and state

Variables store values that may change while the procedure runs.

Worked example

sum starts at 0 and increases after each addition.

Reasoning check

Explain each step, state assumptions and verify the result independently where possible.

Flowcharts

Flowcharts represent processes with action steps, decisions and arrows showing control flow.

Worked example

A decision diamond can test whether n>0.

Reasoning check

Explain each step, state assumptions and verify the result independently where possible.

Pseudocode

Pseudocode describes a procedure using structured natural-language instructions without requiring a programming language.

Worked example

SET total=0; FOR i=1 TO n: total=total+i; OUTPUT total.

Reasoning check

Explain each step, state assumptions and verify the result independently where possible.

Algorithm for greatest of three

Track the maximum while comparing each input; handle equality consistently.

Worked example

For 8,3,11: max begins 8, remains 8 after 3, becomes 11.

Reasoning check

Explain each step, state assumptions and verify the result independently where possible.

Euclidean algorithm

For positive integers a,b, repeatedly replace (a,b) with (b,a mod b) until b=0; then a is gcd.

Worked example

gcd(48,18): 48 mod 18=12; 18 mod 12=6; 12 mod 6=0; gcd=6.

Reasoning check

Explain each step, state assumptions and verify the result independently where possible.

Testing algorithms

Test ordinary inputs, boundary values and special cases, and compare actual with expected outputs.

Worked example

Test a maximum-finding algorithm on equal inputs and negative values.

Reasoning check

Explain each step, state assumptions and verify the result independently where possible.

Correctness

An algorithm is correct if it gives the specified output for every valid input and terminates.

Worked example

An algorithm for division must reject a zero divisor.

Reasoning check

Explain each step, state assumptions and verify the result independently where possible.

Efficiency

Efficiency concerns time and memory used as input size grows; a simpler method may suffice for small tasks.

Worked example

Summing 1..n by a loop uses n additions; n(n+1)/2 uses a formula.

Reasoning check

Explain each step, state assumptions and verify the result independently where possible.

Searching

Linear search checks items in sequence; binary search repeatedly halves a sorted search range.

Worked example

Binary search requires sorted input.

Reasoning check

Explain each step, state assumptions and verify the result independently where possible.

Sorting

Sorting arranges values in order according to a comparison rule.

Worked example

Sorting 7,2,5 gives 2,5,7.

Reasoning check

Explain each step, state assumptions and verify the result independently where possible.

Debugging

Trace each step, inspect variables and identify the first incorrect transition.

Worked example

A loop that starts at 0 instead of 1 may add an unintended term.

Reasoning check

Explain each step, state assumptions and verify the result independently where possible.

Real-world algorithms

Recipes, directions, scheduling and digital systems use algorithmic ideas; real tasks require clear conditions.

Worked example

A route procedure must say what to do if a road is closed.

Reasoning check

Explain each step, state assumptions and verify the result independently where possible.

Key formulas and concepts

TopicExplanationWorked illustration
What is an algorithm?An algorithm is a finite, well-defined sequence of instructions that transforms inputs into outputs to solve a problem.To find larger of a,b: compare and output the greater, or report equality.
Inputs and outputsInputs are the values supplied to a procedure; outputs are the results it produces.For addition, inputs 4 and 7 produce output 11.
Precise instructionsEach step must be unambiguous and executable by the intended person or machine.'Add 1 to x' is precise; 'make x better' is not.
SequenceA sequence of instructions executes in order, where later steps can depend on earlier results.Start x=3, double x, add 1: result 7.
ConditionalsAn if/else rule chooses actions based on a true/false condition.If n is even output 'even'; otherwise output 'odd'.
Loops and iterationA loop repeats instructions until a stopping condition is met; a valid loop needs to terminate for its intended inputs.To sum 1 to n, add each integer from 1 through n.
Variables and stateVariables store values that may change while the procedure runs.sum starts at 0 and increases after each addition.
FlowchartsFlowcharts represent processes with action steps, decisions and arrows showing control flow.A decision diamond can test whether n>0.
PseudocodePseudocode describes a procedure using structured natural-language instructions without requiring a programming language.SET total=0; FOR i=1 TO n: total=total+i; OUTPUT total.
Algorithm for greatest of threeTrack the maximum while comparing each input; handle equality consistently.For 8,3,11: max begins 8, remains 8 after 3, becomes 11.
Euclidean algorithmFor positive integers a,b, repeatedly replace (a,b) with (b,a mod b) until b=0; then a is gcd.gcd(48,18): 48 mod 18=12; 18 mod 12=6; 12 mod 6=0; gcd=6.
Testing algorithmsTest ordinary inputs, boundary values and special cases, and compare actual with expected outputs.Test a maximum-finding algorithm on equal inputs and negative values.
CorrectnessAn algorithm is correct if it gives the specified output for every valid input and terminates.An algorithm for division must reject a zero divisor.
EfficiencyEfficiency concerns time and memory used as input size grows; a simpler method may suffice for small tasks.Summing 1..n by a loop uses n additions; n(n+1)/2 uses a formula.
SearchingLinear search checks items in sequence; binary search repeatedly halves a sorted search range.Binary search requires sorted input.
SortingSorting arranges values in order according to a comparison rule.Sorting 7,2,5 gives 2,5,7.
DebuggingTrace each step, inspect variables and identify the first incorrect transition.A loop that starts at 0 instead of 1 may add an unintended term.
Real-world algorithmsRecipes, directions, scheduling and digital systems use algorithmic ideas; real tasks require clear conditions.A route procedure must say what to do if a road is closed.

Practice exercise A — Definitions

  1. Define what is an algorithm?, state any necessary conditions, and give a valid example.
  2. Define inputs and outputs, state any necessary conditions, and give a valid example.
  3. Define precise instructions, state any necessary conditions, and give a valid example.
  4. Define sequence, state any necessary conditions, and give a valid example.
  5. Define conditionals, state any necessary conditions, and give a valid example.
  6. Define loops and iteration, state any necessary conditions, and give a valid example.
  7. Define variables and state, state any necessary conditions, and give a valid example.
  8. Define flowcharts, state any necessary conditions, and give a valid example.
  9. Define pseudocode, state any necessary conditions, and give a valid example.
  10. Define algorithm for greatest of three, state any necessary conditions, and give a valid example.
  11. Define euclidean algorithm, state any necessary conditions, and give a valid example.
  12. Define testing algorithms, state any necessary conditions, and give a valid example.

Practice exercise B — Application

  1. Verify the worked example: To find larger of a,b: compare and output the greater, or report equality. Change the values or assumptions and solve the new problem with all steps.
  2. Verify the worked example: For addition, inputs 4 and 7 produce output 11. Change the values or assumptions and solve the new problem with all steps.
  3. Verify the worked example: 'Add 1 to x' is precise; 'make x better' is not. Change the values or assumptions and solve the new problem with all steps.
  4. Verify the worked example: Start x=3, double x, add 1: result 7. Change the values or assumptions and solve the new problem with all steps.
  5. Verify the worked example: If n is even output 'even'; otherwise output 'odd'. Change the values or assumptions and solve the new problem with all steps.
  6. Verify the worked example: To sum 1 to n, add each integer from 1 through n. Change the values or assumptions and solve the new problem with all steps.
  7. Verify the worked example: sum starts at 0 and increases after each addition. Change the values or assumptions and solve the new problem with all steps.
  8. Verify the worked example: A decision diamond can test whether n>0. Change the values or assumptions and solve the new problem with all steps.
  9. Verify the worked example: SET total=0; FOR i=1 TO n: total=total+i; OUTPUT total. Change the values or assumptions and solve the new problem with all steps.
  10. Verify the worked example: For 8,3,11: max begins 8, remains 8 after 3, becomes 11. Change the values or assumptions and solve the new problem with all steps.
  11. Verify the worked example: gcd(48,18): 48 mod 18=12; 18 mod 12=6; 12 mod 6=0; gcd=6. Change the values or assumptions and solve the new problem with all steps.
  12. Verify the worked example: Test a maximum-finding algorithm on equal inputs and negative values. Change the values or assumptions and solve the new problem with all steps.

Practice exercise C — Reasoning

  1. Explain why a central formula or procedure is valid.
  2. Construct a counterexample to an incorrect generalisation.
  3. Compare two concepts and their use cases.
  4. Develop a real-world application with realistic units.
  5. Find and correct a plausible mistake.
  6. Check an answer by a second method.
  7. Construct and solve a three-step original problem.
  8. Explain the main concept to another student with a diagram or table.

Frequently asked questions and answers

What is what is an algorithm?? Give an example.

An algorithm is a finite, well-defined sequence of instructions that transforms inputs into outputs to solve a problem. Example: To find larger of a,b: compare and output the greater, or report equality.

What is inputs and outputs? Give an example.

Inputs are the values supplied to a procedure; outputs are the results it produces. Example: For addition, inputs 4 and 7 produce output 11.

What is precise instructions? Give an example.

Each step must be unambiguous and executable by the intended person or machine. Example: 'Add 1 to x' is precise; 'make x better' is not.

What is sequence? Give an example.

A sequence of instructions executes in order, where later steps can depend on earlier results. Example: Start x=3, double x, add 1: result 7.

What is conditionals? Give an example.

An if/else rule chooses actions based on a true/false condition. Example: If n is even output 'even'; otherwise output 'odd'.

What is loops and iteration? Give an example.

A loop repeats instructions until a stopping condition is met; a valid loop needs to terminate for its intended inputs. Example: To sum 1 to n, add each integer from 1 through n.

What is variables and state? Give an example.

Variables store values that may change while the procedure runs. Example: sum starts at 0 and increases after each addition.

What is flowcharts? Give an example.

Flowcharts represent processes with action steps, decisions and arrows showing control flow. Example: A decision diamond can test whether n>0.

What is pseudocode? Give an example.

Pseudocode describes a procedure using structured natural-language instructions without requiring a programming language. Example: SET total=0; FOR i=1 TO n: total=total+i; OUTPUT total.

What is algorithm for greatest of three? Give an example.

Track the maximum while comparing each input; handle equality consistently. Example: For 8,3,11: max begins 8, remains 8 after 3, becomes 11.

What is euclidean algorithm? Give an example.

For positive integers a,b, repeatedly replace (a,b) with (b,a mod b) until b=0; then a is gcd. Example: gcd(48,18): 48 mod 18=12; 18 mod 12=6; 12 mod 6=0; gcd=6.

What is testing algorithms? Give an example.

Test ordinary inputs, boundary values and special cases, and compare actual with expected outputs. Example: Test a maximum-finding algorithm on equal inputs and negative values.

What is correctness? Give an example.

An algorithm is correct if it gives the specified output for every valid input and terminates. Example: An algorithm for division must reject a zero divisor.

What is efficiency? Give an example.

Efficiency concerns time and memory used as input size grows; a simpler method may suffice for small tasks. Example: Summing 1..n by a loop uses n additions; n(n+1)/2 uses a formula.

What is searching? Give an example.

Linear search checks items in sequence; binary search repeatedly halves a sorted search range. Example: Binary search requires sorted input.

Revision checklist

  • I can explain and apply what is an algorithm?.
  • I can explain and apply inputs and outputs.
  • I can explain and apply precise instructions.
  • I can explain and apply sequence.
  • I can explain and apply conditionals.
  • I can explain and apply loops and iteration.
  • I can explain and apply variables and state.
  • I can explain and apply flowcharts.
  • I can explain and apply pseudocode.
  • I can explain and apply algorithm for greatest of three.
  • I can explain and apply euclidean algorithm.
  • I can explain and apply testing algorithms.
  • I can explain and apply correctness.
  • I can explain and apply efficiency.
  • I can explain and apply searching.
  • I can explain and apply sorting.
  • I can explain and apply debugging.
  • I can explain and apply real-world algorithms.

Official source and accuracy note

Official NCERT textbook portal. This original guide is not a verified answer key to every numbered NCERT exercise.

Frequently asked questions

What is what is an algorithm?? Give an example.

An algorithm is a finite, well-defined sequence of instructions that transforms inputs into outputs to solve a problem. Example: To find larger of a,b: compare and output the greater, or report equality.

What is inputs and outputs? Give an example.

Inputs are the values supplied to a procedure; outputs are the results it produces. Example: For addition, inputs 4 and 7 produce output 11.

What is precise instructions? Give an example.

Each step must be unambiguous and executable by the intended person or machine. Example: 'Add 1 to x' is precise; 'make x better' is not.

What is sequence? Give an example.

A sequence of instructions executes in order, where later steps can depend on earlier results. Example: Start x=3, double x, add 1: result 7.

What is conditionals? Give an example.

An if/else rule chooses actions based on a true/false condition. Example: If n is even output 'even'; otherwise output 'odd'.

What is loops and iteration? Give an example.

A loop repeats instructions until a stopping condition is met; a valid loop needs to terminate for its intended inputs. Example: To sum 1 to n, add each integer from 1 through n.

What is variables and state? Give an example.

Variables store values that may change while the procedure runs. Example: sum starts at 0 and increases after each addition.

What is flowcharts? Give an example.

Flowcharts represent processes with action steps, decisions and arrows showing control flow. Example: A decision diamond can test whether n>0.

What is pseudocode? Give an example.

Pseudocode describes a procedure using structured natural-language instructions without requiring a programming language. Example: SET total=0; FOR i=1 TO n: total=total+i; OUTPUT total.

What is algorithm for greatest of three? Give an example.

Track the maximum while comparing each input; handle equality consistently. Example: For 8,3,11: max begins 8, remains 8 after 3, becomes 11.

What is euclidean algorithm? Give an example.

For positive integers a,b, repeatedly replace (a,b) with (b,a mod b) until b=0; then a is gcd. Example: gcd(48,18): 48 mod 18=12; 18 mod 12=6; 12 mod 6=0; gcd=6.

What is testing algorithms? Give an example.

Test ordinary inputs, boundary values and special cases, and compare actual with expected outputs. Example: Test a maximum-finding algorithm on equal inputs and negative values.

What is correctness? Give an example.

An algorithm is correct if it gives the specified output for every valid input and terminates. Example: An algorithm for division must reject a zero divisor.

What is efficiency? Give an example.

Efficiency concerns time and memory used as input size grows; a simpler method may suffice for small tasks. Example: Summing 1..n by a loop uses n additions; n(n+1)/2 uses a formula.

What is searching? Give an example.

Linear search checks items in sequence; binary search repeatedly halves a sorted search range. Example: Binary search requires sorted input.

AVAILABLE FOR ANDROID

Start Studying with Krutsha AI Tonight

Join Class 8 to 12 CBSE & NCERT students mastering complex topics. Instant photo doubt solving, zoomable diagram notes, mock tests, and daily WhatsApp updates for parents.

Free daily doubt credits
Class 8th to 12th CBSE & NCERT
Instant setup
Krutsha AI AskAI Instant Doubt Solver
Krutsha AI 4-Step Chapter Learning Hub
Krutsha AI Quiz AI Analysis Report
Krutsha AI Student Leaderboard and Streaks