24 October 2026

Saturday Computing: Build Your Own Photo Server


Saturday Computing: Build Your Own Photo Server

Your photographs, your Linux server — viewed from Windows or an iPad

You can take thousands of photographs without having a particularly good way of finding them afterwards.

Some are on a camera card. Others are on a Windows computer, an external drive or a tablet. There may be several copies of the same picture, while the one you actually want remains surprisingly difficult to locate.

What if one Linux computer could organise a collection and make it available through a web browser?

That is this week’s project: build a photo server, then use Windows and an iPad to explore the same library.

For GCSE and A-level Computer Science students, this turns databases, networks and web technologies into something useful.

Why Photographs Make Such a Good Computing Project

Photography, sailing and practical science all give me reasons to accumulate images. A useful collection might include a sailing race, microscope photographs and a sequence showing an experiment.

Those images raise different questions:

  • Which photographs were taken on a particular day?
  • Which belong to the same event?
  • Can one photograph appear in two albums?
  • Can I find an image without remembering its filename?
  • Can I view it on a different device?

A folder can store a photograph. A photo-management system adds ways to describe, retrieve and present it.

My teaching aim would be to make students explain what happens when they tap an album. Getting the software working is the beginning of the investigation.

What Are We Actually Building?

The project has four main parts.

PartJob
Linux computerRuns the services and manages hardware, storage and permissions
Photo applicationHandles uploads, albums, requests and access control
DatabaseStores structured information and relationships
Image storageHolds original photographs and generated previews

The Windows computer and iPad are clients. Their browsers request information from the server and display the results.

A server does not have to be an enormous machine in a distant building. It is a computer providing a service.

Nor must every device use the same operating system. The browser and server exchange data using agreed protocols.

That is why a Linux server can provide photographs to a Windows laptop and an Apple tablet.

A Practical Route: Linux and Immich

For this worked example, I would use Immich, a self-hosted photo and video application with a browser interface. Its architecture combines clients, a server and a database, making it a useful system to investigate. Immich

We are installing an existing application and examining the ideas behind it. Students can then build smaller versions of individual components as programming exercises.

Use the current official documentation when installing, because requirements and configuration can change.

Choose Suitable Hardware

A spare computer running a supported 64-bit Linux distribution, such as Ubuntu or Debian, is a useful starting point.

Immich’s current standard requirements specify at least 6 GB RAM and two CPU cores, with 8 GB and four cores recommended. Older processors need checking against its current compatibility requirements.

A compatible 64-bit Raspberry Pi with sufficient memory and suitable storage is another possibility. An old, low-memory Pi should not be assumed suitable. Immich

For a first classroom build, I would choose:

  • A compatible computer with 8 GB RAM or more.
  • An SSD for the operating system and database.
  • Enough image storage for the test collection and generated files.
  • Ethernet to the router where practical.
  • A separate drive for backups.

Keep the database on suitable local storage rather than a network share, as required by Immich’s guidance. Immich

Windows and the iPad need a suitable browser and access to the server’s network.

Start With 50 Photographs

Resist importing an entire photographic archive immediately.

Choose about 50 non-sensitive JPEG images covering several dates and subjects. Keep the originals separately.

A small collection makes it easier to spot missing photographs, understand dates and test albums. JPEG also avoids making camera RAW compatibility the first problem to solve.

For my own teaching, I might use photographs of boats, laboratory equipment and garden plants. Students could use objects or landscapes they have photographed themselves.

The first success is simple:

Upload a picture from Windows and view it on the iPad.

Install the Application in Stages

Immich recommends Docker Compose. Docker containers package application components with their dependencies; they share the host’s kernel rather than each containing a complete separate operating system.

First install Docker Engine and its Compose plugin using the official instructions for your Linux distribution.

Then follow Immich’s current installation guide:

  1. Create a new project directory.
  2. Download the official release’s docker-compose.yml and example environment file.
  3. Rename the environment file to .env.
  4. Configure a new upload location, local database location, timezone and database password.
  5. Start the application from that directory.

The start command is:

docker compose up -d

The -d option runs the services in the background.

Use the current official configuration files rather than copying an old Compose file from a tutorial. Keep a record of the version installed. Immich

Two useful diagnostic commands are:

docker compose ps
docker compose logs --tail=50

These help establish whether the services are running and what they report.

Open the Collection From Windows and an iPad

Find the Linux server’s LAN address through your router or, on many Linux systems, with:

hostname -I

There may be several addresses, including container-network addresses. Choose the address belonging to the connection to your home router.

If it were 192.168.1.50, the default browser address would be:

http://192.168.1.50:2283

That address is an example. Substitute your server’s actual address.

Complete initial setup from a trusted device; the first registered user becomes the administrator. Upload the test images, then open the same address in Safari on the iPad. Immich

Both devices must have network access to the server. Guest Wi-Fi can prevent devices communicating with one another.

The number 2283 identifies the application’s default port. The IP address identifies the machine; the port helps identify the service.

A router DHCP reservation can give the server a consistent LAN address.

Keep this first exercise on a trusted local network. Plain HTTP does not encrypt the connection; use appropriately configured HTTPS or an encrypted private connection before using untrusted networks.

What Happens When You Tap an Album?

Consider a typical album request:

  1. The browser sends a request to the application.
  2. The server checks the user’s identity and permissions.
  3. It retrieves relevant information from the database.
  4. It returns album data and serves the requested previews.
  5. The browser arranges the results on screen.

Opening a photograph can trigger a further request for a larger image.

The iPad does not need to download the entire archive simply to display a gallery.

This illustrates the division between client-side processing, such as arranging the display, and server-side processing, such as checking access and retrieving records.

Ask students to explain why the server must enforce permissions even if the browser interface hides an unavailable album.

Why the Database Matters

The photograph and its database record are different things.

An image file contains image data and may contain embedded metadata, such as capture time, camera settings or GPS coordinates. A photo application can extract information into searchable records and add its own information, including ownership and album membership.

For teaching, imagine this simplified design:

TableExample fields
PhotoPhotoID, Filename, DateTaken, FilePath, OwnerID
AlbumAlbumID, AlbumName
AlbumPhotoAlbumID, PhotoID

This is a teaching model, not Immich’s actual database schema.

PhotoID uniquely identifies a photograph: it is a primary key.

AlbumPhoto connects albums and photographs using foreign keys. Together, AlbumID and PhotoID could form its composite primary key.

This represents a many-to-many relationship: an album contains many photographs, and one photograph can belong to several albums.

A photograph of Champagne might appear in both “Sailing” and “Boat Maintenance” without requiring two copies of the original file.

That gives students a practical reason to understand relationships before writing SQL.

Try a Database Question

Using the teaching model, this query finds photographs taken during October 2026:

SELECT PhotoID, Filename, DateTaken
FROM Photo
WHERE DateTaken >= '2026-10-01'
  AND DateTaken < '2026-11-01'
ORDER BY DateTaken;

The upper boundary also works when DateTaken includes a time.

Run experiments like this in a separate practice database rather than modifying the application’s production database.

Ask students why an index on DateTaken might speed up date searches, and what extra storage and maintenance it would require.

The Web Technologies Hiding in the Gallery

A photo gallery gives familiar web technologies a clear purpose.

TechnologyRole
HTMLStructures page content
CSSControls layout and presentation
JavaScriptSupports interaction and dynamic updates
HTTP or HTTPSCarries requests and responses
APIDefines how software requests data or operations

On Windows, open the browser’s developer tools and select the Network tab.

Reload the gallery. Compare requests for page resources, structured data and images.

Then ask:

  • Does opening an album request every original photograph?
  • What changes when a photograph is opened?
  • Are some resources loaded from the browser cache?
  • Why does a thumbnail grid usually load faster than full-size images?

Students can now connect technical vocabulary to behaviour they have observed.

Measure Storage and Performance

Suppose 50 test JPEGs average 6 MB:

Total image storage = number of images x average file size

Total image storage = 50 x 6 MB = 300 MB

For 20,000 photographs at the same average size:

Total image storage = 20,000 x 6 MB = 120,000 MB, or approximately 120 GB

These are illustrative decimal estimates. Actual file sizes vary.

Allow additional capacity for previews, database growth, other generated files and free space. Video and RAW files can change the calculation substantially.

Students could compare a freshly loaded album with a second visit, or measure the same task on Ethernet and Wi-Fi.

Change one factor at a time. A faster second attempt might reflect caching rather than a faster network.

Should the Server Run All Day?

An old computer may be available at no purchase cost but still use electricity.

For illustration, a machine averaging 30 W continuously uses:

Daily energy in kWh = power in watts x hours / 1000

Daily energy = 30 x 24 / 1000 = 0.72 kWh

At an assumed tariff of 25p per kWh:

Daily cost = 0.72 x £0.25 = £0.18

Use a plug-in meter and your actual tariff for a meaningful comparison. A teaching server may only need to run during lessons.

Existing Folders Need a Different Approach

What if the photographs are already organised on a storage drive?

Immich supports external libraries for existing image folders. This requires the appropriate storage mount and library configuration; files placed in an arbitrary server folder will not automatically appear.

A read-only external-library mount can prevent the application changing those source files. It does not replace a separate backup, and some metadata-writing functions are restricted. Immich

For a first build, browser-uploaded copies are simpler.

A Photo Server Still Needs Backups

Once the project becomes useful, protect both the photographs and the database.

Immich’s database backups contain metadata, not the image collection. Backups stored only on the server also remain vulnerable to its failure.

Use a 3-2-1 approach: three copies, on two different storage types, with one off-site. Save configuration securely too, including the information needed to rebuild the installation. Immich

Practise recovery in a separate test installation. Check that an original image opens and album membership survives.

A working gallery proves that you can access your photographs today. A tested recovery process gives you evidence that you can recover them tomorrow.

That is a worthwhile computing lesson in its own right.

Privacy and Access Beyond Home

For classroom work, use images you own and have permission to use. Avoid identifiable pupils, private documents and sensitive locations in the demonstration collection.

Do not forward the application’s port through the router as part of this beginner exercise.

Access from outside the home is a separate extension involving authentication, encrypted connections, updates and carefully controlled access. A LAN-only gallery is already a complete and worthwhile project.

Viewing through the iPad browser also does not automatically upload every photograph stored on the iPad. Browsing, manual uploading and automatic device backup are separate functions.

Turn the Build Into an OCR Learning Activity

The project connects directly with OCR H446 topics. ocr.org.uk

Specification areaPractical connection
1.3.2 DatabasesKeys, relationships, SQL and indexing
1.3.3 NetworksLANs, protocols and client-server systems
1.3.4 Web TechnologiesHTML, CSS, JavaScript and client/server processing

For GCSE students, concentrate on identifying the components and explaining a request.

For A-level students, add the relational model, SQL and browser-network investigation.

A useful final challenge is to give each student a different failure: a wrong IP address, an unavailable service, an isolated guest network or insufficient access permissions.

Ask them to justify each diagnostic step.

The aim is to develop a method: establish what works, locate the failure and test a plausible explanation.

A Photograph Becomes a Lesson in Computing

The most satisfying outcome is seeing a photograph uploaded from Windows appear on an iPad while the Linux computer quietly provides the service.

A small image collection has become an opportunity to investigate networks, databases, web applications, storage and recovery.

For me, that is the value of practical computing: students have something real to question, measure and explain.

Start with 50 photographs, two browsers and one server. Then make sure you can explain the journey of a single image.

23 October 2026

Plastic Sulfur — Making and Watching an Unstable Allotrope

 


Plastic Sulfur — Making and Watching an Unstable Allotrope

How Can a Brittle Yellow Solid Become Rubbery?

Imagine showing a student a sample of sulfur.

It is yellow, solid and brittle. It looks thoroughly unpromising as a material for anything that needs to bend.

Now imagine transforming it into a dark, rubbery strand that can briefly stretch.

Then leave it alone.

Over time, that flexibility disappears and the material becomes brittle again.

The element has remained sulfur throughout. What has changed is its structure.

Plastic sulfur is a particularly striking demonstration because the story continues after the heating has finished. The freshly prepared material is only a temporary state, and watching it change provides an opportunity to explore allotropy, polymers, crystallisation and stability.

It also poses a useful scientific question:

If a material is solid, does that mean it has finished changing?

The Same Element Can Have Different Structures

Different structural forms of the same element are called allotropes.

Carbon provides the familiar examples: diamond and graphite contain carbon atoms, yet their structures give them very different properties.

Sulfur offers another route into this idea.

Ordinary yellow sulfur consists mainly of molecules containing eight sulfur atoms arranged in puckered rings. We write the molecular formula using ordinary text characters:

S8

These rings are often described as crown-shaped. They are not flat octagons.

In crystalline sulfur, the molecules pack into an ordered arrangement. Different crystal forms can contain the same S8 molecules packed differently.

That gives students two levels of structure to consider:

  • How are the atoms joined within each molecule?

  • How are those molecules arranged throughout the solid?

Plastic sulfur introduces a further possibility: long chains of sulfur atoms, rather than a material dominated by small rings.

Before the Demonstration: A Proper Laboratory Setting

This is a demonstration for a competent adult in a suitably equipped laboratory with a functioning fume cupboard. It is unsuitable as a kitchen or unsupervised home experiment.

The important hazards include hot, sticky molten sulfur, hot apparatus, splashing during transfer and ignition. Burning sulfur produces sulfur dioxide, a harmful respiratory irritant.

A written risk assessment and an established educational procedure should determine the apparatus, scale, heating method, protective equipment and emergency arrangements. University demonstration guidance specifically identifies extraction, temperature control and careful handling as important.

The description below explains what students observe and why. It does not replace a practical protocol.

For my teaching, a close-up camera would be particularly useful here. Students could watch the colour and movement of the liquid on screen while remaining well clear of the apparatus.

First It Melts — Then Something More Interesting Happens

The demonstrator begins with yellow sulfur and heats it under controlled conditions.

Initially, the solid melts to form a relatively mobile yellow or amber liquid.

At this stage, students may reasonably predict that further heating will make it flow more easily. That is what happens with many familiar liquids.

Sulfur challenges that prediction.

Above roughly 159 degrees C, ring-opening polymerisation becomes important. Sulfur atoms begin forming long chains, and the liquid becomes much more viscous. Its colour also darkens.

In relatively pure sulfur, viscosity rises dramatically and reaches a maximum around 187 degrees C. At still higher temperatures, it decreases again as the balance of chain formation and breaking changes. The whole story is more interesting than “hotter means thicker”.

What does “viscous” mean?

Viscosity describes a fluid’s resistance to flow.

Water has a low viscosity. Honey has a much higher viscosity.

Students should distinguish this from density:

A liquid can resist flowing without being especially dense.

The useful observation is how readily the liquid moves under comparable conditions. Appearance alone cannot provide a precise viscosity measurement.

From Small Rings to Long Chains

A simple molecular model helps explain the change.

Imagine a tray containing many small, closed loops of string. The loops can move around one another relatively easily.

Now imagine a tray containing long lengths of tangled string.

Movement becomes more restricted because the long strands interfere with one another.

The analogy is imperfect, but it gives students a way to picture why chain length and entanglement matter.

In sulfur, heating allows some S8 rings to open. The resulting reactive chain ends can participate in further chain growth.

The crucial point is that melting and polymerisation are different processes:

  • Melting changes the physical state.

  • Polymerisation changes the molecular structures present.

Simply melting sulfur does not guarantee the same result as preparing a melt containing a substantial proportion of long sulfur chains.

Rapid Cooling Captures a Temporary Structure

In the established demonstration, suitably heated sulfur is carefully transferred into cold water.

Rapid cooling is called quenching.

It restricts the opportunity for the hot material to reorganise immediately into ordinary crystalline sulfur. A freshly prepared sample can form dark, flexible strands with a rubber-like character. Educational demonstrations describe the resulting material as capable of bending and stretching.

This material is traditionally called plastic sulfur.

Here, “plastic” refers to its capacity to be shaped or deformed. It does not mean that it has become a conventional carbon-based plastic such as polythene.

The sample is still elemental sulfur.

There is another useful qualification: plastic sulfur is not necessarily a pure collection of identical long chains. Quenched sulfur can contain both polymeric sulfur and S8 rings in an amorphous material.

Amorphous means that it lacks the long-range ordered structure of a crystal. It does not mean that its atoms have no organisation at all.

Why Can It Stretch?

Long molecular chains can change their arrangement when a material is pulled.

Some chains become more aligned, and parts of the tangled structure straighten. This helps explain why freshly prepared plastic sulfur behaves so differently from a brittle sulfur crystal.

However, its behaviour should not be oversold.

A particular sample may stretch, deform permanently or snap, depending on its preparation, temperature and age. It should not be expected to behave like a manufactured elastic band.

That variation is part of the teaching opportunity.

Rather than asking only, “Did it work?”, I would ask:

“How flexible was it, when did we test it, and what evidence have we recorded?”

Those questions turn a memorable demonstration into an investigation.

The Experiment Continues After the Apparatus Is Put Away

Plastic sulfur gradually loses its flexibility.

Its molecular structures reorganise, and crystalline sulfur develops. At ordinary room conditions, orthorhombic sulfur built from S8 rings is the stable crystalline form towards which other modifications tend to change.

The material may become harder, more opaque and more yellow as it ages.

The timing varies. Some changes may be apparent within hours; observations over the following day or two can reveal more. Preparation history, storage temperature and sample dimensions all matter.

This is an example of metastability: a material can persist temporarily in a state that is not its most stable state under the surrounding conditions.

“Unstable” here does not mean explosive. It means that the structure changes towards a more stable arrangement over time.

A Follow-Up Investigation: How Quickly Does Flexibility Disappear?

Once the demonstrator has confirmed that the material is cool and suitable for examination under the risk assessment, students can record its changing properties.

I would prepare several comparable pieces, using a fresh piece for each mechanical test. Repeatedly stretching the same strand would change the sample and make later comparisons less meaningful.

A useful observation schedule might be:

Observation timeWhat to record
As soon as safely cooledColour, appearance, flexibility and initial length
After 15 minutesAny visible change; response to the agreed gentle test
After 1 hourComparison with the initial photograph and observations
After several hoursEvidence of hardening, cracking or colour change
The following dayComparison with fresh plastic sulfur and ordinary sulfur

These are proposed observation times, not a prediction of exactly when each change will occur.

Keep the comparisons fair

Use similar sample dimensions, consistent storage conditions and the same gentle testing method.

If extension can be measured reliably:

Extension = stretched length - original length

Percentage extension = (extension / original length) x 100

For example, a strand extending from 40 mm to 50 mm has:

Percentage extension = (10 / 40) x 100 = 25%

That is an illustrative calculation, not an expected experimental result.

Students should also distinguish stretching from elastic recovery. A strand that becomes longer has deformed; to demonstrate recovery, it must shorten again after the force is removed.

Where samples are too irregular for useful measurements, photographs and a clearly defined flexibility scale may produce more honest evidence than precise-looking numbers.

Watching Crystals Return

A microscope adds another dimension.

Students could compare ordinary sulfur crystals with fresh and aged samples of plastic sulfur. Photographs taken with consistent lighting and magnification may reveal changes in surface texture and visible crystalline regions.

However, the limits of the equipment matter.

A classroom digital microscope cannot resolve individual sulfur chains or S8 molecules.

It can show larger-scale changes consistent with the structural explanation. It cannot directly prove the molecular mechanism.

That distinction is valuable:

What we observe and how we explain it are connected, but they are not the same thing.

Is This a Physical Change or a Chemical Change?

Students often expect every change to fit neatly into one of two boxes.

Sulfur shows why the reasoning matters more than the label.

Melting is a physical change. Crystallisation concerns the development of an ordered solid structure. Ring-opening polymerisation involves breaking and forming covalent bonds, even though the material remains an element.

The fact that no second element has been added does not mean that nothing has happened chemically.

I would ask students to identify the particular process they are discussing and explain what happens to the particles and bonds.

That produces a much stronger answer than simply declaring the whole demonstration “physical” or “chemical”.

Why This Matters Beyond Sulfur

Plastic sulfur illustrates a principle that runs throughout materials science:

A material’s properties depend on its structure and processing history, as well as its composition.

For students, that opens several useful questions:

  • Why can cooling rate affect a material’s properties?

  • Why do long-chain molecules behave differently from small molecules?

  • Why can a manufactured material change during storage?

  • How could we test whether an apparent improvement lasts?

It also challenges the assumption that every polymer must be carbon-based. Sulfur can form a chain backbone of its own.

Why I Would Include This in My Teaching

What appeals to me is the opportunity to return to the sample.

The heating and quenching provide the immediate visual interest. The ageing provides the deeper question.

A student who sees only the fresh material might conclude that sulfur has been permanently transformed into something rubbery. A student who examines it again the following day has to revise that explanation.

At Hemel Private Tuition, I want practical science to encourage that habit: observe carefully, make a prediction, collect evidence and be willing to change your mind.

This demonstration can also connect different levels of understanding. One student may focus on the visible properties; another may explore molecular chains; a more advanced student may consider the relationship between stability and the rate of structural change.

There is plenty to discuss without losing sight of the sample in front of us.

The Most Interesting Result May Come Tomorrow

Plastic sulfur begins with a surprising transformation: a brittle yellow solid becomes a dark, flexible material.

Its gradual loss of flexibility makes the lesson more powerful.

The sample reminds us that a solid can still be changing, that cooling history matters, and that knowing which element we have is only the beginning of understanding its properties.

Sometimes the most revealing part of an experiment happens after we think it has finished.

22 October 2026

How Can We Know What Is Inside the Earth Without Going There?

 


How Can We Know What Is Inside the Earth Without Going There?

Earthquake Waves — Looking Inside a Planet We Cannot Enter

We can photograph distant galaxies, send spacecraft to other planets and examine individual cells under a microscope.

Yet we cannot travel very far into the planet beneath our feet.

No borehole has come remotely close to reaching the centre of the Earth. Nevertheless, science textbooks confidently show a rocky mantle, a liquid outer core and a solid inner core.

How can we know what is there when we cannot go and look?

One of the most powerful answers comes from earthquakes.

Earthquakes send waves through the planet. By measuring where those waves arrive, how long they take and which waves are missing, scientists can investigate regions thousands of kilometres below the surface.

The Earth’s interior becomes a problem we can solve using evidence.

For students, this brings together physics, geology and mathematical reasoning. And the investigation can begin with something as simple as a slinky.

Earthquakes Give Scientists a Signal to Follow

An earthquake releases energy, some of which travels through the Earth as seismic waves.

Sensitive instruments called seismometers detect the resulting ground motion. The recording, called a seismogram, contains information about the earthquake and the materials through which its waves have travelled.

Two particularly useful types are P waves and S waves.

Both travel through the Earth’s interior, which is why they are called body waves. Their different movements give us different clues. earthquake.usgs.gov

P waves: a travelling squeeze

P waves are longitudinal waves.

The material vibrates backwards and forwards, parallel to the direction in which the wave travels. Regions of compression and expansion move through it.

Sound travelling through air provides a familiar example of this type of motion.

P waves travel faster than S waves through the same solid material, so they usually produce the first identifiable arrival on a seismogram. The P stands for “primary”. earthquake.usgs.gov

S waves: a travelling sideways movement

S waves are transverse waves.

The material moves perpendicular to the direction of wave travel. Imagine sending a sideways pulse along a rope: the pulse travels towards the far end while individual sections of rope move sideways.

The S stands for “secondary”, because these waves arrive after the P waves. earthquake.usgs.gov

But the most revealing difference concerns what happens when the waves encounter a liquid.

The Crucial Clue: Liquids Cannot Carry S Waves Through Their Interior

P waves can travel through solids and liquids.

S waves require a material that can resist a sideways change of shape. Solids provide that resistance; liquids do not sustain it in the way needed to transmit these shear waves through their bulk.

Consequently, S waves cannot travel through the liquid outer core. P waves can enter it, but their speed and direction change. U.S. Geological Survey

This does not mean that liquids cannot carry waves. Sound travels through water, and waves move across its surface.

The distinction is between different kinds of wave.

That is a valuable teaching point: saying “waves travel through water” is not enough. We must ask which waves, and how the material is moving.

Practical 1: Make P and S Waves With a Slinky

This is an excellent starting point because students can watch the motion rather than simply memorising diagrams.

Equipment

  • A long slinky or suitable demonstration spring.
  • A smooth floor or long table.
  • A small piece of coloured tape.
  • A phone or camera for slow-motion recording, if available.

Keep the spring comfortably extended, avoid overstretching it and keep faces away from its ends.

Demonstrating a P wave

  1. Lay the slinky along the floor, with a person holding each end.
  2. Gather a few coils together near one end.
  3. Release them to send a compression along the spring.
  4. Watch the compression move towards the opposite end.

Attach a small tape marker to one coil.

Ask:

Does the marked coil travel all the way along the spring with the wave?

It does not. It moves locally while the disturbance travels onwards.

That observation helps separate two ideas students often confuse: the movement of the material and the movement of the wave.

Demonstrating an S wave

Move one end briefly from side to side, perpendicular to the spring’s length.

A sideways pulse travels along it.

Again, follow the marked coil. Its movement is across the direction of wave travel.

What the model shows—and where it stops

The slinky makes longitudinal and transverse motion visible. However, its speed, scale and mechanical behaviour do not reproduce the Earth.

I would use it to establish the movement first, then ask students which parts of the model are useful and which are unrealistic.

That question is part of the science.

Practical 2: Send a Wave Back Towards Yourself

A wave does not always continue straight through a material. At a boundary, some of its energy can be reflected.

Fix one end of a suitable rope securely and send a single sideways pulse towards it.

Watch the returning pulse. At a fixed end, it returns inverted: an upward displacement comes back as a downward displacement.

Slow-motion filming makes the outgoing and returning pulses much easier to distinguish.

The geological connection is that seismic waves can also reflect from boundaries inside the Earth.

An echo contains information about the surface that sent it back.

With suitable measurements and a model of wave speed, a reflected arrival can help reveal the position of a hidden boundary.

A simple calculation

For a deliberately simplified example, suppose a pulse travels straight down to a horizontal boundary and returns along the same route.

Assume:

  • Wave speed = 6 km/s.
  • Total return time = 10 seconds.

Then:

Total distance = speed x time

Total distance = 6 x 10 = 60 km

The wave travels down and back, so:

Depth = total distance / 2

Depth = 60 / 2 = 30 km

This is an invented teaching example, not a measurement of a particular location.

Real investigations must account for changing speeds, angled paths and more complicated structures. Nevertheless, the underlying question is accessible:

What can a travel time tell us about something we cannot see?

Practical 3: Explore Changing Speed and Refraction

A spring or mechanical wave model can demonstrate that wave speed depends on the properties of the system.

With a suitable rope, for example, increasing its tension increases the speed of a transverse pulse. Change one variable at a time and compare the travel time over a measured distance.

For a clearer demonstration of refraction, use a ripple tank with a shallow region created by a submerged plate.

Send wavefronts towards the depth boundary at an angle. As their speed changes, their direction changes too.

Water-surface waves are not seismic body waves. Here, the model illustrates the relationship between changing wave speed and changing direction.

Inside the Earth, seismic waves likewise change direction as they encounter different conditions. Gradual changes in wave speed can produce curved paths, while boundaries can produce more abrupt changes.

That is why interpreting earthquake waves requires more than drawing straight lines through a globe.

The Missing Waves Reveal the Liquid Outer Core

Imagine placing earthquake detectors around the world.

After a large earthquake, you compare their recordings.

Some stations detect direct P and S waves. At greater angular distances, direct S waves disappear because their routes would require them to pass through the liquid outer core.

P waves behave differently. They enter the outer core, but strong refraction creates a region where direct P waves are absent: the P-wave shadow zone, approximately 104 to 140 degrees from the earthquake. These angles are measured around the Earth from the earthquake’s surface location. U.S. Geological Survey

“Shadow” does not mean that every instrument records complete silence. Reflected, diffracted and converted waves complicate real recordings.

The important point is that particular expected arrivals are missing.

What scientists do not detect can be as informative as what they do detect.

Become a Seismologist: What Does This Evidence Suggest?

Give students the following simplified evidence cards.

These are conceptual summaries, not a real earthquake dataset.

ObservationWhat might it suggest?
P waves arrive before S waves at a nearby station.The wave types travel at different speeds.
Some arrivals return after reflection from deep boundaries.The Earth contains regions with different properties.
Direct S waves are absent where their paths would cross the outer core.That region cannot transmit shear waves.
Direct P waves are missing over a particular angular range, then appear again farther away.Strong refraction redirects their paths.
Additional P-wave arrivals do not fit a model with one uniform core.Another internal region or boundary may be needed.

Ask students to sketch an interior that could explain the observations.

Then challenge their reasoning:

  • Which observation supports each feature of your drawing?
  • Could another explanation fit?
  • What further measurement would help you decide?

This is where a lesson about waves becomes a lesson about scientific argument.

The table alone cannot establish exact boundary depths. Those require measured travel times, many recordings and calculations that compare possible models.

How Did Scientists Discover the Inner Core?

A liquid outer core explains much of the evidence, but it does not explain every seismic arrival.

Danish seismologist Inge Lehmann examined waves appearing where the accepted model did not adequately explain them. In 1936, she proposed an inner core within the surrounding outer core.

An additional boundary could account for otherwise puzzling wave behaviour. Oxford University Museum of Natural History

This is an excellent example to discuss with students.

An unexpected result is not automatically a mistake to discard. It may expose a weakness in the explanation.

However, the conclusion also needs care: identifying an extra boundary and establishing that the inner core is solid are related but distinct questions. Our present understanding draws on accumulated seismic evidence, the Earth’s overall properties and laboratory investigations of materials under extreme conditions. pubs.usgs.gov

A Common Misconception: The Mantle Is Not a Giant Ocean of Magma

Pictures of the Earth often use bright orange and red layers. Those colours can give the impression that everything beneath the crust is molten.

Most of the mantle is solid rock.

It can transmit S waves, yet it can also deform and flow extremely slowly over geological timescales. “Solid” does not mean incapable of movement over millions of years.

The outer core is liquid, while the inner core is solid. Temperature alone does not determine whether material melts: pressure and composition matter too. pubs.usgs.gov

This gives students an opportunity to reconsider the simple categories they first encountered when learning about solids and liquids.

Why I Would Bring This Into My Teaching

What appeals to me about this investigation is how far it takes us from such simple equipment.

A spring on the laboratory floor introduces the movement of waves. A reflected pulse introduces hidden boundaries. A set of recordings raises questions about the structure of an entire planet.

It also changes the questions we ask.

Instead of only asking:

“What are the Earth’s layers called?”

we can ask:

“What evidence would persuade you that those layers exist?”

In my home laboratory, I would combine the practical demonstrations with close-up filming and a short evidence challenge. Students could make predictions, inspect the recordings and explain how their interpretation changed.

There is useful mathematics here too: speed, distance, time, angles, graphs and uncertainty all have a clear purpose.

Students are using them to investigate something.

The Bigger Lesson: Science Can Reach Beyond Direct Observation

We often associate scientific evidence with seeing something happen.

But much of science concerns things we cannot inspect directly.

We infer their properties from measurable effects, build explanations and test whether those explanations successfully predict further observations.

Seismology makes that process particularly vivid.

We cannot enter the outer core, but we can investigate how waves behave when they encounter it.

We cannot hold a sample of the inner core in a school laboratory, but we can examine the evidence that led scientists to propose it.

The strength of an explanation lies in how well it accounts for the evidence—and how well it survives further tests.

Conclusion: We Cannot Go There, but We Can Investigate

A diagram of the Earth’s interior can look like a finished answer.

Behind it lies a remarkable investigation involving earthquakes, sensitive instruments, unexpected arrivals, missing waves and generations of scientific reasoning.

That is what makes this topic so valuable beyond the syllabus.

A slinky does more than demonstrate a wave. It can begin a discussion about how knowledge is built.

We know about the Earth’s interior because the waves travelling through it carry clues—and scientists have learnt how to interpret them.

21 October 2026

Mathematics of Voting: Can Democracy Be Mathematically Fair?

 


Mathematics of Voting: Can Democracy Be Mathematically Fair?

If everyone votes honestly, surely mathematics should be able to find the fairest winner. Unfortunately, it isn’t that simple.

Ask a class to solve an equation and, usually, there is an answer that everyone can check.

Ask the same class to choose an end-of-term activity and things become rather more complicated.

Some want a film. Others prefer a quiz. A third group would choose a practical science challenge.

“Let’s vote,” somebody suggests.

That sounds straightforward. Count the votes, announce the winner and accept the democratic decision.

But there is a question we should ask first:

How are we going to count those votes?

We could count only first choices. We could eliminate the least popular option and vote again. We could award points for first, second and third places.

These methods can produce different winners, even when nobody changes their preferences.

For the final article in this mathematics-beyond-the-syllabus series, I want to explore something unexpected: how mathematics helps us question what we mean by a fair decision.


Three Sensible People Can Produce a Circular Decision

Let us begin with just three students choosing between activities A, B and C.

The symbol “>” means “is preferred to”.

StudentFirst choiceSecond choiceThird choice
Student 1ABC
Student 2BCA
Student 3CAB

Each student has a perfectly consistent ranking:

  • Student 1: A > B > C
  • Student 2: B > C > A
  • Student 3: C > A > B

Now compare the activities two at a time.

A against B

Students 1 and 3 prefer A to B.

A wins by 2 votes to 1.

B against C

Students 1 and 2 prefer B to C.

B wins by 2 votes to 1.

C against A

Students 2 and 3 prefer C to A.

C wins by 2 votes to 1.

The group therefore produces this result:

A beats B. B beats C. C beats A.

We have gone round in a circle.

This is the Condorcet paradox: individually consistent preferences can produce a cycle when combined through pairwise majority voting. An option that beats every other option head-to-head is called a Condorcet winner. Here, there is no such winner. 

Nobody has miscounted. Nobody has changed their mind.

The difficulty comes from combining their opinions.


The Mathematical Idea Hidden Inside: Transitivity

Students already use a related idea when comparing numbers.

If:

8 > 5

and:

5 > 2

then:

8 > 2

This property is called transitivity.

We often expect preferences to behave similarly. If I prefer A to B and B to C, we might expect me to prefer A to C.

Every student in our example has a transitive ranking.

The group’s majority comparisons do not.

That is what I find particularly interesting about this investigation. A property that holds for every individual does not necessarily survive when we combine their decisions.

“The majority prefers it” sounds decisive, but we need to ask:

The majority prefers it to what?


Could the Order of Voting Decide the Winner?

Return to those three students.

Suppose we organise a sequence of head-to-head votes, with the winner of the first contest facing the remaining activity.

First contestFirst winnerFinal contestOverall winner
A against BAA against CC
B against CBB against AA
C against ACC against BB

We can make any of the three activities win simply by changing the order of the contests.

The preferences remain identical.

This provides a useful lesson for school councils, committees, clubs and businesses: the procedure used to reach a decision can influence the outcome.

It also suggests a sensible practical habit.

Agree the voting procedure before you know which option it will favour.


One Election, Three Different Winners

Now let us move to a larger classroom example.

Thirty students rank three activities:

  • A: watch a film;
  • B: take part in a quiz;
  • C: complete a practical science challenge.

Their preferences are:

Number of studentsFirst choiceSecond choiceThird choice
12ACB
10BCA
8CBA
Total: 30

We will keep these rankings fixed throughout.

Everyone votes honestly. Everyone participates. Everyone ranks all three activities.

Only the counting method changes.

Method 1: First-Past-the-Post

Count first choices:

ActivityFirst-choice votes
A: Film12
B: Quiz10
C: Science challenge8

A wins.

A has more first-choice votes than either competitor.

However:

A’s share = 12 / 30 x 100 = 40%

This is a plurality, meaning the largest share. It is not an absolute majority, which requires more than half.

There is another striking detail: the other 18 students all put A last.

Should the largest group of first-choice supporters be enough to decide the result?

That is our first question about fairness.

Method 2: A Two-Round Run-Off

Suppose the rule says that, if nobody receives more than half the first-round votes, only the top two options enter a final vote.

A and B qualify. C is eliminated.

The eight students who preferred C have:

C > B > A

Assuming they vote according to those unchanged preferences, they choose B in the final.

FinalistFinal-round votes
A: Film12
B: Quiz10 + 8 = 18

B wins by 18 votes to 12.

The film won under first-past-the-post. The quiz wins under a run-off.

Nobody has changed their opinion.

Method 3: Ranked Voting Through Instant Run-Off

“Ranked voting” describes a family of methods using ordered preferences. It does not identify one particular counting rule.

One example is instant run-off voting.

For our complete ballots:

  1. Count each voter’s highest-ranked remaining option.
  2. If an option has more than half the votes, it wins.
  3. Otherwise, eliminate the option with the fewest votes.
  4. Transfer each affected ballot to its highest-ranked remaining option.
  5. Repeat as necessary.

Here, C is eliminated first. Its eight ballots transfer to B.

B wins again, with 18 votes.

With three options and these fixed, complete rankings, instant run-off produces the same result as our two-round run-off.

A separate second election can differ in practice because turnout or preferences may change. Our investigation deliberately holds those factors constant.

Method 4: The Borda Count

A Borda count uses positions throughout each ranking.

For three options, award:

  • 2 points for first place;
  • 1 point for second place;
  • 0 points for third place.

Calculate the totals:

A’s score = 12 x 2 + 10 x 0 + 8 x 0 = 24

B’s score = 12 x 0 + 10 x 2 + 8 x 1 = 28

C’s score = 12 x 1 + 10 x 1 + 8 x 2 = 38

ActivityBorda points
A: Film24
B: Quiz28
C: Science challenge38

C wins.

C has the fewest first-choice votes, but everyone places it first or second.

Our results are now:

Counting methodWinner
First-past-the-postA: Film
Two-round run-offB: Quiz
Instant run-offB: Quiz
Borda countC: Science challenge

The same 30 students. The same preferences. Three different winners.


Does the Science Challenge Have Another Claim to Victory?

Compare C head-to-head with each rival.

C against A

The 10 students in the second group and eight in the third prefer C.

C beats A by 18 votes to 12.

C against B

The 12 students in the first group and eight in the third prefer C.

C beats B by 20 votes to 10.

In this example, C is the Condorcet winner.

Yet both first-past-the-post and instant run-off fail to elect it.

This does not establish that the Borda count always finds a Condorcet winner. It does not. Different methods reward different features of the rankings, and their outcomes can conflict. 

The example gives us something more useful than a slogan about the “best” system: it gives us a precise disagreement to investigate.


What Do We Actually Mean by “Fair”?

Before choosing a voting system, we need to decide which properties matter.

Possible priorityQuestion to ask
First-choice supportWhich option is the favourite of the largest number?
Final-round majorityWhich finalist can attract more than half the votes?
Broad support across rankingsWhich option receives the strongest overall ranking score?
Head-to-head successIs there an option that beats every rival individually?
SimplicityCan voters understand and check the count?
Equal treatmentDoes the procedure treat voters and options consistently?

These priorities can pull in different directions.

Even Borda points contain an assumption worth discussing. Awarding 2, 1 and 0 points gives the same numerical gap between first and second as between second and third.

But a ranking does not tell us how strongly somebody feels.

One student might slightly prefer a film to a quiz. Another might love the film and strongly dislike both alternatives.

Their rankings could look identical.

A ballot records particular information about preferences. It does not automatically capture everything that matters to the voter.


Arrow’s Impossibility Theorem: The Higher-Level Challenge

For A-level and Further Maths students, this leads towards Arrow’s impossibility theorem.

Consider a rule that combines individual rankings into a complete, transitive group ranking for three or more options.

We might require:

  • Unrestricted preferences: every combination of consistent individual rankings is allowed.
  • Unanimity: if everyone prefers A to B, the group ranks A above B.
  • Independence of irrelevant alternatives: if nobody changes their relative preference between A and B, the group’s comparison of A and B stays unchanged, even if other comparisons change.
  • No dictator: no single voter’s strict preferences always determine the group’s corresponding comparisons.

Arrow’s theorem says that no such aggregation rule can satisfy all these requirements simultaneously. 

This is a precise mathematical limitation within a specified framework.

It does not prove that democracy is pointless, that all voting systems are equally good, or that every possible meaning of fairness is impossible.

It tells us to examine our assumptions and recognise the trade-offs.


Try It: Turn the Classroom Into a Voting Laboratory

What appeals to me as a teacher is how little equipment this investigation needs.

Paper, pencils and three options are enough to begin.

Start With a Real Choice

Choose three harmless alternatives: lesson activities, fictional school-trip destinations or possible names for a science club.

Ask each student to rank all three privately.

Count the same ballots using first-past-the-post, instant run-off and Borda points. Then compare every pair head-to-head.

Agree how ties will be resolved before counting.

The discussion afterwards matters as much as the arithmetic:

  • Did the methods agree?
  • Was there a Condorcet winner?
  • Did the winning option appear near the bottom of many ballots?
  • Which rule would students choose before knowing the result?
  • Does their preferred rule change after they see who wins?

That last question can generate a particularly revealing conversation.

GCSE Challenge: Explain the Results

Use the 30-student example to calculate percentages, check totals and explain why a plurality differs from a majority.

For Borda scoring, every ballot distributes:

2 + 1 + 0 = 3 points

Therefore:

Total points = 30 x 3 = 90

Check:

24 + 28 + 38 = 90

This is a simple way to verify the arithmetic.

A-Level Challenge: Change the Scoring Rule

Keep the ballots fixed, but award 3 points for first place, 1 for second and 0 for third.

Which option wins now?

Then investigate a general rule:

First place = p points
Second place = q points
Third place = 0 points

Assume p > q > 0.

For our example:

A’s score = 12p

B’s score = 10p + 8q

C’s score = 8p + 22q

Students can use inequalities to find which relationships between p and q allow each option to win.

An apparently simple voting exercise has become an algebraic investigation.

Further Maths or Computing Challenge: Explore Many Elections

With three options, the number of strict rankings is:

3! = 6

With four options:

4! = 24

With five options:

5! = 120

A spreadsheet or short program could generate preference profiles and compare counting methods.

Students could investigate how often different methods disagree under their chosen model.

The phrase “under their chosen model” matters. Randomly generating rankings in one particular way does not automatically reproduce how real people vote.


Why This Belongs in Mathematics Teaching

Mathematics is sometimes presented as a subject in which every question has one correct answer and every problem ends when the calculation is complete.

Voting mathematics offers a richer picture.

The calculations can be correct while the decision remains open to debate.

Students must distinguish between:

  • the information collected;
  • the rule applied;
  • the mathematical result;
  • the judgement that the result is fair.

At Hemel Private Tuition, this is the kind of investigation I would use to connect mathematical reasoning with decisions students recognise.

It brings together arithmetic, percentages, logic, inequalities, algorithms and clear explanation.

It also rewards a valuable habit: asking what a calculation actually establishes.


Conclusion: Count the Votes—and Question the Rules

Democracy needs counting, but counting alone cannot decide what fairness should mean.

Our three-student example produced a circular majority. Our 30-student example produced three different winners. Arrow’s theorem revealed a deeper limit on combining rankings while preserving several attractive conditions.

These results give us reasons to design decision-making procedures carefully and explain them clearly.

For students, the most useful lesson may be this:

Before asking who won, ask how the winner was chosen.

And before declaring a voting system fair, ask:

Which kind of fairness are we trying to achieve?

Saturday Computing: Build Your Own Photo Server

Saturday Computing: Build Your Own Photo Server Your photographs, your Linux server — viewed from Windows or an iPad You can take thousands ...