A tractable non-adaptative group testing method for non-binary measurements

The original problem of group testing consists in the identification of defective items in a collection, by applying tests on groups of items that detect the presence of at least one defective item in the group. The aim is then to identify all defective items of the collection with as few tests as possible. This problem is relevant in several fields, among which biology and computer sciences. In the present article we consider that the tests applied to groups of items returns a \emph{load}, measuring how defective the most defective item of the group is. In this setting, we propose a simple non-adaptative algorithm allowing the detection of all defective items of the collection. This method improves on classical group testing algorithms using only the binary response of the test. Group testing recently gained attraction as a potential tool to solve a shortage of COVID-19 test kits, in particular for RT-qPCR. These tests return the viral load of the sample and the viral load varies greatly among individuals. Therefore our model presents some of the key features of this problem. We aim at using the extra piece of information that represents the viral load to construct a one-stage pool testing algorithm on this idealized version. We show that under the right conditions, the total number of tests needed to detect contaminated samples can be drastically diminished.


Introduction
The group testing problem consists in identifying a subset of defective items among a larger set by using tests on pools of items answering the question "Does this pool contains at least one defective item?".This problem has a long history, and appeared several times in different fields of medical biology [9,12,28,29] and computer sciences [1,18,23].It has also been the subject of an important mathematical literature, which studied optimal algorithms for the detection of defective items with minimal use of tests, which are considered a limiting resource.Those algorithms can be divided into two main categories: adaptive testing: in which the choice of a pool is influenced by the previous results of tests applied to the group; non-adaptive testing: in which the choice of a pool does not depend on the results of previous tests.
The aim of a pool testing algorithm is to assess, as precisely as possible, the status (defective or not) of each item, through the tests made on pools of items, while using as few tests as possible.
In general, adaptive testing allows to detect defective items with fewer tests than non-adaptive testing.Indeed, in adaptive testing schemes, the result of previous tests are used to construct the next pool to be tested.A more parsimonious use of tests can thus be achieved using this additional information.At one extreme of adaptive testing schemes, a search tree can be used to detect defective items with a maximal economy of tests [7].In contrast, non-adaptive testing allows the possibility to massively parallelize the procedure.As all pools can be constructed before any result is known, all tests can be performed simultaneously, which decreases the time needed to obtain the result.Moreover, in the context of biological testing, non-adaptive schemes decrease the risk of contamination or of decay of samples during their treatment.
It has to be noted that several classes of adaptive testing schemes allow intermediate level of parallelizing.For example, two-or three-stages algorithms can be considered.In this situation, a first set of pools is constructed without prior information.Using the result of testing on these pools, a second set of pools is constructed.With the tests made on this second set of pools, the status of each item is assessed in a two-stage algorithm, or a third set of pools is constructed and tested in a three-stage algorithm, before assessing the status of the items.
One of the first pool testing algorithms to be describe was introduced by Dorfman [9] as a method to detect syphilis in recruited US soldiers.This algorithm is the following: samples taken from individuals are pooled together in a group, which is then tested for syphilis.If the pool turns negative, all individuals are declared non-contaminated, while if the pool turns positive, then each individual of the pool is tested.Note that this is a two-stage algorithm, which we refer to as Dorfman's algorithm in the sequel of the paper.
In the present article, we introduce a non-adaptive pooling scheme which uses tests on the items revealing not only the defective groups, but also a numerical value representing the level of defectiveness of the most defective item in a pool, comparable to the viral load in a medical context.In this scheme, items are organised in groups of n 2 elements, which are placed on a grid.Pools are organized as lines, columns and diagonals of this grid, and an item is declared defective if two or more tests containing it are measuring the same level.
Several adaptive and non-adaptive pool testing algorithms have been described over the years, such as matrix testing [8], smart testing [28], and testing based on risk estimation for items [2,4].We refer to [1] for a recent survey on this topic.To compare these algorithms to our own, which is a variant of matrix testing, it is necessary to specify more precisely the context in which they are used, such as the relative number of defective and non-defective items, the authorized false positive and false negative rates, etc.
Prevalence and efficiency of pooling procedures.As stated above, the objective of pool testing is the reduction of the number of tests used on a population of N items in order to identify the defective ones.If an algorithm uses a total of T tests, we measure its resource-based efficiency by the quantity This ratio measures the average number of tests used per item in this pool testing algorithm to detect the defective ones.Therefore, the lower this ratio, the more parsimonious the algorithm.
Observe that any reasonable algorithm of pool testing should verify E < 1, as otherwise the testing of any item separately represents an at least as efficient use of resources which gives the status of all items.In the present article, we assume that a known proportion p of items is defective.It is worth noting that in that situation, a lower bound on the efficiency of a reasonable non-adaptive pool testing algorithm is E(p) ≥ p. Indeed, there are approximately pN defective items among N , so if one makes less than pN tests, there is no possibility to detect the defective items if all pools contains at least one defective.One is interested in the optimal dependency of E in the parameter p.
The optimal efficiency of the Dorfman algorithm previously described is obtained by choosing the size of the pool depending on the value of p in such a way that it is minimal.It can be computed as follows Indeed, if one creates pools of n items, one test is required for the pool to detect if defective items are present or not, and if the pool contains a defective item (which happens with probability 1 − (1 − p) n ), an additional one is needed per item.The equivalent is obtained by choosing n ≈ p −1/2 as p → 0. Mézard et al. [23] constructed asymptotically optimal non-adaptive and two-steps pool testing algorithms, which detects asymptotically all defective items, while keeping an efficiency of for some C * > 0. This algorithm is based on the construction of random pools of size n ≈ cp −1 of items, such that each item belongs to L ≈ C| log p| pools.An item is declared non-defective if it belongs to at least one pool tested non-defective, is declared defective if it belongs to at least one pool with a defective item such that all the other items in the pool being declared non-defective, and is declared ambiguous otherwise.In that situation, depending of the value of c, C, either with high probability each defective item will belong to at least one pool of non-defective items, and thus be identified as non-defective, or with high probability, the number of ambiguous items after the first stage is small enough that they can be tested individually.
Pooling in the context of the COVID-19 epidemics.In the context of COVID-19, pool testing has been massively proposed and implemented as a method to diminish the marginal cost of a test as well as to answer local shortages of test kits, see for example [3, 4, 14-16, 20, 21, 24-26, 30] among many others.The necessity of early detection of contaminated individuals has been underlined many times, in particular due to the large number of presymptomatic, asymptomatic and mildly symptomatic individuals that remain contagious and can carry the diseases to vulnerable people.As a result, the demand for effective and quick testing has skyrocketed, with the offer being limited by the number of test kits and trained medical professionals for the sampling.The question of optimization of pool testing thus has practical consequences, as improving on the efficiency of a testing algorithm can increase the number of individuals that can be tested with the same number of kits.
A typical test used for the detection of contamination to SARS-COV-2 is the RT-qPCR test (or PCR test for short), the reverse-transcriptase quantitative polymerase chain reaction.This test allows the measurement of the number of RNA segments typical of the virus that are present in a given sample (usually, three different RNA segments are tested simultaneously to improve on the measure), which is related to the viral load of the sample.As the name suggest, the measure is quantitative, thus returns more than binary response (which would be akin to a defective/not defective dichotomy in the classical pooling literature).As such, it seems that this additional piece of information could be used to improve on the existing group testing strategies to reduce the the number of tests needed for detection.
However, let us underline a couple of important caveats.First, the quantity measured by the PCR test is related to the logarithm of the viral load carried in the sample, rather than the viral load itself, with some noise on the measure [5].Therefore the exact viral load is not known, but rather its order of magnitude.Secondly, the viral load in defective items spans a large range, of several orders of magnitude [19].Therefore, if two defective items with viral loads c 1 and c 2 are tested in the same pool, the result of the measure will be as c 1 and c 2 will typically be of different orders of magnitude.Informal description of our result.The aim of this article is to propose and study an algorithm that uses the load of an item to improve its efficiency.We construct this algorithm on an idealized version of the situation described above.We discuss in more details in Section 8 the adaptation of the algorithm to the COVID scenario, pointing some of its limitations.
We introduce in this article a non-adaptative testing algorithm which is a variant of Mézard et al. pool testing.Samples are organized on a grid of n × n, and the pools are constructed as lines, columns and diagonals of the grid.We consider a situation in which tests do not return a binary value, but rather an estimate of the "level of deficiency" of the most deficient item in the pool, that we call load, which is described in the next couple of paragraphs.In these settings, a new Algorithm 1 can be introduced to analyse the results of the pool testing scheme, which predicts the status of each tested item without needing extra tests.
The algorithm described below introduces the possibility to make a few mistakes in the detection of defective items.In general, there are two sources of error.If an item is declared defective but is actually not, it will contribute to the number of false positives.Analogously, a declared non-defective item that is actually defective will contribute to the false negatives.In the rest of the paper, we deal with the control of such false positives and negatives while aiming for the least efficiency E(p) possible.In particular, this method achieves an efficiency with the probability of observing a false negative in the grid going to 0 as p → 0, see Section 6.
We also analyse the efficiency of our pool testing scheme assuming that the samples can only be part of a limited number L of pools.In this situation, the optimal efficiency our method allows, is as p → 0, which is comparable to Dorfman's algorithm for L = 2, and improves the efficiency the larger L becomes.
Defective items with load.We consider in this article some theoretical aspects of pooling strategies that can be employed for the detection of defective items with load, in order to adapt to the PCR testing scenario previously described.We assume here that each defective item u has a positive value x u attached that we call its load.A non-defective item will have a load of 0. The test of a pool A of items has the effect of measuring the value max u∈A x u , i.e. the largest load among all items in the set A.
Observe that if the load of items belongs to {0, 1}, then we are in the settings of the classical pool testing, and a test only detects the presence of at least a contaminated item.However, if this load can take more values, we show that the results of several tests can be crossed to extract additional information on the items.The load x u can be thought of as the logarithm of the viral load of an individual in PCR settings, and the choice of measuring the maximal load of a set comes from (1.3).
We denote by p the prevalence of defective items (i.e. the proportion of defective items in the set to be tested).We assume here that p is known (or at least adequately estimated), so it can be used to choose the size and number of pools to be made. 1 The load associated to each item can then be written as x u = ξ u Z u , where ξ u is a Bernoulli random variable with parameter p representing the fact that item u is defective or not, and Z u is an independent [0, 1]-valued random variable.In this article we will consider Z u uniformly distributed either on [0, 1] or on {1/K, 2/K, . . ., 1} for some K ∈ N. Note that we assume that all defective items have a positive load, but in real-world examples, there are limitations on the accuracy of the detection and some defective items would have a load of 0. We do not try to measure these test-based false negative results as they are present no matter the testing method used. 2he quantity K described above can be interpreted as the level of precision of the measure.The larger K is, the easier it is to distinguish the level of two defective items with similar loads.As a result, the efficiency attained by our algorithm as well as the expected number of false positives will decrease as K increases.Optimal efficiency is reached when K = ∞, which corresponds to Z u uniformly distributed on [0, 1].
The model of group testing with load allows us to explore the information carried by the maximal value of a set of items.It interpolates with the classical group testing model when K = 1, and its limit as K → ∞ is a universal problem, in the sense that all atomless distribution for x u would create the same combinatorial problem.The case K ≥ 2 that generalizes the zero-one binary information corresponding to the healthy-defective alternative is already present in [11] where the load of a pool is supposed to take the form of the sum of the load of each individual.The closest case to our study is the one of ( [10], Chap.11.3) and [17] for K = 2 with the limit that only one defective (of load 1) and one mediocre (of load 1/2) are allowed in the sample.In essence, the linear case considered in [11] and some generalizations described in p119 of [1] are simpler to study than the multilevel loads combined with the (non-linear) maximum load in the spirit of (1.3).Indeed, a lot of the information is lost in only considering the maximum so that the small loads are more likely to be hard to detect.See the results in Section 3 for precise explanations of this fact.
Organization of the paper.We propose here a very simple one-step (non-adaptive) algorithm for the detection of defectives.This algorithm is asymptotically efficient as p → 0 while remaining simple to implement and to evaluate.We describe in the next section the general form of the algorithm we study.We then show how to optimize this algorithm assuming that each sample can only be part of a finite number of pools in Section 5, and optimal efficiency that can be obtained by this algorithm in Section 6.We then provide some numerical simulations to compare these asymptotic results to their finite value counterpart in Section 7.

The Grid pool testing algorithm
In this work, we focus on a simple one-step non-adaptive algorithm.In this algorithm, the items are organized on a grid, and the pools are made of the lines, columns and the diagonals of different slopes of this grid.The algorithm mainly focus on reconstructing the status of items from the measures made on these diagonals.The parameters of the algorithms to be optimized, depending on the prevalence p, are the size of the grid n (representing the number of items in each pool) and the number of diagonals slopes to consider L (representing the number of pools each item belongs to).
Defining the grid.Before describing the algorithm in more details, we introduce some notation.We assume the number of items to test to be sufficiently large that it is possible to divide them into batches of n 2 items.We describe the algorithm on a given batch.
The items are dispatched on a grid n × n, with each item being identified by its position (i, j) ∈ {1, . . ., n} 2 .We write ξ i,j = 1 if (i, j) is defective and ξ i,j = 0 otherwise.Moreover we denote by X i,j the load of the item (which is 0 if the item is non-defective, or a number in (0, 1] otherwise).With the modelling of the previous section, we note that (ξ i,j , 1 ≤ i, j ≤ n) are i.i.d.B(p) random variables, with p the proportion of defective.Conditionally on ξ, (X i,j , 1 ≤ i, j ≤ n) are independent random variables, with X i,j = 0 if ξ i,j = 0 and X i,j uniformly distributed on (0, 1] or on {1/K, 2/K . . ., 1}, depending on the context.
Defining the pools.The pools used can loosely be described as the diagonals of the grid.More precisely, we introduce the following sets of n items to construct the pools of the algorithm: -the lines In an algorithm constructed such that each item is part of L pools, the pools will be taken as families of lines, columns and diagonals with slopes smaller than L − 2. In the rest of the article we will assume this family of pools will form a N (n 2 , n, L) multipool, in the terminology of [27].In other words, we need our pools to satisfy the following three properties: 1. each pool contains exactly n items; 2. each item belongs to exactly L pools; 3. two items (i, j) and (k, l) share at most one pool in common.
While the first two properties are straightforward from the definition, the third one is not, and only holds under some assumptions on n and L.
Proof.We first note that two line never cross, and that a line crosses with a column or a diagonal at exactly one point.Therefore, to verify that is enough to check that no two diagonal cross at more than one place (treating columns as diagonals of line 0).
Observe that for a = b, two diagonals D a k and D b cross at a point (i, j) such that k + ai ≡ + bi mod n, i.e. such that (b − a)i ≡ − k mod n.By the fundamental theorem of algebra, there exists a unique i ∈ [1, n] satisfying this property if and only if (b − a) is prime with n.As |b − a| ≤ L − 2 is smaller than the smallest prime factor of n, we deduce this is indeed the case, proving that any two pools cross at either 0 (if they have the same slope) or 1 point.
In practice, as long as n remains smaller than 90, there is always a prime number at distance smaller than 3 for n, hence one can consider without loss of generality grids with a prime number of lines and columns, which allows a choice of L between 1 and n + 2. The slight restriction in the value of n is compensated by the increase in choices for the value of L.
From now on, we enumerate the pools as the family {P j , j ≤ nL}, with P 1 , . . .P n corresponding to the lines, P n+1 , . . .P 2n to the columns and the rest to the diagonals, in the increasing order of their slope.For each ≤ nL, the effect of probing the pool P corresponds to measuring V := max (i,j)∈P X i,j , the largest load among all defective items belonging to the pool.Finally, for convenience, we denote P i,j the set of indices of pools associated to the item (i, j), Detection of the defective items.The final step of the algorithm consists in a reconstruction of the load of each item via the information contained in the family {V , ≤ nL}.We observe immediately that if V = 0, then all items in the pool are non-defective, and if V = x = 0, then there exists at least one item in the pool with load equal to x.
To reconstruct the load of each item, we employ the following procedure.
2. If V i,j = 0, the item (i, j) is declared non-defective.
3. Otherwise, we count the number of apparitions of the value V i,j inside of the pools containing (i, j) : , meaning that at least two tests containing item (i, j) measured it with the same value, the item (i, j) is declared defective.(b) Otherwise, the item (i, j) is declared non-defective.
Here is the reason behind this definition.By the assumptions we made on the test, V i,j is an upper bound for the load X i,j of the item.In particular, if V i,j = 0, we label the item as non-defective.However, if V i,j > 0 it might be that the item has been, by chance, mixed with defective items in all the tests that were made on it.The fact that level V i,j is attained at least twice is a much stronger indication of the defectiveness of (i, j), as a false positive in that case would mean that it has been by chance mixed in two pools with different defective items sharing exactly the same load, and that in all other pools, there was at least one item with a larger load.In the large K asymptotic, this will not occur with large probability, and similarly if I i,j = 1, with high probability the item will be non-defective.In particular, the individual with load 0.5 belongs to the pools corresponding to the bottom line, leftmost column and the diagonal of slope 1/3 pictured here.For the sake of clarity, we only show one pool corresponding to a diagonal of slope 1/3 (hence five more test are not represented here).The blue circle represent the healthy items whereas the black crosses represent the defective items for whom the level of defectiveness is specified.
Remark 2.2.Observe the procedure we describe here to assess the load and status of each item is not the most accurate.With extra care, one could gain more precision of the reconstruction, for example by checking that each measured load in the pools has been associated to at least one item.However, the procedure described here has the advantage of simplicity and locality: to give the status of an item, one has only to consider the results of the tests related to this item.This makes the forthcoming computation of the probability that an item is wrongfully characterized significantly easier, and it remains efficient enough in the range of parameters we consider.
We sum up the complete procedure inside Algorithm 1 and a concrete toy example in Figure 1.In this figure, the items of load 0.5 and 0.75 are both the most defective items in two of their groups, so will be correctly identified by the algorithm.However, the tests corresponding ot the item of load 0.25 will return 0.75 (horizontal line), 0.25 (vertical line) and 0.5 (diagonal).Hence, as the smallest value 0.25 is only appearing once, this item will falsely be identified as non-defective.All the non-defective items are correctly identified as non-defective.
Efficiency and optimization.It is worth noting that the algorithmic complexity of Algorithm 1 is O(n 2 L).In terms of test usage, it is easy to compute the efficiency of this algorithm as there are a total of nL pools of n items that are tested, in an effort to detect defective elements among n 2 items.The corresponding efficiency is then Algorithm 1: Grid Pool Testing Parameters: n,L, Inputs: X = (X 1 , . . ., X n 2 ) Store X inside the grid (X i,j ) 1≤i,j≤n line by line; Define P 1 , . . ., P n as the lines, P n+1,...,P2n as the columns and P 2n+1 , . . ., P nL as the diagonals; Initialize a matrix S = (S i,j ) i,j of empty lists; for = 1, . . ., nL do Compute V = max (i,j)∈P X i,j ; Append V to every S i,j with (i, j) ∈ P ; end Initialize a matrix R = (R i,j ) i,j of zeros; In general, E depends on the value of p.To lighten the notation, we omit this dependence if the context is clear.
To complete the study of this algorithm, one then need to compute its false positives (when R i,j = 1 implying detection as defective while X i,j = 0 so the item is non-defective) and false negatives (when R i,j = 0 whereas X i,j > 0) rates.See Algorithm 1 for the definition of R i,j .
We denote by F P R (respectively F N R) the probability that a given item is returned by the algorithm as a false positive (resp.false negative).These two quantities depend on the four parameters p, K, n and L in an intricate fashion.However, note that while n and L are integer parameter of the algorithms we can choose, p ∈ [0, 1] and K ∈ N are modelling parameters of the problem, representing respectively the proportion of defective items and the accuracy of the test.Therefore the main goal of this study is to optimize the efficiency E of this algorithm by choosing optimal values for n(p, K) and L(p, K) in a way that ensures that F P R and F N R both stay below prescribed quantities ε and δ.Our main results are considered under the asymptotic p → 0, i.e. assuming a small proportion of defective items.But as most of the computations made are explicit before taking limits, computing the optimal value of n and L for given values p, K remains straightforward.
Remark 2.3.Note that an item is falsely labelled as non-defective if it is part of at most one pool in which it is the item with the largest load.It corresponds to items at position (i, j) such that I i,j = 1 in the above algorithm.Therefore, items such that I i,j could be labelled as inconclusive and tested again in a separate batch in a two-steps algorithm with no false negative analogous to the one described in [23].

Computation of the false negative and false positive rates
In this section, we give explicit upper bounds on the false negative and false positive rates of the algorithm.This does not take into account a possible defective measurement of the loads of the pools.The false negative rate of the algorithm is expressed as the probability for a given item to be defective, but declared non-defective at the end of the algorithm.Similarly, the false positive rate is the probability that a given item in the grid is non-defective, but wrongly declared defective.In Algorithm 1, it is straightforward to compute the false negative/positive rates, as the reconstructed status of an item only depends on the status of items sharing a pool with it.This algorithm being unchanged by changing the coordinates of the grid, as on a torus, these rates do not depend on the position (i, j) of the item in the grid.We thus only compute the probability for item (1, 1) to be wrongfully labelled, given its load.For all x ∈ (0, 1], we set and F P (x) = P((1, 1) is declared defective with load x|X 1,1 = 0).
The false negative rate F N R and the false positive rate F P R are then given by with U a uniform random variable on [0, 1] and the convention that ∞U /∞ = U and F P R(n, L; p, ∞) = 0.
We used here that a given item is defective with probability p and non-defective with probability 1 − p.The following Proposition gives two upper bounds on the false positive/negative rates.
and that In particular, when K → ∞, the false positive rate F P R(n, L; p, K) tends to 0.
Proof.We observe that the probability to wrongfully declare an item as non-defective depends on K (in the discrete case) only through the fact that x takes its values in {1/K, 2/K . . ., 1}.This allows us to give a unified expression for the upper bound of F N .Given x the load of the item (1, 1), we note this item will be wrongfully declared non-defective in Algorithm 1 if and only if I 1,1 = 1 (as V 1,1 ≥ x > 0 a.s.).Decomposing according to the test in P 1,1 measuring the lowest viral load, we have where ϕ(y) = P(min = 0 V > y|X 1,1 = x) and 0 is an arbitrary choice of a fixed element of P 1,1 .Note that in this last equality we used that the elements (V , ∈ P 1,1 ) are i.i.d.conditionally on X 1,1 = x thanks to Lemma 2.1.Hence, we have ϕ(y) = P(V 0 > y|X 1,1 = x) L−1 .Then, using that ϕ(y) ≤ ϕ(x) for all y ≥ x, we obtain As in our setting, the distribution of loads is uniform, there is a proportion x of defective items with load smaller than x.We obtain which leads to the following upper bound for the false negative rate of an item with load x, We can similarly compute the false positive rate of the algorithm by computing the probability that (1, 1) is non-defective, but wrongfully declared as defective.This would happen if and only if (1, 1) is only part of defective pools, and that the two pools with the lowest measured load have the same value, that we write x.Observing that false positive results never occur in the infinite precision setting K = ∞, we assume here that K < ∞.Using again that we have a multipool and that the measure of each test is independent conditionally on the value of X 1,1 we obtain with 0 a fixed element of P 1,1 .By equation (3.4), for every x of the form k/K, g n,p (x) coincide with the cumulative distribution function of V 0 conditionally on X 1,1 = 0 at x.Then, we can use the mean value theorem to get the upper bound We finally get In the next few sections, we compute optimal parameters for Algorithm 1 that guarantees a maximal efficiency under different constraints, based on the above constructed pools.In the next section, we compute some explicit bounds for the asymptotic behaviour of the FNR and the FPR as p → 0 and n → ∞.In Section 5, we consider non-adaptive strategies for the detection of defective items under the assumption that L is fixed, i.e. that each item can be tested at most L times.In this case, we obtain an asymptotic efficiency as p → 0 of same order of magnitude or better than Dorfman's algorithm.In Section 6 we optimize efficiency assuming that samples can be infinitely divided, recovering results consistent with Mézard et al. [23].In Section 7, we compare our asymptotic estimates with simulated experiments, and obtain the false positive/false negative rates and efficiency that can be archived in real testing conditions.

Asymptotics of the false positive and negative rates at L fixed
In this section, we derive equivalent expressions for the upper bound of the false positive and negative rates when the values of K and L remain fixed.We consider two asymptotic cases, when np → 0 and when np → λ > 0. It is implicitly assumed that in these asymptotic cases, n → ∞ and p → 0.
Uniform bound on the rates as np remains bounded.We work here under the assumption that that p → 0 and n → ∞ with lim sup p→0 np < ∞.In this case, we observe that for all x ≥ 0, As a result, using Proposition 3.1 and (3.1), we have In particular, we see that in this regime (as K and L remain fixed), the false negative rate is small with respect to the false positive rate.
Case np → λ > 0. Given λ > 0, we assume that p → 0 with np → λ.In this situation, with L being fixed, we immediately obtain that the number of defective items in each pool converges to a Poisson(λ) random variable.We consider the asymptotic behaviour of the false positive and false negative rates obtained in this situation.We write as a function of L and the precision K. Graphs of F N R and F P R as a function of L" are plotted for different values of K in Figure 2.
and, for all K < ∞, Proof.We first compute the false negative rate.From the properties of Poisson processes, we note that the number of items in a pool with load between x and y is distributed as a Poisson random variable with parameter λ(y − x), independently of the number of items in this pool with load smaller than x or larger than y.In particular, for any given test , for any y ≥ x we have Using this fact, with the same computations as in Proposition 3.1, we can compute the false negative rate of an item of load x as In the two plots above, we draw the upper bounds obtained in Proposition 4.1.On the left, we represented the false negative rate upper bound as a function of L for λ = log 2 for different values of K. On the right, a similar graphic is shown for the false positive rates upper bound with the same choices of the parameters.The two plots below show the same upper bounds in logarithmic scale.In particular, we see the convergence of F N R(λ, L; K) towards F N R(λ, L; ∞) in the two plots on the left.
In the case K = ∞ the computations can be made explicit as in that case In particular, we also obtain Similarly, we can compute the false positive rate of a non-defective item in this regime.From the proof of Proposition 3.1, we have that F P (x) ≤ L(L−1) L−2 Therefore, we obtain Bounding the above quantity by λ 2 L(L−1)

Optimizing one-step testing with L fixed
In this section, we look to optimize Algorithm 1 while assuming that the number L of tests that can be made on each item is finite.This regime is relevant in particular if a test destroys or damages a sample of the item, so that limiting the number of tests made on each item becomes relevant.In the rest of the section L is a fixed constant, and n is a number with no prime factor smaller than L − 1.In that situation Lemma 2.1 holds and we are working with multipools, so that the formulas (3.2) and (3.3) both hold.
Recall that the efficiency of the algorithm is E = L n , therefore to improve the efficiency of the algorithm, one has to increase the size of the grid.However, augmenting the value of n has the effect of increasing the false positive and false negative rates.We consider here the problem of determining the optimal efficiency of Algorithm 1 under the constraint that a portion smaller than ε of the defective items are wrongfully characterized as non-defective, and a portion smaller than η of the non-defective items are wrongfully characterized as defective, i.e.
Here, we the condition F N R(n, L; p, K) ≤ pε guarantees that a fraction at most ε of the n 2 p defective items in the grid will be falsely classified as non-defectives.
Observe that in this setting, the average number of false negative found by the algorithm among n 2 samples will be of order n 2 pε and the average number of false positive will be of order ηn 2 .As a result, we will also compute optimal efficiency assuming that n 2 pε and n 2 η remain bounded.
A choice of n for ε and η fixed.In this situation, one has to choose n in such a way that np remains bounded as p → 0. Therefore, using the bounds in (4.1) and (4.2), we choose the largest n ∈ N satisfying both The largest n that satisfies the first condition is and the largest n that satisfies the second condition is We recommend to choose n as With this choice of n, the efficiency of the algorithm becomes Note that these choices of values for n are driven by the results of Proposition 3.3 and hence are quite conservative, so the efficiency obtained here is an upper bound of the true optimal efficiency of Algorithm 1.Note that in a high precision setting (when K is large) the false positive are a minority inside the false discovery of the algorithm, and the efficiency will depend only on p, L and ε.
We observe that the number of tests to use per item to detect defective ones with fixed false negative/positive rate becomes of order p for small p, hence close to the theoretical optimality of group testing.However, it has to be noted that with these settings, around n 2 pε ≈ ε/p items will be wrongfully characterized as non-defective, while n 2 η ≈ ηp −2 will be wrongfully characterized as defectives.
A choice of n for vanishing ε and η.In order to consider asymptotically optimal pooling algorithms, we can bound the false negative rate by εp = α/n 2 and the false positive rate by (1 − p)η = β/n 2 , with fixed α and β as n → ∞ and p → 0. In this setting, we remark that the average number of false negatives in the n × n grid is bounded by n 2 F N R(n, L; p, K) ≤ α, and the average number of false positives is bounded by n 2 F P R(n, L; p, K) ≤ β.In particular, choosing α and β arbitrarily small provides parameters for the Algorithm 1 to asymptotically correctly identify all items in the grid.
In this setting, using again the bounds in (4.1) and (4.2), we define n 1 and n 2 as the largest numbers such that respectively, i.e. and and the associated efficiency of the algorithm with parameters L and n = min(n 1 , n 2 ) is This efficiency is much larger than the previously computed efficiency E ε,η (p) for fixed ε and η, as expected from the lower tolerance to false positives and negatives.We remark that this efficiency behaves as p L/(L+2)+o (1)  as p → 0. In particular α,β p 1/2 , so the algorithm has similar efficiency as Dorfman's algorithm for p small enough, with no constraint on n coming from Lemma 2.1; α,β p 3/5 , hence this algorithm is asymptotically more efficient than Dorfman's algorithm, with still no constraint on n coming from Lemma 2.1; α,β p 2/3 , with the constraint of choosing an odd value for n coming from Lemma 2.1.
Under the condition K = ∞, the false positive rate becoming negligible, the asymptotic efficiency of Algorithm 1 becomes even better, of the order of magnitude of p L/(L+1)+o (1) .

Optimal choice of L as a function of p
In this section, we relax the assumption that L has to be kept fixed, and aim at choosing an optimal couple n, L so that the efficiency of the algorithm E = L/n is as small as possible, while controlling the false positive and false negative rates, similarly to the previous section.Remark 6.1.The estimates we obtained previously on the false negative rate rely on the assumption that L − 2 is smaller than the smallest prime factor of n.However, as the optimal choice of L and n will be such that L * ≈ | log p| and n * ≈ p −1 , there will always be a couple (n, L) close enough to (n * , L * ) so that Lemma 2.1 applies.As a result, this algebraic condition does not play a role in the asymptotic behaviour of the optimal efficiency.We work in this section under the assumption that the precision on the measure of the load K is infinite.Therefore, the false positive rate is null and one only has to control the false negative rate.Precisely, we compute the asymptotic behaviour as p → 0, of In this new context, L no longer fixed, and its choice might depend on p and ε.We recall from Proposition 4.1 that under the assumptions that p → 0 and np → λ > 0, we have Moreover, the efficiency of the algorithm in the asymptotic regime np → λ satisfies E = L n ∼ Lp/λ.It is therefore natural to consider the approximation of (6.1) as p → 0 defined by As ε → 0, simple computations show that the minimal value of with the minimum of λ →  1)) as ε → 0, we have with L n ∼ p − log ε (log 2) 2 as p → 0. We conclude that for a fixed δ > 0, for all ε > 0 small enough, we have In other words, the optimal efficiency of Algorithm 1 is asymptotically linear.
Similarly to the previous section, it is worth noting that in this setting, bounding the false negative rate by εp, on a typical grid of n 2 items, there will be on average n 2 p defective items, a fraction ε of which will be wrongfully characterized as non-defective.
As a result, for α > 0, we also take interest in i.e. in the optimal efficiency of Algorithm 1 under the assumption that the average number of false negatives in a grid of size n 2 is bounded by α > 0.
With similar computations as above, letting δ > 0, we remark that fixing L = −(1 + δ) log p log 2 and n ≈ log 2 p , we have lim sup We note that this asymptotic efficiency in this setting is similar to the result obtained in [22,23].Compared to the algorithm described in these articles, Algorithm 1 has the advantage of a simple (non-random) construction of the pools and to be non-adaptative, hence mass-parallelizable.However, its drawback is the reliance on the measure of an arbitrary precise load value of defective items.

Comparison of the different algorithms
In this section, we illustrate the behavior of our proposed algorithm versus the two-steps Dorfman's algorithm and Mézard's optimal algorithm.We describe the choices of the parameters in the following.
-The simulations took the set {3, 5,7,11,13,17,19,23,29,31,37,41,43, 47} of the odd prime numbers under 50 as the possible values of n. -The algorithm is allowed to perform tests in up to L max = 14 directions.In the case when n ≤ 14, we obviously restrict the number of directions to L max = n − 1. -The prevalence parameter p varies between 0.05 and 0.2 with a constant increment of 0.05.-We made vary K inside the set {2, 5, 10, 30, 200, 500} to illustrate its influence.
-For each choice of the parameters (n, L, p, K) above, we run 200 copies Algorithm 1.
Consequently, for each choice of the set of parameters, we observe 200 copies of the output of the algorithm.Afterwards, the matrix of results is compared to the matrix of the true matrix containing the information of the true positive and negative characterizations.Thanks to that, we compute the mean number (over the 200 copies) of false positive and false negative discovered by the algorithm.Thus, we end with an estimation of the number of false negative F N (n, L, p, K) and the number of false positive F P (n, L, p, K).The next step is to compute the optimal value of the efficiency E as a function of p.Then, for any couple (p, K) fixed, we did the following concrete inclusions of the conditions of Section 5.
1. We fixed η = 0.01 and we discarded all the pairs n, L such that F P (n, L, p, K) ≥ η(1 − p)n 2 .2. For each value of ε we considered, we discarded the pairs such that F N (n, L, p, K) ≥ εpn 2 .3.Then, from all the remaining values of the pairs (n, L), we minimized the quotient E(p) = L/n.
This value E(p) as a function of p (for different values of K) is the one that we drew in the following illustrations.

Comparing the efficiency with well known algorithms
Figure 3 shows for the two different values K = 5 and K = 30, the behavior of our Efficiency curve versus Dorfman theoretical efficiency and a simulated Mézard, al. efficiency.We drew the resulting points of E(p) in three different colors (blue,purple,black) that correspond to the choices of ε given by (0.02, 0.08, 0.2).For each of these ensembles of points, we also drew a simple regression line.It has to be seen that the dependence of E on p is clearly linear and that the slope of the line is dependent on the choice of the parameter ε, as expected.It is also interesting to see that the effect of ε is less clear when K is small since the number of false positives is higher and then is more limitent than when K is large.

Showing the choices of L and n
The next three plots (in Fig. 4) show the choices of the parameter L during the optimization of E for fixed values of p and K.As before we let ε vary in between the different plots.Besides been a little unstable in the choice of L along p, we observe that the optimal L remains bounded (hence is fairly independent from the choice of p) and does change with a change of ε as suggested by the calculations in Section 6.
The last three plots (in Fig. 5) are the analogs of the previous plots with the slight difference that the displayed numbers correspond to the chosen values of n.In this case, we observe that, now, ε has no more effect on the chosen values of n.As expected, n depends on p in a decreasing manner and validate the calculation of Section 6.Indeed, we showed that the best choices of n allow to keep the product np more or less constant which is the case in the simulations.Remark 7.1.As the reader may notice, the efficiency E(p) tends to skyrocket when the prevalence p exceed values of the order p = 0.1 which makes our group testing technique almost not useful in that context.It has to be mentioned that this effect is commonly observed in pool testing in general.As a consequence, it has to be advised not to use pool testing if one suspect to have a prevalence of the order 10% of higher.

Application to the COVID-19 pandemic and open questions
The application of the present algorithm to PCR testing in the context of the COVID-19 pandemic requires some adaptations and presents a couple of challenges.It should first be noted that the simplifications we made in our modelling were quite important.We thus begin by discussing in more details the discrepancies between the real-world problem and our idealized model.
Finite size of samples.In COVID-19 pool testing, the items that are tested are samples taken from subjects, via nasal swab, saliva sample or other method.If there seems to be usually enough matter to split the sample into several tests, it will not be possible to make an arbitrary large number of tests on each sample.Therefore, optimal computations made in Section 5 might be somewhat more relevant.Additionally, it is worth noting that combining several samples have the effect of creating a composition with the average viral load rather than the maximal, although the fact that this viral load is spread over several orders of magnitudes negates partially this problem as discussed in the introduction.
Noisiness in the measure.In the present article, the lack of accuracy of the testing is modelled by the finite number of available load values {1/K, . . ., 1}.This does not immediately extends to the PCR testing, in which the measured value can be described by a Gaussian variable centred around the actual viral load of the sample.In that case, testing equality between two test results reduces to defining a threshold for the difference in load value.Hence two load values are declared identical if they differ by less than this threshold value, and are declared different otherwise.It allows to split the set of viral load measures into intervals of fixed width, so that the two measures are considered equal if they fall into the same interval.This creates a setting similar to the one we worked on.
We remark that this distance is smaller when the accuracy of the test is greater.Hence, low accuracy can be modeled by a small value of K, high accuracy by a larger value of K.
Distribution of the viral load among contaminated.Concerning the distribution of the viral load of the samples, we made here the choice of uniform distribution, which is the most favourable for this type of algorithm.Although this is quite far from what is effectively observed [6,19], the viral load observed among large groups of people is usually successfully approached by a mixture of two to three Gaussian variables with standard deviations between 3 and 6, spanning over the interval [20,40] (c.f.[5], Appendix B).The viral loads may be considered sufficiently spread over the interval so that the algorithm discussed above might still be relevant.The nice and explicit calculations on the choices of the parameters would need to be adapted.They might also need to be tuned from day to day, depending of the expected prevalence of samples on a given day, which might vary over time.
Precision limits of the PCR.As it was first noted in [13], theoretical aspects of pool testing usually assume that the quality of the test does not depend on the size of the pool.However, this is rarely the case in real-world applications, and it is indeed not the case for the present application.In particular, we show in [5] that pooling has an impact on the measurement of samples with small viral loads, due to a dilution effect.In our toy model, this could be taken into account by specifying that in pools of size n, items with load smaller than c n are treated as non-defective items, for some increasing function c n .This has the effect of decreasing the value of the optimal choice for n, in order to detect enough contaminated individuals with small viral load.However, the computations in this case being very dependent on the function c n , we choose not to include it in the present work.
Random outcome of a pooled test.Finally, we assumed that each test of the pools is performed with no other error than the one inherent to the PCR itself.It is probably an oversimplification in this case, as pool testing implies important manipulations of the samples, with possible additional errors involved.For example, forgetting to collect one individual in a pool, contaminating a pool with a sample that should not belong to it, etc.Those human errors would create noise on the measures of the pools and so would deteriorate the information given to our algorithm.Therefore, it would need to be adapted to this situation, in order not to characterize as negative a sample measured at high values in all but one pool, for example.There is also the issue of systemic bias in PCR, as most machines only allow the measure of the relative viral load rather than an absolute value.As our algorithm only consider relative loads, this is not generally an issue for our method, when the algorithm is performed on a single machine.
Potential extensions.The algorithm presented here has the advantage of being simple to implement and easy to solve, even by hand.However, more precise algorithms might be employed with the help of automation for the creation of samples and measure of results.It would therefore be interesting to create more precise algorithms for PCR-type pool testing.A relevant generalization could be to collect and use additional information on the subjects.We can imagine that, throughout interviews, some individuals might be identified as being more likely to be contaminated, while others could be simply routinely tested.It is probably more efficient to tests the former in smaller pools and the latter in larger ones.
An other project of interest might be the deconvolution of pools created by Dorfman's algorithm.More precisely, in the algorithm, instead of testing individually every member of a group detected as contaminated, it might be interesting to test several samples from different positive pools in a two-stage deconvolution that might represent a further economy of tests on Dorfman's algorithm.Choosing the right pools to pair together, as well as the number of positive pools to be de-convoluted at the same time might be an interesting expansion on the current work.

Figure 1 .
Figure1.A grid with L = 3, n = 6, K = 4 and N = 36.There are 3 defective items of respective loads 0.25, 0.5 and 0.75.Each individual belongs to 3 groups corresponding to an horizontal line, a vertical line and a diagonal of slope 1/3.In particular, the individual with load 0.5 belongs to the pools corresponding to the bottom line, leftmost column and the diagonal of slope 1/3 pictured here.For the sake of clarity, we only show one pool corresponding to a diagonal of slope 1/3 (hence five more test are not represented here).The blue circle represent the healthy items whereas the black crosses represent the defective items for whom the level of defectiveness is specified.

Figure 3 .
Figure 3.The effect of the value of K on the slope of E(p) for different values of ε.

Figure 4 .
Figure 4. Efficiency with respect to p and the associated optimal choice of the parameter L. The number displayed inside the blue bubbles correspond to the chosen value of L in the optimization.

Figure 5 .
Figure 5. Efficiency with respect to p and the associated optimal choice of the parameter n.The number displayed inside the blue bubbles correspond to the chosen value of n in the optimization.
.1) using that 1 − e −np ≤ np, where we write a p b p if lim sup p→0