AC9M9SP03 · YEAR 9 · SPACE

Designing Geometric Algorithms

ACARA v9 CONTENT DESCRIPTION design, test and refine algorithms involving a sequence of steps and decisions based on geometric constructions and theorems; discuss and evaluate refinements
Builds on: Year 9 Space. This unit builds on geometric constructions, congruence and the theorems met across the space and measurement strands, combined with algorithmic thinking. Designing and refining clear procedures is a skill shared with computing and with every part of mathematics.

What an algorithm is

An algorithm is a precise recipe: a finite list of unambiguous steps that, followed exactly, solves a problem every time. This unit applies that computational idea to geometry, designing algorithms built from geometric constructions and theorems, then testing and refining them until they work in every case. The skill is not just writing steps, but judging whether those steps are correct, and improving them when they are not.

Sequences and decisions

Two kinds of instruction make up almost every algorithm. The first is a sequence: ordered steps carried out one after another, where the order genuinely matters. The second is a decision, a branch of the form if a condition holds, do one thing, otherwise do another. A geometry algorithm weaves these together, using measured or constructed facts as the conditions that steer the decisions. Describing an algorithm clearly, in numbered steps with explicit if-then choices, is the first half of the work.

Sequence and decision
A sequence runs ordered steps one after another; a decision branches on a condition, taking one path if it holds and another if it does not.
Two sequence steps run in order, then the diamond tests a condition. If it holds the algorithm takes the if path; otherwise it takes the other. Sequences and decisions are the two building blocks of every algorithm.

Constructions as algorithms: bisecting an angle

Geometric constructions are natural algorithms, because each is a fixed sequence of compass-and-straightedge steps. To bisect an angle, you draw an arc from the vertex crossing both arms, then equal arcs from the two crossing points, then the line from the vertex through their intersection. Followed in order, these steps always halve the angle. The reason is a theorem: the construction quietly builds two triangles with three equal sides each, which are congruent, so the two halves of the angle must be equal. The algorithm and the theorem that guarantees it go hand in hand.

Bisecting an angle, step by step
Draw an arc from the vertex across both arms, then equal arcs from the two crossings, then the line from the vertex through their meeting point; followed in order these steps halve the angle.
Step 1 draws an arc from the vertex crossing both arms. Step 2 draws two equal arcs from those crossings. Step 3 joins the vertex to where they meet. Run in this order, the steps always split the angle into two equal halves.
Why it works: SSS congruence
The construction quietly builds two triangles with three pairs of equal sides; being congruent by SSS, they force the two halves of the angle to be exactly equal.
The arcs make VP equal on both sides and the equal arcs make PQ equal on both sides, while VQ is shared. Three equal sides means the triangles are congruent by SSS, so the two angles at V must be equal: the bisector is justified by a theorem.

The perpendicular bisector

The perpendicular bisector of a segment is another construction algorithm. From each endpoint, draw arcs of the same radius, large enough to cross, then join the two intersection points. Every point on the resulting line is equidistant from the two endpoints, which is exactly what being the perpendicular bisector means. Here again a sequence of steps produces a guaranteed geometric result, and naming the theorem behind it explains why the recipe can be trusted.

Perpendicular bisector
Equal-radius arcs from each endpoint cross at two points; the line through them is the perpendicular bisector, and every point on it is the same distance from both endpoints.
Equal-radius arcs from A and B meet at two points, and the line through them is the perpendicular bisector. The marked point P shows the defining property: PA equals PB, so every point on the line is equidistant from the two endpoints.

Decisions that branch: classifying a triangle

Decisions in geometry often test a property and branch on the answer. Consider an algorithm that classifies a triangle from its three side lengths. A first attempt might say: if two sides are equal, report isosceles, otherwise report scalene. Testing this on a triangle with sides five, five and five exposes a flaw, because it reports isosceles when the triangle is really equilateral. The fix is to reorder the decisions: first check whether all three sides are equal and report equilateral, then check for exactly two equal sides for isosceles, and only then fall through to scalene. Re-testing confirms the refined version handles every case.

Classifying a triangle (a flowchart)
The order of the decisions matters: test for all three sides equal first, so an equilateral triangle is never reported as merely isosceles.
The refined order checks all three sides equal first and reports equilateral, then exactly two equal for isosceles, and only then falls through to scalene. Putting the equilateral test first is what makes the algorithm correct for an input like 5, 5, 5.

Testing and refining

This loop of testing and refining is the heart of good algorithm design. You run the algorithm on carefully chosen examples, including awkward edge cases, watch for inputs that give a wrong or missing answer, then change the steps and run the tests again. A second example is an algorithm that decides whether a triangle is right-angled. Sort the three sides so the longest is last, then test whether the sum of the squares of the two shorter sides equals the square of the longest. For sides three, four and five this holds, so the triangle is right-angled; for four, five and six it fails, so it is not. Choosing the right condition, and ordering the sides first, is what makes the decision reliable.

Test and refine
Running the naive rule on 5, 5, 5 exposes a wrong answer; changing the steps and re-testing is the design loop that turns a rough idea into a correct algorithm.
On 5, 5, 5 the naive rule wrongly reports isosceles, shown in caution gold, while the refined rule reports equilateral in blue. The failing input drives the refinement: you test, change the steps, then re-test until every case is right.

Evaluating a refinement

Evaluating a refinement means asking not only whether it now works, but whether it is clear, efficient and complete. A good algorithm covers every possible input, branches in a sensible order, and avoids unnecessary steps. When deciding triangle congruence, for instance, the valid tests are side-side-side, side-angle-side with the angle between the two sides, angle-side-angle, and right-angle-hypotenuse-side; testing two sides and a non-included angle is not enough to guarantee congruence, a subtlety a careful algorithm must respect. Designing, testing, refining and then judging an algorithm against these standards turns a rough set of steps into a dependable geometric procedure.

Quick self-check
1. In an algorithm, what is a 'decision' (or branch)?
2. The construction for bisecting an angle works because it creates two triangles that are:
3. An algorithm classifies a triangle: 'if two sides are equal, isosceles; else scalene.' On sides 5, 5, 5 it reports isosceles. What is the best refinement?
4. Which is a VALID test for two triangles being congruent?
5. An algorithm tests if a triangle is right-angled by sorting the sides and checking a² + b² = c² (c largest). For sides 4, 5, 6 it finds: