Basic Functions
Advanced

GCD and LCM Functions

Two maintenance cycles, and the arithmetic for putting them on one calendar.

Task:

Four production lines each run two machines on different service cycles, and you are trying to stop the engineer visiting twice as often as necessary. For each line, put the longest interval that fits both cycles in column C, and how many days until the two next fall due on the same day in column D.

Learning Objectives:

  • Use GCD to find a shared interval
  • Use LCM to find when two cycles coincide
  • Recognise a scheduling problem as arithmetic
Hints

Solve without hints for +5 XP

Interactive Spreadsheet

The data in this exercise

This is the grid you start with. Cell references in the task — B6, C2 — point at the row numbers and column letters below.

ABCD
1Cycle A (days)Cycle B (days)Common baseBoth due together
21218
31525
4812
52128
What this exercise teaches (contains the answer)

These two look like school arithmetic until you meet them on a rota. The GCD is the base interval you can book the engineer on and still land on both cycles — every second visit covers the 12-day machine, every third covers the 18-day one. The LCM is the day they collide, which is the visit you want to staff properly.

Functions used here