# Dynamic Infection Spread Model Based Group Testing
## 4 Proposed Algorithms and Analysis
### Comparison of Dynamic Individual and Dorfman Algorithms  
To compare the average number of detected infections at a given time instance for the dynamic individual testing and dynamic Dorfman type group testing algorithms, we obtain the following results stated in the following lemmas. **Lemma 8**. : _When there are \(\bar{\alpha}(t)\) susceptible and \(\bar{\lambda}(t)\) non-isolated infected individuals in a system after the infection spread phase and just before the testing phase at time instance \(t\), and dynamic individual testing algorithm is being used, on average, \(\frac{T\bar{\lambda}(t)}{\bar{\alpha}(t)+\bar{\lambda}(t)}\) infections are detected and isolated at time \(t\)._  
Proof. : When \(T\) individuals from \(\bar{\alpha}(t)+\bar{\lambda}(t)\) individuals are uniformly randomly selected, we have  
\[E\left[\sum_{i=1}^{T}\mathbbm{1}_{\bar{\alpha}_{i}(t)=1}\right] =TP(\bar{U}_{i}(t)=1) \tag{46}\] \[=\frac{T\bar{\lambda}(t)}{\bar{\alpha}(t)+\bar{\lambda}(t)} \tag{47}\]  
where \(\bar{U}_{i}(t)\) represents the infection status of the \(i\)th selected individual for testing at the time of testing phase. On the other hand, when dynamic [PERSON] type group testing algorithm is used, \(T/2\) individuals to be individually tested are chosen from a set of individuals of size \(\frac{2(\bar{\alpha}(t)+\bar{\lambda}(t))}{T}\) that is guaranteed to have at least one infected individual, in the case of \(\bar{\alpha}(t)+\bar{\lambda}(t)\geq T^{2}/4\). When \(\bar{\alpha}(t)+\bar{\lambda}(t)<T^{2}/4\), \(T/2\) individuals to be tested individually are chosen from multiple groups, each having at least one infected individual. The following lemma gives an average number of detected and isolated infections at each time instance for the case of \(\bar{\alpha}(t)+\bar{\lambda}(t)\geq T^{2}/4\), which, in general, holds for practical applications with low testing capacity. Moreover, the following result is also a lower bound for the case of \(\bar{\alpha}(t)+\bar{\lambda}(t)<T^{2}/4\), where \(T/2\) individuals to be individually tested are selected from multiple positive groups. **Lemma 9**. : _When there are \(\bar{\alpha}(t)\) susceptible and \(\bar{\lambda}(t)\) non-isolated infected individuals in a system after the infection spread phase and just before the testing phase at time instance \(t\), with \(\bar{\alpha}(t)+\bar{\lambda}(t)\geq T^{2}/4\), and dynamic Dorfman type group testing algorithm is being used, if \(\bar{\alpha}(t)\geq 2(\bar{\alpha}(t)+\bar{\lambda}(t))/T\), on average,_  
\[\frac{T\bar{\lambda}(t)}{2(\bar{\alpha}(t)+\bar{\lambda}(t))}\left(1-\frac{ \frac{\left(2(\bar{\alpha}(t)+\bar{\lambda}(t))/T\right)}{\bar{\alpha}(t)+ \bar{\lambda}(t)}}{\left(2(\bar{\alpha}(t)+\bar{\lambda}(t))/T\right)}\right)^ {-1} \tag{48}\]  
_infections are detected and isolated at time \(t\). If \(\bar{\alpha}(t)<2(\bar{\alpha}(t)+\bar{\lambda}(t))/T\), then, on average, \(\frac{T\bar{\lambda}(t)}{2(\bar{\alpha}(t)+\bar{\lambda}(t))}\) infections are detected and isolated at time \(t\). In the case of \(\bar{\alpha}(t)+\bar{\lambda}(t)<T^{2}/4\), (48) is a lower bound for the average number of detected and isolated individuals at time \(t\)._  
Proof.