Lesson 106 — Problem Solving and Consolidation: Algorithms for Shapes
Strand: Space | Descriptor: AC9M7SP04 | Duration: 45 minutes
Equipment: shape cards; blank card for the final product.
Learning Intentions
- To design, test, refine and describe a complete classification algorithm.
- To evaluate an algorithm against agreed criteria.
Success Criteria
I can:
- Produce a classification algorithm that is correct, exhaustive and unambiguous.
- Test it with a deliberate range of cases, including edge cases.
- Describe how it works and state its limitations.
- Justify my choice and ordering of questions.
Warmup
(6 minutes — algorithm health check, pairs)
For each, say whether the algorithm fails on correctness, exhaustiveness, unambiguity or testability — and give the shape that exposes it.
- “1. Is it a nice regular shape? Yes → regular. No → irregular.”
- “1.
sides? Yes → triangle. No → sides? Yes → quadrilateral. Stop.” - “1. All sides equal? Yes → square. No → not square.”
- “1. Has a right angle? Yes → right-angled. No → go to 1.”
Answers: 1. Testability — “nice” is not testable; 2. Exhaustiveness — a pentagon reaches no category; 3. Correctness — a rhombus is called a square; 4. It never ends (infinite loop) — the “no” branch returns to the same question with no change.
Activities
Activity 1 — The Main Task (26 min)
Pairs. The assessable piece for AC9M7SP04. Produce a complete, tested, described algorithm on a single card.
The Shape Identification Card.
A Year 5 class needs a card that helps them name any shape you hand them. Design it.
Your card must include:
- The algorithm — numbered steps, testable yes/no decisions, every path ending in a named shape.
- Coverage — it must handle: all triangle types (by sides), all quadrilateral types studied, and polygons of
or more sides (regular or irregular). - A test table — at least six cases, including two edge cases, with columns: case, kind, expected, actual, pass/fail.
- A description — three to four sentences: what it does, what the key decisions contribute, and what it cannot handle.
- A justification — one sentence on why your first question is the one you chose.
Reference solution (teacher — one valid design of many):
- How many sides?
step 2. step 4. or more step 8. - All three sides equal? Yes → equilateral, stop. No → step 3.
- At least two sides equal? Yes → isosceles, stop. No → scalene, stop.
- All four sides equal? Yes → step 5. No → step 6.
- All angles right angles? Yes → square, stop. No → rhombus, stop.
- All angles right angles? Yes → rectangle, stop. No → step 7.
- Two pairs of parallel sides? Yes → parallelogram, stop. No → exactly one pair? Yes → trapezium, stop. No → two pairs of adjacent equal sides? Yes → kite, stop. No → irregular quadrilateral, stop.
- All sides equal and all angles equal? Yes → regular [
-gon by side count], stop. No → any interior angle over ? Yes → concave polygon, stop. No → irregular convex polygon, stop.
Marking emphases:
- Step 1 splits the whole set three ways immediately — the efficient opening (halving principle).
- Step 3 uses “at least two”, consistent with Lesson 41’s convention, so equilateral triangles are caught at step 2 first.
- Step 7 includes the kite branch that the Lesson 104 draft omitted.
- Test table must include a square and an equilateral triangle (the two classic edge cases).
- The description must state a genuine limitation — e.g. “it classifies quadrilaterals to their most specific name, but it does not report that a square is also a rectangle.”
Circulating prompts:
| Prompt | Purpose |
|---|---|
| Hand me a card — walk me through your own steps aloud. | Self-tracing catches gaps fastest. |
| Where does a square end up? An equilateral triangle? | The two edge cases that break most drafts. |
| What is the greatest number of questions any shape needs? | Efficiency, and a route to improvement. |
| Could a Year 5 student answer every one of your questions? | Testability, from the intended user’s viewpoint. |
| What is not on your card? | Drives the limitation sentence. |
Activity 2 — Peer Audit and Refinement (12 min)
Swap cards with another pair. Audit against the checklist, then return for repair.
| Check | ✓ / ✗ / ? |
|---|---|
| Every decision is testable by looking or measuring | |
| A square reaches exactly one category, correctly | |
| An equilateral triangle is not called merely “isosceles” | |
| A pentagon and a | |
| Every path ends — no loops, no dead ends | |
| The test table includes at least two edge cases | |
| The description names a real limitation |
Audit protocol: hand back with two stars and one question (Lesson 76’s format). The authors then make one repair and note it on the card.
Expected common faults, for the debrief:
- Kites omitted (the Lesson 104 gap, if not fixed).
- Equilateral triangles caught by an “exactly two equal” test.
- Concave polygons never anticipated.
- A branch ending in “quadrilateral” without a specific name.
Activity 3 — Closing Reflection (5 min)
Whole class, quick round.
- What was the single hardest shape to accommodate, and why?
- What did testing reveal that designing did not?
- Where else in life do people use decision trees like these?
Discussion targets: the square, because it belongs to several nested categories at once (Lesson 42); testing exposes gaps that seem impossible while designing, because designers imagine only the shapes they had in mind; real-world decision trees include medical triage, plant and animal identification keys, insurance forms, troubleshooting guides, and automated phone menus.
Closing note: biological identification keys — used to name an unfamiliar plant or insect — are exactly this structure, refined over two centuries. The skill transfers directly.
Checks for Understanding
(2 minutes — one-question exit slip, collected with the cards)
Reasoning. In one or two sentences: why must a classification algorithm’s questions be ordered carefully when the categories are nested, such as squares within rectangles?
Expected answer: A broader test asked first will capture shapes that belong in a narrower category — a square answers “yes” to “is it a rectangle?”, so if that question comes first the square never reaches the square branch. Ordering from most specific to most general (or adding extra conditions) prevents it.
Common Misconceptions
| Misconception | How to pre-empt it |
|---|---|
| Designing without tracing. | Circulating prompt requires reading their own steps aloud. |
| Omitting kites or concave shapes. | Explicit coverage requirement; the audit checks both. |
| Untestable questions written for a Year 5 audience. | The “could a Year 5 answer it?” prompt. |
| Declaring the algorithm finished before the test table. | The test table is a graded component, not an optional extra. |
| Believing a passing test set proves correctness. | Carried from Lesson 105; the description must state limitations. |
| Treating the audit as fault-finding rather than repair. | Two-stars-and-a-question format; one repair is required afterwards. |
Enrichment — Competition-Style Problems
E1 (Kangaroo style). A decision tree with
Answer
E2 (AMC Junior style). A shape sorter must separate
Answer
Four, since
E3 (Challenge). Design a two-question algorithm that separates exactly four categories of quadrilateral, and state which four.
Answer
1. All sides equal? 2. All angles right angles? — giving square (yes/yes), rhombus (yes/no), rectangle (no/yes) and “other quadrilateral” (no/no). Efficient because each question splits the set roughly in half.
E4 (Challenge). A biological key identifies
Answer
E5 (Challenge). Explain why an identification key that never asks about the number of sides will still work for polygons, and why it might be a poor design anyway.
Answer
Other attributes (parallel sides, equal angles, symmetry) can distinguish shapes eventually, so the key can work. But side count is the most informative single question — it splits the whole set into large, clean groups immediately, so omitting it makes the key far longer than necessary.
Homework
- Copy your finished algorithm neatly and trace it on three shapes not used in class, showing each path.
- Write your algorithm’s full test table with eight cases: four typical, two edge, one extreme, one invalid.
- Rewrite your description so a Year 5 student could understand it — three sentences.
- State the greatest number of questions your algorithm needs for any shape, and describe one reordering that would reduce it.
- Identify one shape your algorithm cannot handle, and write the extra step that would fix it.
- A decision tree has
questions. What is the maximum number of categories? - Reasoning. Explain the difference between an algorithm being exhaustive and being correct, with an example of one that is exhaustive but not correct.
- Reasoning. Explain why testing reveals faults that designing does not.
- Challenge. Design an identification key for the five Platonic solids — tetrahedron, cube, octahedron, dodecahedron, icosahedron — using questions about faces, edges and vertices. What is the fewest questions needed?
Answers: Q6 —