Group testing for a virus

233 Views Asked by At

Suppose that we have a town with a population $100$. We suspect that at most $1$ person is infected. We could do $7$ tests to detect the infected since $2^7 = 128 > 100$. We would divide the population to smaller groups, mixing bloods and to the test on groups until reach the infected.

My question is what is the minimum number of tests needed in order to detect $2$ infected in $100$. Actually let's generalize:

What is the minimum number of tests needed in order to detect $C$ person in a population $P$?

For example for a $P=4$ and $C=2$, there is no need for groups. With $3$ tests you can detect those infected in worst case scenario.

enter image description here

And be careful that if $C=3$ it is easier to find healthy one than the $3$ infected so the number of tests needed would be $2$.

1

There are 1 best solutions below

3
On

It seems that an information-theoretic approach should work here.

With $P=4$ and $C=2$ there are $\binom{4}{2} = 6$ possible subsets. Since $\log_2 6 \approx 2.58$, you need $2.58$ bits of information to identify a subset. Each binary test yields $1$ bit of information, so you need $3$ tests.

With $P=4$ and $C=3$, $\binom{4}{3} = 4$, and $\log_2 4 = 2$, so $2$ tests are required.

With $P=100$ and $C=2$, $\binom{100}{2} = 4950$, and $\log_2 4950 \approx 12.27$, so you will need $13$ binary tests.