AMC 10 · 2002 · #9

Grade 5 arithmetic
optimizationdecimal-arithmetic greedy-algorithm ↑ Prerequisites: optimization
📏 Medium solution 💡 2 insights
📘 View easy version →
Problem
Thirty files must be stored on disks that each hold 1.44 MB. Three files are 0.8 MB, twelve are 0.7 MB, and the remaining files are 0.4 MB. A file cannot be split across two disks. Find the smallest number of disks that can hold all thirty files.

Pick an answer.

(A)
12
(B)
13
(C)
14
(D)
15
(E)
16
How to solve
Strategy Extreme Principle

We want the smallest disk count, so tool #14 (Extreme Principle) says push each disk to hold as much as it can and check the boundary of 1.44 MB: which files can share a disk and which cannot. The files come in three sizes, so tool #7 (Identify Subproblems) splits the job into three groups. Start with the biggest files, because they are the hardest to pair up, and see what each big file is forced to do. Then fit the medium files, then the small ones, filling any leftover room. Counting the disks each group forces gives both a working plan and a proof that fewer disks is impossible.

1STEP 1

Count the files of each size

Subtract the named groups from 30: 30-3-12 = 15 files of 0.4 MB.

30-3-12=15 files of 0.4 MB
2STEP 2

Each big file needs its own disk

Two big files or a big plus a medium both exceed 1.44, so each big file takes its own disk plus one small: 3 disks.

0.8+0.8=1.6 > 1.44, 0.8+0.7=1.5 > 1.44, 0.8+0.4=1.2 ≤ 1.44
3STEP 3

Pair up the medium files

Mediums fit only two per disk (0.7+0.7 = 1.4), so twelve of them need 6 disks.

0.7+0.7=1.4 ≤ 1.44, 0.7+0.7+0.7=2.1 > 1.44, 12 ÷ 2=6
4STEP 4

Group the leftover small files

Twelve small files remain and pack three to a disk (1.2 MB), needing 4 disks.

3 × 0.4=1.2 ≤ 1.44, 4 × 0.4=1.6 > 1.44, 12 ÷ 3=4
5STEP 5

Add up the disks

Every group was forced, so the total is 3+6+4 = 13, choice (B).

3+6+4=13 → (B)
Answer
13
Check the total size: 3(0.8)+12(0.7)+15(0.4)=2.4+8.4+6.0=16.8 MB. Dividing by 1.44 gives about 11.7, so at least 12 disks are needed just by volume, and 12 disks would hold 12 × 1.44=17.28 MB — enough room by volume alone. That is exactly why (A) 12 is the trap: the no-splitting rule wastes space (the medium-file disks leave 0.04 MB unused each), forcing a 13th disk. Our packing is also legal to double-check: 3 disks at 1.2 MB, 6 disks at 1.4 MB, 4 disks at 1.2 MB, all at or under 1.44, storing 3+12+12=27 small/medium/big slots plus the 3 paired smalls =30 files. And 13 is truly minimal: the big files force 3 disks and the medium files force 6 more that cannot take any small files, so the twelve leftover smalls need ⌈ 12/3⌉=4 additional disks no matter what.
💡Key takeaway

Pack the biggest, pickiest files first and fill each disk as tightly as the limit allows — then adding up the forced groups gives the fewest disks.

  • Count the files of each size
  • Each big file needs its own disk
  • Pair up the medium files
  • Group the leftover small files
  • Add up the disks