IWOCA 2020: Combinatorial Algorithms pp 277-288

# A Parameterized Perspective on Attacking and Defending Elections

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 12126)

## Abstract

We consider the problem of protecting and manipulating elections by recounting and changing ballots, respectively. Our setting involves a plurality-based election held across multiple districts, and the problem formulations are based on the model proposed recently by [Elkind et al., IJCAI 2019]. It turns out that both of the manipulation and protection problems are NP-complete even in fairly simple settings. We study these problems from a parameterized perspective with the goal of establishing a more detailed complexity landscape. The parameters we consider include the number voters, and the budgets of the attacker and the defender. While we observe fixed-parameter tractability when parameterizing by number of voters, our main contribution is a demonstration of parameterized hardness when working with the budgets of the attacker and the defender.

## Keywords

Elections W-hardness Parameterized complexity

## 1 Introduction

Electoral fraud and errors in consolidation of large-scale voting data are fundamental issues in democratic societies. To counteract issues with malicious manipulations and accidental errors in the counting of votes, most electoral systems allow for strategic recounting of ballots to verify the election outcome. Recounting is generally an expensive and high-stakes process, and it would be desirable to formalize the problem so as to capture the relevant trade-offs and possibly pursue an algorithmic approach to finding an optimal recounting strategy. Such a framework was recently proposed by Elkind et al. , where the authors considered the problems of protecting and manipulating elections by recounting and changing ballots, respectively. These problems are modeled as a Stackelberg game involving an attacker and a defender. Both players work with limited budgets (say $$\mathcal {B}_A$$ and $$\mathcal {B}_D$$), and the question is if the players can develop optimal strategies for their desired outcomes.

In this model, the election is spread out across multiple districts, with the voter preferences aggregated according to the plurality voting rule in one of two different ways, which we will explain explicitly in a moment. The manipulation problem is the following. The attacker has to optimize, typically with the goal of turning the election in favor of a particular candidate that he may have in mind, an attack strategy that involves manipulating the votes in at most $$\mathcal {B}_A$$ districts while ensuring that the impact of the attack persists even if the defender restores at most $$\mathcal {B}_D$$ of these districts to their original state. In the recounting problem, the defender is given complete information about the original and manipulated voting profiles and she can restore the state of at most $$\mathcal {B}_D$$ districts with the goal of making the “true winner” win the repaired election.

Known Results. The results obtained in  already demonstrate the hardness of the attacker’s and defender’s problems for two natural ways of aggregating the votes: (1) Plurality over Voters (PV), where districts are only used for the purpose of collecting the ballots and the winner is selected among the candidates that receive the largest number of votes in total, and (2) Plurality over Districts (PD), where each district selects a preferred candidate using the Plurality rule, and the overall winner is chosen among the candidates supported by the largest number of districts, or the set of districts with largest total weight if the districts have weights associated with them. We briefly recall the main highlights from , since this provides the context for our contributions. It turns out that the recounting problem is NP-complete for both implementations of the plurality rule, even when there are only three candidates (this result assumes a succinct representation of the votes) or even when the votes are specified in unary. The problem is tractable when PD is employed over unweighted districts. On the other hand, the manipulation problem is NP-hard for PD even with unweighted districts, and in fact, $$\Sigma _2^P$$-complete for PD with succinct input even when there are only three candidates. Further, it is NP-hard for PV, again even when there are only three candidates (in the setting of succinct input) or even when the votes are specified in unary.

Our Contributions. Our main contribution is to establish the parameterized intractability of both the recounting and manipulation problems under both implementations of the plurality voting rule when parameterized by the budget of the players. Our contributions directly address a direction suggested by . In particular, we obtain the following results:

### Theorem 1

The PV-Rec and PD-Rec problems are W-hard and W-hard, respectively, when parameterized by the budget of the defender, and are FPT when parameterized by the number of districts.

### Theorem 2

The PV-Man and PD-Man problems are W-hard when parameterized by the budget of the attacker (even when the defender budget is zero), and are FPT when parameterized by the number of voters.

Our results rely on reductions from traditional problems such as Multi-Colored Clique and Dominating Set. Our hardness results work even when the input is specified in unary. It is reasonably natural to imagine that these parameters would be small in practice, since they correspond to real-world budget constraints. To that end, our results here bring mixed news: on the one hand, the hardness of mounting an attack may be viewed as a positive outcome, but on the other hand, it turns out that the problem of optimally reversing damages is hard as well. This triggers the natural question of whether the recounting problem admits good approximations when treated as an optimization problem, either on the criteria of the budget or on the criteria of the quality of the winning candidate that we are able to restore. The FPT algorithms that we present rely mostly on straightforward enumeration, and it would be interesting to improve the running times in question.

Related Work. While we build most closely on the work of Elkind et al. , and much of the work on manipulation in the literature of social choice does not consider the possibility of a counter-attack, we note that some recent investigations have been carried out in a spirit that is similar to our present contribution. Dey et al.  also consider a parameterized approach to protecting elections, where the voting rule in question is the Condorcet rule. They build on the work of Yin et al. , who study a pre-emptive approach to protecting elections. In these models, the defender allocates resources to guard some of the electoral districts, so that the votes there cannot be influenced, and the attacker responds afterward. This is in contrast to our setting, where the defender makes the second move. The social choice literature is rich in studies of manipluation, control, and bribery. For a detailed overview we direct the reader to the surveys [1, 6].

## 2 Preliminaries

We recall the setting from . We consider elections over a candidate set C, where $$|C| = m$$. There are n voters who are partitioned into k pairwise disjoint districts. The set of all districts is $$\mathcal {D}$$. For each $$i \in \mathcal {D}$$, let $$n_i = |i|$$. We note that in this context, i denotes a subset of voters. For each $$i \in \mathcal {D}$$, district i has a weight $$w_i$$, which is a positive integer. We say that an election is unweighted if $$w_i = 1$$ for all $$i \in \mathcal {D}$$. Each voter votes for a single candidate in C. For each $$i \in \mathcal {D}$$ and each $$c \in C$$ let $$\mathbf{v} _{ic}$$ denote the number of votes that candidate c gets from voters in i. We refer to the list $$\mathbf{v} = (\mathbf{v} _{ic})_{i \in \mathcal {D}, c \in C}$$ as the vote profile.

Let $$\succ$$ be a linear order over C; $$a \succ b$$ indicates that a is favored over b. We consider the following two voting rules, which take the vote profile $$\mathbf{v}$$ as their input.

• Plurality over Voters (PV): We say that a candidate a beats a candidate b under PV if $$\sum \limits _{i \in \mathcal {D}}{} \mathbf{v} _{ia} > \sum \limits _{i \in \mathcal {D}}{} \mathbf{v} _{ib}$$ or $$\sum \limits _{i \in \mathcal {D}}{} \mathbf{v} _{ia} = \sum \limits _{i \in \mathcal {D}}{} \mathbf{v} _{ib}$$ and $$a \succ b$$; the winner is the candidate that beats all other candidates. Note that district weights $$w_i$$ are not relevant for this rule.

• Plurality over Districts (PD): For each $$i \in \mathcal {D}$$ the winner $$c_i$$ in i is chosen from the set $$arg\,max_{c \in C} \mathbf{v} _{ic}$$, with ties broken according to $$\succ$$. Then, for each $$i \in \mathcal {D}$$, $$c \in C$$, we set $$w_{ic} = w_i$$ if $$c = c_i$$, else $$w_{ic} = 0$$. We say that a candidate a beats a candidate b under PD if $$\sum \limits _{i \in \mathcal {D}} w_{ia} > \sum \limits _{i \in \mathcal {D}} w_{ib}$$ or $$\sum \limits _{i \in \mathcal {D}} w_{ia} = \sum \limits _{i \in \mathcal {D}} w_{ib}$$ and $$a \succ b$$. The winner is the candidate that beats all other candidates. Given the voting profile $$\mathbf{v}$$, we take the winner in district i to be $$\mathcal {G}_\mathbf{v} (i)$$. We shall omit the subscript if the voting profile to be used is clear from the context.

For PV and PD, we define the social welfare of a candidate $$c \in C$$ as the total number of votes that c gets and the total weight that c gets, respectively:
$$SW^{PV}(c) = \sum \limits _{i \in \mathcal {D}} \mathbf{v} _{ic}, \,\,\,SW^{PD}(c) = \sum \limits _{i \in \mathcal {D}} w_{ic}$$
Hence, the winner under each voting rule is a candidate with the maximum social welfare. We now define some additional terminology that we use later in this paper:
• Score: Given a voting profile u, under the PD rule, the score of a candidate p is defined as the sum of weights of districts in which the candidate p wins. Formally, $$sc_u(p) = \sum \limits _{i \in \mathcal {D}} w_i \cdot \delta _{\mathcal {G}(i)p}$$ (Here $$\delta$$ is the Kronecker delta function).

• Rivals: Given a voting profile u, under the PD rule, we define the rivals of a candidate p to be the set of candidates $$\mathcal {C} \subset C$$ such that for all candidates $$c \in \mathcal {C}$$, either $$sc_u(c) > sc_u(p)$$ or $$sc_u(c) = sc_u(p)$$ and $$c \succ p$$.

We now consider the scenario where an election may be manipulated by an attacker, who wants to change the result of the election in favor of his preferred candidate p. The attacker has a budget $$B_{\mathcal {A}} \in \mathbb {N}$$ which enables him to change the voting profiles in at most $$B_{\mathcal {A}}$$ districts. For each district $$i \in \mathcal {D}$$, we define $$\gamma _i,0\le \gamma _i\le n_i$$ to be the number of votes that the attacker can manipulate in i. After the manipulation we have a voting profile $$\overline{\mathbf{v }} = (\overline{\mathbf{v }}_{ic})_{i \in \mathcal {D}, c \in C}$$. We formalize the notion of a manipulation as a set $$M \subseteq \mathcal {D}$$ and a voting profile $$\overline{\mathbf{v }}$$ such that $$|M| \le B_{\mathcal {A}}$$ where $$\overline{\mathbf{v }}_{ic} = \mathbf{v} _{ic}$$ for all $$i \notin M$$ and for all $$i\in M$$ it holds that $$\sum \limits _{c \in C}\overline{\mathbf{v }}_{ic} = n_i$$ and $$\sum \limits _{c \in C} \frac{|\overline{\mathbf{v }}_{ic} - \mathbf{v} _{ic}|}{2} \le \gamma _i$$.

After the attacker, a socially minded defender with budget $$B_\mathcal {D} \in \{0\} \cup \mathbb {N}$$ can demand a recount in at most $$B_\mathcal {D}$$ districts. Formally, a recounting strategy R is a set such that $$R \subseteq M$$ and $$|R| \le B_\mathcal {D}$$. After the defender recounts, the vote counts of the districts in R are restored to their original values. This results in a new voting profile $$u = (u_{ic})_{i \in \mathcal {D}, c \in C}$$ where for all $$i \in \mathcal {D}\setminus M \cup R, u_{ic} = \mathbf{v} _{ic}$$ and for all $$i \in M \setminus R, u_{ic} = \overline{\mathbf{v }}_{ic}$$. Then the voting rule $$\mathcal {V} = \{PV, PD\}$$ is applied to the profile u that is obtained to obtain a winner (let it be $$w'$$) with ties broken according to $$\succ$$. The defender’s objective is to maximize $$SW^{\mathcal {V}}(w')$$. It is a game of perfect information i.e. both entities know all information about the game.

We say that the attacker wins if he has a manipulation strategy such that after the defender moves optimally, the preferred candidate of attacker i.e. p wins. We define the following two decision problems based on voting rule $$\mathcal {V} \in \{PV, PD\}$$ and the two entities:
• $$\mathcal {V}$$-Man: Given the voting rule $$\mathcal {V}$$, a voting profile $$\mathbf{v}$$, the linear order $$\succ$$, a preferred candidate p, attacker budget $$B_\mathcal {A}$$, defender budget $$B_{D}$$ and weights $$w_i$$ and parameter $$\gamma _i$$ for each district $$i \in \mathcal {D}$$, does the attacker have a winning strategy?

• $$\mathcal {V}$$-Rec: Given the voting rule $$\mathcal {V}$$, a voting profile $$\mathbf{v}$$, a manipulated voting profile $$\overline{\mathbf{v }}$$, a preferred candidate w, the linear order $$\succ$$, defender budget $$B_{D}$$ and weights $$w_i$$ for each district $$i \in \mathcal {D}$$, can the defender make w win by recounting at most $$B_\mathcal {D}$$ districts?

Next we state the definitions and parameterized hardness results for decision problems that are used throughout this paper, and refer the reader to [2, 4] for a detailed introduction to parameterized complexity and the framework of parameterized reductions.

• Dominating Set: A set of vertices D is a dominating set in graph G if $$V (G) = N_G[D]$$. Dominating Set asks that given a graph G and a non-negative integer k, does there exist a dominating set of size at most k? Dominating Set is known to be W-hard parameterized by k .

• Multi-Colored Clique: Given a graph G and a partition of the vertex set V into k color classes $$V_1, V_2, \ldots V_k$$, Multi-Colored Clique asks whether there exists a clique of size k with one vertex each from $$V_1, V_2, \ldots V_k$$. Multi-Colored Clique is known to be W-hard parameterized by k [7, 9].

## 3 Plurality over Voters (PV)

In this section, we analyze the parameterized complexity of PV-Rec and PV-Man with different parameters. It is easy to see that PV-Rec is FPT when parameterized by the number of districts (k), since we may guess the districts to be recounted. Since $$k \le n$$, the problem is also FPT parameterized by the number of voters.

### Proposition 1

PV-Rec is FPT when parameterized by the no. of districts k or the number of voters n.

We now show that PV-Rec is W-hard when parameterized by budget of the defender ($$\textsc {B}_\mathcal {D}$$). Before describing the construction formally, we briefly outline the main idea. We reduce from the Dominating Set, which is well-known to be W-hard parameterized by the size of the solution, which we denote by k. Let $$(G = (V,E), k)$$ be an instance of Dominating Set. We create an instance of PV-Rec where we have candidates and districts corresponding to vertices of G, along with a special candidate w who is our desired winner. To begin with, we have an “immutable” district—one where the original and manipulated votes are identical—that sets the baseline score of the special candidate at n. The number votes for any other candidate c from this district is fixed to ensure that the total number of votes for c is also n. In a district corresponding to a vertex v, every candidate corresponding to a vertex $$u \in N[v]$$ gets one vote. In the original scenario, all voters in these districts vote only for some dummy candidates. The key is that a “switch” in a district corresponding to a vertex v reduces the vote count for all vertices in N[v]. Since w receives no votes from any of the other districts, observe that the only way for w to emerge as a unique winner is if all of the other candidates lose votes from the switches. It is not hard to infer from here that the defender has a valid switching strategy if and only if G has a dominating set of size at most k.

### Lemma 1

PV-Rec is W-hard parameterized by $$\textsc {B}_\mathcal {D}$$, the defender’s budget.

### Proof

We present an FPT reduction from the Dominating Set problem. Let $$(G = (V,E), k)$$ be an instance of Dominating Set. Let $$N = |V|$$ and $$M = |E|$$. We begin by describing the construction of the reduced instance.

Districts: We introduce a baseline district $$\mathcal {D}_0$$. Further, for each vertex $$v \in V$$, we introduce a corresponding primary district $$\mathcal {D}_v$$.

Candidates: For each vertex $$v \in V$$ we introduce a main candidate $$c_v$$ and a dummy candidate $$d_v$$. We also have a special candidate w.

Voting Outcomes: The voting outcomes are as follows. For ease of presentation, let $$v \in V$$ be arbitrary but fixed.

1. 1.

The special candidate does not receive any votes from the primary districts in either the original or the manipulated settings. In particular, $$\overline{\mathbf{v }}_{\mathcal {D}_v,w} = \mathbf{v} _{\mathcal {D}_v,w} = 0$$.

2. 2.

In the original election, the main candidates have no votes in the primary districts, that is, $$\mathbf{v} _{\mathcal {D}_v,c_u} = 0$$ for all $$u \in V$$.

3. 3.
In the manipulated election, a main candidate $$c_u$$ has a single vote in its favor in the primary district $$\mathcal {D}_v$$ if and only if $$u \in N_G[v]$$. Formally,
$$\overline{\mathbf{v }}_{\mathcal {D}_v,c_u} = {\left\{ \begin{array}{ll} 1 &{}\quad \text {if }u \in N_G[v] \\ 0 &{}\quad \text {otherwise}\\ \end{array}\right. }$$

4. 4.
In the original election, a dummy candidate $$d_u$$ has a score of $$d(u)+1$$ in the primary district corresponding to u, and a score of zero everywhere else. Formally,
$$\mathbf{v} _{\mathcal {D}_v,d_{u}} = {\left\{ \begin{array}{ll} d(v)+1 &{}\quad \text {if u = v}\\ 0 &{}\quad \text {otherwise}\\ \end{array}\right. }$$

5. 5.

The dummy candidates receive no votes in the primary districts in the manipulated elections.

6. 6.

In the baseline district, the score of the main candidates is defined to ensure that their total score in the manipulated election is N. In particular, $$\overline{\mathbf{v }}_{\mathcal {D}_0,c_v} = \mathbf{v} _{\mathcal {D}_0,c_v} = N - (d (v) + 1)$$.

7. 7.

The dummy candidates receive no votes in the baseline district in both the original and manipulated elections.

8. 8.

The score of w is N in the baseline district in both the original and manipulated elections. In particular, $$\overline{\mathbf{v }}_{\mathcal {D}_0,w} = \mathbf{v} _{\mathcal {D}_0,w} = N$$.

To summarize, the primary districts corresponding to a vertex v have $$d(v) + 1$$ voters, and all main candidates corresponding to vertices in $$N_G[v]$$ get one vote each in the manipulated world; while the dummy candidate $$d_v$$ gets all the votes in the original world. Observe that in the manipulated election, all the candidates except the dummy candidates have a total score of N, while the dummy candidates have a score of zero.

We set $$\textsc {B}_\mathcal {D}$$ $$= k$$. The preferred candidate is w. We also work with the following tie-breaking order: $$\ldots c_{v} \ldots \succ w \succ \ldots d_{vu} \ldots ,$$ where the main candidates are preferred over the special candidate, but the special candidate dominates the dummy candidates. This completes the description of the constructed instance. Due to lack of space, we defer the proof of equivalence to a full version  of this paper.    $$\square$$

We now turn our attention to PV-Man. First, we prove that PV-Man is FPT parameterized by the number of voters. This follows by first observing that $$m \le 2n$$ without loss of generality, since at most 2n candidates can have a non-trivial score across the original and manipulated instances combined, and the remaining candidates are irrelevant to the instance. The algorithm can then proceed by guessing a manipulation strategy—note that the space of all possible strategies is bounded once the candidates are bounded—and then invoking the PD-Rec algorithm from the previous section as a subroutine to verify the validity of the guessed strategy. Thus, we have the following.

### Proposition 2

PV-Man is FPT parameterized by n, the number of voters.

We now show that PV-Man is W-hard parameterized by budget of the attacker ($$\textsc {B}_\mathcal {A}$$). Before describing the construction formally, we briefly outline the main idea. We reduce from the Multi-Colored Clique problem, which is well-known to be W-hard parameterized by the number of color classes, which we denote by k. Let $$(G = (V = V_1 \uplus \cdots \uplus V_k,E), k)$$ be an instance of Multicolored-Clique. In the reduced instance, we introduce a special candidate w who is the preferred candidate of the defender. The rival candidates are candidates corresponding to color classes $$\mathcal {R}_i$$, ordered pairs of color classes $$\mathcal {R}_{i j}$$ and vertices $$c_v$$. We also introduce some dummy candidates. We introduce districts corresponding to each $$v \in V$$ and each $$e\in E$$. Also, there exists a special district which is “immutable”, which sets up the initial scores of all candidates such that they are equal to a large number (say F). Initially, w has 0 votes. The scores are set up in such a way that the attacker has to transfer votes of $$k^2$$ districts to w to make her win. The scores are engineered to ensure that the attacker has a successful manipulation strategy if and only if these $$k^2$$ districts correspond to k vertices and $${k \atopwithdelims ()2}$$ edges that form a multicolored clique in G.

### Lemma 2

PV-Man is W-hard parameterized by $$\textsc {B}_\mathcal {A}$$, the attacker’s budget.

### Proof

We demonstrate a parameterized reduction from the Multi-Colored Clique problem. Let $$(G = (V = V_1 \uplus \cdots \uplus V_k,E), k)$$ be an instance of Multi-Colored Clique. We begin by describing the construction.

Districts: There are two types of districts. We have a primary district $$\mathcal {D}_v$$ for each vertex $$v \in V$$ and two secondary districts $$\mathcal {D}_{uv}$$ and $$\mathcal {D}_{vu}$$ for each edge $$e = (u,v) \in E$$. Apart from these, there is a baseline district $$\mathcal {D}_0$$.

Candidates: For each vertex $$v \in V$$ we will have a main candidate $$c_v$$. Also, we have challenger candidates corresponding to color classes $$\mathcal {R}_i$$’s and ordered pairs of color classes $$\mathcal {R}_{ij}$$’s. We introduce some dummy candidates of an unspecified number, whose role is equalize the number of votes across primary and secondary districts. Finally, we have a special candidate w.

Voting Profiles: We introduce the following voting outcomes for the candidates.

1. 1.

The score of the special candidate w is zero in all districts.

2. 2.

A main candidate $$c_v$$ for $$v \in V$$ has a score of $$k-1$$ in the primary district corresponding to v, and a score of zero in all other primary districts.

3. 3.
A main candidate $$c_v$$ for $$v \in V$$ has a score of one in every secondary district corresponding to an edge $$e = \{u,w\}$$ that it is not incident to, provided u and v share the same color class. In particular, if $$v \in V_i$$ and there are t edges incident on $$V_i \setminus \{v\}$$, then $$c_v$$ has a score of one in t secondary districts. Formally, assuming $$v \in V_i$$, we have:
$$\mathbf{v} _{\mathcal {D}_{uw},c_v} = {\left\{ \begin{array}{ll} 1 &{}\quad \text {if }u \ne v \text { and }u\in V_i \\ 0 &{}\quad \text {otherwise}\\ \end{array}\right. }$$

4. 4.
A challenger candidate corresponding to color class i has one vote from any primary district corresponding to a vertex $$v \in V_i$$ and a score of zero from all other primary districts. In other words:
$$\mathbf{v} _{\mathcal {D}_v,\mathcal {R}_i} = {\left\{ \begin{array}{ll} 1 &{}\quad \text {if }v \in V_i \\ 0 &{}\quad \text {otherwise}\\ \end{array}\right. }$$

5. 5.

A challenger candidate corresponding to an ordered pair of color classes $$(V_i,V_j)$$ has one vote from any secondary district $$\mathcal {D}_{uv}$$ corresponding to an edge $$e \in E$$ whose endpoints u and v are in color classes $$V_i$$ and $$V_j$$ respectively, and a score of zero from all other secondary districts. Note that the candidates $$\mathcal {R}_{ij}$$ and $$\mathcal {R}_{ji}$$ receive scores of one from distinct secondary districts. Specifically, we have: $$\mathbf{v} _{\mathcal {D}_{uv},\mathcal {R}_{i j}} = 1$$ if $$u \in V_i$$ and $$v \in V_j$$.

Now, let $$\ell$$ be the size of the largest—in terms of the number of voters—among the primary and secondary districts constructed so far. For every primary or secondary district D with $$\nu (D)$$ voters, we add $$\ell - \nu (D)$$ dummy voters and dummy candidates, and we let each dummy voter vote for a distinct dummy candidate. We let $$F = \ell k^2$$.

We are now ready to specify the voting outcomes from the baseline district. these are simply designed to ensure that all primary candidates $$c_v$$ get $$F + k-2$$ votes and the challenger candidates get F votes, which is easy to verify from the proposed outcomes below:
1. 1.

$$\mathbf{v} _{\mathcal {D}_0,c_v} = F-1- \sum \limits _{e = \{u,v\} \in E} (\mathbf{v} _{\mathcal {D}_{uv},c_v} + \mathbf{v} _{\mathcal {D}_{vu},c_v}$$)

2. 2.

$$\mathbf{v} _{\mathcal {D}_0,\mathcal {R}_i} = F-\sum \limits _{u \in V}{} \mathbf{v} _{\mathcal {D}_u,\mathcal {R}_i} - \sum \limits _{e = \{u,v\} \in E}(\mathbf{v} _{\mathcal {D}_{uv},\mathcal {R}_i} + \mathbf{v} _{\mathcal {D}_{vu},\mathcal {R}_i})$$

3. 3.

$$\mathbf{v} _{\mathcal {D}_0,\mathcal {R}_{i j}} = F-\sum \limits _{u \in V}{} \mathbf{v} _{\mathcal {D}_u,\mathcal {R}_{i j}} - \sum \limits _{e = \{u,v\} \in E}(\mathbf{v} _{\mathcal {D}_{uv},\mathcal {R}_{i j}} + \mathbf{v} _{\mathcal {D}_{vu},\mathcal {R}_{i j}})$$

Note that apart from the above, the dummy candidates get 1 vote each, and the special candidate w has 0 votes. Also, the attacker has no room to manipulate in the baseline district, that is, $$\gamma _{\mathcal {D}_0} = 0$$. On the other hand, the attacker can modify up to $$\ell$$ votes in the primary and secondary districts. Further, we set $$\textsc {B}_\mathcal {A}= k^2$$ and $$\textsc {B}_\mathcal {D}= 0$$. The preferred candidate is w. Finally, we impose the following tie-breaking order:
$$\ldots \mathcal {R}_i \ldots \succ \ldots \mathcal {R}_{i j} \ldots \succ \ldots c_{v} \ldots \succ w \succ \ldots \text{ dummies } \ldots .$$
This completes the description of the constructed instance. We now turn to the proof of equivalence.
Forward Direction. Let a multi-colored clique S of size k be given. The attacker chooses the k primary and $$2 {k \atopwithdelims ()2}$$ secondary districts corresponding to the vertices and edges of S, and transfers all the $$\ell$$ votes in these $$k^2$$ districts to the desired candidate w. The score of w is now F. Further, note that the scores of all challenger candidates has decreased by one to $$F-1$$, and the scores of all main candidates have decreased by $$k-1$$ as well, but for different reasons: for main candidates corresponding to vertices of the clique, the drop is directly from the recounting in the primary districts, while for any other main candidate, the drop is cumulative across $$(k-1)$$ relevant secondary districts. In particular, suppose $$S \cap V_i := \{v_i\}$$. Consider any $$u \in V_i$$ such that $$u \ne v_i$$, and observe that $$c_u$$ had a score of one in the following $$(k-1)$$ districts:
$$D_{v_i v_1}, \ldots , D_{v_i v_{i-1}},D_{v_i v_{i+1}}, \ldots , D_{v_i v_k},$$
which have indeed been attacked, and therefore the score of $$c_u$$ reduces by $$k-1$$. This leaves all candidates ranked ahead of the special candidate w in the tie-breaking order with a score less than the final score of w, and the scores of the dummy candidates is either zero or one, thus they pose no threat to w. Therefore, w wins the election under this attack, concluding the argument in the forward direction.

Reverse Direction. In the reverse direction, we essentially argue that any valid solution must resemble the structure of the solution that we obtained while demonstrating the forward direction. This follows from the construction, and due to lack of space, the details are deferred to a full version  of this paper.    $$\square$$

## 4 Plurality over Districts (PD)

In this section, we analyze the parameterized complexity of PD-Rec and PD-Man. As with PV-Rec, it is easy to see that PD-Rec is also FPT when parameterized by the number of districts (k), since we may guess the districts to be recounted. Since $$n \ge k$$, it is also FPT parameterized by the number of voters.

### Proposition 3

PD-Rec is FPT when parameterized by the number of districts k or the number of voters n.

We now show that PD-Rec is W-hard parameterized by budget of the defender $$\textsc {B}_\mathcal {D}$$. Before describing the construction formally, we briefly outline the main idea. We reduce from the Multicolored-Clique Problem, which is well-known to be W-hard parameterized by the no. of color classes, which we denote by k. Let $$(G = (V = V_1 \uplus \cdots \uplus V_k,E), k)$$ be an instance of Multicolored-Clique. In the reduced instance, we introduce a special candidate w who is the preferred candidate of the defender. The rival candidates are candidates corresponding to color classes $$\mathcal {R}_i$$ and ordered pairs of color classes $$\mathcal {R}_{ij}$$. Further, we introduce candidates encoding the vertices $$c_v$$ and edges $$h_e$$ & $$a_e$$. We also introduce some dummy candidates. We introduce two districts corresponding to each $$v \in V$$ and five districts corresponding to each $$e\in E$$. Also, there exists a baseline district for each candidate which is “immutable”, which sets up the initial scores of all candidates such that they are equal to a large number (say $$\lambda$$). The scores are set up in such a way that there is no way to increase the score of w, thus we require to reduce the score of all the rivals by at least one while not increasing the scores of other candidates. But the districts and voting profiles are engineered so as to enforce that any recounting solution must have a certain structure, from which we can draw a correspondence to a subset of vertices which must in fact form a multi-colored clique of size k in G.

### Lemma 3

PD-Rec is W-hard parameterized by $$\textsc {B}_\mathcal {D}$$, the defender’s budget.

### Proof

This hardness result follows from the following reduction from the Multi-Colored Clique. The given instance is the graph $$G = (V,E)$$ and the number of unique color classes, k, where $$V_i$$ denotes the $$i^{th}$$ color class. We begin by describing the construction of the reduced instance.

Candidates: For every color class $$1 \le i \le k$$ there is a candidate $$\mathcal {R}_i$$ corresponding to $$V_i$$. Further, for every pair of color classes (ij) such that $$1 \le i < j \le k$$, we introduce two candidates $$\mathcal {R}_{ij}$$ and $$\mathcal {R}_{ji}$$. These will be the rival candidates of the reduced instance. Now we introduce candidates that encode the vertices and edges of the graph G. To begin with, for each vertex $$v \in V$$ we introduce two candidates $$c_v$$ and $$d_v$$, which we will refer to as the main and dummy candidates, respectively. Also, for every edge $$e \in E$$, we introduce two candidates $$h_{e}$$ and $$a_{e}$$, which we refer to as the helper and auxiliary candidates, respectively. Finally, we have a special candidate w. To summarize, the overall set of candidates is:
$$C = \{R_i ~|~ i \in [k]\} \cup \left\{ R_{ij}, R_{ji} ~|~ (i,j) \in {[k] \atopwithdelims ()2} \right\} \cup \{c_v,d_v ~|~ v \in V \} \cup \{a_e, h_e ~|~ e \in E\}$$
Districts: We introduce the following districts.
1. 1.

For each $$v \in V$$ we introduce a primary district $$D_v$$ with weight one and a critical district $$D^\star _v$$ with weight k.

2. 2.

For each $$e = (u,v) \in E$$, we introduce two edge districts $$D_{uv}$$ and $$D_{vu}$$, one support district $$S_{e}$$, and two transfer districts $$T_{e,u}$$ and $$T_{e,v}$$. The support districts have weight two, while the remaining districts have weight one.

3. 3.

For each candidate $$c \in C \setminus \{d_v ~|~ v \in V\}$$, we introduce a baseline district $$B_c$$ with a weight of $$\lambda _c$$, which will be specified in due course.

Voting Outcomes: The voting outcomes in the original and manipulated districts are depicted in the Table 1 below.
Table 1.

For the winners depicted above assume that $$v \in V_j$$ and that $$e = (u,v)$$, and further that $$u \in V_i$$ and $$v \in V_j$$. The subscript c in the last column corresponding to the baseline districts denotes an arbitrary non-dummy candidate.

 District type $$D_v$$ $$D_v^\star$$ $$D_{uv}$$ $$D_{vu}$$ $$S_e$$ $$T_{e,u}$$ $$T_{e,v}$$ $$B_c$$ Original winner $$c_v$$ $$d_v$$ $$h_e$$ $$h_e$$ $$a_e$$ $$c_u$$ $$c_v$$ c Manipulated winner $$R_{j}$$ $$c_v$$ $$\mathcal {R}_{ij}$$ $$\mathcal {R}_{ji}$$ $$h_e$$ $$a_e$$ $$a_e$$ c Weight 1 k 1 1 2 1 1 $$\lambda _c$$

Note that the voting outcome in the baseline districts is the same in the original and manipulated settings. It only remains to specify explicitly the weights of the baseline districts. We let $$\lambda _w := (n+1)k + 6m$$. Recall that this is the weight of the baseline district corresponding to the special candidate. For any non-dummy candidate c, let s(c) be its score from the manipulated districts. We then set $$\lambda _c := \lambda _w - s(c)$$. With these weights, we ensure that all the non-dummy candidates tie for the same score (i.e, $$\lambda _w$$) in the manipulated election, and all dummy candidates have a score of zero. We note that all the weights introduced here are polynomially bounded. We set $$B_\mathcal {D} = 2k + 5\times \left( {\begin{array}{c}k\\ 2\end{array}}\right)$$. The preferred candidate is w.

We enforce the following tie-breaking order: $$\ldots \mathcal {R}_i \ldots \succ \ldots \mathcal {R}_{i j} \ldots \succ w \succ \ldots c_{v} \ldots \succ \ldots a_e \ldots \succ \ldots h_e \ldots \succ \ldots d_v \ldots .$$

This completes the description of the constructed instance. We defer the proof of equivalence to a full version  of this paper due to lack of space.    $$\square$$

We now turn our attention to PD-Man. We observe that PD-Man can be shown to be W-hard by a reduction from PD-Rec. We briefly sketch the main idea: to begin with, we switch the roles of the manipulated profiles and the original ones, set the defender budget to zero and the attacker budget to the defender budget. We would also set up the votes in the districts to be such that the only meaningful manipulation by the attacker is to move the manipulated profile to the original one. The equivalence is based on repurposing a recounting strategy to an attacking one and vice-versa. We defer the details of this argument to a full version  of the paper.

## 5 Concluding Remarks

Our main contribution was to settle the parameterized complexity for the problems of recounting and manipulation when parameterized by the player budgets, for both the PD and PV implementations of the plurality voting rules. We also observed that these problems are FPT when parameterized by the number of voters, and that the recounting problem is FPT when parameterized by the number of districts as well.

We make some remarks about directions for future work. In the setting of succinct input, the problems of recounting and manipulation are already para-NP-hard because of the NP-completeness for three candidates. When the votes are specified in unary is an interesting direction for future work. The dynamic programming algorithm proposed by  already shows that the problem is in XP, parameterized by the number of candidates, and we leave open the issue of whether the problem is FPT. The problem of manipulation parameterized by the number of districts is another unresolved case. More broadly, it would be interesting to challenge the theoretical hardness results obtained here against heuristics employed on real world data sets. The issue of identifying and working with structural parameters is also an interesting direction for further thought.

## References

1. 1.
Conitzer, V., Walsh, T.: Barriers to manipulation in voting. In: Brandt, F., Conitzer, V., Endriss, U., Lang, J., Procaccia, A.D. (eds.) Handbook of Computational Social Choice, pp. 127–145. Cambridge University Press, Cambridge (2016)
2. 2.
Cygan, M., et al.: Parameterized Algorithms. Springer, Cham (2015).
3. 3.
Dey, P., Misra, N., Nath, S., Shakya, G.: A parameterized perspective on protecting elections. In: Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI 2019, pp. 238–244 (2019)Google Scholar
4. 4.
Downey, R.G., Fellows, M.R.: Parameterized Complexity. Springer, New York (1999).
5. 5.
Elkind, E., Gan, J., Obraztsova, S., Rabinovich, Z., Voudouris, A.A.: Protecting elections by recounting ballots. In: Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence (IJCAI), pp. 259–265 (2019)Google Scholar
6. 6.
Faliszewski, P., Rothe, J.: Control and bribery in voting. In: Brandt, F., Conitzer, V., Endriss, U., Lang, J., Procaccia, A.D. (eds.) Handbook of Computational Social Choice, pp. 146–168. Cambridge University Press, Cambridge (2016)
7. 7.
Fellows, M.R., Hermelin, D., Rosamond, F.A., Vialette, S.: On the parameterized complexity of multiple-interval graph problems. Theor. Comput. Sci 410(1), 53–61 (2009)
8. 8.
Gowda, K.N., Misra, N., Patel, V.: A parameterized perspective on attacking and defending elections, CoRR abs/2005.03176 (2020). https://arxiv.org/abs/2005.03176
9. 9.
Pietrzak, K.: On the parameterized complexity of the fixed alphabet shortest common supersequence and longest common subsequence problems. J. Comput. Syst. Sci 67(4), 757–771 (2003)
10. 10.
Yin, Y., Vorobeychik, Y., An, B., Hazon, N.: Optimally protecting elections. In: Proceedings of the Twenty-Fifth International Joint Conference on Artificial Intelligence, IJCAI, pp. 538–545. IJCAI/AAAI Press (2016)Google Scholar