This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Quickly Determining Who Won an Election

Lisa Hellerstein Department of Computer Science and Engineering, New York University Tandon School of Engineering, New York, United States. Email lisa.hellerstein@nyu.edu. Partially supported by NSF Award IIS-1909335.    Naifeng Liu Department of Computer Science, CUNY Graduate Center; Department of Economics, University of Mannheim. Email nliu@mail.uni-mannheim.de. Partially supported by the Teaching Fellowship at City University of New York.    Kevin Schewior Department of Mathematics and Computer Science, University of Southern Denmark. Email kevs@sdu.dk. Partially supported by the Independent Research Fund Denmark, Natural Sciences, Grant DFF-0135-00018B.
Abstract

This paper considers elections in which voters choose one candidate each, independently according to known probability distributions. A candidate receiving a strict majority (absolute or relative, depending on the version) wins. After the voters have made their choices, each vote can be inspected to determine which candidate received that vote. The time (or cost) to inspect each of the votes is known in advance. The task is to (possibly adaptively) determine the order in which to inspect the votes, so as to minimize the expected time to determine which candidate has won the election. We design polynomial-time constant-factor approximation algorithms for both the absolute-majority and the relative-majority version. Both algorithms are based on a two-phase approach. In the first phase, the algorithms reduce the number of relevant candidates to O(1)O(1), and in the second phase they utilize techniques from the literature on stochastic function evaluation to handle the remaining candidates. In the case of absolute majority, we show that the same can be achieved with only two rounds of adaptivity.

1 Introduction

We introduce the following problem. Consider an election with voters 1,,n1,\dots,n who each vote for a single candidate out of 1,,d1,\dots,d. Each voter ii chooses each candidate jj with known probability pi,j(0,1)p_{i,j}\in(0,1), independently of all other voters. A candidate wins the election if they receive a strict majority of the votes which may be, depending on the model, an absolute or a relative majority. After the votes have been collected, it is possible to count the vote of any voter ii, taking a known time ci0c_{i}\geq 0 (which can also be thought of as cost). The present paper is concerned with the following question: In what order should votes be counted so as to minimize the expected time (or cost) until it is known who won the election? We allow adapting this order along the way.

The above problem is a stochastic function-evaluation problem (for a survey, see [Ünl04]): The votes can be regarded as random variables taking one of dd values, and the function maps these variables to the index of the winning candidate or, if no such candidate exists, to 0. When d=2d=2, results on such problems can be applied to our problem. Note that for d=2d=2, there is no difference between absolute and relative majority. If nn is odd, the problem for d=2d=2 is somewhat simpler because function value 0 is impossible. The function can then be seen as a so-called kk-of-nn function, a Boolean function that is 11 if and only if at least kk of the nn variables have value 11. For these functions, a beautiful optimal strategy due to Salloum, Breuer, and (independently) Ben-Dov is known [SB84, BD81]. In what follows, we refer to this as the SBB strategy. In our setting, it translates to the following: An interchange argument shows that, if it were known a-priori that candidate jj is the winner, it would be optimal to inspect votes in increasing order of ci/pi,jc_{i}/p_{i,j} ratios. Since the two strategies, for j{1,2}j\in\{1,2\}, have to count n/2+1\lfloor n/2\rfloor+1 votes before they have verified the winner, there exists, by the pigeonhole principle, a vote that is contained in both corresponding prefixes. An unconditionally optimal strategy can safely inspect this vote and then recurse on the resulting subinstance. In the case that d=2d=2 and nn is even, determining who is the winner of the election, or determining that there is no winner because of a tie, is equivalent to determining whether there are precisely n/2n/2 votes for both candidates, and an optimal strategy can be derived in a similar way [AJO11, GGHK22].

For our general setting, where dd can be greater than 2, we do not expect a similarly clean strategy. For previously studied functions of Boolean variables that are slight extensions of kk-of-nn functions, the stochastic evaluation problem is either known to be NP-hard or no polynomial-time algorithms111For an algorithm for our problem to run in polynomial time, we require that, in every situation, it can find the next vote to count in time polynomial in the input size. Note that the corresponding decision tree may have exponential size. For an in-depth discussion of such issues, we refer to the survey by Ünlüyurt [Ünl04, Section 4.1]. computing optimal strategies are known. A recent trend in stochastic function evaluation has been to design (polynomial-time) approximation algorithms instead, i.e., algorithms whose expected cost can be bounded with respect to the expected cost of an optimal strategy, preferably by a constant factor [GGN22, GGHK22, GHKL22, PS22, Liu22, DHK16].

The problems considered in this paper have similarities to the stochastic function-evaluation problem for Boolean linear threshold functions. Constant-factor approximation algorithms have been developed for that problem, using two different approaches. The first approach reduces the problem to Stochastic Submodular Cover through the construction of a utility function and solves the problem with an algorithm called Adaptive Dual Greedy  [DHK16]. We show that this approach yields an O(d)O(d)-approximation for our problems (but it is conceivable that a more nuanced analysis could yield a better approximation factor). The second approach generates a separate strategy for each of the possible values of the function, by solving multiple instances of a constrained maximization problem, and interweaves the resulting strategies together [GGN22]. Applying this approach and current analysis to our problems would involve interweaving at least dd separate strategies, leading to (at least) a linear dependence on dd.

Instead, we develop a two-phase approach, where the first phase reduces the number of relevant candidates to O(1)O(1) and the second phase handles the remaining candidates with some of the aforementioned techniques. As we show, this approach yields O(1)O(1)-approximation algorithms for both the absolute-majority and the relative-majority setting.

A strategy is considered particularly useful in practice if it is non-adaptive (e.g., [GV06, GHKL22, GGN22]), i.e., it considers votes in a pre-specified order until the function is evaluated. For the absolute-majority version, we give an O(1)O(1)-approximation algorithm with only two rounds of adaptivity. In counting rounds, we use the “permutation” definition: In each round, votes are inspected in an order that is pre-specified for that round, until some stopping condition is reached. This definition is consistent with usage in a number of previous papers (e.g., [AAK19, GGN21]).

For future work, we leave it open whether there are non-adaptive O(1)O(1)-approximate strategies and, if so, whether they can be computed in polynomial time.

1.1 Our Contribution

We start with discussing the arguably simpler absolute-majority case. Here, a candidate wins if they receive more than n/2n/2 votes. Let us first formalize the termination condition, i.e., the condition that we have enough information to determine the outcome of the election. The condition is fulfilled if it is either known that (i) some particular candidate has won or that (ii) it is no longer possible for any candidate to win. Clearly, (i) is fulfilled if, for some candidate jj, the number of votes candidate jj has received is at least n/2+1\lfloor n/2\rfloor+1 and (ii) is fulfilled if, for all candidates jj, the number of votes received by candidates other than jj has reached at least n/2\lceil n/2\rceil.

Such conditions can be turned into submodular functions which map any state bb (representing the values of the votes counted so far) to a non-negative integer value such that reaching a state whose value is equal to a certain goal value is equivalent to satisfying the condition. For instance, as noted before, we can conclude that candidate jj is not the absolute-majority winner if and only if the number of votes for candidates other than jj has reached at least n/2\lceil n/2\rceil. Denote the number of votes in state bb for candidates other than jj, capped at n/2\lceil n/2\rceil, by gj(b)g_{j}(b). By previous techniques (cf. [DHK16]), such conditions can be combined to obtain a submodular function gg with the property that, once gg has reached a certain value, the termination condition is reached. As mentioned before, Adaptive Dual Greedy can then be applied to the resulting submodular function, and the approximation bound on Adaptivity Dual Greedy can then be shown to yield an approximation factor of O(d)O(d). For completeness, we detail this analysis in Appendix A.

A second approach is based on the previously mentioned approach for d=2d=2. Note that, using the SBB strategy, it is possible to evaluate at minimum expected cost whether any fixed candidate jj wins (by what can be viewed as merging the other candidates into a single one). Clearly, the expected cost of this strategy does not exceed the expected cost of an optimal strategy, as an optimal strategy also has to evaluate whether candidate jj wins (and more than that). Since concatenating the corresponding strategies (where repeated votes are skipped) determines who is the winner, the resulting strategy has an approximation factor of at most dd. Unfortunately, such an approximation factor seems inherent to an approach which consists of separate strategies for all dd candidates, even if a more sophisticated round-robin approach (e.g., [AHKÜ17, PS22]) is used to merge them into a single strategy.

As a third approach, let us try something much more naive, namely inspecting votes in increasing order of cost. Not surprisingly, this alone does not yield a constant-factor approximation algorithm, as shown, e.g., by the following instance: Consider d=2d=2 with nn odd, and the following three types of votes: (i) (n1)/2(n-1)/2 votes ii with pi,1=1εp_{i,1}=1-\varepsilon and ci=εc_{i}=\varepsilon, (ii) (n1)/2(n-1)/2 votes ii with pi,1=εp_{i,1}=\varepsilon and ci=1εc_{i}=1-\varepsilon, and (iii) a special vote ii^{\star} with pi,1=1εp_{i^{\star},1}=1-\varepsilon and ci=1c_{i^{\star}}=1. When one considers votes in increasing order of cost, for ε0\varepsilon\to 0, with probability approaching 1 it will be necessary to inspect all nn votes (at a total cost approaching (n+1)/2(n+1)/2). However, one could instead first inspect the type (i) votes, and then the special vote, and with probability approaching 1 this would be sufficient (at a total cost approaching 11).

Interestingly, a combination of the two latter approaches yields a constant-factor approximation algorithm. The crucial observation is that inspecting votes in increasing order of cost as long as more than two candidates can still win does not incur more cost than a constant factor times the cost that an optimal strategy incurs. To get an intuition for why this is true, consider the case in which all costs are either ε\varepsilon (for negligible ε\varepsilon) or 11. After all cost-ε\varepsilon votes have been inspected, resulting in state bb, let m2m_{2} be the second-smallest distance of a function gj(b)g_{j}(b) from its goal value n/2\lceil n/2\rceil. It is not difficult to see that an optimum strategy still has to inspect at least m2m_{2} votes. On the other hand, assume that, after inspecting 2m22m_{2} votes, there are still more than two functions gj(b)g_{j}(b) that have not reached their goal values yet. Noting that, for any pair of such goal functions, inspecting any vote adds 11 to at least one of them readily yields a contradiction. Interestingly, using a more involved charging argument, we are able to extend such an argument to arbitrary cost.

Next, consider the resulting situation, in which there are only two candidates left that can still win, say, candidates 11 and 22. We can now use the SBB strategy to first evaluate whether candidate 11 wins and then, again, to evaluate whether candidate 22 wins. Similarly to the argument given before, it is easy to argue that the expected cost of this is no larger than twice the expected cost of an optimal strategy. The resulting approximation guarantee of the entire algorithm is therefore 44. By replacing each instance of the SBB strategy with a 22-approximation non-adaptive strategy during the process of evaluating if candidate 11 wins and then if candidate 22 wins, we obtain an algorithm with only three rounds of adaptivity at the cost of a larger approximation factor of 66. Additionally, we give another algorithm that further reduces the rounds of adaptivity to 22 with a slightly subtle analysis, but it increases the approximation factor to 1010.

We now discuss the relative-majority case. Here, a candidate wins if they receive more votes than any other candidate. Again, the termination condition is fulfilled if it is either known that (i) some particular candidate has won or that (ii) it is no longer possible for any candidate to win. To formalize this, consider any state bb and any two candidates jj and kk. Note that jj is known to have received more votes than candidate kk if the number of inspected votes for candidate kk plus the number of uninspected votes is not larger than the number of inspected votes for candidate jj. Again, we can translate this to a goal-value function gj,k(b)g_{j,k}(b). Then, (i) is fulfilled if, for some candidate jj, the d1d-1 functions gj,k(b)g_{j,k}(b) (for k{1,,d}{j}k\in\{1,\dots,d\}\setminus\{j\}) have reached their goal values. For (ii), all votes have to be inspected.

Interestingly, a similar approach works: Again, we inspect votes in increasing order of costs until only two candidates can win. We can bound the total cost of this phase by 44 times the cost of an optimal strategy. In the second phase, assume candidates 11 and 22 can still win. We would like to evaluate whether g1,2(b)g_{1,2}(b) reaches its goal value. To do so, we use Adaptive Dual Greedy. We adapt the analysis of Deshpande et al. for Boolean linear threshold functions [DHK16], to handle the fact each vote may contribute 0, 11, or 22 to g1,2(b)g_{1,2}(b). As a consequence, we show that the cost is at most 33 times the expected cost of an optimal strategy. After this algorithm has been applied, it is either known that candidate 11 is the winner, or candidate 22 is the only candidate that can still possibly win. We use the SBB strategy to handle the latter case. The resulting total approximation factor is 88.

1.2 Further Related Work

The stochastic function-evaluation problem we discussed is inspired by the seminal work of Charikar et al. [CFG+00], where each input value is originally unknown but can be revealed by paying an information price cic_{i}, and the goal is to design a query strategy to compute the value of function ff with minimum cost. However, in the work of Charikar et al., the distributions of input variables are unknown so the performance is measured using competitive analysis. In our stochastic setting, we can compute the expected cost of query strategies since the distributions are known, which allows us to use the standard analysis in approximation algorithms. Recently, Blanc et al. [BLT21] revisited the priced information setting of Charikar et al., and they focus on a similar model to the Stochastic Boolean Function Evaluation problem of Deshpande et al. [DHK16], but allow an ϵ\epsilon error in the evaluation result.

Most recent works related to stochastic discrete minimization problems concentrate on designing non-adaptive strategies [GGN22, GGHK18, GHKL22] or strategies that require small rounds of adaptivity [AAK19, GGN21]. Non-adaptive strategies have advantages in many practical applications. For example, they typically require less storage space and they are amenable to parallelization. In addition, the adaptivity gap is studied to measure the performance difference between an optimal adaptive algorithm and an optimal non-adaptive algorithm. So if the adaptivity gap is small, non-adaptive strategies are usually more desired. However, there are situations where it is hard to design a non-adaptive strategy with good performance, e.g., when the adaptivity gap is large. Surprisingly, sometimes allowing a few rounds of adaptivity can greatly reduce the expected cost of an optimal non-adaptive strategy. Hence, it is interesting to design strategies that permit small rounds of adaptivity to keep a subtle balance between performance, storage space, and parallelizability.

Interestingly, economists study similar problems in deciding the winner of an election while the goal is different [BBMtV15, GS09]. For example, in one of the settings of finding a first-best mechanism, they seek to maximize the social welfare, which is the expected utility gain of individuals if the value of ff matches the input of any coordinate, minus the expected cost spent in learning the input values that are needed to determine the value of ff. In other words, this approach generates a complicated rule for determining the value of election results. Our approach can be considered as fixing the decision rule so the utility gain is constant, and now the goal is equivalent to minimizing the cost of learning the value of ff. Hence, our algorithms can be potentially helpful in mechanism-design problems.

1.3 Overview

In Section 2, we give some needed definitions. In Sections 3 and 4, we give constant-factor approximation algorithms for the absolute-majority and the relative-majority cases, respectively. We conclude and state open problems in Section 5.

2 Preliminaries

Let nn be the number of voters, and dd be the number of candidates. We number the voters from 11 to nn, and the candidates from 11 to dd. We sometimes use [k][k] to denote the set {1,,k}\{1,\dots,k\}.

For X=(X1,,Xn){1,,d}nX=(X_{1},\ldots,X_{n})\in\{1,\ldots,d\}^{n} we define Nj(X)N_{j}(X) to be the number of entries XiX_{i} of XX that are equal to jj. The absolute-majority function f:{1,,d}n{0,1,,d}f:\{1,\ldots,d\}^{n}\rightarrow\{0,1,\ldots,d\} is defined as follows:

f(X)={j if Nj(X)n2+1,0 otherwise.\displaystyle f(X)=\begin{cases}j&\text{ if }N_{j}(X)\geq\lfloor\frac{n}{2}\rfloor+1,\\ 0&\text{ otherwise. }\end{cases}

Here f(X)=jf(X)=j means jj is an absolute-majority winner, meaning jj receives more than half the votes, and f(X)=0f(X)=0 means there is no absolute-majority winner. The relative-majority function f:{1,,d}n{0,,d}f:\{1,\dots,d\}^{n}\rightarrow\{0,\dots,d\} is as follows:

f(X)={j if k{1,,d}{j},Nj(X)>Nk(X),0 otherwise.\displaystyle f(X)=\begin{cases}j&\text{ if }\forall k\in\{1,\dots,d\}\setminus\{j\},\ N_{j}(X)>N_{k}(X),\\ 0&\text{ otherwise.}\end{cases}

Similar to the previous function, the output of ff is either the winner of the election, or 0 if there is no winner. Here the winner must receive more votes than any other candidate.

The above two functions are symmetric functions, meaning that the results of the function only depend on the number of 11’s, …, dd’s in the input. (This property is called anonymity in social-choice theory.) We assume that the vote of voter ii is an independent random variable XiX_{i}, taking a value in the set {1,,d}\{1,\ldots,d\}. For each candidate jj, we use pi,jp_{i,j} to denote the probability that Xi=jX_{i}=j. We assume that each pi,j>0p_{i,j}>0.

In our vote-inspection problems, we are given as input the pi,jp_{i,j} values for each voter ii and candidate jj. For each voter ii, we are also given a value ci0c_{i}\geq 0. The only way to discover the value of XiX_{i}, the vote of voter ii, is to “inspect” vote ii, which incurs cost cic_{i}. (We will sometimes use the phrase “test variable XiX_{i}” instead of “inspect vote ii”.) In other words, cic_{i} is the cost of inspecting the vote of voter ii. The problem is to determine the optimal (adaptive) order in which to sequentially inspect the votes, so as to minimize the expected total cost of determining the winner of the election.

An assignment aa to the nn variables XiX_{i} is a vector a{1,,d}na\in\{1,\ldots,d\}^{n}, where aia_{i} is the value assigned to xix_{i}. We use assignments to represent the values of the votes of the nn voters. A partial assignment is a vector b{1,,d,}nb\in\{1,\ldots,d,*\}^{n}, where bi=b_{i}=* indicates that the value of XiX_{i} has not been determined. In discussing vote inspection strategies, we use a partial assignment bb to represent the current state of knowledge regarding the values of the votes inspected so far, with bib_{i} equal to the value of voter ii’s vote if it has been inspected already, and bi=b_{i}=* otherwise. In the same way as for XX, we use Nj(b)N_{j}(b) to denote the number of entries ii of bb such that bi=jb_{i}=j. So Nj(b)N_{j}(b) represents the number of inspected votes that are for candidate jj.

3 Absolute Majority

We describe an adaptive 4-approximation algorithm for the absolute-majority version of our problem. The general idea is as follows. Throughout, we keep a partial assignment bb that records the vote values known so far. For each candidate jj, let gj(b)g_{j}(b) denote the number of known votes for candidates other than jj, capped at n/2\lceil n/2\rceil. We can rule out jj as the absolute-majority winner of the election iff gj(b)=n/2g_{j}(b)=\lceil n/2\rceil. The algorithm has two phases. In the first phase, we inspect the votes ii in increasing order of their costs cic_{i}, until there are at most two candidates jj who could still get enough votes to win the election. Equivalently, Phase 1 ends when the third-smallest value of gj(b)g_{j}(b), for all jj, is n/2\lceil n/2\rceil. At this point, if we have enough information to determine the outcome of the election, we are done. Otherwise, for each of the at most two remaining potential winners jj, we need to determine whether the remaining uninspected votes include enough additional votes for candidate jj to make jj the absolute-majority winner. (If neither do, then the election has no absolute-majority winner.) We take one of these remaining potential winners, calculate the minimum number kk of votes they would need to win, and use the SBB strategy for evaluating kk-of-nn functions to determine whether this candidate is the winner. If not, and if another candidate is still a potential winner, we again use the SBB strategy to check if that candidate is the winner. If not, we know there is no winner. Pseudocode for the algorithm is presented in Algorithm 1 (note that we are more verbose than necessary regarding the output, for readability).

b{}nb\leftarrow\{*\}^{n}
while the value of ff is not certain do
       if the 33rd-smallest (ties broken arbitrarily) gj(b)<n/2g_{j}(b)<\lceil n/2\rceil then
             test the next untested variable in increasing order of cic_{i}
             update bb
            
      else
             αanyjargminj{1,,d}gj(b)\alpha\leftarrow\text{any}\ j\in\operatorname*{arg\,min}_{j\in\{1,\dots,d\}}g_{j}(b)
             βanyjargminj{1,,d}{α}gj(b)\beta\leftarrow\text{any}\ j\in\operatorname*{arg\,min}_{j\in\{1,\dots,d\}\setminus\{\alpha\}}g_{j}(b)
             evaluate if f=αf=\alpha using the SBB strategy
             update bb
             if f=αf=\alpha then
                  return f=αf=\alpha
            else
                   if gβ(b)=n/2g_{\beta}(b)=\lceil n/2\rceil then
                        return f=0f=0
                  else
                        evaluate if f=βf=\beta using the SBB strategy
                         if f=βf=\beta then
                              return f=βf=\beta
                        else
                              return f=0f=0
return the value of ff
Algorithm 1 A 44-apx. adaptive algorithm for evaluating the absolute-majority function

We now prove an approximation bound on the algorithm.

Theorem 1.

Algorithm 1 is an adaptive 44-approximation algorithm for evaluating the absolute-majority function.

Proof.

We analyze the two phases of Algorithm 1: Phase 1 ends when the third-smallest gj(b)g_{j}(b) equals n/2\lceil n/2\rceil; note that Algorithm 1 cannot terminate before that happens. Phase 2 ends when the algorithm terminates. The key to our proof is to show that, in Phase 1, Algorithm 1 spends at most 22 times the cost of an optimal strategy.

We first consider the following situation. Suppose we are in the process of executing Algorithm 1 and Phase 1 has not yet ended. Let bb^{\prime} be the current value of partial assignment bb, and without loss of generality, assume N1(b)Nd(b)N_{1}(b^{\prime})\geq\cdots\geq N_{d}(b^{\prime}). Let m1(b),,md(b)m_{1}(b),\dots,m_{d}(b) denote the distances of functions g1(b),,gd(b)g_{1}(b),\dots,g_{d}(b) to n/2\lceil n/2\rceil, i.e.,

j{1,,d},mj(b)=n/2min{{1,,d}{j}N(b),n/2}.\forall j\in\{1,\dots,d\},\ \ m_{j}(b)=\lceil n/2\rceil-\min\Bigg{\{}\sum_{\ell\in\{1,\dots,d\}\setminus\{j\}}N_{\ell}(b),\lceil n/2\rceil\Bigg{\}}.

Since N1(b)Nd(b)N_{1}(b^{\prime})\geq\cdots\geq N_{d}(b^{\prime}), we have m1(b)md(b)m_{1}(b^{\prime})\geq\cdots\geq m_{d}(b^{\prime}). Since Phase 1 has not yet ended, m3(b)>0m_{3}(b^{\prime})>0. Let SS^{\prime} denote the set of variables tested so far by Algorithm 1.

We will show that the following two facts hold:

  • Fact 1: During its execution, an optimal algorithm needs to test at least m2(b)m_{2}(b^{\prime}) of the variables not in SS^{\prime}.

  • Fact 2: To finish Phase 1, Algorithm 1 needs to test at most m2(b)+m3(b)m_{2}(b^{\prime})+m_{3}(b^{\prime}) additional variables.

To prove Fact 1, note that if f=j0f=j\neq 0, then during its execution, an optimal algorithm needs to test at least n/2+1Nj(b)\lfloor n/2\rfloor+1-N_{j}(b^{\prime}) of the variables not in SS^{\prime}; if f=0f=0, an optimal algorithm needs to test at least m1(b)m_{1}(b^{\prime}) variables not in SS^{\prime}. Since

m2(b)=n/2N1(b)j=3dNj(b)n/2+1N1(b)n/2+1Nj(b)m_{2}(b^{\prime})=\lceil n/2\rceil-N_{1}(b^{\prime})-\sum_{j=3}^{d}N_{j}(b^{\prime})\leq\lfloor n/2\rfloor+1-N_{1}(b^{\prime})\leq\lfloor n/2\rfloor+1-N_{j}(b^{\prime})

and m2(b)m1(b)m_{2}(b^{\prime})\leq m_{1}(b^{\prime}), we have shown that Fact 1 holds, regardless of the value of ff.

We now show Fact 2. Suppose that after performing m2(b)+m3(b)m_{2}(b^{\prime})+m_{3}(b^{\prime}) additional tests, Algorithm 1 still hasn’t terminated. Let b′′b^{\prime\prime} denote the partial assignment after the m2(b)+m3(b)m_{2}(b^{\prime})+m_{3}(b^{\prime}) additional tests are performed. If m2(b′′)0m_{2}(b^{\prime\prime})\neq 0, the number of 22’s among those m2(b)+m3(b)m_{2}(b^{\prime})+m_{3}(b^{\prime}) variables must be more than m3(b)m_{3}(b^{\prime}); if m3(b′′)0m_{3}(b^{\prime\prime})\neq 0, the number of 33’s among those variables must be more than m2(b)m_{2}(b^{\prime}). Those two conditions cannot occur simultaneously, and if one of m2(b′′),m3(b′′)m_{2}(b^{\prime\prime}),m_{3}(b^{\prime\prime}) is not equal to 0, the remaining mj(b′′)m_{j}(b^{\prime\prime}) for j>3j>3 are definitely 0. If both m2(b′′)=m3(b′′)=0m_{2}(b^{\prime\prime})=m_{3}(b^{\prime\prime})=0, we can use this argument again for m4(b′′)m_{4}(b^{\prime\prime}) and m5(b′′)m_{5}(b^{\prime\prime}). If still not finished, we can use it for m6(b′′)m_{6}(b^{\prime\prime}) and m7(b′′)m_{7}(b^{\prime\prime}), etc. Hence, there are at most two mj(b′′)m_{j}(b^{\prime\prime}) that are not equal to 0 after testing the additional m2(b)+m3(b)m_{2}(b^{\prime})+m_{3}(b^{\prime}) variables because only m1(b′′)m_{1}(b^{\prime\prime}) and one other mj(b′′)m_{j}(b^{\prime\prime}) could be greater than 0. Thus Phase 1 has ended, proving Fact 2.

Having proved the above two facts, which relate to the status of Algorithm 1 when it has not yet completed Phase 1, we now analyze the total cost spent in Phase 1, relative to the total cost spent in an optimal algorithm. Let σ\sigma denote the indices of variables such that

cσ1cσ2cσn.c_{\sigma_{1}}\leq c_{\sigma_{2}}\leq\cdots\leq c_{\sigma_{n}}.

Let kk be the number of variables tested by Algorithm 1 in Phase 1. Thus the variables tested in Phase 1 are {xσ1,,xσk}\{x_{\sigma_{1}},\dots,x_{\sigma_{k}}\}.

Now let bb^{\prime} be the partial assignment right after Algorithm 1 tests xσ1,,xσk1x_{\sigma_{1}},\dots,x_{\sigma_{k-1}}. We define ϕ1,,ϕd\phi_{1},\dots,\phi_{d} such that

mϕ1(b)mϕ2(b)mϕd(b).m_{\phi_{1}}(b^{\prime})\geq m_{\phi_{2}}(b^{\prime})\geq\cdots\geq m_{\phi_{d}}(b^{\prime}).

Since testing the next variable xσkx_{\sigma_{k}} will end Phase 1, mϕ3(b)=1m_{\phi_{3}}(b^{\prime})=1, and because testing {xσ1,,xσk1}\{x_{\sigma_{1}},...,x_{\sigma_{k-1}}\} does not provide enough information to determine the value of ff, an optimal algorithm needs to test at least one variable from {xσk,,xσn}\{x_{\sigma_{k}},\dots,x_{\sigma_{n}}\} during its execution. Hence, we can compare the most expensive variable tested by an optimal algorithm, which costs at least cσkc_{\sigma_{k}}, with the last two variables tested by Algorithm 1 in Phase 1, which cost cσk1+cσkc_{\sigma_{k-1}}+c_{\sigma_{k}}.

Now, suppose bb^{\prime} is the partial assignment right after testing xσ1,,xσk3x_{\sigma_{1}},\dots,x_{\sigma_{k-3}}, and consider the corresponding ϕ1,,ϕd\phi_{1},\dots,\phi_{d}. Because there are exactly 33 variables tested in Phase 1 after {xσ1,,xσk3}\{x_{\sigma_{1}},\dots,x_{\sigma_{k-3}}\}, and by Fact 2, mϕ2(b)+mϕ3(b)m_{\phi_{2}}(b^{\prime})+m_{\phi_{3}}(b^{\prime}) is an upper bound on the number of additional variables tested in Phase 1, we have that 3mϕ2(b)+mϕ3(b)3\leq m_{\phi_{2}}(b^{\prime})+m_{\phi_{3}}(b^{\prime}). Since the mjm_{j}’s are integer-valued functions, we have mϕ2(b)2m_{\phi_{2}}(b^{\prime})\geq 2. By Fact 1, an optimal algorithm needs to test at least mϕ2(b)m_{\phi_{2}}(b^{\prime}) variables not in {xσ1,,xσk3}\{x_{\sigma_{1}},\dots,x_{\sigma_{k-3}}\} during its execution, so it needs to test at least two variables from {xσk2,,xσn}\{x_{\sigma_{k-2}},\dots,x_{\sigma_{n}}\}. Hence, we can compare the second-most expensive variable tested by an optimal algorithm, which costs at least cσk2c_{\sigma_{k-2}}, with the third-last and the fourth-last variables tested by Algorithm 1 in Phase 1, which cost cσk3+cσk2c_{\sigma_{k-3}}+c_{\sigma_{k-2}}.

More generally, let bb^{\prime} denote the partial assignment right after having tested variables xσ1,,xσkx_{\sigma_{1}},\dots,x_{\sigma_{k-\ell}} where 1k11\leq\ell\leq k-1, and again consider the corresponding ϕ1,,ϕd\phi_{1},\dots,\phi_{d}. Algorithm 1 does \ell tests in Phase 11 after testing xσ1,,xσkx_{\sigma_{1}},\dots,x_{\sigma_{k-\ell}}, where mϕ2(b)+mϕ3(b)2mϕ2(b)\ell\leq m_{\phi_{2}}(b^{\prime})+m_{\phi_{3}}(b^{\prime})\leq 2m_{\phi_{2}}(b^{\prime}) by Fact 11. Applying Fact 2 then yields that an optimal algorithm needs to test at least mϕ2(b)/2m_{\phi_{2}}(b^{\prime})\geq\lceil\ell/2\rceil variables from {xσk+1,,xσn}\{x_{\sigma_{k-\ell+1}},\dots,x_{\sigma_{n}}\}. Hence, the /2\lceil\ell/2\rceilth-most expensive variable tested by an optimal algorithm costs at least cσk+1c_{\sigma_{k-\ell+1}}. On the other hand, the \ellth-last and the (+1)(\ell+1)st-last variable tested by Algorithm 1 in Phase 1 cost cσk+1+cσkc_{\sigma_{k-\ell+1}}+c_{\sigma_{k-\ell}} in total.

To conclude our analysis of Phase 1, the cost Algorithm 1 spends in Phase 1 is upper-bounded by twice the total cost of the k/2\lceil k/2\rceil most expensive variables tested by an optimal algorithm, and hence it is also upper-bounded by twice the total cost of all variables tested by an optimal algorithm.

After Phase 1, there are three remaining possibilities: f=αf=\alpha, f=βf=\beta and f=0f=0. Let 𝖮𝖯𝖳\mathsf{OPT} denote an optimal adaptive strategy for the problem. If f=αf=\alpha, clearly, our algorithm queries the remaining variables optimally; if f=βf=\beta, since we always need to prove fαf\neq\alpha, our algorithm spends at most 2E[𝖮𝖯𝖳]2E[\mathsf{OPT}] in Phase 2; if f=0f=0, we need to show fαf\neq\alpha and fβf\neq\beta, hence, our algorithm spends at most 2E[𝖮𝖯𝖳]2E[\mathsf{OPT}] in Phase 2 as well. Combining the cost we spent in Phase 1, Algorithm 1 is a 44-approximation algorithm for evaluating an absolute-majority function when ci>0c_{i}>0. ∎

The SBB strategy is a highly adaptive strategy; it is easy to see that Algorithm 1 may require Ω(n)\Omega(n) rounds of adaptivity. Motivated by this, we also sketch a modification of this algorithm such that the new algorithm needs only 3 rounds of adaptivity, but the approximation ratio is increased slightly from 4 to 6. Specifically, we replace Phase 2 which contains the two runs of the SBB strategy. After Phase 1 is completed, if we are still uncertain about the result of the election, we can first evaluate if α\alpha is the absolute-majority winner by using the non-adaptive 2-approximation algorithm for evaluating a kk-of-nn function, which was introduced in Gkenosis et al. [GGHK18]. This algorithm performs a modified (cost-sensitive) round robin between two orderings, one in increasing order of ci/pi,αc_{i}/p_{i,\alpha}, and the other in increasing order of ci/(1pi,α)c_{i}/(1-p_{i,\alpha}). The modified round robin is due to Allen et al. [AHKÜ17] and we present the pseudocode in Appendix B (as it is used as part of another algorithm). It keeps track of the next vote to be inspected in each ordering, and the total cost incurred so far for each ordering. It computes, for each ordering, the sum of the cost incurred so far, plus the cost of the next test. It performs the next test from the ordering for which this sum is smaller (breaking ties arbitrarily). We call this Phase 2.

Since the problem of evaluating ff requires determining whether or not α\alpha is the winner, the cost spent in Phase 2 is upper-bounded by twice the expected cost of evaluating the value of ff. If we know α\alpha is not the absolute-majority winner after Phase 2, we start Phase 3 by evaluating if β\beta is the winner using the same algorithm in Gkenosis et al. This will again add at most twice the expected cost of evaluating ff. Clearly, if both α\alpha and β\beta are not the winner, there is no absolute-majority winner in the election..

We thus have the following theorem.

Theorem 2.

There exists a 66-approximation algorithm for evaluating the absolute-majority function with 33 rounds of adaptivity.

We note that it is possible to reduce the rounds of adaptivity from 3 to 2 using a modified round-robin applied to 4 different non-adaptive orderings. We give details in Appendix B.

4 Relative Majority

We now turn our attention to the relative-majority version of our problem and present an 88-approximation algorithm. Similar to our previous approach, we keep a partial assignment bb to track the values of inspected votes and also to indicate which vote values are not yet known. To show that a candidate jj has more votes than a candidate kk is equivalent to showing that

Nk(b)+N(b)<Nj(b).N_{k}(b)+N_{*}(b)<N_{j}(b).

The fact that N(b)=nk{1,,d}Nk(b)N_{*}(b)=n-\sum_{k\in\{1,\dots,d\}}N_{k}(b) motivates designing

gj,k(b)=min{Nj(b)+{1,,d}{k}N(b),n+1}g_{j,k}(b)=\min\Bigg{\{}N_{j}(b)+\sum_{\ell\in\{1,\dots,d\}\setminus\{k\}}N_{\ell}(b),n+1\Bigg{\}}

where gj,k(b)=n+1g_{j,k}(b)=n+1 iff candidate jj is guaranteed to have more votes than candidate kk. Hence, to conclude that jj is a relative-majority winner, we must have gj,k(b)=n+1g_{j,k}(b)=n+1 for all k{1,,d}{j}k\in\{1,\dots,d\}\setminus\{j\}. Our algorithm again has two phases. In Phase 1, we still inspect the votes in increasing order of their costs. We end Phase 1 when there are at most two candidates who can possibly win and let α,β\alpha,\beta denote the two candidates. Then, there are at most three possible results of the election: α\alpha wins, β\beta wins, or it is a tie. We will first determine if α\alpha wins or not. Recall that, if α\alpha wins, they must have more votes than β\beta, which means gα,β(b)g_{\alpha,\beta}(b) needs to reach n+1n+1 at some point. Since a vote for α\alpha,β\beta, or any candidate in {1,,d}{α,β}\{1,\dots,d\}\setminus\{\alpha,\beta\} contributes 22, 0, or 11 to gα,βg_{\alpha,\beta}, respectively (until threshold n+1n+1 is reached), we can use the Adaptive Dual Greedy algorithm introduced by Deshpande et al. [DHK16] to evaluate whether gα,β(b)g_{\alpha,\beta}(b) reaches its threshold value n+1n+1. If yes, clearly α\alpha is the winner. If not, then we test the remaining variables in increasing order of ci/(1pi,α)c_{i}/(1-p_{i,\alpha}) until it is certain whether β\beta is the winner or there is a tie. As shown below, if all remaining votes are for α\alpha, then α\alpha and β\beta are tied, otherwise β\beta is the winner. The pseudocode is presented in Algorithm 2 (again, this is slightly more verbose than necessary for readability).

b{}nb\leftarrow\{*\}^{n}
while the value of ff is not certain do
       if there are more than 22 candidates that can possibly win then
             test the next untested variable in increasing order of cic_{i}
             update bb
            
      else
             αanyjargmaxj{1,,d}Nj(b)\alpha\leftarrow\text{any}\ j\in\operatorname*{arg\,max}_{j\in\{1,\dots,d\}}N_{j}(b)
             βanyjargmaxj{1,,d}{α}Nj(b)\beta\leftarrow\text{any}\ j\in\operatorname*{arg\,max}_{j\in\{1,\dots,d\}\setminus\{\alpha\}}N_{j}(b)
             evaluate if f=αf=\alpha by using the Adaptive Dual Greedy algorithm (cf. [DHK16])
             if f=αf=\alpha then
                   return f=αf=\alpha
                  
            else
                   evaluate if f=βf=\beta by testing remaining variables in increasing order of ci1pi,α\frac{c_{i}}{1-p_{i,\alpha}}
                   if f=βf=\beta then
                         return f=βf=\beta
                  else
                         return f=0f=0
return the value of ff
Algorithm 2 An 8-apx. adaptive algorithm for evaluating the relative-majority function

We now give an analysis of the algorithm.

Lemma 1.

The cost that Algorithm 2 spends in Phase 1 is at most 44 times the cost of an optimal algorithm.

Proof.

For each j{1,,d}j\in\{1,\dots,d\} and k{1,,d}{j}k\in\{1,\dots,d\}\setminus\{j\}, we define mj,k(b)m_{j,k}(b) to be the distance from gj,k(b)g_{j,k}(b) to n+1n+1, so we have

mj,k(b)=n+1gj,k(b),m_{j,k}(b)=n+1-g_{j,k}(b),

and define Mj(b)M_{j}(b) such that

Mj(b)=maxk{1,,d}{j}mj,k(b),M_{j}(b)=\max_{k\in\{1,\dots,d\}\setminus\{j\}}m_{j,k}(b),

which is the largest distance among the d1d-1 utility functions gj,kg_{j,k} of candidate jj to n+1n+1.

Recall the definition of the relative-majority function ff. We can see that, when f=0f=0, which means it is a draw situation, clearly we need to test all variables. When there exists a relative-majority winner, let bb^{\prime} be the partial assignment at any moment before Algorithm 2 terminates, and let jj^{*} be an arbitrary element in the set argminj{1,,d}Mj(b)\operatorname*{arg\,min}_{j\in\{1,\dots,d\}}M_{j}(b^{\prime}). Then, any optimal algorithm needs to test at least Mj(b)/2\lceil M_{j^{*}}(b^{\prime})/2\rceil variables from the untested variables since any single test can contribute at most 22 to any gj,kg_{j,k}. Here we note that Mj(b)>0M_{j^{*}}(b^{\prime})>0, otherwise, in bb^{\prime}, jj^{*} would have strictly more votes than all other candidates, and it would already be known that f=jf=j^{*}.

Now we define γ,δ{1,,d}{j}\gamma,\delta\in\{1,\dots,d\}\setminus\{j^{*}\} such that

k{1,,d}{γ,δ,j},Mj(b)=mj,γ(b)mj,δ(b)mj,k(b),\forall k\in\{1,\dots,d\}\setminus\{\gamma,\delta,j^{*}\},\ \ M_{j^{*}}(b^{\prime})=m_{j^{*},\gamma}(b^{\prime})\geq m_{j^{*},\delta}(b^{\prime})\geq m_{j^{*},k}(b^{\prime}),

which implies that

k{1,,d}{γ,δ,j},Nγ(b)Nδ(b)Nk(b)\forall k\in\{1,\dots,d\}\setminus\{\gamma,\delta,j^{*}\},\ \ N_{\gamma}(b^{\prime})\leq N_{\delta}(b^{\prime})\leq N_{k}(b^{\prime})

since mj,k(b)=n+1gj,k(b)m_{j^{*},k}(b^{\prime})=n+1-g_{j^{*},k}(b^{\prime}) for any k{1,,d}{j}k\in\{1,\dots,d\}\setminus\{j^{*}\}.

Suppose Phase 1 has not ended, meaning that there are more than two candidates who can still win at this moment. Then, we claim that testing any mj,γ(b)+mj,δ(b)m_{j^{*},\gamma}(b^{\prime})+m_{j^{*},\delta}(b^{\prime}) additional variables will end Phase 1.

We now prove this claim. Let mγ=mj,γ(b)m_{\gamma}=m_{j^{*},\gamma}(b^{\prime}), mδ=mj,δ(b)m_{\delta}=m_{j^{*},\delta}(b^{\prime}). Let b′′b^{\prime\prime} denote the partial assignment after testing any mγ+mδm_{\gamma}+m_{\delta} additional variables. Suppose there exists a μ{1,,d}{j}\mu\in\{1,\dots,d\}\setminus\{j^{*}\} such that mj,μ(b′′)>0m_{j^{*},\mu}(b^{\prime\prime})>0. Then

mj,μ(b′′)>0\displaystyle m_{j^{*},\mu}(b^{\prime\prime})>0
\displaystyle\Leftrightarrow\ \ mj,μ(b)(Nj(b′′)Nj(b))mγmδ+(Nμ(b′′)Nμ(b))>0\displaystyle m_{j^{*},\mu}(b^{\prime})-(N_{j^{*}}(b^{\prime\prime})-N_{j^{*}}(b^{\prime}))-m_{\gamma}-m_{\delta}+(N_{\mu}(b^{\prime\prime})-N_{\mu}(b^{\prime}))>0
\displaystyle\Leftrightarrow\ \ Nμ(b′′)Nμ(b)>mγ+mδ+Nj(b′′)Nj(b)mj,μ(b′′)\displaystyle N_{\mu}(b^{\prime\prime})-N_{\mu}(b^{\prime})>m_{\gamma}+m_{\delta}+N_{j^{*}}(b^{\prime\prime})-N_{j^{*}}(b^{\prime})-m_{j^{*},\mu}(b^{\prime\prime})
\displaystyle\Leftrightarrow\ \ Nμ(b′′)Nμ(b)>(n+1gj,γ(b))+(n+1gj,δ(b))\displaystyle N_{\mu}(b^{\prime\prime})-N_{\mu}(b^{\prime})>(n+1-g_{j^{*},\gamma}(b^{\prime}))+(n+1-g_{j^{*},\delta}(b^{\prime}))
+Nj(b′′)Nj(b)(n+1gj,μ(b))\displaystyle\hskip 176.407pt+N_{j^{*}}(b^{\prime\prime})-N_{j^{*}}(b^{\prime})-(n+1-g_{j^{*},\mu}(b^{\prime}))
\displaystyle\Leftrightarrow\ \ Nμ(b′′)Nμ(b)>(n+1)gj,γ(b)gj,δ(b)+gj,μ(b)+Nj(b′′)Nj(b).\displaystyle N_{\mu}(b^{\prime\prime})-N_{\mu}(b^{\prime})>(n+1)-g_{j^{*},\gamma}(b^{\prime})-g_{j^{*},\delta}(b^{\prime})+g_{j^{*},\mu}(b^{\prime})+N_{j^{*}}(b^{\prime\prime})-N_{j^{*}}(b^{\prime}).

Similarly, if there exists a ν{1,,d}{j,μ}\nu\in\{1,\dots,d\}\setminus\{j^{*},\mu\} such that mj,ν(b′′)>0m_{j^{*},\nu}(b^{\prime\prime})>0, we have

Nν(b′′)Nν(b)>(n+1)gj,γ(b)gj,δ(b)+gj,ν(b)+Nj(b′′)Nj(b).N_{\nu}(b^{\prime\prime})-N_{\nu}(b^{\prime})>(n+1)-g_{j^{*},\gamma}(b^{\prime})-g_{j^{*},\delta}(b^{\prime})+g_{j^{*},\nu}(b^{\prime})+N_{j^{*}}(b^{\prime\prime})-N_{j^{*}}(b^{\prime}).

Then, we can see that if both mj,μ(b′′)>0m_{j^{*},\mu}(b^{\prime\prime})>0 and mj,ν(b′′)>0m_{j^{*},\nu}(b^{\prime\prime})>0 hold, we have

Nμ(b′′)Nμ(b)+Nν(b′′)Nν(b)\displaystyle N_{\mu}(b^{\prime\prime})-N_{\mu}(b^{\prime})+N_{\nu}(b^{\prime\prime})-N_{\nu}(b^{\prime})
>\displaystyle>\; 2(n+1gj,γ(b)gj,δ(b))+gj,μ(b)+gj,ν(b)+2(Nj(b′′)Nj(b))\displaystyle 2(n+1-g_{j^{*},\gamma}(b^{\prime})-g_{j^{*},\delta}(b^{\prime}))+g_{j^{*},\mu}(b^{\prime})+g_{j^{*},\nu}(b^{\prime})+2(N_{j^{*}}(b^{\prime\prime})-N_{j^{*}}(b^{\prime}))
\displaystyle\geq\; 2(n+1)gj,γ(b)gj,δ(b)+2(Nj(b′′)Nj(b))\displaystyle 2(n+1)-g_{j^{*},\gamma}(b^{\prime})-g_{j^{*},\delta}(b^{\prime})+2(N_{j^{*}}(b^{\prime\prime})-N_{j^{*}}(b^{\prime}))
\displaystyle\geq\; mγ+mδ,\displaystyle m_{\gamma}+m_{\delta},

where the second inequality comes from gj,μ(b)+gj,ν(b)gj,γ(b)+gj,δ(b)g_{j^{*},\mu}(b^{\prime})+g_{j^{*},\nu}(b^{\prime})\geq g_{j^{*},\gamma}(b^{\prime})+g_{j^{*},\delta}(b^{\prime}) and the third inequality comes from Nj(b′′)Nj(b)0N_{j^{*}}(b^{\prime\prime})-N_{j^{*}}(b^{\prime})\geq 0. We have thus shown that Nμ(b′′)Nμ(b)+Nν(b′′)Nν(b)>mγ+mδN_{\mu}(b^{\prime\prime})-N_{\mu}(b^{\prime})+N_{\nu}(b^{\prime\prime})-N_{\nu}(b^{\prime})>m_{\gamma}+m_{\delta}, which is a contradiction because it implies that more than mγ+mδm_{\gamma}+m_{\delta} additional votes were inspected. Therefore, there is at most one kk such that mj,k(b′′)>0m_{j^{*},k}(b^{\prime\prime})>0. This proves the claim that inspecting any mγ+mδm_{\gamma}+m_{\delta} additional votes will end Phase 1.

By definition, mj,k(b′′)=0m_{j^{*},k}(b^{\prime\prime})=0 is equivalent to gj,k(b′′)=n+1g_{j^{*},k}(b^{\prime\prime})=n+1, which means jj^{*} has strictly more votes than kk. This eliminates the possibility that kk is the winner. Since there exists at most one kk^{*} that satisfies mj,k0m_{j^{*},k^{*}}\neq 0, there are at most two candidates, jj^{*} and kk^{*}, who can possibly win.

Now we can use a similar argument as in the proof of Theorem 1 to prove the rest of the lemma. Let σ1,,σn\sigma_{1},\dots,\sigma_{n} denote the indices of variables such that cσ1cσ2cσnc_{\sigma_{1}}\leq c_{\sigma_{2}}\leq\cdots\leq c_{\sigma_{n}}. In an arbitrary realization, we assume at the time Phase 1 ends, Algorithm 2 has tested xσ1,,xσkx_{\sigma_{1}},\dots,x_{\sigma_{k}}.

Let bb^{\prime} denote the partial assignment when we have obtained the values of xσ1,,xσkx_{\sigma_{1}},\dots,x_{\sigma_{k-\ell}} where 1\ell\geq 1. From our previous claim, we know that

mj,γ(b)+mj,δ(b)2mj,γ(b).\ell\leq m_{j^{*},\gamma}(b^{\prime})+m_{j^{*},\delta}(b^{\prime})\leq 2\cdot m_{j^{*},\gamma}(b^{\prime}).

On the other hand, we know that an optimal algorithm needs to test at least mj,γ(b)/2\lceil m_{j^{*},\gamma}(b^{\prime})/2\rceil variables outside of {xσ1,,xσk}\{x_{\sigma_{1}},\dots,x_{\sigma_{k-\ell}}\}, which implies that an optimal algorithm needs to test at least /4\lceil\ell/4\rceil variables from {xσk+1,,xn}\{x_{\sigma_{k-\ell+1}},\dots,x_{n}\}. Hence, for example, by setting =1\ell=1, we can compare the most expensive variable tested by an optimal algorithm, which costs at least cσkc_{\sigma_{k}}, with the total costs of {xσk3,xσk2,xσk1,xσk}\{x_{\sigma_{k-3}},x_{\sigma_{k-2}},x_{\sigma_{k-1}},x_{\sigma_{k}}\}; by setting =5\ell=5, we can compare the second-most expensive variable tested by an optimal algorithm, which costs at least cσk4c_{\sigma_{k-4}}, with the total costs of {xσk7,xσk6,xσk5,xσk4}\{x_{\sigma_{k-7}},x_{\sigma_{k-6}},x_{\sigma_{k-5}},x_{\sigma_{k-4}}\}. Generalizing these observations, we can see that the /4\lceil\ell/4\rceilth-most expensive variable tested by any optimal algorithm costs at least cσk+1c_{\sigma_{k-\ell+1}}. Hence, the total cost that Algorithm 2 spends in Phase 1, cσ1++cσkc_{\sigma_{1}}+\cdots+c_{\sigma_{k}}, is at most 4 times the cost of an optimal algorithm. ∎

Theorem 3.

Algorithm 2 is an adaptive 8-approximation algorithm for evaluating the relative-majority function.

Proof.

Let 𝖮𝖯𝖳\mathsf{OPT} denote an optimal algorithm. By using Lemma 1, we know that Algorithm 2 spent at most 4E[𝖮𝖯𝖳]4E[\mathsf{OPT}] in Phase 1. Hence, we just need to solve the induced problem after Phase 1.

Let α,β\alpha,\beta denote the two candidates who can possibly win. We know that evaluating function ff will also evaluate if f=αf=\alpha. Hence, the expected cost of an optimal algorithm for evaluating if α\alpha wins is upper-bounded by the expected cost of an optimal algorithm for evaluating the result of the election. Since there are only two candidates α,β\alpha,\beta remaining, evaluating if f=αf=\alpha is equivalent to evaluating if α\alpha has more votes than β\beta. This problem can be understood as evaluating a variant of a linear threshold formula that was studied by Deshpande et al. [DHK16]. In particular, let bb^{\prime} denote the partial assignment right after we figured α,β\alpha,\beta, we need to determine whether or not the following inequality, with variables yiy_{i}, holds:

Nα(b)+(k{1,,d}{β}Nk(b))+i:bi=yin+1.N_{\alpha}(b^{\prime})+\Bigg{(}\sum_{k\in\{1,\dots,d\}\setminus\{\beta\}}N_{k}(b^{\prime})\Bigg{)}+\sum_{i:b_{i}^{\prime}=*}y_{i}\geq n+1.

Here yi=2y_{i}=2 if we find xi=αx_{i}=\alpha; yi=1y_{i}=1 if xi{1,,d}{α,β}x_{i}\in\{1,\dots,d\}\setminus\{\alpha,\beta\}; and yi=0y_{i}=0 if xi=βx_{i}=\beta. This is a linear threshold evaluation problem, involving ternary rather than binary variables. The Adaptive Dual Greedy algorithm of Deshpande et al. can be used to solve this ternary linear threshold function evaluation problem, and determine whether f=αf=\alpha. A slight modification of the analysis used by Deshpande et al. shows that it spends at most 3E[𝖮𝖯𝖳]3E[\mathsf{OPT}]. We defer details of the use of Adaptive Dual Greedy and its approximation bound to Appendix A.

Suppose fαf\neq\alpha, what remains is to decide if f=0f=0 or f=βf=\beta. Recall that at the point we know fαf\neq\alpha, let bb^{\prime} be the partial assignment, we have

Nα(b)+N(b)Nβ(b).N_{\alpha}(b^{\prime})+N_{*}(b^{\prime})\leq N_{\beta}(b^{\prime}).

This means that, when the equality does not hold, we know f=βf=\beta, since even if all the remaining variables have value α\alpha, β\beta will have strictly more votes. Therefore, the induced problem can be considered as evaluating a conjunction (i.e., checking whether xi=αx_{i}=\alpha for all untested xix_{i}’s), which can be solved optimally by using the SBB strategy that tests the remaining variables in increasing order of ci/(1pi,α)c_{i}/(1-p_{i,\alpha}).

Hence, Algorithm 2 spends at most 4E[𝖮𝖯𝖳]+3E[𝖮𝖯𝖳]+E[𝖮𝖯𝖳]=8E[𝖮𝖯𝖳]4E[\mathsf{OPT}]+3E[\mathsf{OPT}]+E[\mathsf{OPT}]=8E[\mathsf{OPT}]. ∎

5 Conclusion

In this paper, we have introduced the problem of quickly determining the winner of an election. We have also given the first constant-factor approximation algorithms for this problem in both the absolute-majority and the relative-majority case. While the approximation guarantees are one-digit numbers, we have no reason to believe that they match some type of approximation hardness. In fact, even NP-hardness remains an open problem. Assuming our problem is NP-hard, proving this is the case might require new techniques. Some stochastic evaluation problems are known to be NP-hard, for example, evaluation of Boolean linear threshold functions (cf. [Ünl04]) and evaluation of ss-tt connectivity in general graphs [FFX+17]. However, it is open whether a number of Stochastic Score function evaluation problems, related to our problem, are NP-hard [AJO11, GGHK22, GHKL22]. The question of whether the stochastic evaluation problem for Boolean read-once formulas is NP-hard has been open since the 1970’s (cf. [Ünl04]).

A structural question left open by our work is whether the adaptivity gap of our problem is constant. The strongest lower bound on the adaptivity gap that we are aware of comes from the lower bound of 1.51.5 for kk-of-nn functions [PS22]. Extending the corresponding construction, one may try to consider an instance in which there are some votes of negligible cost that determine a forerunner, who can then be proved to be a winner cheaply by an adaptive strategy (by selecting the corresponding votes) but not by a non-adaptive strategy (because it does not know which votes to inspect). The extension is, however, not straightforward. One is restricted to certain distributions of who is the forerunner, and even votes for another candidate make progress on goal functions associated with other candidates.

Many natural extensions and variants of our model are possible, e.g., to other voting systems. A relatively small extension would concern larger target numbers of votes than n/2n/2, possibly even candidate-specific ones. Such scenarios can be approached by adding an appropriate number of 0-cost votes for each candidate (i.e., with probability close enough to 11) and then using our algorithm for the absolute-majority version. Similarly, one could consider weighted voting systems (with modern applications in liquid democracy or voting in shareholder meetings). Ranked-voting systems could also be investigated.

References

  • [AAK19] Arpit Agarwal, Sepehr Assadi, and Sanjeev Khanna. Stochastic submodular cover with limited adaptivity. In ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 323–342, 2019.
  • [AHKÜ17] Sarah R Allen, Lisa Hellerstein, Devorah Kletenik, and Tonguç Ünlüyurt. Evaluation of monotone dnf formulas. Algorithmica, 77(3):661–685, 2017.
  • [AJO11] Jayadev Acharya, Ashkan Jafarpour, and Alon Orlitsky. Expected query complexity of symmetric Boolean functions. In Allerton Conference on Communication, Control, and Computing (Allerton), pages 26–29, 2011.
  • [BBMtV15] Katalin Bognar, Tilman Börgers, and Moritz Meyer-ter Vehn. An optimal voting procedure when voting is costly. Journal of Economic Theory, 159:1056–1073, 2015.
  • [BD81] Yosi Ben-Dov. Optimal testing procedures for special structures of coherent systems. Management Science, 27(12):1410–1420, 1981.
  • [BLT21] Guy Blanc, Jane Lange, and Li-Yang Tan. Query strategies for priced information, revisited. In ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1638–1650, 2021.
  • [CFG+00] Moses Charikar, Ronald Fagin, Venkatesan Guruswami, Jon Kleinberg, Prabhakar Raghavan, and Amit Sahai. Query strategies for priced information. In ACM Symposium on Theory of Computing (STOC), pages 582–591, 2000.
  • [DHK16] Amol Deshpande, Lisa Hellerstein, and Devorah Kletenik. Approximation algorithms for stochastic submodular set cover with applications to Boolean function evaluation and min-knapsack. ACM Transactions on Algorithms (TALG), 12(3):1–28, 2016.
  • [FFX+17] Luoyi Fu, Xinzhe Fu, Zhiying Xu, Qianyang Peng, Xinbing Wang, and Songwu Lu. Determining source–destination connectivity in uncertain networks: Modeling and solutions. IEEE/ACM Transactions on Networking, 25(6):3237–3252, 2017.
  • [GGHK18] Dimitrios Gkenosis, Nathaniel Grammel, Lisa Hellerstein, and Devorah Kletenik. The stochastic score classification problem. In European Symposium on Algorithms (ESA), pages 36:1–36:14, 2018.
  • [GGHK22] Dimitrios Gkenosis, Nathaniel Grammel, Lisa Hellerstein, and Devorah Kletenik. The stochastic Boolean function evaluation problem for symmetric Boolean functions. Discrete Applied Mathematics, 309:269–277, 2022.
  • [GGN21] Rohan Ghuge, Anupam Gupta, and Viswanath Nagarajan. The power of adaptivity for stochastic submodular cover. In International Conference on Machine Learning (ICML), pages 3702–3712, 2021.
  • [GGN22] Rohan Ghuge, Anupam Gupta, and Viswanath Nagarajan. Non-adaptive stochastic score classification and explainable halfspace evaluation. In International Conference on Integer Programming and Combinatorial Optimization (IPCO), pages 277–290, 2022.
  • [GHKL22] Nathaniel Grammel, Lisa Hellerstein, Devorah Kletenik, and Naifeng Liu. Algorithms for the unit-cost stochastic score classification problem. Algorithmica, 84(10):3054–3074, 2022.
  • [GS09] Alex Gershkov and Balázs Szentes. Optimal voting schemes with costly information acquisition. Journal of Economic Theory, 144(1):36–68, 2009.
  • [GV06] Michel Goemans and Jan Vondrák. Stochastic covering and adaptivity. In Latin American Theoretical Informatics Symposium (LATIN), pages 532–543, 2006.
  • [Liu22] Naifeng Liu. Two 6-approximation algorithms for the stochastic score classification problem. CoRR, abs/2212.02370, 2022.
  • [PS22] Benedikt M. Plank and Kevin Schewior. Simple algorithms for stochastic score classification with small approximation ratios. CoRR, abs/2211.14082, 2022.
  • [SB84] Salam Salloum and Melvin A Breuer. An optimum testing algorithm for some symmetric coherent systems. Journal of Mathematical Analysis and Applications, 101(1):170–194, 1984.
  • [Ünl04] Tonguç Ünlüyurt. Sequential testing of complex systems: a review. Discrete Applied Mathematics, 142(1-3):189–205, 2004.

Appendix A Adaptive Dual Greedy

The Adaptive Dual Greedy algorithm of Deshpande et al. is an approximation algorithm for the Stochastic Submodular Cover problem [DHK16]. After presenting a few definitions, we begin by defining the Stochastic Submodular Cover problem and presenting the approximation bound achieved by the Adaptive Dual Greedy (ADG) algorithm. We then show how to use ADG to solve the absolute-majority problem, and how to apply the approximation bound for ADG to prove an approximation bound for the absolute-majority problem.

Deshpande et al. used ADG to get a 3-approximation algorithm for the Stochastic Boolean Function Evaluation problem for Boolean linear threshold functions. The analysis proving the approximation factor of 3 does not immediately apply to our use of ADG in Algorithm 2, because there we need to evaluate a linear threshold function with inputs in {0,1,2}\{0,1,2\}, rather than with Boolean inputs. At the end of this section, we verify that the approximation factor of 3 also holds for our ternary linear threshold evaluation problem.

A.1 Definitions

For two partial assignments b,b([d]{})nb,b^{\prime}\in([d]\cup\{*\})^{n}, we say bb^{\prime} is an extension of bb, denoted by bbb^{\prime}\succeq b, if for all i[n] where bii\in[n]\text{ where }b_{i}\neq*, it holds that bi=bib_{i}^{\prime}=b_{i}.

We say that a partial assignment b([d]{})nb\in([d]\cup\{*\})^{n} is a zz-certificate for a function ff defined on [d]n[d]^{n} if for all assignments a[d]na\in[d]^{n}, aba\succeq b implies that f(a)=zf(a)=z. We write f(b)=zf(b)=z to denote that partial assignment bb is a zz-certificate. Furthermore, we say bb is a certificate of function ff, if bb is a zz-certificate of function ff for any output value zz that function ff can have. If aa is a fixed assignment in [d]n[d]^{n}, we say that a subset SS of {x1,,xn}\{x_{1},\dots,x_{n}\} is a certificate for the function ff (for assignment aa) if the partial assignment bb with bi=aib_{i}=a_{i} for all xix_{i} in SS, and bi=b_{i}=* for all xix_{i} not in SS, is a certificate for ff.

A.2 Stochastic Submodular Cover

The inputs to the Stochastic Submodular Cover problem include a utility function g:([d]{})n0g:([d]\cup\{*\})^{n}\rightarrow\mathbb{Z}^{\geq 0}, and a positive integer QQ that we call the goal value. The function gg is given by an oracle, and has the following properties: (1) it is monotone and submodular, according to the definitions given below, (2) g(,,)=0g(*,\ldots,*)=0, and (3) for all x[d]nx\in[d]^{n}, g(x)=Qg(x)=Q. The other inputs to the problem are costs ci0c_{i}\geq 0 for i[n]i\in[n], and probabilities pi,jp_{i,j} for i[n]i\in[n] and j[d]j\in[d], such that pi,j(0,1)p_{i,j}\in(0,1). As in the absolute-majority problem, we assume that the value of each input xix_{i} to gg is a random variable, whose value is determined by performing a test with cost cic_{i}. The probability that xi=jx_{i}=j is pi,jp_{i,j}. We use partial assignment b([d])nb\in([d]\cup*)^{n} to represent the outcomes of the tests performed so far. The problem is to find an adaptive strategy for achieving g(b)=Qg(b)=Q with minimum expected cost.

We say that utility function gg is monotone if g(b)g(b′′)g(b^{\prime})\geq g(b^{\prime\prime}) whenever bb′′b^{\prime}\succeq b^{\prime\prime}. We say it is submodular if for any two partial assignments bb′′b^{\prime}\succeq b^{\prime\prime}, i[n]i\in[n] such that bi=bi′′=b^{\prime}_{i}=b^{\prime\prime}_{i}=*, and j[d]j\in[d], we have g(bij)g(b)g(bij′′)g(b′′)g(b^{\prime}_{i\leftarrow j})-g(b^{\prime})\leq g(b^{\prime\prime}_{i\leftarrow j})-g(b^{\prime\prime}). Here the subscript means that the partial assignment is modified by changing the iith entry of the partial assignment to jj.

We refer the reader to the paper of Deshpande et al. for pseudocode for ADG, and a description of how it works [DHK16]. Here, we discuss the approximation bound proved by Deshpande et al. for this algorithm. They proved an upper bound on the approximation factor achieved by Adaptive Dual Greedy, with respect to the optimal (minimum expected cost) adaptive strategy for achieving goal value QQ for utility function gg. The expression for the bound is somewhat complicated. To describe it, we first need some notation.

For x[d]nx\in[d]^{n}, let C(x)C(x) be the sequence of bits xix_{i} that are tested when running ADG on xx. Define (x)\mathbb{P}(x) to be the set of all proper prefixes of this sequence. (We treat each prefix as the set of elements it contains, since the ordering within the prefix is not relevant to us.)

For full assignment x[d]nx\in[d]^{n} and S[n]S\subseteq[n], let g(x,S)g(x,S) denote the value of gg on the partial assignment b([d]{})nb\in([d]\cup\{*\})^{n} such that bi=b_{i}=* for all iSi\not\in S, and bi=xib_{i}=x_{i} for all iSi\in S.

Deshpande et al. proved that the expected cost of the ADG strategy, for achieving goal utility QQ for utility function gg, is within the following factor of the optimal adaptive strategy:

𝒜:=maxx[d]nmaxS(x)iC(x)S[g(x,S{i})g(x,S)]Qg(x,S).{\mathcal{A}}:=\max_{x\in[d]^{n}}\max_{S\in\mathbb{P}(x)}\frac{\sum_{i\in C(x)-S}[g(x,S\cup\{i\})-g(x,S)]}{Q-g(x,S)}. (1)

Intuitively, this bound can be interpreted as follows. Consider running ADG on some fixed xx in [d]n[d]^{n}. Consider a partial assignment bb that represents the outcomes of the tests performed so far, at some point in the running of ADG on xx. Let SS denote the set of items tested so far, and let SS^{\prime} denote the additional items that will be tested by ADG before gg achieves goal value QQ on assignment xx.

At this point, g(b)g(b) utility has been achieved, and to reach the goal, an additional Qg(b)Q-g(b) units of utility must be achieved (this is the distance to goal). We know that we can achieve that additional Qg(b)Q-g(b) utility for realization xx by adding the results of the tests in SS^{\prime} to the results of the tests in SS. That is, g(x,SS)g(x,S)=Qg(x,S)g(x,S\cup S^{\prime})-g(x,S)=Q-g(x,S). In words, the cumulative increase in utility, if we add the results of all the tests in SS^{\prime} to the results we already obtained for the tests in SS, is Qg(x,S)Q-g(x,S). Now consider beginning with the results of the tests in SS and adding only the result of a single additional test ii. This will cause an increase in utility of g(x,S{i})g(x,S)g(x,S\cup\{i\})-g(x,S). If gg were a modular function, then we would have that iS(g(x,S{i})g(x,S))=g(x,SS)g(x,S)\sum_{i\in S^{\prime}}(g(x,S\cup\{i\})-g(x,S))=g(x,S\cup S^{\prime})-g(x,S). But because gg is submodular, the quantity on the left hand side of this equation can also be strictly larger (but not smaller) than the quantity on the right. The ADG bound is the maximum, over all xx and all associated subsets SS and SS^{\prime} (produced by starting to run ADG on xx and stopping at any point) of the ratio between the quantity on the left hand side, and the quantity on the right.

A.3 Using ADG to solve Absolute Majority

We use the same approach used by Deshpande et al. in solving the problem of evaluating a Boolean linear threshold function [DHK16]. We reduce the problem of evaluating an absolute-majority function to Stochastic Submodular Cover through the construction of a “goal function” gg for the absolute-majority problem. This is a utility function g:([d])n0g:([d]\cup*)^{n}\rightarrow\mathbb{Z}^{\geq 0} obeying the properties listed above, and such that for b([d]{})nb\in([d]\cup\{*\})^{n}, g(b)=Qg(b)=Q iff bb is a certificate for the absolute-majority function.

There are multiple ways that one could construct a goal function gg for the absolute-majority function. Here we present one such construction. For each candidate jj, let gjg_{j} be the utility function such that on partial assignment bb, gj(b)=min{n/2+1,Nj(b)}g_{j}(b)=\min\{\lfloor n/2\rfloor+1,N_{j}(b)\}. We define the goal value of this function to be Qj:=n/2+1Q_{j}:=\lfloor n/2\rfloor+1. Partial assignment bb is a certificate that jj won the absolute-majority election iff gj(b)g_{j}(b) is equal to its goal value, Qj=n/2+1Q_{j}=\lfloor n/2\rfloor+1.

For each candidate jj, we also define a goal function gj0g_{j0}, with goal value Qj0=n/2Q_{j0}=\lceil n/2\rceil. The value of gj0(b)g_{j0}(b) is min{n/2,k[d]\{j}Nk(b)}\min\{\lceil n/2\rceil,\sum_{k\in[d]\backslash\{j\}}N_{k}(b)\}, the total number of entries of bb that are equal to values in [d][d] other than jj. So, the value of gj0(b)g_{j0}(b) is the number of votes seen so far that are for candidates other than jj, capped at n/2\lceil n/2\rceil. Partial assignment bb is a certificate that candidate jj is not the absolute-majority winner iff gj0(b)=Qj0=n/2g_{j0}(b)=Q_{j0}=\lceil n/2\rceil.

We now use standard AND and OR constructions to produce our final goal function gg (cf.  [DHK16]).

We use the OR construction to combine the gjg_{j} functions into a single utility function g^\hat{g}. It reaches its goal value when at least one of the gjg_{j} reaches its goal value. The goal value of g^\hat{g} is Q^=j[d]Qj\hat{Q}=\prod_{j\in[d]}Q_{j}, and its value on a partial assignment bb is as follows:

g^(b)=Q^j[d](Qjgj(b)).\hat{g}(b)=\hat{Q}-\prod_{j\in[d]}(Q_{j}-g_{j}(b)).

We combine the gj0g_{j0}’s into a single utility function g0g_{0}, using the standard AND construction. The value of g0g_{0} on a partial assignment bb is

g0(b)=j[d]gj0(b).g_{0}(b)=\sum_{j\in[d]}g_{j0}(b).

The goal value of g0g_{0} is Q0=j[d]Qj0=dn/2Q_{0}=\sum_{j\in[d]}Q_{j0}=d\lceil n/2\rceil. Utility function g0g_{0} reaches its goal value on a partial assignment bb iff all the gj0g_{j0}’s have reached their goal values on partial assignment bb.

We then apply the OR construction to g^\hat{g} and g0g_{0} to create our final utility function gg. The goal value of gg is Q=Q^Q0Q=\hat{Q}Q_{0} and its value on partial assignment bb is as follows:

g(b)=Q(Q^g^(b))(Q0g0(b)).g(b)=Q-(\hat{Q}-\hat{g}(b))(Q_{0}-g_{0}(b)).

Utility function gg reaches its goal value iff either g^(b)=Q^\hat{g}(b)=\hat{Q} (meaning bb is a certificate that some candidate has an absolute majority) or g0(b)=Q0g_{0}(b)=Q_{0} (meaning bb is a certificate that no candidate has an absolute majority). The problem of finding an adaptive strategy of minimum expected cost for evaluating the absolute-majority function is equivalent to the problem of finding an adaptive strategy of minimum expected cost for achieving goal value QQ for utility function gg. Hence running Adaptive Dual Greedy, for utility function gg with goal value QQ, is an adaptive strategy for evaluating the absolute-majority function.

We now apply the approximation bound for Adaptive Dual Greedy given above in (1) to get an upper bound on the approximation factor 𝒜{\mathcal{A}} achieved by running ADG on the utility function gg that we constructed for the absolute-majority function. More particularly, we will show that running ADG on utility function gg is an O(d)O(d)-approximation algorithm for that problem. We do not know whether this O(d)O(d) approximation bound, for running ADG on gg, is tight.

Let R(x,S)R(x,S) denote the ratio in the expression for 𝒜{\mathcal{A}}, so

R(x,S):=iC(x)S[g(x,S{i})g(x,S)]Qg(x,S).R(x,S):=\frac{\sum_{i\in C(x)-S}[g(x,S\cup\{i\})-g(x,S)]}{Q-g(x,S)}.

Consider the numerator in this fraction. It is a summation over all iC(x)Si\in C(x)-S. We will first prove an upper bound on the expression inside the summation, g(x,S{i})g(x,S)g(x,S\cup\{i\})-g(x,S).

Fix xx in [d]n[d]^{n} and SS in (x)\mathbb{P}(x). In what follows, we will drop xx as a parameter in the utility functions, as it will be equal to this fixed xx. For example, we will write g(S)g(S) instead of g(x,S)g(x,S).

Let jj^{\prime} be the value of xix_{i}. Then for j{0,j}j\notin\{0,j^{\prime}\}, gj(S)=gj(S{i})g_{j}(S)=g_{j}(S\cup\{i\}). Intuitively, when we add ii to SS, the distance to the goal QjQ_{j} of each gjg_{j} where j{0,j}j\not\in\{0,j^{\prime}\} does not change. However, the distance to the goal QjQ_{j^{\prime}} of gjg_{j^{\prime}} decreases by 1. The distance to the goal Q0Q_{0} of g0g_{0} decreases by some amount that is between 1 and d1d-1.

For j[d]j\in[d], let Zj:={0,j}(Qg(S))Z_{j}:=\prod_{\ell\notin\{0,j\}}(Q_{\ell}-g_{\ell}(S)). Since gj(S)=gj(S{i})g_{j}(S)=g_{j}(S\cup\{i\}) for j{0,j}j\notin\{0,j^{\prime}\}, we have that the distance from g^(S)\hat{g}(S) to goal value Q^\hat{Q}, and the distance of g^(S{i})\hat{g}(S\cup\{i\}) to goal value Q^\hat{Q}, are respectively:

Q^g^(S)=Zj(Qjgj(S))\hat{Q}-\hat{g}(S)=Z_{j^{\prime}}(Q_{j^{\prime}}-g_{j^{\prime}}(S)) (2)

and

Q^g^(S{i})=Zj(Qjgj(S{i})).\hat{Q}-\hat{g}(S\cup\{i\})=Z_{j^{\prime}}(Q_{j^{\prime}}-g_{j^{\prime}}(S\cup\{i\})). (3)

Therefore,

g(S{i})g(S)=(Q0g0(S))(Q^g^(S))(Q0g0(S{i}))(Q^g^(S{i})=Zj[(Q0g0(S))(Qjgj(S))(Q0g0(S{i}))(Qjgj(S{i}))]Zj[(Q0g0(S))(gj(S{i})gj(S))+(Qjgj(S))(g0(S{i})g0(S))],\begin{split}&g(S\cup\{i\})-g(S)\\ &=(Q_{0}-g_{0}(S))(\hat{Q}-\hat{g}(S))-(Q_{0}-g_{0}(S\cup\{i\}))(\hat{Q}-\hat{g}(S\cup\{i\})\\ &=Z_{j^{\prime}}[(Q_{0}-g_{0}(S))(Q_{j^{\prime}}-g_{j^{\prime}}(S))-(Q_{0}-g_{0}(S\cup\{i\}))(Q_{j^{\prime}}-g_{j^{\prime}}(S\cup\{i\}))]\\ &\leq Z_{j^{\prime}}[(Q_{0}-g_{0}(S))(g_{j^{\prime}}(S\cup\{i\})-g_{j^{\prime}}(S))+(Q_{j^{\prime}}-g_{j^{\prime}}(S))(g_{0}(S\cup\{i\})-g_{0}(S))],\end{split} (4)

where the first equality is by the definition of gg, the second is from (2) and (3), and we use the following simple property of non-negative numbers to justify the last inequality. Let s,t,u,v0s,t,u,v\geq 0. Then (s+t)(u+v)tv(s+t)u+(u+v)s(s+t)(u+v)-tv\leq(s+t)u+(u+v)s. Take s=g0(S{i})g0(S)s=g_{0}(S\cup\{i\})-g_{0}(S) and t=Q0g0(S{i})t=Q_{0}-g_{0}(S\cup\{i\}), so s+t=Q0g0(S)s+t=Q_{0}-g_{0}(S). Similarly, take u=gj(S{i})gj(S)u=g_{j^{\prime}}(S\cup\{i\})-g_{j^{\prime}}(S) and v=Qjgj(S{i})v=Q_{j^{\prime}}-g_{j^{\prime}}(S\cup\{i\}), so u+v=Qjgj(S)u+v=Q_{j^{\prime}}-g_{j^{\prime}}(S). Substituting these values into the inequality (s+t)(u+v)tv(s+t)u+(u+v)s(s+t)(u+v)-tv\leq(s+t)u+(u+v)s yields the inequality above.

Interpreting the expression in brackets in the last line of (4), as relating to the effect of adding ii to SS, we see that it is equal to:

(Distance of g0g_{0} from its goal before adding ii)(Increase in gjg_{j^{\prime}} from adding ii) + (Distance of gjg_{j^{\prime}} from its goal before adding ii) (Increase in g0g_{0} from adding ii).

We now use the fact that the increase in gjg_{j^{\prime}} from adding ii is 1, and the increase in g0g_{0} from adding ii is at most d1d-1. We thus have that

g(S{i})g(S)Zj[(Q0g0(S))+(d1)(Qjgj(S))].g(S\cup\{i\})-g(S)\leq Z_{j^{\prime}}[(Q_{0}-g_{0}(S))+(d-1)(Q_{j^{\prime}}-g_{j^{\prime}}(S))].

Recalling that we were using jj^{\prime} to denote the value of xix_{i}, we therefore have the following upper bound on the numerator of R(x,S)R(x,S):

iC(x)S[g(S{i})g(S)][iC(x)SZxi(Q0g0(S))]+[iC(x)S(d1)j[d](Qjgj(S))].\sum_{i\in C(x)-S}[g(S\cup\{i\})-g(S)]\leq\Big{[}\sum_{i\in C(x)-S}Z_{x_{i}}(Q_{0}-g_{0}(S))\Big{]}+\Big{[}\sum_{i\in C(x)-S}(d-1)\prod_{j\in[d]}(Q_{j}-g_{j}(S))\Big{]}. (5)

We will now separately bound the two terms on the right hand side of (5). Recall that C(x)C(x) is the sequence of tests performed by ADG on xx, and that the last test performed is the one where the goal value QQ of gg is reached. It follows that for each j[d]j\in[d], C(x)SC(x)-S can contain at most Qjgj(S)Q_{j}-g_{j}(S) indices ii such that xi=jx_{i}=j, because after the tests on SS, an additional Qjgj(S)Q_{j}-g_{j}(S) votes for candidate jj would cause candidate jj to have enough votes for an majority, meaning that the goal value of gjg_{j} would be reached.

It follows that for candidate jj,

iC(x)S:xi=jZj(Q0g0(S))Zj(Q0g0(S))(Qjgj(S))=Qg(S).\sum_{i\in C(x)-S:x_{i}=j}Z_{j}(Q_{0}-g_{0}(S))\leq Z_{j}(Q_{0}-g_{0}(S))(Q_{j}-g_{j}(S))=Q-g(S).

This holds by symmetry for all candidates jj, so

j[d]iC(S)S:xi=jZj(Q0g0(S))d(Qg(S)).\sum_{j\in[d]}\sum_{i\in C(S)-S:x_{i}=j}Z_{j}(Q_{0}-g_{0}(S))\leq d(Q-g(S)).

The left-hand side of the above inequality is equal to iC(S)SZxi(Q0g0(S))\sum_{i\in C(S)-S}Z_{x_{i}}(Q_{0}-g_{0}(S)), so we have the following upper bound on the first term on the right-hand side of (5):

iC(S)SZxi(Q0g0(S))d(Qg(S)).\sum_{i\in C(S)-S}Z_{x_{i}}(Q_{0}-g_{0}(S))\leq d(Q-g(S)).

We now bound the second term. Each test performed after SS increases the value of g0g_{0} by at least one, so the total number of tests in C(x)SC(x)-S is at most Q0g0(S)Q_{0}-g_{0}(S). Therefore,

iC(x)S(d1)j[d](Qjgj(S))\displaystyle\sum_{i\in C(x)-S}(d-1)\prod_{j\in[d]}(Q_{j}-g_{j}(S)) (d1)(Q0g0(S))j[d](Qjgj(S))\displaystyle\leq(d-1)(Q_{0}-g_{0}(S))\prod_{j\in[d]}(Q_{j}-g_{j}(S))
=(d1)(Qg(S)).\displaystyle=(d-1)(Q-g(S)).

We have thus proved the following upper bound on the numerator of R(x,S)R(x,S):

iC(x)Sg(S{i})g(S)d(Qg(S))+(d1)(Qg(S))=(2d1)(Qg(S)).\sum_{i\in C(x)-S}g(S\cup\{i\})-g(S)\leq d(Q-g(S))+(d-1)(Q-g(S))=(2d-1)(Q-g(S)).

Since the denominator of R(x,S)R(x,S) is Qg(S)Q-g(S), we have shown that 𝒜2d1{\mathcal{A}}\leq 2d-1, meaning that we have proved our claimed approximation factor of O(d)O(d).

A.4 Use of ADG in Algorithm 2

Algorithm 2 uses Adaptive Dual Greedy after the votes obtained so far have narrowed down the number of potential relative-majority winners to two remaining candidates. We discuss here how to use ADG to determine whether one of these candidates, say α\alpha, is the relative-majority winner.

As stated in the description of the algorithm, we use bb^{\prime} to denote the partial assignment immediately after determining the two viable candidates α\alpha and β\beta, and we need to determine whether or not

Nα(b)+(k{1,,d}{β}Nk(b))+i:bi=yin+1.N_{\alpha}(b^{\prime})+\Big{(}\sum_{k\in\{1,\dots,d\}\setminus\{\beta\}}N_{k}(b^{\prime})\Big{)}+\sum_{i:b_{i}^{\prime}=*}y_{i}\geq n+1.

Here yi=2y_{i}=2 if we find xi=αx_{i}=\alpha; yi=1y_{i}=1 if xi{1,,d}{α,β}x_{i}\in\{1,\dots,d\}\setminus\{\alpha,\beta\}; and yi=0y_{i}=0 if xi=βx_{i}=\beta.

This is equivalent to finding the optimal adaptive strategy for evaluating a ternary linear threshold function with unit coefficients, that is, determining whether an inequality of the form

i[n]xiθ\sum_{i\in[n]}x_{i}\geq\theta

holds, where each xi{0,1,2}x_{i}\in\{0,1,2\} and θ\theta is a positive integer. Again, we address the evaluation problem in a stochastic environment where for each xix_{i} we are given P[xi=0]P[x_{i}=0], P[xi=1]P[x_{i}=1], and P[xi=2]P[x_{i}=2], the xix_{i} are independent, and it costs cic_{i} to obtain the value of xix_{i}.

In order to apply ADG to this evaluation problem, we construct a utility function g:([d]{})n0g:([d]\cup\{*\})^{n}\rightarrow\mathbb{Z}^{\geq 0} which is a minor variant of the utility function used by Deshpande et al. [DHK16] in their algorithm for evaluating Boolean linear threshold functions. Function gg is built from two other utility functions, g1g_{1} and g0g_{0}. The function g1g_{1} is such that g1(b)=min{θ,i[n]:bibi}g_{1}(b)=\min\{\theta,\sum_{i\in[n]:b_{i}\neq*}b_{i}\}, while g0g_{0} is such that g0(b)=min{2nθ+1,i[n]:bi(2bi)}g_{0}(b)=\min\{2n-\theta+1,\sum_{i\in[n]:b_{i}\neq*}(2-b_{i})\}. We define Q1=θQ_{1}=\theta and Q0=2nθ+1Q_{0}=2n-\theta+1. We then combine g1g_{1} and g0g_{0} using the standard OR construction to obtain g:{0,1,2}n0g:\{0,1,2\}^{n}\rightarrow\mathbb{Z}^{\geq 0} such that for b{0,1,2,}nb\in\{0,1,2,*\}^{n},

g(b)=Q0Q1(Q0g0(b))(Q1g1(b)).g(b)=Q_{0}Q_{1}-(Q_{0}-g_{0}(b))(Q_{1}-g_{1}(b)).

We define the goal value QQ for gg to be Q0Q1Q_{0}Q_{1}. To evaluate the ternary linear threshold function given above, we apply Adaptive Dual Greedy to achieve goal value Q=Q0Q1Q=Q_{0}Q_{1} for the constructed gg. The approximation bound 𝒜{\mathcal{A}} given in (1) for Adaptive Dual Greedy holds. It remains to show that this bound is at most 3 for the constructed gg.

As in the previous section, for fixed x{0,1,2}nx\in\{0,1,2\}^{n}, and S[n]S\subseteq[n], we use g(S)g(S) to represent the value of g(b)g(b) where bb is such that bi=xib_{i}=x_{i} for iSi\in S, and bi=b_{i}=* otherwise (and similarly for g0g_{0} and g1g_{1}.) Again, we use R(x,S)R(x,S) to denote the ratio in the expression for 𝒜{\mathcal{A}}.

Now fix x{0,1,2}nx\in\{0,1,2\}^{n} and let SS be the set of tests in a fixed prefix of C(x)C(x). Let R(x,S)R(x,S) be the ratio in the bound AA in (1). Let SS^{\prime} be the set of tests in C(x)SC(x)-S. Because ADG stops performing tests as soon as g(b)=Qg(b)=Q, prior to performing the last test of C(x)C(x) we have both g0(b)<Q0g_{0}(b)<Q_{0} and g1(b)<Q1g_{1}(b)<Q_{1}. Without loss of generality, assume that the last test causes g1(b)=Q1g_{1}(b)=Q_{1}. In that case, the value of the last test must be 1 or 2.

If it is 2, then the final value of bb must satisfy g1(b)=Q1g_{1}(b)=Q_{1} and g0(b)<Q0g_{0}(b)<Q_{0}. Further, by the definition of g1g_{1}, and the fact that the xix_{i} are in {0,1,2}\{0,1,2\}, i:bibiθ+1\sum_{i:b_{i}\neq*}b_{i}\leq\theta+1. Also, i:iS(g1(S{i})g1(S))Q1g1(S)+1\sum_{i:i\in S^{\prime}}(g_{1}(S\cup\{i\})-g_{1}(S))\leq Q_{1}-g_{1}(S)+1. Since g0(b)<Q0g_{0}(b)<Q_{0}, by the definition of g0g_{0}, i:bibi<2nθ+1\sum_{i:b_{i}\neq*}b_{i}<2n-\theta+1 and iS(g0(x,S{i})g0(x,S))<Q0g0(S)\sum_{i\in S^{\prime}}(g_{0}(x,S\cup\{i\})-g_{0}(x,S))<Q_{0}-g_{0}(S).

The denominator of R(x,S)R(x,S) is equal to (Q1g1(S))(Q0g0(S))(Q_{1}-g_{1}(S))(Q_{0}-g_{0}(S)). The numerator is equal to iS(g(x,S{i})g(x,S))\sum_{i\in S^{\prime}}(g(x,S\cup\{i\})-g(x,S)). For fixed iSi\in S^{\prime}, a similar analysis to that used to show (4) above yields

iS[g(S{i})g(S)]\displaystyle\sum_{i\in S^{\prime}}[g(S\cup\{i\})-g(S)]
=\displaystyle= iS[(Q0g0(S))(Q1g1(S))(Q1g1(S{i}))(Q0g0(S{i}))]\displaystyle\sum_{i\in S^{\prime}}[(Q_{0}-g_{0}(S))(Q_{1}-g_{1}(S))-(Q_{1}-g_{1}(S\cup\{i\}))(Q_{0}-g_{0}(S\cup\{i\}))]
\displaystyle\leq iS(Q0g0(S))(g1(S{i})g1(S))+iS(Q1g1(S))(g0(S{i})g0(S))].\displaystyle\sum_{i\in S^{\prime}}(Q_{0}-g_{0}(S))(g_{1}(S\cup\{i\})-g_{1}(S))+\sum_{i\in S^{\prime}}(Q_{1}-g_{1}(S))(g_{0}(S\cup\{i\})-g_{0}(S))].

From the above facts about g1g_{1} and g0g_{0}, with our assumption that the last test had the value 2 and caused g1(b)=Q1g_{1}(b)=Q_{1}, we can upper bound the first term on the right-hand side of the above inequality:

iS(Q0g0(S))(g1(S{i})g1(S))(Q0g0(S))(Q1g1(S)+1).\sum_{i\in S^{\prime}}(Q_{0}-g_{0}(S))(g_{1}(S\cup\{i\})-g_{1}(S))\leq(Q_{0}-g_{0}(S))(Q_{1}-g_{1}(S)+1).

We can also upper bound the second term:

iS(Q1g1(S))(g0(S{i})g0(S))<(Q1g1(S))(Q0g0(S)).\sum_{i\in S^{\prime}}(Q_{1}-g_{1}(S))(g_{0}(S\cup\{i\})-g_{0}(S))<(Q_{1}-g_{1}(S))(Q_{0}-g_{0}(S)).

Since the denominator of R(x,S)R(x,S) is (Q1g1(S))(Q0g0(S))(Q_{1}-g_{1}(S))(Q_{0}-g_{0}(S)), it follows that

R(x,S)2+1=3.R(x,S)\leq 2+1=3.

The analysis in the case that the last test has the value 1 is similar. In this case, we have that iS(g0(x,S{i})g0(x,S))Q0g0(S)\sum_{i\in S^{\prime}}(g_{0}(x,S\cup\{i\})-g_{0}(x,S))\leq Q_{0}-g_{0}(S) and iS(g1(x,S{i})g0(x,S))Q1g1(S)\sum_{i\in S^{\prime}}(g_{1}(x,S\cup\{i\})-g_{0}(x,S))\leq Q_{1}-g_{1}(S), implying that R(x,S)2R(x,S)\leq 2.

Appendix B A 1010-approximation algorithm for evaluating the absolute-majority function with 22 rounds of adaptivity.

Theorem 4.

There exists a 1010-approximation algorithm for evaluating the absolute-majority function with 22 rounds of adaptivity.

Proof.

Here we propose an algorithm that replaces Phase 2 of Algorithm 1 by testing the remaining votes following Phase 1 non-adaptively, in order of a permutation, until the value of ff if certain. The permutation is generated using the modified round-robin approach introduced by Allen et al. [AHKÜ17]. The modified round-robin algorithm creates a single permutation by combining the following four sequence permutations: increasing orders of cipi,α,ci1pi,α\frac{c_{i}}{p_{i,\alpha}},\frac{c_{i}}{1-p_{i,\alpha}}, and cipi,β,ci1pi,β\frac{c_{i}}{p_{i,\beta}},\frac{c_{i}}{1-p_{i,\beta}}, respectively. Let 𝖠𝖫𝖦\mathsf{ALG} denote this algorithm, and let 𝖮𝖯𝖳\mathsf{OPT} denote the optimal algorithm for evaluating the absolute-majority function. The pseudocode for the modified round robin is given in Algorithm 3.

Input: sequences L1,,LkL_{1},\dots,L_{k}
Define D[1,,k]D[1,\dots,k]
D[i]0D[i]\leftarrow 0 for i{1,,k}i\in\{1,\dots,k\}
π[]\pi\leftarrow[]
while |π|<kn|\pi|<k\cdot n do
       for i{1,,k}i\in\{1,\dots,k\} do
             τi\tau_{i}\leftarrow the index of the next variable in LiL_{i} if exists; 0 otherwise
            
      ii^{*}\leftarrow any jj in argminj:τj0(D[j]+cτj)\operatorname*{arg\,min}_{j:\tau_{j}\neq 0}(D[j]+c_{\tau_{j}})
       Append xτix_{\tau_{i^{*}}} to π\pi
       D[i]D[i]+cτiD[i^{*}]\leftarrow D[i^{*}]+c_{\tau_{i^{*}}}
      
For each xix_{i} that appears more than once in π\pi, keep the first occurrence in π\pi but delete all later occurrences.
return π\pi
Algorithm 3 Modified round-robin (Allen et al.)

Let MM denote the set of assignments where 𝖠𝖫𝖦\mathsf{ALG} needs to perform at least 11 test in Phase 2. As α,β\alpha,\beta is known in Phase 2, we can further separate MM into Mα,Mβ,M0M_{\alpha},M_{\beta},M_{0}, which represents the sets of assignments in MM that satisfy f(a)=α,f(a)=β,f(a)=0f(a)=\alpha,f(a)=\beta,f(a)=0 for all aa in the corresponding set, respectively. Let C1(𝖠𝖫𝖦,a)C_{1}(\mathsf{ALG},a) and C2(𝖠𝖫𝖦,a)C_{2}(\mathsf{ALG},a) denote the cost spent in Phase 1 and Phase 2 of our algorithm on assignment aa, respectively.

If we only consider the assignments in MαM_{\alpha}, what remains to do is to verify that f=αf=\alpha. Then, an optimal strategy would test the remaining variables in increasing order of ci/pi,αc_{i}/p_{i,\alpha}, and its cost is upper-bounded by the expected cost of 𝖮𝖯𝖳\mathsf{OPT} on MαM_{\alpha}. Because of the way the modified round-robin approach described in Algorithm 3 is performed, for each assignment aa, what we spend in Phase 2 of our algorithm is at most 4 times the cost of an optimal algorithm for verifying f=αf=\alpha. (By an optimal algorithm for verifying f=αf=\alpha, we mean its expected cost on random xx, given that f(x)=αf(x)=\alpha, is as small as possible.) Hence, we have

aMαC2(𝖠𝖫𝖦,a)p(a)4aMαC(𝖮𝖯𝖳,a)p(a).\sum_{a\in M_{\alpha}}C_{2}(\mathsf{ALG},a)p(a)\leq 4\sum_{a\in M_{\alpha}}C(\mathsf{OPT},a)p(a).

And for assignments in MβM_{\beta} and M0M_{0}, any strategy that evaluates the value of ff will first show that fαf\neq\alpha. Let C2fα(𝖠𝖫𝖦,a)C_{2}^{f\neq\alpha}(\mathsf{ALG},a) denote the cost of using 𝖠𝖫𝖦\mathsf{ALG} to verify faf\neq a on assignment aa in Phase 2. Recall that an optimal algorithm for verifying fαf\neq\alpha tests the remaining variables in increasing order of ci/(1pi,α)c_{i}/(1-p_{i,\alpha}), and also its cost is again upper-bounded by the expected cost of 𝖮𝖯𝖳\mathsf{OPT} on MβM0M_{\beta}\cup M_{0}, we have

aMβM0C2fα(𝖠𝖫𝖦,a)p(a)4aMβM0C(𝖮𝖯𝖳,a)p(a).\sum_{a\in M_{\beta}\cup M_{0}}C_{2}^{f\neq\alpha}(\mathsf{ALG},a)p(a)\leq 4\sum_{a\in M_{\beta}\cup M_{0}}C(\mathsf{OPT},a)p(a).

For the same reason, we also have the following two inequalities

aMβC2(𝖠𝖫𝖦,a)p(a)\displaystyle\sum_{a\in M_{\beta}}C_{2}(\mathsf{ALG},a)p(a) 4aMβC(𝖮𝖯𝖳,a)p(a),\displaystyle\leq 4\sum_{a\in M_{\beta}}C(\mathsf{OPT},a)p(a),
aMαM0C2fβ(𝖠𝖫𝖦,a)p(a)\displaystyle\sum_{a\in M_{\alpha}\cup M_{0}}C_{2}^{f\neq\beta}(\mathsf{ALG},a)p(a) 4aMαM0C(𝖮𝖯𝖳,a)p(a).\displaystyle\leq 4\sum_{a\in M_{\alpha}\cup M_{0}}C(\mathsf{OPT},a)p(a).

Last, we consider the assignments in M0M_{0}. Since C2(𝖠𝖫𝖦,a)=max{C2fα(𝖠𝖫𝖦,a),C2fβ(𝖠𝖫𝖦,a)}C_{2}(\mathsf{ALG},a)=\max\{C_{2}^{f\neq\alpha}(\mathsf{ALG},a),C_{2}^{f\neq\beta}(\mathsf{ALG},a)\} for aM0a\in M_{0}, we have

aM0C2(𝖠𝖫𝖦,a)p(a)=\displaystyle\sum_{a\in M_{0}}C_{2}(\mathsf{ALG},a)p(a)= aM0(max{C2fα(𝖠𝖫𝖦,a),C2fβ(𝖠𝖫𝖦,a)})p(a)\displaystyle\sum_{a\in M_{0}}(\max\{C_{2}^{f\neq\alpha}(\mathsf{ALG},a),C_{2}^{f\neq\beta}(\mathsf{ALG},a)\})p(a)
\displaystyle\leq aM0(C2fα(𝖠𝖫𝖦,a)+C2fβ(𝖠𝖫𝖦,a))p(a).\displaystyle\sum_{a\in M_{0}}(C_{2}^{f\neq\alpha}(\mathsf{ALG},a)+C_{2}^{f\neq\beta}(\mathsf{ALG},a))p(a).

Combining what we have above, the expected cost of 𝖠𝖫𝖦\mathsf{ALG} spent in Phase 2 is

a[d]nC2(𝖠𝖫𝖦,a)p(a)=\displaystyle\sum_{a\in[d]^{n}}C_{2}(\mathsf{ALG},a)p(a)= aMC2(𝖠𝖫𝖦,a)p(a)+a[d]nMC2(𝖠𝖫𝖦,a)p(a)\displaystyle\sum_{a\in M}C_{2}(\mathsf{ALG},a)p(a)+\sum_{a\in[d]^{n}\setminus M}C_{2}(\mathsf{ALG},a)p(a)
=\displaystyle= aMαMβM0C2(𝖠𝖫𝖦,a)p(a)+a[d]nM0p(a)\displaystyle\sum_{a\in M_{\alpha}\cup M_{\beta}\cup M_{0}}C_{2}(\mathsf{ALG},a)p(a)+\sum_{a\in[d]^{n}\setminus M}0\cdot p(a)
\displaystyle\leq\; 8aMC(𝖮𝖯𝖳,a)p(a)8a[d]nC(𝖮𝖯𝖳,a)p(a).\displaystyle 8\sum_{a\in M}C(\mathsf{OPT},a)p(a)\leq 8\sum_{a\in[d]^{n}}C(\mathsf{OPT},a)p(a).

Since C1(𝖠𝖫𝖦,a)2C(𝖮𝖯𝖳,a)C_{1}(\mathsf{ALG},a)\leq 2C(\mathsf{OPT},a) for all a[d]na\in[d]^{n} as shown in the proof of Theorem 1, we have

a[d]nC(𝖠𝖫𝖦,a)p(a)=\displaystyle\sum_{a\in[d]^{n}}C(\mathsf{ALG},a)p(a)= a[d]nC1(𝖠𝖫𝖦,a)p(a)+a[d]nC2(𝖠𝖫𝖦,a)p(a)\displaystyle\sum_{a\in[d]^{n}}C_{1}(\mathsf{ALG},a)p(a)+\sum_{a\in[d]^{n}}C_{2}(\mathsf{ALG},a)p(a)
\displaystyle\leq\; 2a[d]nC(𝖮𝖯𝖳,a)p(a)+8a[d]nC(𝖮𝖯𝖳,a)p(a)=10a[d]nC(𝖮𝖯𝖳,a)p(a).\displaystyle 2\sum_{a\in[d]^{n}}C(\mathsf{OPT},a)p(a)+8\sum_{a\in[d]^{n}}C(\mathsf{OPT},a)p(a)=10\sum_{a\in[d]^{n}}C(\mathsf{OPT},a)p(a).

This completes the proof. ∎