1: Total tests required = number of batches, plus all persons in one batch.
Batches = 500/10. Persons in a batch = 10. So:
1A: (500/10) + 10 = 50 + 10 = 60 tests needed under TTTT.
1B: 500 – 60 = 440 tests saved.
1C: 440/500 = .88 = 88% reduction in tests
2) Total tests required = number of batches, plus all persons in one batch.
2A: T = (E/N) + N
2B: E = 500, N = 10, T = (500/10) + 10 = 60.
3) Optimum batch size is the square root of total employment E
3A)
T = E*N-1 + N (formula from step 2)
dT/dN = -1*E*N-2 + 1 (calculate the first derivative (slope) with respect batch size).
Now minimize the number of tests by finding the point where the derivative is zero.
-1*E*N-2 + 1 = 0 (Set derivative to zero).
-1*E*N-2 = -1 (Subtract 1 from both sides).
E*N-2 = 1 (divide by -1).
E = N2 (multiply through by N-squared).
N = SQRT(E) (Take square roots)
The optimum batch size is the square root of total hospital employment E.
Second derivative is positive by inspection, so this is a minimum.
3B) For Euler Hospital’s 500 employees:
Optimum batch size: SQRT(500) = 22.36
Number of tests = 2*SQRT(500) = 44.72
Ignoring rounding.
4) Download this Excel file: TTTT numerical analysis
The answer is somewhere between 22 and 23 for the optimum batch, requiring a around 44.73 tests. So that matches the calculus result to within rounding error.
5) Gauss Hospital in Binary, Arkansas.
5A) 2*SQRT(256) = 32 tests required for optimized TTTT
5B) Gauss hospital should consider using a binary search instead. At each step, divide the employees in half, test both halves, and repeat on whichever half tests positive. Employees at each phase:
- 256, divide in two, test both
- 128, ditto
- 64, and so on …
- 32
- 16
- 8
- 4
- 2
5C) On the eight tier, you have two employees, you test them both, and one of them is positive. You have a total of 8 tiers (8 rounds of testing), each tier requires two tests, so this requires a total of 16 tests.
6) It matters much more to larger hospitals.
Flat-footed testing of every employee required E tests. Optimized TTTT requires 2*SQRT(E) tests. Calculate the ratio of the two — the smaller that is, the more that optimized TTTT saves you, in percentage terms. Either calculate that for a few different values of E (numerical analysis approach), or inspect the derivative of that with respect to E (loosely termed here the calculus-of-variations approach).
Ratio = 2*SQRT(E) / E
Ratio = 2*E1/2*E-1 (re-expressed using exponent notation)
Ratio = 2*E-1/2 (when you multiply the numbers, you add the exponents)
dRatio/dE = -E-3/2 (take the derivative, and note that it is always negative)
So the ratio falls as E gets larger.
Examples:
50 beds, ratio = .28, optimized TTTT requires 28% as much testing as the just-test-everybody approach.
500 beds, ratio = .09, optimized TTTT requires 9% as much testing. (Recall from question 1 that standard TTTT had 88% savings, so standard TTTT only required 12% as much testing. So, true to its name, optimized TTTT not only requires less testing than test-everybody, it requires less testing than standard TTTT).
5000 beds, ratio = .03, optimized TTTT requires 3% as much testing
7) The worst-case scenario occurs if your infected employers are spread as thinly as possible across your population.
7A) To find 2 infected employee: 50 batches, plus 10 in two batches = 70 total.
7B) To find 10 infected employees: 50 batches, plus 10 in 10 batches = 150 total
7B) To find 60 infected employees: 50 batches, plus 10 in … well, there’s only 50 batches so … that’s 550 tests? No,wait, that’s dumb. You end up having to test everybody anyway. The batch tests are a waste.
Just test everybody from the get-go. The answer is 500 tests.
8) We’ve just shown that the TTTT method still functions, even if you have more than one infected employee, it just requires more tests. And, it can be wasteful if you reach the point where you’re going to have to test every employee anyway.
Optimized TTTT simply wastes fewer tests in the case of 60 sick employees, because you only have 23 wasted batch tests. But note that optimized TTTT, due to the higher batch size, becomes wasteful at lower infection rates. With optimized TTTT, in this example, once you have 23 infected hospital employees, you end up testing everybody.
Binary search will eventually find everybody, but it is a total and hugely inefficient waste of time at high infection rates, because instead of performing two tests at each tier, you have to test every group. It doesn’t let you discard groups of people until you get way down the tier structure.
Let me just hack through it with 32 sick employees at Gauss General. Worst case scenario, it requires 190 tests. You don’t rule out anyone until you get to the next-to-the-last tier. If you knew the infection rate was this high, you’d just go straight to smaller batches (start at tier 6) and only use 128 tests.
- 256, 2 batches, 128/batch, 2 tests required
- 256, 4 batches, 64/batch, 4 tests required.
- 256, 8 batches, 32/batch, 8 tests required
- 256, 16 batches, 16/batch, 16 tests required
- 256, 32 batches, 8/batch, 32 tests required — at this point, every group has one.
- 256, 64 batches, 4/batch, 64 tests required — half the test are now negative
- 128, 64 batches, 2/batch, 64 tests required — you have isolated the 32.