Owing to the worsening of 2019 Novel Coronavirus (2019-nCoV) outbreak in China, panic buying of face masks had shown an accelerated growth worldwide, especially in the Greater China region. Facing this tough situation of possible shortage of masks, the Central Epidemic Command Center (CECC) in Taiwan announced a name-based rationing system for masks on February 3, 2020, which would be launched three days after the announcement. The policy was expected to be capable of ensuring universal access to face masks as well as fairness and transparency of resources allocation and curbing the hoarding of face masks.
In the announcement, CECC pointed out several changes in the sale of masks, one of which is quoted as follows:
"To reduce the queue for face masks, the policy allows the people whose ID card number ends with an even number to buy masks on Tuesdays, Thursdays and Saturdays, and the people whose ID card number ends with an odd number to buy masks on Mondays, Wednesdays and Fridays while everyone can buy them on Sundays. Furthermore, office workers and people with disabilities can ask their family members or friends to buy face masks on their behalf. However, each person is allowed to buy face masks for another person by presenting the person's IC card, and the abovementioned rules of purchase apply. Moreover, face masks for children are only allowed to be purchased when IC cards of children under 12 are presented."
In short, all the people would be partitioned into two disjoint sets, and
• on Tuesdays, Thursdays and Saturdays, only people whose ID card number ends with an even number are allowed to buy masks;
• on Mondays, Wednesdays and Fridays, only people whose ID card number ends with an odd number are allowed to buy masks.
Notice that a valid ID number is a capital letter, which depends on the place of one's first household registration, followed by nine digits, where each digit ranges from 0 to 9, the first digit recognizes the gender and the last digit is a checksum depending on the leading letter and the other eight digits, one should be dubious about the "fairness" of this policy for the two disjoint sets of people considering the nature of checksum computations, i.e., the distribution of the parity of the last digit of ID number is non-trivial and remains unknown. Table 1 : One-to-one correspondence between a capital letter and an integer.
Let Aa 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 be a valid ID number, where A is a capital letter and has a one-to-one correspondence to an integer 10 ≤ α ≤ 35, shown in Table 1 , and a i is an integer in the range 0 to 9 for each i = 1, 2, · · · , 9. Let 0 ≤ α ′ ≤ 9 satisfies α ≡ α ′ (mod 10), then
Using (1), the fairness issue can be reformulated as follows:
Problem 1. Let f X (x) be the probability mass function of the parity of a 9 , then
where x = a 9 mod 2, for some 0 ≤ p ≤ 1. If p is far from 1/2, then the policy could be considered unfair, since, for example, if p were equal to 0.9, then 90% of the people could go to the pharmacies or drugstores to buy masks on Mondays, which would lead to a severe competing purchase. So, is p close enough to one half or not in reality?
To be more precise, since p is the probability that a 9 is even, also, 10 is a multiple of 2, let
From (2) we know that the parity of the last digit of ID number only depends on the leading capital letter as well as the second, fourth, sixth and eighth digits. To briefly discuss the fairness issue, we may assume that, in a specific region, the ID numbers of most of the people start with the same capital letter, then p only depends on the parity of b 2 + b 4 + b 6 + b 8 , and we get an equivalent problem as follows:
Problem 2. Without loss of generality, assume in Hsinchu City, most of the people have ID number starting with "O", from Table 1 we know that α = 35 and α ′ = 5. Since 35−11×5 10 = −2 is an even number, b 9 = b 2 + b 4 + b 6 + b 8 mod 2. Let p j denotes the probability that a j is even, for j = 2, 4, 6, 8, and assume that a j 's are independent, then p = p 2 p 4 p 6 p 8 + p 2 p 4 (1 − p 6 )(1 − p 8 ) + p 2 (1 − p 4 )p 6 (1 − p 8 ) + p 2 (1 − p 4 )(1 − p 6 )p 8 + (1 − p 2 )p 4 p 6 (1 − p 8 ) + (1 − p 2 )p 4 (1 − p 6 )p 8 + (1 − p 2 )(1 − p 4 )p 6 p 8
What is condition for p 2 , p 4 , p 6 , p 8 such that p is close to or exactly one half ?
One may start from an easy case. Let y, x 1 , x 2 ∈ Z 2 , where Z n denotes the group of integers modulo n for some positive integer n. If x 1 , x 2 are independent variables and y = x 1 + x 2 , then P {y = 0} = P{x 1 = 0}P{x 2 = 0} + P{x 1 = 1}P{x 2 = 1}
It is obvious that if x 1 or x 2 is 0 of probability 1/2, then P y = 0 is always 1/2. Theorem 1. Consider a sequence of independent variables x 1 , x 2 , · · · , x m ∈ Z 2 , for some m ≥ 2, let
Then
(3)
Proof.
(i) It is clear that (3) holds for f = 2.
(ii) If (3) still hold for some 2 ≤ f = t < m, consider f = t + 1, then y (t+1) = y (t) + x t+1 and
(iii) By induction, (3) holds for all 2 ≤ f ≤ m.
Corollary. Consider the notations defined in Theorem 1. Then, for 2 ≤ f ≤ m, P y (f ) = 0 = 1 2 if and only if q k = 1 2 for all k ≤ f .
This corollary, which is a trivial result following from (3), implies that, in Problem 2, if none of p 2 , p 4 , p 6 , p 8 is 1 2 , then p = 1 2 . Finally, we can conclude that, if at least one of the distributions of parities of the second, fourth, sixth or eighth digit of ID number is uniform (i.e., odd and even are equally-likely), then the policy could be considered fair.
A special case can also be found in [1] , Gallager showed that if a sequence of m independent binary digits in which every digit is a 1 with probability q, then the probability that an even number of digits are 1 is
That is, even if q = 1/3, when m = 4, the probability is 0.5062 which is only slightly greater than 1/2.
If one can show the evidence of one of the exact distributions of parities of the second, fourth, sixth and eighth digits, the fairness issue of this policy can be confirmed. Nevertheless, as mentioned and calculated in the previous paragraph, people should always try not to worry and be frustrated about it given that the two disjoint sets of people are probably of the same size.
Despite the fact that the above derivations are strict enough, mathematically, there may still exist some exceptions. Note that in reality, the second digits are mostly in the range 0 to 2; also, due to the entendre between numbers and Chinese words, the number "4" may occur less than other numbers in the ID number.