Skip to content

Algorithm Design Paradigms and Amortised AnalysisActivities & Teaching Strategies

Algorithm design paradigms and amortised analysis demand hands-on practice because their subtleties are best uncovered through direct engagement. Students solidify their understanding of divide-and-conquer, greedy, and dynamic programming by applying each to concrete problems, while amortised analysis becomes clear through simulation rather than abstract discussion.

JC 2Computing4 activities30 min50 min

Learning Objectives

  1. 1Compare and contrast the suitability of divide-and-conquer, greedy, and dynamic programming paradigms for solving canonical computational problems.
  2. 2Apply amortised analysis using the aggregate, accounting, or potential method to demonstrate the O(1) amortised cost of appending to a dynamic array.
  3. 3Evaluate the optimality of greedy algorithms for activity selection and 0/1 knapsack problems, explaining the structural differences that lead to different outcomes.
  4. 4Design an algorithm using one of the discussed paradigms to solve a novel problem, justifying the choice of paradigm.
  5. 5Analyze the time complexity of algorithms implemented using divide-and-conquer, greedy, and dynamic programming approaches.

Want a complete lesson plan with these objectives? Generate a Mission

45 min·Pairs

Paradigm Comparison Challenge: Merge Sort vs Greedy

Pairs implement merge sort (divide-and-conquer) and greedy sort on interval data, then time both on growing inputs. They graph results and note where divide-and-conquer excels due to balanced splits. Discuss why greedy fails on non-local optima.

Prepare & details

Compare divide-and-conquer, greedy, and dynamic programming paradigms, providing a canonical problem for each and explaining why the other two paradigms fail or are suboptimal for that problem.

Facilitation Tip: During the Paradigm Comparison Challenge, have students first sketch the recursive tree for merge sort on paper before coding to reinforce the divide-and-conquer structure.

Setup: Chairs arranged in two concentric circles

Materials: Discussion question/prompt (projected), Observation rubric for outer circle

AnalyzeEvaluateCreateSocial AwarenessRelationship Skills
35 min·Small Groups

Dynamic Array Simulation: Amortised Cost Lab

Small groups use physical cards to simulate array appends and doublings. Track total operations over 20 appends, compute aggregate cost per append. Switch to accounting method, assigning credits to future resizes.

Prepare & details

Apply amortised analysis (aggregate, accounting, or potential method) to a dynamic array to explain why the amortised cost of append is O(1) despite occasional O(n) resizing operations.

Facilitation Tip: In the Dynamic Array Simulation, ask students to physically move cards across a table to represent resizing, which makes the potential method tangible.

Setup: Chairs arranged in two concentric circles

Materials: Discussion question/prompt (projected), Observation rubric for outer circle

AnalyzeEvaluateCreateSocial AwarenessRelationship Skills
50 min·Whole Class

Knapsack Debate Stations: Paradigm Showdown

Whole class rotates through stations for activity selection (greedy optimal), knapsack (DP needed), and merge sort. At each, justify paradigm choice and prototype suboptimal alternatives in pseudocode.

Prepare & details

Evaluate whether a greedy algorithm yields an optimal solution for the activity-selection problem and the 0/1 knapsack problem, and explain the structural difference between these two problems that accounts for the different outcomes.

Facilitation Tip: At the Knapsack Debate Stations, provide printed item cards with value and weight so students can physically rearrange them during arguments.

Setup: Chairs arranged in two concentric circles

Materials: Discussion question/prompt (projected), Observation rubric for outer circle

AnalyzeEvaluateCreateSocial AwarenessRelationship Skills
30 min·Pairs

Potential Method Worksheet: Pair Analysis

Individuals derive potential function for dynamic array, apply to append sequence. Pairs verify calculations and extend to delete operations, correcting errors through peer review.

Prepare & details

Compare divide-and-conquer, greedy, and dynamic programming paradigms, providing a canonical problem for each and explaining why the other two paradigms fail or are suboptimal for that problem.

Setup: Chairs arranged in two concentric circles

Materials: Discussion question/prompt (projected), Observation rubric for outer circle

AnalyzeEvaluateCreateSocial AwarenessRelationship Skills

Teaching This Topic

Teach these topics by alternating between concrete examples and abstract reasoning. Start with a problem students can solve by hand, then ask them to generalize the method, and finally test it on edge cases. Avoid lecturing about paradigms in isolation; instead, let students discover their strengths and weaknesses through structured comparisons. Research shows that when students articulate why a paradigm fails on a particular problem, they develop stronger conceptual maps than when they simply memorize definitions.

What to Expect

By the end of these activities, students will confidently match paradigms to problems, justify their choices with evidence, and use amortised analysis to explain costs. They will also critique each other’s reasoning during debates and simulations, showing deeper metacognitive awareness of algorithm behavior.

These activities are a starting point. A full mission is the experience.

  • Complete facilitation script with teacher dialogue
  • Printable student materials, ready for class
  • Differentiation strategies for every learner
Generate a Mission

Watch Out for These Misconceptions

Common MisconceptionDuring Paradigm Comparison Challenge, watch for students who assume greedy algorithms always produce optimal solutions.

What to Teach Instead

After the activity, have students compare their greedy output to the actual optimal solution printed on a card, highlighting cases where greedy choices lead to suboptimal totals.

Common MisconceptionDuring Dynamic Array Simulation, watch for students who think every append operation costs O(1).

What to Teach Instead

Use the potential method cards to track stored 'energy' before and after resizing, so students see how costs are spread across operations.

Common MisconceptionDuring Knapsack Debate Stations, watch for students who believe all paradigms work equally well on any problem.

What to Teach Instead

Have groups time each other’s solutions on the same problem instance to reveal runtime differences tied to paradigm choice.

Assessment Ideas

Quick Check

After Paradigm Comparison Challenge, present three problem descriptions and ask students to identify the best paradigm for each, justifying their choice in one sentence.

Discussion Prompt

During Knapsack Debate Stations, ask groups to present why greedy fails on knapsack but works on activity selection, focusing on the structural difference exposed by their item cards.

Exit Ticket

After Dynamic Array Simulation, provide a scenario with a dynamic array and ask students to explain why the average cost remains constant using the potential method, referencing their simulation materials.

Extensions & Scaffolding

  • Challenge students to design a variant of the activity selection problem where greedy fails, then prove why no greedy algorithm can solve it optimally.
  • For students who struggle, provide partially completed tables for the 0/1 knapsack dynamic programming solution, with only the first few rows filled in.
  • Deeper exploration: Ask students to compare the space complexity of divide-and-conquer versus dynamic programming on a problem like matrix chain multiplication, using the Paradigm Comparison Challenge as a reference point.

Key Vocabulary

Divide-and-ConquerAn algorithm design paradigm that recursively breaks down a problem into two or more smaller sub-problems of the same type, solves them independently, and then combines their solutions.
Greedy AlgorithmAn algorithm design paradigm that makes the locally optimal choice at each stage with the hope of finding a global optimum. It does not reconsider previous choices.
Dynamic ProgrammingAn algorithm design paradigm that solves complex problems by breaking them down into simpler subproblems, solving each subproblem only once, and storing their solutions to avoid redundant computations.
Amortised AnalysisA method for analyzing the average performance of an operation over a sequence of operations, even if some individual operations are expensive.
Dynamic ArrayA data structure that can grow or shrink in size as elements are added or removed, often implemented using an underlying array that is resized when capacity is reached.

Ready to teach Algorithm Design Paradigms and Amortised Analysis?

Generate a full mission with everything you need

Generate a Mission