1 Introduction
Social choice theory is concerned with the aggregation of preferences expressed by the members of a society to arrive at a collective decision. The origins of social choice theory are often traced to the work of JeanCharles de Borda and Marquis de Condorcet in the 18th Century, even though it is now known that Condorcet’s voting rule had been already proposed by Ramon Llull in the 13th Century [8]. During the past two decades, social choice theory has been examined under the algorithmic lens, and computational social choice (COMSOC) has emerged as an interdisciplinary research area that combines insights and methods from mathematics, economics, logic, and computer science. The COMSOC community has carried out an indepth investigation of computational aspects of voting and preference aggregation in an election or a poll. Since preferences are often only partially expressed, the notions of necessary winners and possible winners were formulated by Konczak and Lang [14], as the candidates who win in every (respectively, in at least one) completion of the given partial preferences. Subsequent investigations produced a classification of the computational complexity of the necessary and possible winners for a variety of voting rules [3, 4, 21].
Here, we bring forth a novel framework that aims to create bridges between the COMSOC community and the data management community. We enrich the kinds of data analysis tasks that COMSOC methods currently support by incorporating context about candidates, voters, issues, and positions, thus going well beyond the mere determination of winners. To achieve this, we accommodate COMSOC primitives within a relational database framework, enabling the formulation and evaluation of sophisticated queries.
Motivating Example. A preference database [10] is depicted in Figure 1. The relations Cand and Voter contain demographic information about political candidates and voters, while Supports and Opposes list positions of candidates on campaign issues, and Ballot records results of an election or a poll. Observe that Ballot specifies preferences of a voter in an election with pairwise comparisons: the meaning of the tuple is that voter Ann prefers Clinton to Trump when polled on October 5.
Preferences of voters may be incomplete. In particular, Ann states that she prefers both Clinton and Johnson to Trump, but does not specify a relative preference between Clinton and Johnson. The incomplete preference relation Ballot gives rise to four completions, through , in which each session is associated with a complete ranking (a total order) over the candidates that is consistent with the partial preference in Ballot.
A data analyst may want to aggregate the votes of Ann and Bob to determine the winner of the Oct5 election—the candidate deemed most desirable by the voters—using a voting rule. In this paper, we focus on positional scoring rules—voting rules that assign a score to each candidate based on the candidate’s position in a ranking and then sum the scores across all rankings.
Our example involves two voting rules: plurality, which assigns a score of to the top candidate in each ranking and to all other candidates, and Borda, which assigns a score of to the candidate at position out of . The sum of scores of each candidate in each completion is shown in the bottom left table in Figure 1.
We are concerned with answering the following kind of question: Is there a winner according to the plurality rule in the October 5 election who is prochoice? This question is phrased in logicrule style below as:
What is the meaning of such a query posed on a database with partial preferences? In Section 3, we propose formal semantics that generalizes the concepts of necessary and possible winners from computational social choice to those of necessary and possible answers in a partial preference database.
Returning to the example in Figure 1, if we consider Borda’s rule, Clinton is the only necessary winner: she is the sole winner in , and , and is among the winners in . If we consider the plurality rule, we find the following winners in each completion: : Clinton, : Clinton and Trump, : Clinton and Johnson, : Johnson and Trump. Consequently, the set of necessary winners under plurality is empty. Observe that, although no candidate is a necessary winner under plurality, it is the case that at least one of the winners in each completion is prochoice. Thus, under the plurality rule, the query is necessary, i.e., true is a necessary answer of .
The preceding example illustrates the difference that context makes and points to the richness brought by combining social choice and data management.
Contributions. At the conceptual level, we develop a framework that combines social choice with database management, thus making it possible to study social choice problems in the context of additional information about voters, candidates, and issues. In particular, we give rigorous semantics to queries in this framework by introducing the notions of the necessary answers and the possible answers. At the technical level, we embark on an investigation of the computational complexity of query evaluation in this framework. In particular, we establish a number of results about the necessary answers of queries that stand in sharp contrast to results about the necessary winners under positional scoring rules.
We begin by exploring the complexity of computing the necessary answers under the plurality rule. It is well known that there is a polynomialtime algorithm for computing the necessary winners under the plurality rule, and in fact, such an algorithm exists for every pure positional scoring rule [14, 21]. We give a polynomialtime algorithm for computing the necessary answers of conjunctive queries that involve the plurality rule and have the property that the winner atoms belong to different connected components of the query. We prove that for a large class of conjunctive queries, the property that winner atoms belong to different connected components is precisely the property that distinguishes tractable from intractable queries under the plurality rule; particularly, evaluating queries in that class with two winner atoms in the same connected component is coNPcomplete.
Going beyond the plurality rule, we show that there is a natural conjunctive query involving database relations and winners such that computing the necessary answers is a coNPcomplete problem for all nontrivial positional scoring rules. By trivial we mean a scoring rule that assigns the same score to every candidate (hence, every candidate is a necessary winner). This result subsumes the corresponding results (Theorems 4 and 5) that we have published in the abridged version of this paper [12].
Cand  

cand  party  sex  edu  age 
Clinton  D  F  JD  70 
Johnson  L  M  BS  64 
Trump  R  M  BS  71 
Supports  

cand  issue 
Clinton  guncontrol 
Clinton  prochoice 
Johnson  prochoice 
Opposes  

cand  issue 
Johnson  guncontrol 
Trump  guncontrol 
Trump  prochoice 
Voter  

voter  sex  edu 
Ann  F  MS 
Bob  M  BS 
Ballot  

election  voter  lcand  rcand 
Oct5  Ann  Clinton  Trump 
Oct5  Ann  Johnson  Trump 
Oct5  Bob  Clinton  Johnson 
Oct5  Bob  Trump  Johnson 
cand  pl  Brd  pl  Brd  pl  Brd  pl  Brd 

Clinton  2  4  1  3  1  3  0  2 
Johnson  0  1  0  1  1  2  1  2 
Trump  0  1  1  2  0  1  1  2 
Candidate scores in the possible completions under the plurality (pl) and Borda (Brd) rules
A possible completion of Ballot  

election  voter  ranking 
Oct5  Ann  
Oct5  Bob 
A possible completion of Ballot  

election  voter  ranking 
Oct5  Ann  
Oct5  Bob 
A possible completion of Ballot  

election  voter  ranking 
Oct5  Ann  
Oct5  Bob 
A possible completion of Ballot  

election  voter  ranking 
Oct5  Ann  
Oct5  Bob 
2 Preliminaries
Relational databases and conjunctive queries.
A schema is a collection of relation symbols, each having an associated signature, which is a sequence of attribute names. A database instantiates each relation symbol with a corresponding relation (table). We will use the database in Figure 1 as our running example.
A query is a function that maps every database into a relation. More formally, a query has an associated input schema and an output signature, and it maps every database over the input schema into a relation over the output signature. If is a database and is a query, then denotes the relation resulting by evaluating on ; each tuple in is referred to as an answer to on . In this paper, we study conjunctive queries, which correspond to the fragment of firstorder logic obtained from atomic formulas using conjunction and existential quantification. Conjunctive queries are also known as selectprojectjoin (SPJ) queries, and are among the most frequently asked database queries.
We will write queries as logic rules with a body and a head. For example, consider the following query:
This query computes candidates who are older than 65 and whose sex is the same as that of voter Ann, and will return a single tuple, Clinton, when evaluated over the database in Figure 1. Note that Ann and 65 are constants in , while , , , , and are variables. The variables that occur in the body, but not in the head, of the query are existentially quantified.
A Boolean query is a query that has no free variables, hence it stands for a yes/no (true/false) question about the database. For example, the Boolean query
asks whether or not there is a candidate who is older than 65 and whose sex is the same as that of voter Ann.
Conjunctive query evaluation has been a central topic of research in the database management community (see [1]). In particular, it is well known that, for every fixed conjunctive query , there is a polynomialtime algorithm that, given a database , computes .
Incomplete databases and possible worlds.
Various notions of database incompleteness have been studied in depth for several decades. Common to these is the notion of possible worlds: these include the completions of incomplete databases and the solutions in data exchange and data integration [7, 9, 15]. Query answering is a central challenge studied in these frameworks, where the goal is to find the certain answers, i.e., the answers obtained on every completion or on every solution. Additionally, a possible answer is an answer that is obtained on at least one possible world. More formally, if denotes the set of possible worlds of the database representation at hand, then the set of certain answers to the query is the intersection , while the set of possible answers to is the union .
Voting profiles and voting rules.
Let be a set of candidates (or alternatives) and let be a set of voters. A complete voting profile is a tuple , where each is a total order of the set of candidates representing the ranking (preference) of voter on the candidates in .
Positional scoring rules constitute a large and extensively studied class of voting rules. Each positional scoring rule on a set of
candidates is specified by a scoring vector
of nonnegative integers, called the score values, such that . To avoid trivialities, we assume that there are at least two different score values. Suppose that is a total voting profile. The score of a candidate on is the value where is the position of candidate in . When the positional scoring rule is applied to , it assigns to each candidate the sum as the score of . The set of the winners consists of the candidates who achieved maximum score.From now on, we focus on positional scoring rules that are defined for every number of candidates. Thus, a positional scoring rule is an infinite sequence of scoring vectors such that each is a scoring vector of length . Alternatively, a positional scoring rule is a function that takes as argument a pair of positive integers with and returns as value a nonnegative integer such that . We will also assume that the function is computable in polynomial time. This implies that the winners can be computed in polynomial time.
As examples, the plurality rule is given by the infinite sequence of scoring vectors of the form , the approval rule is given by the infinite sequence of scoring vectors of the form , and the Borda rule is given by the infinite sequence of scoring vectors of the form .
Much on the literature makes the assumption that the rules are also pure, which means that the scoring vector of length is obtained from the scoring vector of length by inserting a score in some position of the scoring vector , provided that the decreasing order of score values is maintained. The plurality, approval and Borda rules are all pure.
Partial orders.
A preference over a collection of items is a linear order that ranks the items from the most to the least preferred. Often, our knowledge about the preference is only partial. Missing information in preferences is commonly modeled using a partial order, that is, a relation that is reflexive, transitive, and antisymmetric, but not necessarily total. A completion of a partial order is a total order that extends that partial order. A partial order may have exponentially many completions.
Partial voting profiles, necessary and possible winners.
A partial voting profile is a tuple , where each is a partial order of the set of candidates representing the partial ranking (partial preference) of voter on the candidates. A completion of a partial voting profile is a complete voting profile such that each is a completion of the partial order . The notions of necessary and possible winners were introduced by Konczak and Lang [14].
Let be a voting rule and a partial voting profile. The set of the necessary winners with respect to and is the intersection of the sets , where varies over all completions of . In other words, a candidate is a necessary winner with respect to and , if is a winner in for every completion of .
The set of the possible winners with respect to and is the union of the sets , where varies over all completions of . In other words, a candidate is a possible winner with respect to and , if is a winner in for at least one completion of .
On the face of the definitions, computing necessary and possible winners requires exponential time, since, in general, a partial order may have exponentially many completions. There is a substantial body of research on the computational complexity of the necessary and the possible winners for a variety of voting rules. The following complete classification of the complexity of the necessary and the possible winners for all pure positional scoring rules was obtained through the work of Konczak and Lang [14], Xia and Conitzer [21], Betzler and Dorn [4], and Baumeister and Rothe [3].
Theorem 1.
[Classification Theorem] The following hold.

For every pure positional scoring rule , there is a polynomialtime algorithm for computing the set of necessary winners, given a partial voting profile .

If is the plurality rule or is the veto rule, then there is a polynomialtime algorithm for computing the set of possible winners, given a partial voting profile . For all other pure positional scoring rules, the following problem is NPcomplete: given a partial voting profile and a candidate , is a possible winner with respect to and ?
3 A Relational Framework for COMSOC
Preference schemas and sessions.
We adopt and refine the formalism for preference databases proposed in [10] and explored further in [11]. A preference schema consists of preference relation symbols and ordinary relation symbols. The attribute list of each preference symbol is of the form , where is a list of attributes called session signature, and are attributes with candidates as values. The intent is that if is a tuple in an instance of the preference symbol , then candidate is preferred to candidate in the session determined by . In what follows, we will assume that each session signature consists of the attributes election and voter. The intuition is that values for election stand for particular events, such as an election (e.g., the election for city council members) or a poll (e.g., a poll on presidential candidates taken on October 5), while the values for voter range over the possible voters.
Incorporating voting rules and winners.
We augment the preference schema at hand with a new ternary relation symbol Winner. The signature of Winner is the triple . The intent is that rule has voting rules as values, while election and candidate have elections (or polls) and candidates as values, respectively. The new relation symbol Winner can now be used in standard relational database queries (e.g., SQL queries). To illustrate this, we return to our running example (the preference database in Fig. 1) and give examples of Boolean queries over this database.

Query : Is there a winner according to the plurality rule in the October 5 election who is prochoice?

Query : Are there a winner according to the Borda rule and a winner according to the 2approval rule such that the former supports gun control and the latter opposes it?
Necessary and possible answers.
What is the semantics of queries, such as the three preceding ones, in a framework that allows for partial preferences, voting rules, and winners? We propose two different semantics of queries over partial preference databases, namely, the necessary answers and the possible answers.
Let be a partial preference database. Then gives rise to a partial voting profile consisting of the partial orders that correspond to the identifiers of the session signature. For example, the pair gives rise to the partial order that expresses the (partial) preferences of Ann in the October 5 election (or poll).
Let be a total preference database. We say that is a completion of if is obtained from by completing all partial preferences into total ones. Thus, is a completion of iff and agree on the ordinary relation symbols and, for each preference relation symbol, the total voting profile arising from is a completion of the partial voting profile arising from .
Definition 1.
Let be a database query over the preference schema augmented with relation symbol Winner.

The necessary answers of on , denoted , is the intersection of the answers of on , as ranges over all completions of .

The possible answers of on , denoted , is the union of the answers of on , as ranges over all completions of .
If contains an atom of the form , then this atom is evaluated on by applying the voting rule on the total voting profile . Thus, evaluates to true on if and only if belongs to the set of the winners according to rule and the total voting profile . In this evaluation, only the part of the voting profile that is associated with the election is needed.
Clearly, the preceding notions of necessary and possible answers coincide with those of certain and possible answers in the framework of incomplete databases, where the set of possible worlds is the set of all completions of a given partial preference database .
If is a Boolean query, we say that is necessary on if is true for every completion , and possible on if is true for at least one completion . We denote by the decision problem: given , is necessary on ? Similarly, we denote by the decision problem: given , is possible on ?
We conclude this section by pointing out that our framework is different from other approaches that have explored the interaction between databases and social choice. For example, Konczak [13]
investigated the computation of necessary and possible winners via logic programming (however, that work does not involve the concepts of necessary answers and possible answers of queries considered here). In a different direction, Lukasiewicz et al.
[18] investigated top queries in databases using rankings whose computation involve the aggregation of partial preferences.4 Complexity of Necessary Answers
How difficult is it to compute the necessary answers and the possible answers of a fixed conjunctive query , given a partial preference database ? As regards upper bounds, we can consider every candidate tuple of values from the domain of , and test whether this tuple is indeed a necessary or possible answer. If the voting rules occurring in are such that their winners are computable in polynomial time, then, for every completion of , we have that can be evaluated in polynomial time in the size of . Consequently, deciding whether a tuple is a necessary answer of is in coNP, while deciding whether it is possible is in NP.
Here, we will investigate the computational complexity of the necessary answers of conjunctive queries. We begin by considering several motivating examples.
Example 1.
Assume that is an atomic query of the form . Computing the necessary and the possible answers of is the same as computing the necessary and the possible winners according to rule . Thus, if is a pure positional scoring rule, then this query is accounted for by the Classification Theorem 1 discussed earlier. ∎
Example 2.
Let be the query encountered earlier:
A moment’s reflection reveals that there is a difference between the problem of deciding whether
is possible and the problem of deciding whether is necessary.Indeed, to determine whether is possible on a partial preference database , it is enough to compute the set of the possible winners with respect to the plurality rule and the partial voting profile , and then intersect this set with the set of the prochoice candidates. Since the possible winners with respect to the plurality rule are computable in polynomial time, it follows that is decidable in polynomial time.
In other words, the possibility of can be rewritten to a query that involves the possible winners . Concretely, is equivalent to the query
In contrast, cannot be rewritten (at least in a straightforward way) to a computation involving the necessary winners . In particular, is not equivalent to the query
Indeed, for every completion of , there may exist a prochoice winner (thus, is necessary on ), but there may be different winners for different completions and, as a result, there may exist no necessary winner who is also prochoice (thus, the query evaluates to false on ).
Our results, however, will imply that is decidable in PTIME. ∎
Example 3.
Assume that is the query : Are there two winners with different positions on at least one issue?
Note that the query involves two Winner atoms and that the candidates and occurring in these atoms are linked via the variable in the two ordinary atoms of .
Our results will imply that is coNPcomplete. Thus, Examples 2 and 3 demonstrate that, when bringing together preferences, voting rules, and relational data in a unifying framework, we are in a new state of affairs in which methods and results from computational social choice need not apply directly. ∎
4.1 Complexity Results for the Plurality Rule
We present several complexity results for Boolean conjunctive queries. In what follows in this subsection, we assume that all queries considered involve the plurality rule and some fixed election, which appears as a constant value elec in the queries. Hence, each Winner atom has at most one variable, which stands for a winning candidate; we refer to such variable as a winner variable.
4.1.1 Tractability Results
We begin with a tractability result.
Theorem 2.
If is a Boolean conjunctive query consisting of a single Winner atom and ordinary atoms, then is decidable in polynomial time.
We reduce the problem to the following generalization of the necessarywinner problem: Given a partial voting profile and a subset of candidates, determine whether overlaps with the set of winners in every completion. In turn, we reduce this problem to maximum matching in a bipartite graph.
Next, we prove Theorem 2. Let be as in the theorem. For a voting rule , the evaluation of reduces to the following problem that we refer to as necessary intersection: Given a set of candidates, a partial voting profile and a party , is represented in the winners in every completion of ? In other words, is it true that for all completions of ?
In the remainder of this proof, we present an algorithm for necessary intersection in the case where is the plurality rule.
We assume that and . For every , we denote by the set of candidates such that does not prefer any other candidate over . For each candidate , let be the number of partial profiles such that . The following lemma is straightforward.
Lemma 1.
For all it holds that is the maximal score that can obtain over all possible completions of .
We select as a candidate outside of such that is maximal among all candidates in . A key lemma is the following.
Lemma 2.
For all completions of there exists a completion of such that and for all .
Proof.
Let be a completion of . Transform into by promoting to the head of the list whenever . Then the score of in is . Moreover, by transforming to no candidate got any new point of score. ∎
We then conclude the following lemma.
Lemma 3.
The following are equivalent.

There is a completion of such that no party member is a winner.

There is a completion of such that for all .
Proof.
We prove each direction separately.
Let be a completion of such that no candidate in is a winner. Let be a winner of . Then for all . According to Lemma 1 it holds that , and hence, for all . So, we select as the completion of Lemma 2 for .
Suppose that is a completion of such that for all . Let be obtained from by applying Lemma 2, where plays the role of and the role of . Then in every party member of has a score strictly lower than , and therefore, none of the members of are winners. ∎
From Lemma 3 we conclude that we need to decide on the existence of a completion of such that each party member has a score lower than . This is done by translating the problem into that of finding a maximum matching in a bipartite graph, as follows.
Call a partial profile a necessary supporter of if . We construct the bipartite graph as follows.

contains the node for every necessary supporter of .

contains the nodes for all party members .

connects with whenever .
Lemma 4.
The following are equivalent.

There is a completion of such that for all .

has a matching of size .
Proof.
We prove each direction separately.
Let be a completion of such that for all . We construct a matching in by selecting for each a unique where is the top of . Observe that we have enough since got fewer top votes than , as we are using the plurality rule.
Suppose that has a matching of size . We construct the desired as follows. For each necessary supporter , if is matched with then we select as a completion in which is at the top. For every other we select as a completion in which a candidate in is at the top. Hence, each gets the a score smaller than since there are only pairs . ∎
To conclude, our algorithm computes , constructs the graph , and answers “yes” if and only if has no matching of size . The correctness is due to the combination of Lemmas 3 and 4. This completes the proof of Theorem 2.
As a direct corollary of Theorem 2, for the query in Example 2, we have that is in polynomial time. Another corollary, discussed next, generalizes Theorem 2 through the notion of the Gaifman graph of a query, a notion that plays an important role in finite model theory (see [16]); in this graph, the nodes are the variables of the query and the edges consist of pairs of variables occurring in the same ordinary atom.
The corollary applies to the case where every two distinct winner variables belong to different connected components of the Gaifman graph. In this case, we say that the Winner atoms are pairwise disconnected.
Corollary 1.
If is a Boolean conjunctive query with pairwisedisconnected Winner atoms, then is decidable in polynomial time.
Proof.
When the winner variables of a Boolean conjunctive query are pairwise disconnected, the query “factors out” over the subqueries that correspond to the connected components of the Gaifman graph. Consequently, is necessary on if and only if each is necessary on . Hence, it suffices to solve for each such . Theorem 2 implies that can be solved in polynomial time for each such since, by assumption, each such contains either:

one Winner atom, in which case it covered by Theorem 2;

several copies of a Winner atom, in which we can ignore all of these atoms except for one copy; or

no Winner atoms at all, in which case the evaluation is that of a conjunctive query over an ordinary database.
Hence, is decidable in polynomial time. ∎
4.1.2 Dichotomy for Two Winner Atoms
Next, we show that, for a natural class of conjunctive queries, the necessity of queries exhibit a PTIME vs. coNPcomplete dichotomy.
Definition 2.
Let be the class of all Boolean conjunctive queries with the following properties:
(i) There are two distinct Winner atoms (and both involve the plurality rule and the same fixed election).
(ii) All other atoms of are ordinary atoms such that no ordinary relation symbol occurs twice (i.e., the ordinary atoms form a selfjoin free query).
Theorem 3.
Let be a query in the class .

If the Winner atoms of are pairwise disconnected, then is decidable in polynomial time.

Otherwise, is coNPcomplete.
Tractability follows from Corollary 1. We reduce to each remaining query via the proof technique of a dichotomy by Kenig et al. [11].
In the remainder of this section, we prove Theorem 3. We begin by proving coNPhardness of for a specific Boolean conjunctive query :
(1)  
Lemma 5.
is coNPcomplete.
Proof.
Membership in coNP is straightforward: as a witness of nonnecessity, we can use an appropriate completion of the partial preferences. To prove coNPhardness, we show a reduction from the complement of the maximum independent set problem. We are given as input a graph and a number , and the goal is to determine whether has an independent set of size . We construct a database as follows.

There is a single election, and the candidates are al pairs of the form where is a node of and .

There are voters . The voter prefers every candidate to all candidates where . Voter has no preference between the .

consists of all pairs such that one of the following holds:

and ;

but is a neighbor of .

This concludes the reduction, and we complete the proof by proving its correctness.
We have the following. If has an independent set of size , then we construct a completion of such that is false. For that, the voter positions first. Then, the winners are the , and then is indeed false. Similarly, if is false in a completion, then the set of winners in this completion forms an independent set of size . ∎
We can now prove Theorem 3.
Proof (of Theorem 3). Tractability follows from Corollary 1. For coNPhardness, we use the coNPhardness of , due to Lemma 5, and reduce to each remaining query via the proof technique of a dichotomy by Kenig et al. [11]. We do so as follows.
Let be a conjunctive query in such that the Winner atoms of are connected. We write as follows.
Here, is a conjunction of distinct atomic queries, all ordinary database relations. We construct a reduction from to . That is, given a database for , we construct a database for , so that the two queries and are either both necessary or none is.
Let be given. To construct , we use the exact same partial profile as , and we construct the other relations of as follows. We begin with empty relations. For each fact of , we add to all ground facts of .
To prove correctness, we show that for every completion of the profile, the two queries behave the same. For that, we show two claims:

If is in , then is true in .

If is true in for some , then is in .
The first claim is true by construction, and it requires neither the assumption that connects the winners nor that has no self joins.
For the second claim, assume that is true in for some . If and occur in the same atom, then it follows immediately that is in . Otherwise, the variable tuples of the atoms include three types: ones that involve and s, ones that involve only s, and ones that involve s and . Then the tuples of the second and the third type have the property that they give rise to reflexive tuples in , where values that correspond to different variables are the same. By connectedness, we get the existence of an atom of the first type, in which takes the value and takes value . This can only happen if we had in . This completes the proof of Theorem 3. ∎
As a direct application, is coNPcomplete, where is the query in Example 3. In contrast, is solvable in polynomial time, where is the following query.
4.2 Hardness Beyond the Plurality Rule
Here, we show that for a large class of positional scoring rules, there are conjunctive queries involving Winner atoms and ordinary atoms such that is coNPcomplete.
Definition 3.
Let be a pure positional scoring rule. We say that is eventually constant if there is a positive integer such that for every and for every with , we have that .
The plurality rule, the approval rule, for , and the rule with scoring vectors of the form (this rule played an important role in the proof of the Classification Theorem 1 [3, 4]) are eventually constant positional scoring rules, while the Borda rule is not.
Theorem 4.
If is an eventually constant positional scoring rule, then there is a Boolean conjunctive query involving Winner atoms and ordinary atoms such that is coNPcomplete.
Hint of Proof: By reduction from the complement of Positive in Sat, for suitable values of and . This problem asks: given a CNFformula consisting entirely of positive clauses of length , is there a truth assignment such that exactly variables each clause are true? If and , then Positive in Sat is NPcomplete by Schaefer’s dichotomy [Schaefer:1978:CSP:800133.804350].
Definition 4.
Let be a positive integer. The veto rule (also known as the approval rule) is the positional scoring rule with scoring vectors of the form with scoring values of at the beginning and scoring values of at the end.
Clearly, the veto rule is the well known veto rule.
Theorem 5.
For every , there is a Boolean conjunctive query involving Winner atoms of the veto rule and ordinary atoms such that is coNPcomplete.
Hint of Proof: Similar to the proof of Theorem 4.
A positional scoring rule is said to be strict if always allows to strictly prefer one candidate over another, or more formally, it is the case that for all . In this section, we show the existence of a Boolean conjunctive query such that is coNPcomplete for all strict positional scoring rules.^{1}^{1}1We note that this result subsumes the corresponding results, namely Theorems 4 and 5, that we have published in the abridged version of this paper [12]. Specifically, our results there are restricted to the classes of eventually constant and veto rules.
If is a positional scoring rule, then we denote by the following query that uses as a constant.
(2)  
Theorem 6.
is coNPcomplete for all strict positional scoring rules .
In the remainder of this section, we prove Theorem 6. We show a reduction from 3DNF Tautology. An instance of this problem is a 3DNF formula over a collection of Boolean variables, where each is a conjunction of three atomic formulas. The goal is to determine whether is true fo every truth assignment to . So, let be a strict scoring rule, and let such be given. We construct an instance of as follows.
There are candidates:

for ;

for ;

a special candidate .
We denote by the set of all candidates; that is:
We denote by the number of candidates, that is, . It is crucial for the proof that
is odd, and this is the reason for having the special candidate
. We fix a natural number with the property thatWe identify a linear order over with a vector that consists of all the candidates of , where is the most preferred and is the least preferred. For , let be the vector (linear order) that is constructed as follows. Start with a vector of empty placeholders. Next, place at position and at position . Next, place all remaining elements at the remaining placeholders, in an arbitrary order. We denote as follows.
For , we define voters as follows.

The voter has the preference , with the preference removed. Hence, and are incomparable, but inserting either the preference or the preference results in a linear order.

For an odd , the voter has the total preference order , with all candidates but and shifted positions to the left in a circular manner; that is:
where .

For an even , the voter has the same preference as an odd , except that and switch positions; that is:
where .
Taken over all , the above defines voters.
Denote the sequence as . We define additional voters , where the preference for is the linear order with shifted positions to the left in a circular manner; that is, the preference of is given by the following vector.
This completes our definition of the voters. All in all, we have precisely voters; we denote this number by
Voter  Partial order  
