I like the way you think, here: Theoretically, if [itex]N[/itex] people needed to be tested, the number of required tests could be reduced ideally from [itex]N[/itex] tests to [itex]\log_2 N[/itex] tests.
There are several practical problems with this approach.
- Samples would have to be combined for a given test, effectively diluting each individual sample. This alone could render the test ineffective.
- This method would cause a huge increase in the error rate. Every individual test has a nonzero probability of producing a false positive or false-negative result. In this method, these errors would propagate from one level to the next, even between different people. The propagation could render the results pretty useless (and arguably dangerously ineffective).
- At this time, the sample collection is not as simple as just providing saliva. The antigen test (the test to determine if you are presently infected) involves sticking a swab way up into sinuses, and the antibody test (the one that determines if you have already had the virus) involves drawing blood. The proposed method would seem to me like it might require more samples per person.
So no, I don't think that this approach would work. It does make for a fun math problem though.