Skip to content
Computer Science · Grade 9 · Computational Thinking and Logic · Term 1

Introduction to Algorithms

Students will learn the definition and characteristics of algorithms, exploring their role in problem-solving.

Ontario Curriculum ExpectationsCS.HS.AP.2CS.HS.CT.3

About This Topic

Algorithms form the backbone of computational thinking: they are finite sequences of unambiguous instructions that take inputs, produce outputs, and solve problems effectively. Grade 9 students start by identifying these characteristics through familiar examples, such as recipes or traffic light sequences. This foundation reveals algorithms' role in everyday problem-solving and sets the stage for programming.

In the Ontario Computer Science curriculum, this unit emphasizes comparison of algorithms for the same task, efficiency analysis via step counts, and construction of algorithms for routine activities like packing a backpack. Students practice pseudocode to express logic clearly, fostering skills in decomposition and pattern recognition aligned with standards CS.HS.AP.2 and CS.HS.CT.3.

Active learning excels with algorithms because students must execute steps themselves to spot flaws. When they swap and test peers' algorithms or time different versions, ambiguities surface naturally. Collaborative refinement turns abstract rules into practical insights, boosting retention and confidence in logical design.

Key Questions

  1. Compare and contrast different algorithms for solving the same problem.
  2. Analyze the efficiency of a simple algorithm based on its number of steps.
  3. Construct an algorithm to solve a specific, everyday task.

Learning Objectives

  • Define algorithm and identify its core characteristics: finiteness, definiteness, input, output, and effectiveness.
  • Compare and contrast two different algorithms designed to solve the same everyday problem, such as making toast.
  • Analyze the efficiency of a simple algorithm by counting the number of steps required to complete a task.
  • Construct a step-by-step algorithm for a common task, like packing a school backpack, using clear and unambiguous instructions.
  • Explain the role of algorithms in solving problems in both computational and non-computational contexts.

Before You Start

Problem Solving Strategies

Why: Students need foundational skills in breaking down problems into smaller parts before they can construct algorithms to solve them.

Logical Reasoning

Why: Understanding cause and effect, and the order of operations, is crucial for developing and evaluating step-by-step instructions.

Key Vocabulary

AlgorithmA finite sequence of well-defined, unambiguous instructions, typically used to solve a class of specific problems or to perform a computation.
InputThe data or information that an algorithm receives to process.
OutputThe result or data produced by an algorithm after processing the input.
EfficiencyA measure of how many steps an algorithm takes to complete its task, often used to compare different algorithms for the same problem.
PseudocodeAn informal, high-level description of the operating principle of a computer program or other algorithm, using natural language conventions rather than formal programming language syntax.

Watch Out for These Misconceptions

Common MisconceptionAlgorithms are only for computers, not people.

What to Teach Instead

Algorithms apply to any precise problem-solving sequence, like board game rules. Pairs acting out algorithms for manual tasks, such as paper folding, show their human applicability and clarify the concept through shared execution.

Common MisconceptionMore steps make a better algorithm.

What to Teach Instead

Efficiency prioritizes fewer, precise steps. Group comparisons of step counts for tasks like stacking cups reveal shorter paths work faster. Active testing with timers helps students internalize optimization over length.

Common MisconceptionAny list of instructions is an algorithm.

What to Teach Instead

Steps must be definite and unambiguous. When students follow peers' vague lists and encounter confusion, peer review sessions highlight the need for precision, strengthening revision skills.

Active Learning Ideas

See all activities

Real-World Connections

  • Navigation apps like Google Maps or Waze use complex algorithms to calculate the fastest routes, considering real-time traffic data and road conditions.
  • Automated assembly lines in car manufacturing plants follow precise algorithms to perform repetitive tasks like welding or painting, ensuring consistency and speed.
  • The process of following a recipe to bake a cake is an everyday example of an algorithm, requiring specific ingredients (input) and steps to produce a finished cake (output).

Assessment Ideas

Exit Ticket

Provide students with two different sets of instructions for making a peanut butter and jelly sandwich. Ask them to write down which set of instructions they think is a better algorithm and explain why, referencing clarity and completeness.

Quick Check

Present students with a simple task, such as sorting three colored blocks (red, blue, green) from left to right. Ask them to write down the algorithm in pseudocode or numbered steps and then count the total number of actions (steps) required.

Discussion Prompt

Pose the question: 'Can an algorithm have more than one correct output for the same input?' Facilitate a class discussion using examples like sorting numbers in ascending versus descending order, or finding the shortest path versus the scenic route.

Frequently Asked Questions

How do you introduce algorithms in grade 9 computer science?
Begin with relatable examples like recipes or directions, then define key traits: finite, definite, input-output focused. Use pseudocode for a simple task, such as tying shoes. Build to comparisons by having students generate variants, ensuring connections to problem-solving grow naturally from concrete starts.
What activities compare algorithm efficiency?
Sorting challenges with cards or beads work well: students create and test versions, counting steps and timing runs. Whole-class debates on route algorithms reinforce analysis. These reveal trade-offs in simplicity versus speed, aligning with curriculum goals for step-based evaluation.
How can active learning help students grasp algorithms?
Active methods like peer-testing algorithms expose flaws immediately, as students execute steps and debug collaboratively. Swapping pseudocode for everyday tasks builds empathy for user perspective and iterative improvement. Hands-on refinement makes abstract traits tangible, improving retention over passive lectures by 30-50% in engagement studies.
What are common student misconceptions about algorithms?
Many think algorithms are computer-exclusive or that length equals quality. Others overlook definiteness, creating vague lists. Address via role-play execution and efficiency races, where groups refine and compare, turning errors into teachable moments for precise, optimized design.