key: cord-0583224-fa0htqpv authors: Waghela, Chetan title: A unified picture of Balance puzzles and Group testing: Some lessons from quantum mechanics for the pandemic date: 2021-08-04 journal: nan DOI: nan sha: 075b099f877844f3446014a878b6cbd315a1a279 doc_id: 583224 cord_uid: fa0htqpv Balance (Counterfeit coin) puzzles have been part of recreational mathematics for a few decades. A particular type of Counterfeit coin puzzle is known in the literature as the"Beam balance puzzle". An abstract solution to it is provided by Iwama et.al as a modification of the Bernstein-Vazirani algorithm, making use of quantum parallelism and entanglement. Moreover, during this pandemic, group testing has proved to be an efficient algorithm to save time and cost of testing specimens for the presence of infection. In this article, we propose a"Binary Spring Balance"(BSB) puzzle, to facilitate a unified picture of the counterfeit coin problem and the testing for infection problem, as both aim to reduce the number of queries. We then showcase two solutions to the BSB problem, one using bits and other using classical-qubits ('cebits") for querying. Both solutions are demonstrated using circuits. In this pursuit, we develop a modified optical implementation of Bernstein-Vazirani algorithm using only polarizers (no need of beam splitters), which has surprisingly not yet been proposed earlier. Under the pretext of this demonstration we question why we have not yet developed testing mechanisms inspired by Bernstein-Vazirani algorithm for the pandemic, as they solve the problem in single query, they have no issues related to prevalence of infection in the population, nor are they plagued by the issue of dilution of samples due to pooling. The modified implementation of Bernstein-Vazirani algorithm using polarizers can also be a cost-effective demonstration in an undergraduate lab. Testing (or querying) is a process to reveal or enhance a particular hidden feature of a specimen. For example, for a counterfeit coin of a higher weight among original coins which are identical on observation, the only way to reveal the counterfeit coin is to weigh them. Similar to the case with coins, all identical looking swabs can be identified for the presence of infection using an RT-PCR test (there are other tests also available but for mathematical abstraction they are all considered equivalent). A simplified description of the commonly used RT-PCR tests can be found at 1 . The exact details of the testing are not required for the purpose of this article. An uninformed person would test or weigh each of the swabs or coins individually. However, in the event when there are too many specimens to be tested it is tedious and in some cases impossible to test all of them individually. The time and testing kit cost shoots in proportion to the sample size. An innovative technique had been invented to counter this, which is known as "Group testing" or "Pooled testing", to identify the positive specimen in least number of tests 2 . Similarly, the problem to identify counterfeit coins in least number of weighing is known as the "Balance Puzzle" or the "Counterfeit coin puzzle" 3 . The testing mechanism depends on the nature of the sample. Balance puzzles use weighing as testing mechanism while identification for infection uses various laboratory methods. Moreover, the instruments used for weighing or identification for infection can differ and cause a change in mathematical structure of the solution (or algorithm) to the problem. For example, there are two types of instruments that can be used to weigh for the Balance puzzles. One being Beam balance while the other being Spring balance. The beam balance works by comparing mass. Equal number of coins (whose total will always be even) are kept on either side and then compared, if the pan tilts then a counterfeit coin is present in either of the pan. The knowledge of the weight of the coin is not needed for it. On the other hand spring balance does not function by comparison of weight. If a spring balance is used, knowledge of the weight of original coin is at least necessary. The weight shown on the scale is compared to the predicted weight depending on the number of coins placed. Then, if it is different compared to the predicted weight (assuming all coins are original), a counterfeit coin is present in the weighed coins. Additionally, spring balance also reveals the number of counterfeit coins in a particular weighing (deduced from the deficit between the value shown by the weighing and predicted value if all are considered original). We will study a unified logical picture of both the problems of spring balance and testing for infection in a population, and call it "Binary spring balance" (BSB) puzzle. It is to be noted that the testing mechanism for identifying positive specimens is similar to that of the application of spring balance to find counterfeit coins, and it is not similar to the application of beam balance. This is because a beam balance works by comparison of coins and always needs even number of coins for a particular weighing 4 . In the BSB puzzle the samples are bits rather than coins of swabs (0 denoting original bit and 1 denoting defective bit). The goal of this puzzle is the same i.e. to identify the defective bits using least number of queries. This puzzle demonstrates a unified logical picture of both the problems. We also intend to showcase two circuits to implement on this binary sample. One where queries cannot be superimposed while in other case where queries can be superimposed. The second circuit is inspired by the Bernstein-Vazirani algorithm, it however works in the classical domain, too. The second circuit may pave a path for creating a framework to develop testing mechanism and algorithms which work by using only a single test for population of any size. The article is arranged as follows: In Section 2, we will discuss the history and literature of problems individually. In Section 3, we discuss Li's S stage algorithm implemented for identification of positive specimens in a population. In Section 4, we will introduce the "Binary Spring Balance" puzzle and showcase a circuit which implement's Li's S stage strategy (where queries are not superimposed) for the problem with binary string size N=12. Section 5, we will showcase a circuit which solves the same problem using Bernstein-Vazirani algorithm (where queries are superimposed). In the same section we showcase a circuit to implement the algorithm using just polarizers (linear polarizers and half wave retarders). In Section 6, we will finally conclude. The earliest mention of the pooled testing strategy was in the year 1943 5,6 . In 1943, during the Second World War the United States Public Health Service took up a task to remove all syphilitic men called up for induction. testing required drawing a blood sample from an individual and then analysing the sample to determine the presence or absence of syphilis. During those times, performing this test was expensive due to less resources. Testing every soldier individually would have been very expensive and also would need lot of time. This is because, if a person is not syphilitic then the testing kit as well as time is wasted on testing the person. Hence, in the scenario when the number of tests are large and the number of infected (or defective or counterfeit) samples are comparatively less, individual testing is an inefficient method as we will see. Dorfman proposed a clever way to solve this problem by pooling the blood samples. A graphical depiction of Dorfman testing is depicted in Fig. 1(b) . If there are 100 men to be tested then samples can be grouped in batches of 10. The samples can then be tested in group. If any of the group shows sign of syphilis then each sample in the group can be tested individually. In this way, we can reduce the number of tests. There are 2 stages in this scheme, first is testing the complete population in groups and then individually testing the identified infected groups. This strategy is not the most efficient and it can be improved upon as shown by later literature. There are various modifications of this problem for various scenarios. In 1957, Sterrett 7 proposed a modification of Dorfman's procedure. In 1958, Sobel and Groll 8 improvised the solutions for various scenarios and for the first time studied this problem in the context of Information theory. The reader is advised to follow 6 for more information related to the history of the research on group testing. A variant of the pooling strategy is known as "Matrix pooling" or "Array querying" 2 . In these solutions a sample is shared between two or more pools in same stage rather than only one pool. Recently, a method using Kirkman Triples, known as "Tapestry pooling" has been proposed by 9 . In this strategy too the samples are distributed in different groups in same stage. It is proposed that in this scheme only one stage of querying is needed to identify all infected. However, there are issues like dilution of samples due to multiple distribution and also in keeping track of the strategy, which needs additional solutions. In 1962, Li 10 came up with a generalization of the Dorfman's 2 stage procedure, called as S stage procedure Fig. 2 . The difference in Li's S stage procedure is to regroup the detected groups with infection in second stage and then retest, repeating this procedure for 'S' number of stages rather than just 2 as in the case of Dorfman's scheme. This procedure is efficient compared to the Dorfman's procedure as it further reduces use of testing kits as well as time. This procedure is also easier to implement and reduces human error compared to other schemes like Matrix pooling or Tapestry pooling. We will study pooling strategies in terms of Li's generalized procedure for our paper due to its' simplicity, it being generalization of the Dorfman's procedure which has received widespread implementation during recent Covid-19 pandemic 2,11 . Some important parameters to consider are the accuracy of the tests (i.e. sensitivity and specificity of the tests 12 , the "prevalence rate" and the "pool size" 6 . For this paper we will assume that the tests are always accurate. The prevalence rate is the ratio of the number of infected to the total population to be tested. Pool size is the number of the samples to be included in one pool. Prevalence rate plays an important role in determining optimal pool size for pooling and also to determine if the pooling strategy is any better than individual testing. We also assume that the maximum number of specimens that can pooled together for efficient detection is unlimited (this is not true in reality due to dilution). This is quantitatively discussed later in detail. We will explicitly define the specific problem that we will consider for the study: You have N similar specimens from suspected patients and a test for the presence of the infection. All the specimens are indistinguishable without the test. 'd' number of specimens are infected and show unique marker compared to noninfected ones upon testing. What is the maximum number of tests required by the Li's pooling strategy considering 'g' pools of size 'k'. We are interested in the maximum number of tests required because it prepares us for the worst case scenario. The worst case scenario for a pooling strategy like Li's occur when the 'd' positive specimens are evenly distributed among 'g' pools of size 'k' made from a population of size 'N'. Suppose for 18 specimens, 2 are infected (this number is unknown to you in reality). They are each distributed in separate 2 of the 3 pools of size of size 6, each. Application of the pooling strategy would require maximum of 13 tests combined (3 in first stage and at most 10 in second). If the infected were all in same pool, it would require 9 tests only (3 in first stage and maximum of 6 in second stage of individual testing). As we cannot know before hand if the infected samples are evenly distributed or not, we need to be prepared for 13 tests in total, known as worst case scenario. Suppose for 100 positive specimens 5 are infected ones, and there is one positive specimen in each of the groups. Using Dorfman's strategy on 2 stages, it would require testing each and every group individually and this increases the number of total tests to 110 (a number higher than the actual population size of 100). On the other hand, if the 10 positive specimens were in a same group, it would reduce the number of maximum tests required to only 10. We cannot control if the specimens would be evenly distributed or not, hence we should consider worst case scenario. The earliest known mention of the balance puzzle (or also known as the counterfeit coin Usually, for the standard balance puzzle, a beam balance is used. In this paper we will consider the balance puzzle with a spring balance. Fig. 1 (a) depicts the algorithm to detect a single counterfeit coin among 9 identical coins using spring balance. Each original coins weight=w. When the coins are pooled together and weighed they should weigh 3w if all are original. If there is any deficit then there is a counterfeit coin present. The reason to consider this is that in the standard beam balance puzzle only even number of coins can be tested at once, however, for the spring balance any number of coins can be tested at once. The testing mechanism is slightly different from application of beam balance above. The details are as discussed in the introduction. A spring balance and a standard test for identification of positive specimens are equivalent on an abstract level. The explicit statement for the spring balance puzzle considered in this article is as such: You have N indistinguishable coins and a spring balance. All the coins are indistinguishable without the weighing. 'd' number of coins are counterfeit and and are heavier compared to original one. What is the maximum number of weighing required for the Li's pooling strategy applied in this scenario considering 'g' pools of size 'k'. We can compare this with the statement in previous subsection, and as depicted in Fig. 1 (b). If we replace coins by specimens the problems are similar except for the samples in concern and instruments used for the testing. We will revise a few insights into Li's S stage procedure 6,10 for group testing. It is to be noted that Li's s stage algorithm is a generalization of Dorfman's procedure (which has S=2 stages rather than s>2). It is also to be noted that we qualitatively showcased the equivalence between the spring balance puzzle and the problem of detection of infection in the human population. Hence, all the quantitative insights of Li's S stage algorithm for infection identification also apply to the spring balance puzzle stated in previous section. In the Li's S stage algorithm Fig. 2 , for a population of size 'N' and 'd' number of positive specimen, the prevalence rate is p=d/N. Consider for 1 st stage there are g 1 groups of equal size k 1 and for i th stage there g i groups of size k i (i.e. g i = N/k i ). The number of stages considered are 'S' in number. It is to be noted that there can be cases where at most one group can be of size lesser than k i because the population gets exhausted before filling up that group. We will still consider this group to be of size k i . For example, if there are 9 coins and we group the coins in size of 2, there will be 5 groups in total and there will be one group with only 1 coin. In this case we will still consider this group to be of size 2. Consider m 1 groups are found to be having positive specimen in 1st stage and m i in i th stage. When there are S=1 stages then the number of querying will be constant i.e. N, irrespective of the prevalence. This is because there will be no grouping at any stage in this procedure. When there are S=2 stages (Dorfman's strategy), there will be pooling at 1 st stage and individual testing in the second stage. The optimal pool size for first stage in this case will be k 1 = N/d. Then the optimal number of groups would be g 1 = √ N d. For the derivations For a procedure with S stages, the optimal pool size for i th stage is and the optimal number of groups for a particular stage is g i ≤ d(N/d) 1/S . The maximum number of tests required for all S stages is t = Sd(N/d) 1/S . The above equation only tells us given 'S' stages how much tests would be required in worst case scenario, however we have not fixed optimal number of stages required to reduce the number of tests. Now, the optimal number of stages to exhaust the testing of all the N specimens is S 0 = ln(N/d) = −ln(p). Using this knowledge we derive that the maximum number of tests needed for a given population N and d positive specimen when optimal number of stages are implemented, is is the Euler's constant. A few things need to be pointed out as they are very important: 1) This pooling strategy may not be a good choice in cases where the prevalence rate 'p' is above certain threshold. It is to be noted that p = d/N ≤ 1 as number of positive specimen cannot exceed the population size. If we consider Li's procedure with S=2 stages, then the worst case scenario is t = 2 √ N d = 2 N 2 p = 2N √ p. Until and unless √ p ≤ 0.5 (or p ≤ 0.25) , t ≤ N otherwise it becomes greater than N and pooling is a futile exercise compared to individual testing whose worst case scenario is the constant 'N'. Hence, the prevalence rate threshold for S 0 stages is when the tests needed are equal to or greater than 'N'. The number of worst case tests required can be written in terms of the prevalence rate, t = edln(N/d) = eN pln(N/N p) = −eN pln(p). Hence when, t ≥ N the prevalance rate has to be −pln(p) ≥ 1/e. This also has been one of the major hurdles in implementing these strategies when the infection has spread to a larger population. However, we will see in later sections how it can be overcome in some cases inspired by superposition of queries. Let us understand a version of the above problems in a binary form. This would help us in creating logical circuits to demonstrate the problem and understand them in unified manner. Let the sample population be a binary string made of N binary bits, 0 and 1 (we will call it the secret string 's'). 0 denoting an original bit (original coins or negative specimens) and 1 denoting defective bit (counterfeit coin or positive specimens). We are unaware of the nature of the string 's', i.e. which particular bit is 1 or 0. We can denote the positions of the bits by an index. For example, in the sample of size 4 and the secret string, s=0011, the 1st bit is s 1 = 1, 2 nd bit is s 2 = 1, 3 rd bit is s 3 = 0 and 4 th is s 4 = 0. There exists a query string 'x' which indicates which particular bit of 's' is being queried at a particular step in the solution process. x i = 1 denoting s i being queried in the particular step and x i = 0 denoting it being not queried. In the case of the classical spring balance puzzle it is equivalent to i th coin being weighed in or not and in the case of pooled testing, it is equivalent to i th specimen being tested for infection or not. For example, if the query code is 0110, it means the 2 nd and 3 rd bit of 's' is being queried and others are not. The binary version of weighing on a spring balance or testing for infection in specimens is given by the transformation: For example, for the query string x=1011 being used on s=0011 given above: f (x) = 1 × 0 + 0 × 0 + 1 × 1 + 1 × 1 = 2 = 10(in binary) Hence, we can conclude that there is at least a defective bit present at index 1, 2 and 4 bit of the string 's'. However, if the a query string x=1100 is applied to the same secret code: f (x) = 1 × 0 + 1 × 0 + 0 × 1 + 0 × 1 = 0(in binary and decimal) Here, no defective bit was found at index 3 and 4. As only two binary bits are multiplied at a time, × can be replaced by an AND gate operation on the two bits. The circuit to implement addition can be done using Full Adder circuits 19 . We now want to identify the defective bits in least number of queries. The procedure is as what we mentioned in previous section using Li's S stage algorithm. We will show by example how it is to be performed in the BSB puzzle case. The maximum number of queries needed to detect the defective bit would be N=12 for d=1. This was mentioned in the previous section. We can reduce the number of queries by using Li's pooling technique. The optimal number of stages required, S 0 for this problem is around S 0 = ln(12) ≈ 2. Hence, only two stages are needed. We can divide the string in groups of size k 1 = √ 12 ≈ 3, this gives us g 1 = 4. The querying then proceeds by pooling first 3 bits (x=000000000111), then next 3 bits (x=000000111000) and so on. Hence, we see that the last bit (12 th ) in the secret string s is the only defective bit. In general for the BSB puzzle we pool the bits in 1 st stage and then query the collective secret string one by one. We detect which groups were having defective bit and then move to next stage. The total number of queries needed for this sample is t = 7. This value is equal to the worst case queries needed to test a population of size N=12 with prevalence rate of 1/12 Thus, we observe that in individual querying for the BSB puzzle we needed 12 queries however using the pooling strategy we required only 7 for the same string size 'N' and prevalence rate 'p'. Hence, pooling reduced the number of queries required in the above example. This can be particularly useful in querying a large secret code with large string size. If the prevalence rate would have been larger than or equal to 0.25, i.e. there were three defective bits, d=3, this procedure would be worse than individual querying. Summation of the output from previous step or finding its' Hamming weight. For the first step, as the multiplication is between two bits at a time, it can be implemented using Logical AND gates. In short consider different combination of multiplying 0 and 1 (0x0 = 0, 0x1 = 1, 1x0 = 0 and 1x1 = 1), and compare it with the Logical AND operation (0∧0 = 0, 0∧1 = 0, 1∧0 = 0, 1∧1 = 1 ), both provide same output. Hence, the first step can be easily implemented using Logical AND gates. We create a digital circuit to implement this example. A simulation of the complete circuit implementation for N=12 bits has been uploaded at 21 . To use it the reader is advised to input a particular secret string of size N=12 of their choice. Then the Dorfman's procedure is to be implemented using various queries as mentioned in previous section. The output is the value of the spring balance function for a particular query 'x'. The query string in the Li's solution to BSB puzzle uses classical binary bits, asking if a particular bit of the secret string is being queried or not, one at a time: NO=0 and YES=1. However, if a query can exist in a superposition of states of YES and NO (denoted by 1 √ 2 (|0 + |1 )) simultaneously, BV algorithm can be implemented to solve the BSB problem using only single query. Such query problems have been considered by quantum computing experts in the past, however we emphasize that some of these algorithms can also be implemented in classical domain. Superposition states of binary bits are known as 'qubits' in literature. It is to be noted superposition states like qubits can be implemented using classical systems too and in some literature are known as "cebits" [22] [23] [24] . Note that this statement is not in violation of any previous knowledge because, the power of quantum computing lies in superposition and nonlocality combined 25, 26 . We would caution that different interpretations would have different viewpoints regarding this, however we do not intend to delve into this and rather showcase applicability of superposition of states towards solving the BSB problem at hand. A classical version of a qubit can be easily implemented using polarization of classical light. It is to be noted that the secret string is still binary and do not exist in superposition. Terhal and Smolin 27 were the first to report connection between counterfeit coin puzzles and the problem addressed by BV algorithm 28 . In the past Iwama et.al 4 has considered solving the balance puzzle using quantum mechanics. They have aptly named it the "quantum counterfeit coin" puzzle. They however in their article consider a beam balance rather than a spring balance. Due to this they consider a query trit (ternary bit) string rather than a query bit string. A single trit is considered to be of a value either '-1','0' or '1'. -1 representing placing the coin on left pan, 1 representing placing on the right pan and 0 placing it nowhere. Moreover, the Hamming weight of the query string in their case has to be even (i.e. the number of trits in the trit string different than 0 has to be even). fThe Bernstein-Vazirani 28 (BV) algorithm was intended to showcase a method to extract a secret string embedded inside a "black box" known as an "Oracle". Simply, the idea of a black box can be considered to be a box holding information of a secret string, which is registered there, maybe by your friend or enemy who does not want to reveal it to you. You catch hold of the box and reveal the secret string from the outputs from this black box by implementing different queries through its' inputs. The motivation is same as the problems considered previously. Here, Hence, when an input |0 ⊗N |− is transformed by H ⊗N ⊗ I then the output is The R.H.S of above equation is used for querying the oracle in next stage. It is to be noted the final 'N+1' th qubit |− (called the 'Ancilla") can also be created from |0 by using the X and H gates in series. For example, the output of H ⊗3 ⊗ I acting on |0 ⊗3 |− is 2) Querying: An oracle is a "black box" which takes in several inputs and gives outputs. We usually do not know what it holds and in standard problems try to reveal the hidden property of the constituents of the oracle by querying it. The standard BV algorithm uses an oracle known as a phase oracle, which encodes a function onto the phase of the inputs. Hence, when a product state '|x ⊗N ⊗ |− ' (x is a binary string), passes through a phase oracle, we have ). It can be observed in the second equality that the a phase has been encoded into the input, hence it is known as phase oracle. Here, s i x i (mod 2), where s is the secret string which is generally unknown to the one who is querying. Using |−{d}, +{d } |− we introduce a new notation to simplify under- An interesting observation is that if the phase function h(x) is replaced by the Binary spring balance function f (x) (Eq.1), there will be no change in the output of the oracle. In standard textbooks and articles 4,27-29 , the oracle is usually considered to be encoding a function h(x) onto the phase. The authors are not aware of any article where f (x) is is not equivalent to the spring balance unlike f (x) as it does not reveal number of defective bits in a particular pool, like a spring balance. For example, when 1 √ 2 3 x={0,1} 3 |x |− passes through the phase oracle holding a secret string s=101 then, Even though the information of the secret string held by the oracle is now encoded in the phase of its' output, the phase however is non-retrievable directly. We therefore need a step to retrieve it, otherwise the whole test is futile. For this, the Hadamard gates will be once again useful. If Hadamard gates can create superpositions, they can even break it, i.e. H |+ = |0 and H |− = |1 . Hence implementing H ⊗N ⊗ I on the output from the phase oracle acquired in previous step gives: The first term in the last equality represents the case when z=s, it occurs exactly 2 N times due to the sum always has a value equal to 1, because the exponent is always even. Hence, the coefficient of first term is always 1. If the coefficient of that term is 1, then the coefficient of other term has to be equal to zero, due to the normalization criterion in quantum mechanics. Hence, the final output is |s |− . The secret string can be revealed by measurement in a particular basis of all the states in the product state. We can observe that the state |− plays no direct role in the computation. It is known as the "ancilla qubit" added at the input to sustain reversibility of the oracle in some circuits. It holds no other significance in the circuit. It is to be noted that for the BV algorithm it can be discarded as it holds no significance for the calculation 23,30-33 . There are several articles exploring classical implementation of quantum computing algorithms, for example using lenses 34 , using linear optical elements 23 and others 25, 35, 36 . Noting this, we will discuss a modification of the oracle implementation such that it can be demonstrated using cost effective materials available around. One of the standard ways the phase oracle "O h " can be implemented is by using CN OT gates as depicted in Fig. 4 . CN OT gates are two qubit gates and their implementation has been a major problem in optical implementation of quantum algorithms as it requires entanglement 37 . Earlier optical implementation of universal quantum computers used nonlinear optics [38] [39] [40] to implement it. However, later KLM protocol 41 solved this issue and this gate could be implemented using linear optical elements 37, 42 . Even, then it is hard to implement this algorithm physically, as it requires some materials which are not readily available. We then ask can we create an equivalent oracle using only single qubit gates like Z and I gates, as the ancilla qubit plays no role in the computation. It has been noted in 23, 31 . However, it is interesting to note that even after this knowledge, an optical implementation was not proposed using only polarizers. All single qubit gates like Z and I can be implemented entirely using only polarizers if polarization is considered for qubit realization 37 . First we justify equivalence between two oracle implementations and then show how the latter can be implemented using just polarizers. The oracle implementation using CN OT gates is as shown in Fig. 4 . The notation |−{d}, +{d } is discussed in previous section. An implementation of the oracle using the circuit is given by Fig. 4 using Z and I gates. Except for the ancilla qubit |− the output Eq. (6) and Eq. (7) For Half wave plates,(phase retardation) η = π and (circularity) φ = 0. For Quarter wave plates η = π/2 and φ = 0. θ is the angle between the "fast axis" of the plates and direction of horizontal polarization. Linear Polarizers (LP) are represented by transformation matrix as given below: For demonstration in a lab, these polarizers can be found in form of plastic sheets also known as polymer "retarder films". The linear and quarter wave plates (two quarter wave plates with parallel fast axis in series produce a half wave plate) can also be found in 3D movie glasses using circular polarization for stereoscopy. They can also be made using cellophane tape as suggested in 45 . Let us look at how the gates needed to implement BV algorithm can be created using polarizers. The procedure for the demonstration is as follows (Fig. 5 For demonstration, someone can be asked to secretly position Z gates at desired position, without revealing it to others. 4) The secret string registered in the oracle is now registered in the phase of the output from the oracle, which can be revealed using 'N' Hadamard gates as used before. The optical implementation of the BV algorithm circuit using just polarizers and classical light, for a secret code s=10110 registered in the oracle, is as shown in Fig 5. In terms of the problem of testing for infection in a certain population, if we consider that the positive specimens act as Z gates (BF (π, 0, 0 o )) and we use polarization of classical light to query for their presence. The problem can then be solved in just a single query by using the circuit mentioned above. In this case we do not need to even worry about the prevalence rate 'p' of infection in the population as required for the other "classical" pooling strategies described above. We do not even need to care about dilution of samples due to pooling. The limitation of this method however is related to the nature of the specimens. If the query needed to test the specimens cannot exist in superposition for the testing mechanism to work, then it is not possible to test in a single query. Hence, a device and testing mechanism can be created where Hilbert space structure applies, such that a cebit or a qubit can be used for querying. We do not even need to be in quantum domain for implementing such a strategy. In the classical domain we saw Hilbert space structure applies to polarization of classical light and other candidates are Orbital Angular Momeentum of classical light 46 or path of the classical light 47 . In this article we presented a unified picture of the Balance puzzles and the problem of pooled testing for infection in a large population. It was showcased that the "Spring balance puzzles" (as opposed to beam balance puzzles) are similar the problem of pooled testing for infection. We then propose a logical version of these problems and name it as Binary spring balance puzzle, not yet discussed earlier in standard articles. It provides a unified logical picture for both the set of problems irrespective of the testing mechanism to be implemented. The logical function f (x) where x is a "binary" query string acts as a spring balance or the device which tests for positive specimen. The Detection of Defective Members of Large Populations Combinatorial group testing and its applications On the detection of defective members of large populations Group testing to eliminate efficiently all defectives in a binomial sample A Compressed Sensing Approach to Pooled RT-PCR Testing for COVID-19 A sequential method for screening experimental variables Sample pooling strategies for SARS-CoV-2 detection What are sensitivity and specificity? Solutions for Problems: E651-E655 A Predetermined Algorithm for Detecting a Counterfeit Coin with Multi-arms Balances How to Find Many Counterfeit Coins? The Oddball Problem A Tale of Two Coins The Counterfeit Coin Problem Revisited Digital Logic and Computer Design Upper Bounds on the Multiplicative Complexity of Symmetric Boolean Functions Quantum computation with classical light: The Deutsch Algorithm Optical implementations, oracle equivalence, and the Bernstein-Vazirani algorithm Quantum mechanics and classical light Classical wave-optics analogy of quantum-information processing A Classical Analogy of Entanglement Single quantum querying of a database Quantum complexity theory Quantum Computation and Quantum Information Fiber-Optics Implementation of the Deutsch-Jozsa and Bernstein-Vazirani Quantum Algorithms with Three Qubits Implementation of a quantum algorithm to solve the Bernstein-Vazirani parity problem without entanglement on an ensemble quantum computer Quantum Algorithms for Josephson Networks Efficient optical implementation of the Bernstein-Vazirani algorithm A simple optical demonstration of quantum cryptography using transverse position and momentum variables Quantumlike systems in classical optics: applications of quantum optical methods Optical quantum computing Quantum optical Fredkin gate Nonlinear quantum optical computing via measurement Any nonlinear gate, with linear gates, suffices for computation A scheme for efficient quantum computation with linear optics Linear optical quantum computing with photonic qubits Minimal three-component SU(2) gadget for polarization optics The Simon-Mukunda polarization gadget Interference birefringent filters fabricated with low cost commercial polymers Generating arbitrary cebits on the orbital angular momentum Poincaré sphere Entanglement in Classical Optics