Voronoi games, as introduced by Ahn et al. , can be viewed as competitive facility-location problems in which two players and want to place their facilities in order to maximize their market area. The Voronoi game of Ahn et al. is played in a bounded region , and the facilities of the players are modeled as points in this region. Each player gets the same number, , of facilities, which they have to place alternatingly. The market area of (and similarly of ) is now given by the area of the region of all points whose closest facility was placed by , that is, it is the total area of the Voronoi cells of ’s facilities in the Voronoi diagram of the facilities of and . Ahn et al. proved that for and when the region is a circle or a segment, the second player can win the game by a payoff of , for some , where the first player can ensure is arbitrarily small.
The one-round Voronoi game introduced by Cheong et al.  is similar to the Voronoi game of Ahn et al., except that the first player must first place all his facilities, after which the second player places all her facilities. They considered the problem where is a square, and they showed that when is large enough the first player can always win a fraction of the area of for some . Fekete and Meijer  considered the problem on a rectangle of aspect ratio . They showed that the first player wins more than half the area of , unless and , or and . They also showed that if is a polygon with holes, then computing the locations of the facilities for the second player that maximize the area she wins, against a given set of facilities of the first player is NP-hard.
One-round discrete Voronoi games. In this paper we are interested in discrete (Euclidean) one-round Voronoi games, where the players do not compete for area but for a discrete set of points. That is, instead of the region one is given a set of points in a geometric space, and a point is won by the player owning the facility closest to . (Another discrete variant of Voronoi games is played on graphs [17, 19] but we restrict our attention to the geometric variant.) More formally, the problem we study is defined as follows.
Let be a multiset of points in , which we call voters from now on, and let and be two integers. The one-round discrete Voronoi game defined by the triple is a single-turn game played between two players and . First, player places a set of points in , then player places a set of points in . (These points may coincide with the voters in .) We call the set the strategy of and the set the strategy of . Player wins a voter if , where and denote the minimum distance between a voter and the sets and , respectively. Note that this definition favors player , since in case of a tie a voter is won by . We now define to be the multiset of voters won by player when he uses strategy and player uses strategy . Player wins the game if he wins at least half the voters in , that is, when ; otherwise wins the game. Here denotes the size of the multiset (counting multiplicities). We now define as the maximum number of voters that can be won by player against an optimal opponent:
For a given multiset of voters, we want to decide if444One can also require that ; with some small modifications, all the results in this paper can be applied to the case with strict inequality as well. . In other words, we are interested in determining for a given game if has a winning strategy, which is a set of points such that wins the game no matter where places her points.
An important special case, which has already been studied in spatial voting theory for a long time, is when . Here the coordinates of a point in represent the preference of the voter on certain topics, and the point played by represents a certain proposal. If the point played by wins against all possible points played by , then the ’s proposal will win the vote against any other proposal. Note that in the problem definition we gave above, voters at equal distance from and are won by , and has to win at least half the voters. This is the definition typically used in papers of Voronoi games [3, 4, 5, 6]. In voting theory other variants are studied as well, for instance where points at equal distance to and are not won by either of them, and wins the game if he wins more voters than ; see the paper by McKelvey and Wendell  who use the term majority points for the former variant and the term plurality points for the latter variant.
Previous work. Besides algorithmic problems concerning the one-round discrete Voronoi game one can also consider combinatorial problems. In particular, one can ask for bounds on as a function of , , and . It is known that for any set in and we have . This result is based on known bounds for maximum Tukey depth, where the lower bound can be proven using Helly’s theorem. It is also known  that there is a constant such that points suffice for to win the game, that is, for any .
In this paper we focus on the algorithmic problem of computing for given , , and . The problem of deciding if was studied for the case by Wu et al.  and Lin et al. , and later by De Berg et al.  who solve this problem in time in any fixed dimension . Their algorithms works when is a set (not a multiset) and for plurality points instead of majority points. Other algorithmic results are for the setting where the players already placed all but one of their points, and one wants to compute the best locations for the last point of and of . Banik et al.  gave algorithms that finds the best location for in time and for in time. For the two-round variant of the problem, with , polynomial algorithms for finding the optimal strategies of both players are also known .
Our work is inspired by the paper of Banik et al.  on computing in . They considered the case of arbitrarily large and , but where (and is a set instead of a multiset). For this case they showed that depending on the set either or can win the game, and they presented an algorithm to compute in time , where is a constant dependent only on . This raises the question: is the problem NP-hard when is part of the input?
Our results. We answer the question above negatively, by presenting an algorithm that computes in in polynomial time. Our algorithm works when is a multiset, and it does not require and to be equal. Our algorithm computes and finds a strategy for that wins this many voters in time . The algorithm can be extended to the case when the voters are weighted, requiring only a slight increase in running time.
The algorithm by Banik et al.  discretizes the problem, by defining a finite set of potential locations for to place his points. However, to ensure an optimal strategy for , the set of potential locations has exponential size. To overcome this problem we need several new ideas. First of all, we essentially partition the possible strategies into various classes—the concept of thresholds introduced later plays this role—such that for each class we can anticipate the behavior of the optimal strategy for . To compute the best strategy within a certain class we use dynamic programming, in a non-standard (and, unfortunately, rather complicated) way. The subproblems in our dynamic-program are for smaller point sets and smaller values of and (actually we will need several other parameters) where the goal of will be to push his rightmost point as far to the right as possible to win a certain number of points. One complication in the dynamic program is that it is unclear which small subproblems can be used to solve a given subproblem . The opposite direction—determining for which larger subproblems may use in their solution—is easier however, so we use a sweep approach: when the solution to some has been determined, we update the solution to larger subproblems that can use .
After establishing that we can compute in polynomial time in , we turn to the higher-dimensional problem. We show that deciding if has a winning strategy is -hard in . We also show that for fixed and this problem can be solved in polynomial time. Our solution combines algebraic methods  with a result of Paterson and Zwick  that one can construct a polynomial-size boolean circuits that implements the majority function. The latter result in essential to avoid the appearance of in the exponent. As a byproduct of the algebraic method, we show that the problem is contained in the complexity class ; see  for more information on this complexity class.
2 A polynomial-time algorithm for
In this section we present a polynomial-time algorithm for the 1-dimensional discrete Voronoi game. Our algorithm will employ dynamic programming, and it will be convenient to use , , and as variables in the dynamic program. From now on, we therefore use for the size of the original multiset , and and for the initial number of points that can be played by and , respectively.
2.1 Notation and basic properties
We denote the given multiset of voters by , where we assume the voters are numbered from left to right. We also always number the points in the strategies and from left to right. For brevity we make no distinction between a point and its value (that is, its -coordinate), so that we can for example write to indicate that the leftmost point of is located to the left of the leftmost point of .
For a given game , we say that a strategy of player realizes a gain if for any strategy of player . Furthermore, we say that a strategy is optimal if it realizes , the maximum possible gain for , and we say a strategy is optimal against a given strategy if for any strategy .
Trivial, reasonable, and canonical strategies for . For , define to be the leftmost points in . Suppose we want to compute for some and . The trivial strategy of player is to place his points at the points of with the highest multiplicities—here we consider the multiset as a set of distinct points, each with a multiplicity corresponding to the number of times it occurs in —with ties broken arbitrarily. Let denote the number of distinct points in . Then the trivial strategy is optimal when and also when : in the former case wins all voters with the trivial strategy, and in the latter case can always win all voters not coinciding with a point in (namely by surrounding each point by two points sufficiently close to ) so the trivial strategy is optimal for . Hence, from now on we consider subproblems with and .
We can without loss of generality restrict our attention to strategies for that place at most one point in each half-open interval of the form with , where , , and . Indeed, placing more than two points inside an interval is clearly not useful, and if two points are placed in some interval then we can always move the leftmost point onto . (If is already occupied by a point in , then we can just put the point on any unoccupied voter; under our assumption that an unoccupied voter always exists.) We will call a strategy for satisfying the property above reasonable.
Observation 1 (Banik et al. ).
Assuming there exist an optimal strategy for that is reasonable and has (that is, coincides with a voter).
We can define an ordering on strategies of the same size by sorting them in lexicographical order. More precisely, we say that a strategy is greater than a strategy , denoted by , if , where denotes the lexicographical order. Using this ordering, the largest reasonable strategy that is optimal—namely, that realizes —is called the canonical strategy of .
-gains, -gains, and gain sequences. Consider a strategy . It will be convenient to add two extra points to , namely and ; this clearly does not influence the outcome of the game. The strategy thus induces open intervals of the form where player may place her points. It is easy to see that there exists an optimal strategy for with the following property: contains at most two points in each interval with , and at most one point in and at most one point in . From now on we restrict our attention to strategies for with this property.
Now suppose that and are consecutive points (with ) in some strategy , where could be and could be . As just argued, either places zero, one, or two points inside . When places zero points, then she obviously does not win any of the voters in . The maximum number of voters can win from by placing a single point is the maximum number of voters in that can be covered by an open interval of length ; see Banik et al. . We call this value the -gain of in and denote it by . By placing two points inside , one immediately to the right of and one immediately to the left of , player will win all voters . Thus the extra number of voters won by the second point in as compared to just placing a single point is equal to . We call this quantity the -gain of in and denote it by . Note that for intervals we have and ; a similar statement holds for .
The following observation follows from the fact that equals the maximum number of voters in that can be covered by an open interval of length .
Observation 2 (Banik et al. ).
For any we have .
If we let and , then player wins either 0, , or points depending on whether she plays 0, 1, or 2 points inside the interval. It will therefore be convenient to introduce the notation for , which is defined as
We assume the precedence of these operators are higher than addition.
Let be a given strategy for , where by convention and . Consider , the multiset of all -gains and -gains defined by the intervals . Sort this sequence in non-increasing order, using the following tie-breaking rules if two gains are equal:
if one of the gains is for an interval —that is, the gain is either or —and the other gain is for an interval with , then the gain for precedes the gain for .
if both gains are for the same interval then the -gain precedes the -gain.
We call the resulting sorted sequence the gain sequence induced by on . We denote this sequence by or, when and are clear from the context, sometimes simply by .
The canonical strategy of and sequence representations. Given the multiset , a strategy and value , player can compute an optimal strategy as follows. First she computes the gain sequence and chooses the first gains in . Then for each she proceeds as follows. When and are both chosen, she places two points in that win all voters in ; when only is chosen, she places one point in that win voters. (By Observation 2 and the tie-breaking rules, when is chosen it is always the case that is also chosen.) The resulting optimal strategy is called the canonical strategy of with points against on .
From now one we restrict the strategies of player to canonical strategies. In an optimal strategy, player places at most two points in any interval induced by a strategy , and when we know that places a single point (and similarly when she places two points) then we also know where to place the point(s). Hence, we can represent an optimal strategy , for given and , by a sequence where indicates how many points plays in the interval . We call the sequence representation of the strategy against on . We denote the sequence representation of the canonical strategy of with points against on by . We have the following observation.
The canonical strategy of with points against is the optimal strategy with points against whose sequence representation is maximal in the lexicographical order.
2.2 The subproblems for a dynamic-programming solution
For clarity, in the rest of Section 2 we assume the multiset of voters does not have repetitive entries, i.e we have a set of voters, and not a multiset. While all the results are easily extendible to multisets, dealing with them adds unnecessary complexity to the text.
Our goal is to develop a dynamic-programming algorithm to compute . Before we can define the subproblems on which the dynamic program is based, we need to introduce the concept of thresholds, which is a crucial ingredient in the subproblems.
Strict and loose thresholds. Consider an arbitrary gain sequence . Recall that each is the -gain or -gain of some interval , and that these gains are sorted in non-increasing order. We call any integer value an -threshold for induced by on , or simply a threshold if is clear from the context. We implicitly assume so that talking about -threshold is also meaningful. Note that when then the canonical strategy for chooses all gains larger than and no gains smaller or equal to . Hence, we call a strict threshold if . On the other hand, when then gains of value may or may not be chosen by the canonical strategy of . (Note that in this case for gains of value to be picked, we would actually need .) In this case we call a loose threshold.
The idea will be to guess the threshold in an optimal solution and then use the fact that fixing the threshold helps us to limit the strategies for and anticipate the behavior of . Let be the canonical strategy realizing . We call any -threshold of an optimal threshold. We devise an algorithm that gets a value as input and computes correctly if is an optimal threshold, and computes a value not greater than , otherwise.
Clearly we only need to consider values of that are at most . In fact, since each -gain or -gain in a given gain sequence corresponds to a unique subset of voters, the -th largest gain can be at most , so we only need to consider -values up to . Observe that when there exists an optimal strategy that induces an -threshold equal to zero, then can win all voters not explicitly covered by . In this case the trivial strategy is optimal for . Our global algorithm is now as follows.
For all thresholds , compute an upper bound on the number of voters can win with a strategy that has an -threshold . For the run where is an optimal threshold, the algorithm will return .
Compute the number of voters wins in the game by the trivial strategy.
Report the best of all solutions found.
The subproblems for a fixed threshold . From now on we consider a fixed threshold value . The subproblems in our dynamic-programming algorithm for the game have several parameters.
A parameter , specifying that the subproblem is on the voter set .
Parameters , specifying that can use points and can use points.
A parameter , specifying the number of voters must win.
A parameter , specifying the strictness of the fixed -threshold .
Intuitively, the subproblem specified by a tuple asks for a strategy where wins at least voters from and such that that induces an -threshold of strictness , against an opponent using points. Player may use points and his objective will be to push his last point, as far to the right as possible. The value of the solution to such a subproblem, which we denote by , will indicate how far to the right we can push . Ultimately we will be interested in solutions where can push all the way to , which means he can actually win voters by placing only points.
To formally define , we need one final piece of notation. Let , let , and let be integers. For convenience, define . Now we define the -span of to , denoted by , as
For parameters , , and , we define the value and what it means when a strategy realizes this value, as follows.
For , we call it an elementary subproblem, and define if
wins at least voters from , and
induces an -threshold with strictness on ,
and we define otherwise. In the former case we say that realizes .
For , we call it a non-elementary subproblem, and is defined to be equal to the maximum real value such that there exists a strategy with , integer values with and , an integer , and a satisfying the following conditions:
wins at least voters from ,
induces an -threshold with strictness on ,
Let and . Then for all .
When a set satisfying the conditions exists, we say that realizes . We define if no such exists.
By induction we can show that if the parameters are not in a certain range, namely if one of the conditions or is violated, then . The next lemma shows we can compute from the solutions to our subproblems.
Let be a set of voters in . Let and be two integers such that and , and let be a fixed threshold. Then
Moreover, for an optimal threshold , the inequality changes to equality.
It is clear that is at least equal to the right-hand side in (1). Indeed, an equation implies by definition that there is a strategy of points such that wins at least voters against an opponent with points, and then must win voters as well. Next we prove the opposite direction for an optimal threshold .
Let be the canonical strategy realizing . By definition, is an -threshold induced by on . Let be the canonical strategy of with points against on and let be its sequence representation. Define and , and let be the largest index such that . Let , and , that is, is the number of voters from won by against . Note that is an -threshold of on . Let indicate whether our fixed threshold is a strict or loose threshold induced by and on , where .
We will need the following claim.
Claim. is the canonical strategy of with points against on , and for all we have .
Proof of claim. The second part of the claim is obvious by the definition of sequence representation and by the definition of .
The first part of the claim can be shown by contradiction. Suppose is the canonical strategy of with points against on , where . Let . Consider the strategy with sequence representation of size against . We have two cases.
is not an optimal strategy against . This means wins more voters than against , because the winning of any given voter by is only dependent on the number of points places in the interval containing that voter. But this contradicts the fact that is an optimal strategy against .
is an optimal strategy against , but is smaller in the lexicographical order than . This means that is a strategy of equal gain as whose sequence representation is lexicographically larger. But this contradicts the fact that is a canonical strategy against .
Let denote the subproblem given by for . Below we will show by induction on that for any we have
where we use as a shorthand for . Note that (2) finishes the proof of the lemma. Indeed, by definition, and which implies . Hence, and , and so there is a such that , thus finishing the proof. It remains to prove (2).
- Base case: .
- Induction step: .
We first prove that satisfies all five conditions from Definition 4 for and , and for and . This implies that . After that we argue there is no larger value of satisfying all conditions, thus finishing the proof.
wins at least voters from .
wins voters against by definition. Moreover, by the Claim above, is an optimal strategy for against on . Hence, can win voters from .
induces an -threshold with strictness on .
This is true by definition.
Obviously . Now let and assume for a contradiction that . In the next paragraph, we will argue that this implies that realizes . This gives the desired contradiction since is then an optimal strategy that is lexicographically greater than the canonical strategy .
Since the only difference between and is that is moved to the right to the position , the intervals only change for and for . Thus the possible gains for in all intervals stay the same, except possibly in and . Since and and by definition, the gains in are the same as the gains in . Finally, since , it is clear that cannot win more voters in against than she can win in against by playing a single point inside these intervals. Similarly, she cannot win more voters by playing two points in , as compared to playing two points in . Hence, wins at least the same number of voters as and so realizes .
realizes for .
By the induction hypothesis and since by definition, realizes . By the above Claim, is optimal against on and is optimal against on . Hence, , which proves the condition.
Let and . Then for all .
This is true by the above Claim.
We still need to show that is the maximum value in satisfying the above mentioned conditions. This is obvious for . For , with a similar reasoning to the proof of the third condition, we can show that is the maximum value in satisfying the conditions, as otherwise cannot be the canonical strategy realizing . Namely, we assume with is the solution to realized by