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:

  1. Produce a classification algorithm that is correct, exhaustive and unambiguous.
  2. Test it with a deliberate range of cases, including edge cases.
  3. Describe how it works and state its limitations.
  4. 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. “1. Is it a nice regular shape? Yes → regular. No → irregular.”
  2. “1. sides? Yes → triangle. No → sides? Yes → quadrilateral. Stop.”
  3. “1. All sides equal? Yes → square. No → not square.”
  4. “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:

  1. The algorithm — numbered steps, testable yes/no decisions, every path ending in a named shape.
  2. Coverage — it must handle: all triangle types (by sides), all quadrilateral types studied, and polygons of or more sides (regular or irregular).
  3. A test table — at least six cases, including two edge cases, with columns: case, kind, expected, actual, pass/fail.
  4. A description — three to four sentences: what it does, what the key decisions contribute, and what it cannot handle.
  5. A justification — one sentence on why your first question is the one you chose.

Reference solution (teacher — one valid design of many):

  1. How many sides? step 2. step 4. or more step 8.
  2. All three sides equal? Yes → equilateral, stop. No → step 3.
  3. At least two sides equal? Yes → isosceles, stop. No → scalene, stop.
  4. All four sides equal? Yes → step 5. No → step 6.
  5. All angles right angles? Yes → square, stop. No → rhombus, stop.
  6. All angles right angles? Yes → rectangle, stop. No → step 7.
  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.
  8. 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:

PromptPurpose
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 -sided shape both reach a category
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.

  1. What was the single hardest shape to accommodate, and why?
  2. What did testing reveal that designing did not?
  3. 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

MisconceptionHow 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 yes/no questions can distinguish at most how many categories?

Answer

.

E2 (AMC Junior style). A shape sorter must separate named categories. What is the fewest yes/no questions any shape might need in the best possible design?

Answer

Four, since — at least some shape needs four questions.

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 species. Assuming perfectly even splits, how many questions does it need? What if one species is far more common and should be reachable in one question?

Answer

questions for even splits. Putting the common species behind a single first question makes that one fast but pushes the rest to questions — a real trade-off between average speed and worst case.

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

  1. Copy your finished algorithm neatly and trace it on three shapes not used in class, showing each path.
  2. Write your algorithm’s full test table with eight cases: four typical, two edge, one extreme, one invalid.
  3. Rewrite your description so a Year 5 student could understand it — three sentences.
  4. State the greatest number of questions your algorithm needs for any shape, and describe one reordering that would reduce it.
  5. Identify one shape your algorithm cannot handle, and write the extra step that would fix it.
  6. A decision tree has questions. What is the maximum number of categories?
  7. Reasoning. Explain the difference between an algorithm being exhaustive and being correct, with an example of one that is exhaustive but not correct.
  8. Reasoning. Explain why testing reveals faults that designing does not.
  9. 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 — . Q7 — exhaustive means every input reaches some category; correct means every input reaches the right one. The Lesson 105 warmup’s sorter is exhaustive (pentagons reach a category) but incorrect (they are labelled quadrilaterals). Q8 — designers test the shapes they had in mind; a systematic test set deliberately includes shapes the designer did not consider, which is exactly where gaps live. Q9 — e.g. 1. Are the faces triangles? Yes → 2, No → 4. 2. Four faces? Yes → tetrahedron. No → 3. 3. Eight faces? Yes → octahedron. No → icosahedron. 4. Are the faces squares? Yes → cube. No → dodecahedron. Three questions suffice for the worst case, since .