Solution (source code)

= Solution

Label batches before consulting the random-number table, so their labels are independent of the test results. A uniformly random permutation of $1,\ldots,16$, restricted to a smaller label set, induces a uniformly random ordering of that set. This provides a simple rejection-and-restriction scheme:

* For A, label each day's six batches $1,\ldots,6$. Use a fresh permutation, discard labels $7,\ldots,16$, and test the first remaining batch. Repeat independently on each working day. Each daily batch has inclusion <probability> $1/6$, and five batches are tested per week.
* For B, label the fifteen weekly morning batches $1,\ldots,15$. Discard label 16 from a fresh permutation and choose the first three remaining labels. Use an independent permutation for the afternoon stratum. Every three-element subset within a stratum is equally likely, and each batch has inclusion <probability> $3/15=1/5$. Six batches are tested per week.
* For C, label the weekdays $1,\ldots,5$. Keep the first label in this range from a fresh permutation and test all six batches on that day. Repeat independently each week. Every day, and hence every batch, has inclusion <probability> $1/5$; six batches are tested per week.

With independent random digits instead, <rejection sampling> gives the same uniform choices: for A keep only digits $1,\ldots,6$; for C keep only $1,\ldots,5$. For B, use uniform two-digit numbers, retain labels $01,\ldots,15$, and reject repeats within a three-batch sample. Taking residues modulo six or fifteen from a table whose range is not divisible by that number would give unequal <probabilities>. These are respectively day-stratified <simple random sampling>, morning/afternoon <stratified sampling>, and a one-day design using <cluster sampling>. The printed word “rest” for A is interpreted as “test”, consistently with the surveillance task. If it instead meant leaving one batch untested, choose that omitted batch uniformly and test the other five; this alternative would test 25 batches per week, with inclusion <probability> $5/6$, and has a different testing budget.