Basic Functions
Intermediate

Find a shared case size and a joint order quantity across two suppliers

GCD and LCM start from the same two numbers and answer opposite questions — the biggest size that fits into both, and the smallest total that both fit into.

Task:

You handle procurement for a hardware distributor. The same three products come from two suppliers who pack them in different case sizes, and you're standardizing the reorder process. In column E, use GCD to work out the largest case size you could switch both suppliers onto without either one leaving a partial case. In column F, use LCM to work out the smallest order quantity that both suppliers could fill using only whole cases. Copy both down through row 4.

Learning Objectives:

  • Use GCD to find the largest size that divides two quantities exactly
  • Use LCM to find the smallest quantity that two case sizes both divide into
  • Recognize GCD and LCM as opposite questions asked of the same two numbers
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.

ABCDEF
1ProductCase size (Supplier A)Case size (Supplier B)Largest shared case sizeSmallest matching order
2Anchor bolts2436
3Wing nuts1540
4Washers1830
What this exercise teaches (contains the answer)

GCD(B2,C2) in E2 checks anchor bolts' two case sizes, 24 and 36, and returns 12 because that's the biggest number both divide into without a remainder — cases of 12 would let either supplier fill an order exactly. LCM(B2,C2) in F2 asks the opposite question of the same two numbers: the smallest order size both suppliers could fill in whole cases, which is 72, since 24 goes into it 3 times and 36 goes into it 2 times. Neither answer comes from the other — GCD shrinks toward the size that fits inside both case sizes, LCM grows toward the total that both case sizes fit inside.