\section{Hardness Results on the \(\mathit{ManipSA}\) Problem} \label{Sect:MU}

We have seen in the last section that the \(\mathit{ManipSA}\) problem is in XP w.r.t. parameters \(n\) and \(\mu(a_1)\) and that it is in FPT for parameter \(\mathtt{rg}^{\max}\). One could hope for more positive results for parameters \(n\) and \(\mu(a_1)\), as an FPT algorithm. However, we show in this section that the \(\mathit{ManipSA}\) problem is W[1]-hard w.r.t. each of these two parameters.\\

We start with the hardness result on parameter \(\mu(a_1)\). In fact, we obtain a stronger result by proving that even determining if there exists a successfully manipulation is W[1]-hard w.r.t. \(\mu^{\max}\). Note that, by definition, \(\mu^{\max}\) is greater than or equal to \(\mu(a_1)\).
\begin{theorem} \label{theorem: hardness}
Determining if there exists a successful manipulation for \(a_1\) is W[1]-hard w.r.t. parameter \(\mu^{\mathtt{max}}\).
\end{theorem}

\begin{proof}
We make a parameterized reduction from the CLIQUE problem where given a graph \(G = (V,E)\) and an integer \(k\), we wish to determine if there exists a clique of size \(k\). This problem is W[1]-hard w.r.t. parameter \(k\). W.l.o.g., we make the assumptions that \(|V| > k\) and that \(|E| > k(k-1)/2\) (because otherwise it is trivial to determine if there is a clique of size \(k\)).\\

From an instance of CLIQUE, we create the following \(\mathit{ManipSA}\) instance.\\

\emph{Set of items.} We create two items, \(g_{\{i,j\}}\) (a good item) and \(w_{\{i,j\}}\) (one of the worst items), for each edge \(\{i,j\}\in E\) and two items, \(b_{i}\) (one of the best items) and \(m_i\) (a medium item), for each vertex \(i\in V\). Put another way, \(\mathcal{I} = \{g_{\{i,j\}},w_{\{i,j\}}|\{i,j\}\in E\}\cup\{b_i,m_i| i \in V\}\) and the number of items is thus \(|I| = 2|V| + 2|E|\).\\

\emph{Set of agents.} We create one agent \(e_{\{i,j\}}\) for each edge \(\{i,j\}\in E\) and one agent \(v_{i}\) for each vertex \(i\in V\). The top of \(e_{\{i,j\}}\)'s ranking is \(g_{\{i,j\}} \succ m_i \succ m_j \succ w_{\{i,j\}}\) (which one of \(m_i\) or \(m_j\) is ranked first can be chosen arbitrarily). The top of \(v_{i}\)'s ranking is \(b_{i} \succ m_i\) . We also create \(|V| - k - 1\) agents \(c_t\) for \(t\in \{1,\ldots, |V| - k - 1\}\) (whose role is to collect medium items) such that the top of the ranking of each \(c_t\) is \(m_1\succ m_2\ldots \succ m_{|V|}\). Last, the manipulator, that we denote by \(a_1\) to be consistent with the rest of the paper,
has the following preferences: he first ranks items \(b_{i}\),
then items \(g_{\{i,j\}}\), then items \(m_i\) and last items \(w_{\{i,j\}}\). To summarize, \(\mathcal{A} = \{e_{\{i,j\}}|\{i,j\}\in E\}\cup\{v_i|i\in V\}\cup\{c_t|t\in \{1,\ldots, |V| - k - 1\}\}\cup\{a_1\}\) and there are \(|\mathcal{A}| = 2|V|+|E|-k\) agents.\\

\emph{Picking sequence.} The picking sequence \(\pi\) is composed of the following rounds:
\begin{itemize}
    \item Manipulator round 1:  \(a_1\) gets to pick \(k\) items.
    \item Vertex round: each agent \(v_{i}\) gets to pick one item.
    \item Manipulator round 2:  \(a_1\) gets to pick \(k(k-1)/2\) items.
    \item Edge round: each agent \(e_{\{i,j\}}\) gets to pick one item.
    \item Medium item collectors round: each agent \(c_t\) gets to pick one item.
    \item Manipulator round 3:  \(a_1\) gets to pick one item.
    \item End round: the remaining items can be shared arbitrarily within the non-manipulators such that each of them gets at most one new item.
\end{itemize}
Note that \(\mu^{\mathtt{max}} = \mu(a_1) = \frac{k(k+1)}{2} + 1\).\\

\emph{Utility values of \(a_1\).} For ease of presentation, we will act as if there were only four different utility values, even if \(a_1\) is asked to report a complete preference order. One can remove this assumption, making preferences strict, by using sufficiently small \(\epsilon\) values.
In this sketch of proof, each item \(b_{i}\) has utility \(4\). Each item \(g_{\{i,j\}}\) has utility \(3\). Each item \(m_i\) has utility \(2\). Lastly, items \(w_{\{i,j\}}\) have utility \(1\). In this simplified setting, we set \(\succ_T\) as being one specific ranking consistent with the utility values of \(a_1\) and we wish to determine if there exists another ranking yielding a strictly higher utility.\\

\emph{Sketch of the proof.} At the end of the vertex round, all the best items are gone, as they have already been picked by \(a_1\) or by the vertex agents $v_i$. Similarly, at the end of the edge round, none of the good items are left. Hence, at the third manipulator round, when \(a_1\) picks her last item, the best she can hope for is a medium item. Consequently, the maximum utility she might achieve is accomplished by picking $k$ best items in her first round, $k(k-1)/2$ good items in her second round, and finally a medium item in her third round, for an overall utility of $4k + 3k(k-1)/2 + 2$. Note that she can always pick any set of \(k\) best items in her first round and then (whatever the previous \(k\) best items) pick any set of \(k(k-1)/2\) good items in her second round. Hence obtaining an overall utility of $4k + 3k(k-1)/2 + 1$ is always possible. Note also that, if $\{b_{i_1},\ldots,b_{i_k}\}$ are the $k$ best items selected by \(a_1\) at the first round, then in the vertex round the vertex agents $\{v_{i_1},\ldots,v_{i_k}\}$ will pick the medium items $\{m_{i_1},\ldots,m_{i_k}\}$. Moreover, before the third manipulator round, agents $c_t$ will pick additional $|V|-k-1$ medium items. So, a medium item is left at the third manipulator round only if none of the edge agents picks a medium item in the edge round. According to her preference ranking, any such agent $e_{\{i,j\}}$ will not pick a medium item iff $g_{\{i,j\}}$ is still available, or if $g_{\{i,j\}}$, $m_i$ and $m_j$ have all already been picked.
If $g_{\{i,j\}}$ is one of the $k(k-1)/2$ good items that have been already picked at the manipulator second round, then $m_i$ and $m_j$ have already been picked before by $v_i$ and $v_j$
in the vertex round, if $b_i$ and $b_j$ were already taken in the first manipulator round. In conclusion, none of the medium items are picked by the edge agents iff the $k(k-1)/2$ edges $e_{\{i,j\}}$ for which $g_{\{i,j\}}$ has already been picked at the second manipulator round have as endpoints only nodes in $\{v_{i_1},\ldots,v_{i_k}\}$, and this is possible iff $\{v_{i_1},\ldots,v_{i_k}\}$ forms a clique in the initial graph $G$. Summarizing, there exists a strategy for \(a_1\) achieving an overall utility of $4k + 3k(k-1)/2 + 2$ iff $G$ has a clique of $k$ nodes.
It remains to show that we could solve the CLIQUE problem if we could determine if there exists a successful manipulation. This fact results from the following disjunction of two cases: If \(u_T = 4k + 3k(k-1)/2 + 2\), then we can conclude that there exists a clique of size \(k\); Otherwise, if \(u_T = 4k + 3k(k-1)/2 + 1\), then there exists a clique of size \(k\) iff there exists a successful manipulation for \(a_1\).
\end{proof}

\textit{Remark:} Aziz et al.~\cite{aziz2017complexity} considered a sequential allocation setting in which the manipulator has a binary utility function but is asked to provide a complete preference order. In this setting, the manipulation problem consists in finding a ranking maximizing the utility of the bundle she gets. While the authors showed that this problem can be solved in polynomial time, the reduction used in the sketch of the proof of Theorem~\ref{theorem: hardness} shows that this problem is NP-hard if the manipulator has a utility function involving four different values (instead of two).\\

 Similarly, we obtain that the \(\mathit{ManipSA}\) problem is W[1]-hard w.r.t. the number of agents.

\begin{theorem} \label{theorem: hardness on n}
$\mathit{ManipSA}$ is W[1]-hard w.r.t. the number of agents.
\end{theorem}
\begin{proof}
We design a parameterized reduction from MULTICOLORED CLIQUE. In this problem, given a graph \(G = (V,E)\) with vertex set $V=\{v_1,\ldots,v_n\}$, an integer \(k\), and a vertex coloring \(\phi: V \rightarrow \{1,\ldots,k\}\), we wish to determine if there exists a clique of size \(k\) in \(G\) containing exactly one vertex per color. MULTICOLORED CLIQUE is known to be W[1]-hard w.r.t. parameter \(k\) \cite{fellows2009parameterized}. \\

\emph{Idea of the proof}: We resort on the nice mathematical tool of Sidon sequences. These sequences associate to each number $i$ in $\{1,\ldots, n\}$ a value $id(i)$ such that, for every pair $(i,l)$ with \(i\leq l\), the sum $id(i)+ id(l)$ is different from the one of any other different pair of elements in $\{1,\ldots, n\}$. We use the construction of Erd\"os and Tur\`an \cite{erdos1941problem}, by setting \(id(i) = 2pi + (i^2 \mod p)\) for every \(i \in \{1,\ldots,n\}\), where $p$ is the smallest prime number greater than $n$. Notice that, by the Bertrand-Chebyshev theorem \cite{chebyshev1852memoire}, \(p < 2n\), and thus $id(i)=O(n^2)$. This sequence will be used in the following way. We create a large set of items $B_j$ for each color $j$. In the first picking round, the manipulator will be able to pick a large number of items within these sets. To recover a solution of the MULTICOLORED CLIQUE problem, we will show that, if a multicolored clique $\{v_{i_1},\ldots,v_{i_k}\}$ exists in which each vertex  $v_{i_j}$ has color $\phi(v_{i_j})=j$, then in an optimal manipulation the manipulator should pick exactly $(k+1) \cdot id(i_j)$ items in each set $B_j$. The edges of the clique will then be identified by the sums $id(i_j)+id(i_r)$ for all pairs of vertices $\{v_{i_j},v_{i_r}\} \subset \{v_{i_1},\ldots,v_{i_k}\}$. \\

From a MULTICOLORED CLIQUE instance \((G=(V,E),k,\phi)\), we construct the following \(\mathit{ManipSA}\) instance.\\

\emph{Set of items}:
\begin{itemize}
    \item For each color $j$, we create a set $B_j$ of \((k+1)\cdot id(n)\) items, and two sets $Id_j$ and $Id_{\overline{j}}$ of $id(n)+2$ items each.
    The purpose of items in $Id_j \cup Id_{\overline{j}}$ is to ensure that the number of items picked by \(a_1\) in \(B_j\) is of the form $(k+1) \cdot id(i)$ such that $\phi(v_i) = j$.
    \item For each pair of colors $\{j,r\}$ with $j \neq r$, we create a set $Id_{\{j,r\}}$ of $2 \cdot (id(n) +1)$ items.
    The purpose of  items in $Id_{\{j,r\}}$ is to ensure that, whenever \(a_1\) picks $(k+1) \cdot id(i)$ items in $B_j$ and $(k+1) \cdot id(l)$ items in $B_r$ for two given vertices $v_i$ and $v_l$ of colors $\phi(v_i) = j$ and $\phi(v_l) = r$, then $\{v_i,v_l\}$ is an edge of $G$.
    \item We create a set $D$ of $k(k+1)\cdot id(n)$ items.
    In a first picking round, the manipulator will be able to pick items in $\bigcup_{j=1}^k B_j \cup D$. The purpose of items in $D$ is to make it possible for \(a_1\) to adjust the number of items she picks in $\bigcup_{j=1}^k B_j$.
    \item Last, we add a set $Z$ of $2k(k+1)id(n)$ items.
    Set $Z$ will be used as a buffer of items where each non-manipulator will pick when no items in $Id_j$, $Id_{\overline{j}}$, or $Id_{j,r}$ are left, so as to avoid mutual conflicts.
\end{itemize}

\emph{Set of agents}: We create two agents $c_j$ and $\overline{c}_j$ per color $j$, and two agents $p_{j,r}$ and $p_{r,j}$ for each pair of colors $\{j,r\}$ such that \(j\neq r\). Moreover, we create one agent denoted by $d$ and one manipulator $a_1$. In total, there are $k(k+1)+2$ agents. We now detail the top of the preference rankings of non-manipulators, where by abuse of notations, we use $S\succ S'$ to denote the fact that items in $S$ are ranked before the ones in $S'$, while the order inside each set is indifferent.
\begin{itemize}
    \item Agent $c_j$, for  $1 \leq j \leq k$: $B_j \succ Id_j \succ Z \succ \ldots$.
    \item Agent $\overline{c}_j$, for $1 \leq j \leq k$: $B_j \succ Id_{\overline{j}} \succ Z \succ \ldots$.
    \item Agent $p_{j,r}$, for $1 \leq j \neq r \leq k$: $B_j \succ  Id_{\{j,r\}} \succ Z \succ \ldots.$
    \item Agent $p_{r,j}$ for $1 \leq j \neq r \leq k$: $B_r \succ Id_{\{j,r\}} \succ Z \succ \ldots.$
    \item Agent $d$: $D \succ Z \succ \ldots$.
\end{itemize}
As an important remark, notice that agents $p_{j,r}$ and $p_{r,j}$ rank items in $Id_{\{j,r\}}$ identically.\\

\emph{Picking sequence}: \(\pi\) is composed of the following rounds:
\begin{itemize}
    \item Manipulator round 1:  \(a_1\) gets to pick \(k(k+1) \cdot id(n)\) items.
    \item Non-manipulators round:
    \begin{itemize}
        \item Agents in $\mathcal{A} \setminus \{a_1,d\}$ pick in \(id(n)\) subrounds. In each subround, each of them picks exactly one item in the following order: agents \(c_{j}\), $1 \leq j \leq k$, are the first pickers, then come agents $p_{j,r}$,
        and lastly agents   \(\overline{c}_j\).
        \item Finally, agent $d$ picks $k(k+1) \cdot id(n)$ items.
    \end{itemize}
    \item Manipulator round 2:  \(a_1\) gets all remaining items.
\end{itemize}

\emph{Utility values of \(a_1\)}: For ease of presentation, we use two simplifying assumptions. First, we act as if different items can have the same utility value for $a_1$. This assumption can be removed making preferences strict by adding sufficiently small \(\epsilon\) values. Second, we use negative utilities. In fact, one can recover an equivalent instance with only non-negative values by adding to all the utilities the absolute value of the minimal one. Indeed, this would not change the set of optimal solutions as the size of \(a_1\)'s bundle is fixed by \(\pi\).
\begin{itemize}
    \item Items in $Z$ have a utility value of $0$.
    \item One specific item in each set $B_j$, that we denote by $b_j^*$, has a utility value of $4\alpha$ where $\alpha = (id(n) + 2)k(k+1)$. All items in $(\bigcup_{j=1}^k B_j \cup D)\setminus\{b_1^*,\ldots,b_k^*\} $ have a utility value equal to $2\alpha$.
    \item The utilities of the items in the sets $Id_j$ and $Id_{\overline{j}}$ are defined as follows. Index the items in $Id_j$ (resp. $Id_{\overline{j}}$) from $1$ to $id(n)+2$ according to the preference order of agent $c_j$ (resp. $\overline{c}_j$). Furthermore, let $\Tau_{j} = \{id(i)| \phi(v_i) = j\}$, $\tau_{j}(t)$ denote the $t^{th}$ smallest value in $\Tau_{j}$, and $T_{j} = |\Tau_{j}|$. We also set $\tau_{j}(0) = 0$ and $\tau_{j}(T_{j} + 1) = id(n)+2$. Then, all items receive a utility value of $1$, except for the items of indices $\tau_{j}(t)$ for $t\in \{1,\ldots,T_{j}+1\}$, that get utility $\tau_{j}(t-1) - \tau_{j}(t) + 1$. Notice that, for every $t$ such that $1 \leq t \leq T_{j} + 1$, by definition the sum of the utilities of all the items from
    $\tau_{j}(t-1)+1$ to $\tau_{j}(t)$ is $0$.

    \item Similarly, the utilities of the items in each $Id_{\{j,r\}}$ are set in the following manner. Index these items from $1$ to $2id(n) + 2$ according to the preference order of agents $p_{j,r}$ and $p_{r,j}$. Furthermore, let $\Tau_{j,r} = \{id(i) +id(l)| \phi(v_i) = j, \phi(v_l) = r, \{v_i,v_l\} \in E\}$, $\tau_{j,r}(t)$ denote the $t^{th}$ smallest value in $\Tau_{j,r}$, and $T_{j,r} = |\Tau_{j,r}|$. We also set $\tau_{j,r}(0) = 0$ and $\tau_{j,r}(T_{j,r} + 1) = 2id(n)+2$. Then all items receive a utility value of $1$, except items of index $\tau_{j,r}(t)$ for $t\in \{1,\ldots,T_{j,r}+1\}$, whose utility is set to $\tau_{j,r}(t-1) - \tau_{j,r}(t) + 1$.
\end{itemize}

As we are going to show below, in an optimal manipulation, the agents behave as follows. In the first manipulator round, $a_1$ picks $k(k+1)\cdot id(n)$ items in $\bigcup_j B_j \cup D$. Then, in the non-manipulators round, agents $c_j$, $p_{j,r}$ and $\overline{c}_j$ for the different values $j$ and $r \neq j$ pick the remaining items in the sets $B_j$, plus other items in $Id_j$, $Id_{\overline{j}}$ and $Id_{\{j,r\}}$. Subsequently, $d$ takes all the remaining items in $D$ and further ones to complete her picks in $Z$. Finally, in the second manipulator round, $a_1$ collects all remaining items.\\

\emph{Sketch of the proof.} We first claim that, in the first manipulator round, \(a_1\) should pick only items in $\bigcup_j B_j \cup D$.
Indeed, after the non-manipulators round, none of these items is left, whatever \(a_1\) has previously picked. In particular, the items left by $a_1$ in each set $B_j$ are collected by agents $c_j$, $p_{j,r}$ and \(\overline{c}_j\), while the ones in $D$ are collected by agent $d$. Moreover, because $|\bigcup_j (Id_j\cup Id_{\overline{j}}) \cup \bigcup_{j\neq r} Id_{j,r}|$ is upper bounded by $\alpha$ and of the utility function we have set, any subset of items in $\mathcal{I} \setminus (\bigcup_j B_j \cup D)$ as a utility value which is strictly less than $\alpha$ and strictly greater than $-\alpha$. As a result, because each item in $\bigcup_j B_j \cup D$ is worth $2\alpha$, any solution which would not pick only items in $\bigcup_j B_j \cup D$ in the first manipulator round could be improved by doing so.
Using the same type of argument, we also claim that $a_1$ should pick all of the $b_j^*$ items in her first picking round. We will hence restrict our attention to picking strategies that verify these two assumptions. Under such an hypothesis, the best utility value $a_1$ can hope to get from the set of items she collects in her second picking round is $0$. This is induced by the utility values that we have set, as well as by the truthful picking strategies of non-manipulators. Indeed, note that by construction the overall utility of the set $\mathcal{I} \setminus (\bigcup_j B_j \cup D)$ is 0. Moreover, as sets $Id_j$, $Id_{\overline{j}}$ and $Id_{\{j,r\}}$ are indexed according to the preference orders of agents $c_j$, $\overline{c}_j$, $p_{j,r}$ and $p_{r,j}$, at the end of the non-manipulators round only prefixes of such sets have been picked. Hence, recalling that all the items in $Z$ have null utility for $a_1$, the overall utility of items left to $a_1$ at the beginning of the second manipulator round is $0$ if and only if the prefixes of the already picked items in all the sets $Id_j$, $Id_{\overline{j}}$ and $Id_{\{j,r\}}$ end up to items of negative value for $a_1$.
We now argue that this can happen if and only if there exists a multicolored clique $G$.

Let us first show the only if direction, i.e., that if $a_1$ gets an overall utility equal to $0$ from the set of items she collects in her second picking round, then there is a multicolored clique of size $k$ in $G$. Let us denote by $nb_j$ the number of items that $a_1$ has picked in $B_j$ during the first manipulator round. Since for each $j\in \{1,\ldots,k\}$ agent $a_1$ has picked $b_j^*$ and $|B_j|=(k+1)id(n)$, we have that $1\le nb_j \le (k+1)id(n)$. We first show that $nb_j$ should be a multiple of $k+1$.

To this aim, let us first observe that, for each $j\in \{1,\ldots,k\}$, after the first manipulator round, in every non-manipulators subround, $k+1$ items of $B_j$ (if still available) are picked by the $k+1$ agents $c_j$, $p_{j,r}$ with $j\neq r$ and $\overline{c}_j$ (in this order).
Therefore, at the end of the non-manipulators rounds,  $c_j$ has picked $\lfloor nb_j/(k+1)\rfloor$ items in $Id_{j}$ and $\overline{c}_j$ has picked $\lceil nb_j/(k+1)\rceil$ items in $Id_{\overline{j}}$. But then, if $nb_j$ is not a multiple of $k+1$, these two numbers are different and thus the last items picked by $c_j$ in $Id(j)$ and by $\overline{c}_j$ in $Id_{\overline{j}}$ cannot both have negative utility for $a_1$, because the difference between two consecutive $id$ values is strictly greater than $1$. Therefore, each $nb_j$ should be of the form $nb_j = (k+1) \cdot id(i_j)$ for some $i_j\in \{1,\ldots,n\}$ such that $\phi(v_{i_j}) = j$, so that both $c_j$ and $\overline{c}_j$ pick $id(i_j)$ items in $Id_j$ and $Id_{\overline{j}}$, respectively.
In order to show that $\{v_{i_j}|1\le j\le k\}$ is a multicolored clique, it remains to prove that all the vertices of this set are neighbors in $G$. Indeed, since in each subround of the non-manipulators round every time $c_j$ picks in $Id(j)$ each agent $p_{j,r}$ picks in $Id_{\{j,r\}}$,
at the end of the non-manipulators round \(p_{j,r}\) and \(p_{r,j}\) have picked $id(i_j)+id(i_r)$ items in $Id_{\{j,r\}}$. Since in order for $a_1$ to achieve an overall utility equal to $0$ in the second manipulator round the last item previously picked in $Id_{\{j,r\}}$ must have a negative utility, \(\{v_{i_j}, v_{i_r}\}\) must be an edge of \(G\).

It remains to show the if direction, i.e., that if there is a multicolored clique $\{v_{i_1},\ldots,v_{i_k}\}$ in $G$, then there exists a strategy leading $a_1$ to reach overall utility $0$ in her second manipulation round. Assuming without loss of generality that $\phi(v_{l_j}) = j$, this can be accomplished by letting $a_1$ pick $nb_j = (k+1) \cdot id(i_j)$ items in $B_j$, $1 \leq j \leq k$, and the remaining items in $D$. Then, each $c_j$ (resp. $\overline{c}_j$) will pick
$id(i_j)$ items in $Id(j)$ (resp. $Id_{\overline{j}}$) and each $p_{j,r}$ will pick $id(i_j)$ items in $Id_{\{j,r\}}$, which causes $a_1$ to achieve overall utility $0$ in her second manipulator round, finally proving the claim.
\end{proof}

Consequently from Theorems~\ref{theorem: hardness} and \ref{theorem: hardness on n}, it is unlikely that the \(\mathit{ManipSA}\) problem admits FPT algorithms w.r.t. parameters \(\mu(a_1)\) and \(n\). Hence, these results valorize the XP results on these parameters obtained in Section~\ref{Sect:positive}, as well as Theorem~\ref{theorem n + mu}, which interestingly shows that the \(\mathit{ManipSA}\) problem is FPT w.r.t. parameter \(\mu(a_1) + n\).
\section{Conclusion and Future Work}

We have provided a variety of results on the problem of finding an optimal manipulation in the sequential allocation protocol. Beside an integer program to solve this problem, we have designed a dynamic programming algorithm from which we have derived several positive parameterized complexity results. For instance, we have shown that this manipulation problem is in XP with respect to the number of agents and that it is in FPT with respect to the maximum range of an item. Conversely, we have also provided matching W[1]-hardness results.
Lastly, motivated by the fact that agents could be inclined to behave truthfully if a manipulation would not be worth it, we have investigated an upper bound on the increase in utility that the manipulator could get by manipulating. We have showed that the manipulator cannot increase the utility of her bundle by a factor greater than or equal to 2 and that this bound is tight. Overall, our results show that, not only sequential allocations are worth manipulating, but also that they can be manipulated efficiently for a wide range of instances.

Several directions for future work are conceivable. One could try to decrease our upper bound on the increase in utility that the manipulator can obtain by restricting to specific instances (e.g., imposing a specific type of picking sequences). Moreover, it would be worth investigating the price of manipulation, i.e., the worst case ratio between the social welfare when one agent manipulates, all the others being truthful, and the one when all the agents behave truthfully. On this issue, to the best of our knowledge, little is known except for some preliminary results by Bouveret and Lang~\cite{bouveret2014manipulating}. \\
\section{Setting and Notations}
We consider a set \(\mathcal{A} = \{a_1,\ldots,a_n\}\) of \(n\) agents and a set \(\mathcal{I} = \{i_1,\ldots,i_m\}\) of \(m\) items. A preference profile \(P = \{\succ_{a_1}, \ldots,\succ_{a_n}\}\) describes the preferences of the agents.
More precisely, \(P\) is a collection of rankings such that ranking \(\succ_a\) specifies the preferences of agent \(a\) over the items in \(\mathcal{I}\). The items are allocated to the agents according to the following sequential allocation procedure: at each time step, a picking sequence \(\pi \in \mathcal{A}^m\) specifies an agent who gets to pick an item within the remaining ones. Put another way, \(\pi(1)\) picks first, then \(\pi(2)\) picks second, and so forth. We assume that agents behave greedily by choosing at each time step their preferred item within the remaining ones. If we view sequential allocation as a centralized protocol, then all agents report their preference rankings to a central authority which mimics this picking process. In the following, w.l.o.g. we use this centralized viewpoint where agents have to report their preference rankings. This sequential process leads to an allocation that we denote by \(\phi\). More formally, \(\phi\) is a function such that \(\phi(a)\) is the set of items that agent \(a\) has obtained at the end of the sequential allocation process.

\begin{example}[Adapted from Example 1 in~\cite{aziz2017complexity}] \label{example:running}
For the sake of illustration, we consider an instance with 3 agents and 4 items, i.e., \(\mathcal{A} = \{a_1 , a_2 , a_3\}\) and \(\mathcal{I} = \{i_1, i_2, i_3, i_4\}\). The preferences of the agents
are described by the following
profile:
\begin{align*}
    a_1 &: i_1 \succ i_2 \succ i_3 \succ i_4\\
    a_2 &: i_3 \succ i_4 \succ i_1 \succ i_2\\
    a_3 &: i_1 \succ i_2 \succ i_3 \succ i_4
\end{align*}
and the picking sequence is \(\pi = (a_1,  a_2,  a_3, a_1)\). Then, \(a_1\) will first pick \(i_1\), then \(a_2\) will pick \(i_3\),  \(a_3\) will pick \(i_2\), and lastly \(a_1\) will pick \(i_4\). Hence, the resulting allocation is given by \(\phi(a_1) = \{i_1, i_4\}\), \(\phi(a_2) = \{i_3\}\) and \(\phi(a_3) = \{i_2\}\).
\end{example}

The allocation \(\phi\) is completely determined by the picking sequence \(\pi\) and the preference profile \(P\). Notably, if one of the agents reports a different preference ranking, she may obtain a different set of items. This different set may even be more desirable to her. Consequently, agents may have an incentive to misreport their preferences.

\begin{example}[Example \ref{example:running} continued]
Assume now that agent \(a_1\) reports the preference ranking \(i_3 \succ i_2 \succ i_1 \succ i_4\). Then she obtains the set of items \(\phi(a_1) = \{i_2, i_3\}\). This set of items may be more desirable to \(a_1\) than \(\{i_1, i_4\}\) if for instance items \(i_1\), \(i_2\) and \(i_3\) are almost as desirable as one another, but are all three much more desirable than \(i_4\).
\end{example}

In this work, we study this type of manipulation. We will assume that agent \(a_1\) is the manipulator and that all other agents behave truthfully. Although the agents are asked to report ordinal preferences, we will assume a standard assumption in the literature that \(a_1\) has underlying additive utilities for the items. More formally, the preferences of \(a_1\) over items in \(\mathcal{I}\) are described by a set of positive values \(U = \{u(i)|i \in \mathcal{I}\}\) such that \(i \succ_{a_1} j\) implies \(u(i) > u(j)\). The utility of a set of items \(S\) is then obtained by summation, i.e., \(u(S) = \sum_{i\in S} u(i)\).
We will denote by \(\succ_T\) the truthful preference ranking of \(a_1\), and by \(\phi_{\succ}\) the allocation obtained if agent \(a_1\) reports the preference ranking \(\succ\). Moreover, we will denote by \(u_T\) the value \(u(\phi_{\succ_T}(a_1))\) which is the utility value of \(a_1\)'s allocation when she behaves truthfully.  We will say that a preference ranking \(\succ\) is a successful manipulation if \(a_1\) prefers \(\phi_{\succ}(a_1)\) to \(\phi_{\succ_T}(a_1)\), i.e., if \(u(\phi_{\succ}(a_1)) > u_T\).
Hence, the objective for the manipulator is to find a successful manipulation \(\succ\) maximizing \(u(\phi_{\succ}(a_1))\). We are now ready to define formally the problem of \textbf{M}anipulating a \textbf{S}equential \textbf{A}llocation process, called \(\mathit{ManipSA}\).
\begin{cproblem}{\(\mathit{ManipSA}\)}
Input: A set \(\mathcal{A} = \{a_1, a_2, \ldots, a_n\}\) of \(n\) agents where \(a_1\) is the manipulator, a set \(\mathcal{I} = \{i_1,\ldots,i_m\}\) of \(m\) items, a picking sequence \(\pi\), a preference profile \(P\) and a set \(U\) of utility values for \(a_1\).

Find: A preference ranking \(\succ\) maximizing \(u(\phi_{\succ}(a_1))\).
\end{cproblem}

The \(\mathit{ManipSA}\) problem is known to be \(\mathit{NP}\)-hard \cite{aziz2017complexity}. In this work, we will address this optimization problem from a parameterized complexity point of view. We will be mostly interested in three types of parameters: the number of agents, the  number of items that an agent gets to pick, and the range of the items. While the number of agents \(n\) is already clear, let us define the other parameters more formally. We denote by \(\mu(a)\) the number of items that agent \(a\) gets to choose in \(\pi\) and by \(\mu^{\mathtt{max}}\) the maximum of these values, i.e., \(\mu^{\mathtt{max}} = \max\{\mu(a) | a\in \mathcal{A}\}\). Let \(\mathtt{rk}_a(i)\) denote the rank of item \(i\) in the preference ranking of agent \(a\). Then, we define the range \(\mathtt{rg}(i)\) of an item \(i\) as:
\[\mathtt{rg}(i) = \max_{a\in \mathcal{A}\setminus\{a_1\}} \mathtt{rk}_a(i) - \min_{a\in \mathcal{A}\setminus\{a_1\}} \mathtt{rk}_a(i)  + 1.\notag \]
Note that we define the range of an item using only non-manipulators. The maximum range of an item \(\mathtt{rg}^{\mathtt{max}}\) is then defined as \(\max_{i\in \mathcal{I}} \mathtt{rg}(i)\).

Let us give some intuitions on parameters $\mu(a_1)$ and \(\mathtt{rg}^{\mathtt{max}}\).
In the $\mathit{ManipSA}$ problem, $\mu(a_1)$ can be seen as a budget parameter for the manipulator. Intuitively, the larger the value of $\mu(a_1)$, the more she can manipulate. It is also the size of a feasible solution, i.e., the size of the bundle \(a_1\) will get. Interestingly, in real-life applications, $\mu(a_1)$ can be much smaller than $|\mathcal{I}|$ and even much smaller than $|\mathcal{A}|$. For these reasons, $\mu(a_1)$ is an interesting parameter to study in the $\mathit{ManipSA}$ problem.
On the other hand, parameter \(\mathtt{rg}^{\mathtt{max}}\) measures the correlation between the preferences of the non-manipulators. If \(\mathtt{rg}^{\mathtt{max}}=1\) (its minimal possible value), then all non-manipulators have the same preference ranking. In this case, the manipulation problem becomes easy to solve, as all non-manipulators can be treated as a single agent and the case of two agents is known to be polynomial-time solvable. This simple insight can let us hope that the manipulation problem remains tractable if this parameter is small. An important motivation behind parameter \(\mathtt{rg}^{\mathtt{max}}\) is that, in practice, the preferences of different agents are often correlated.
\section{Positive Parameterized Complexity Results on the $\mathit{ManipSA}$ Problem}\label{Sect:positive}
To solve the \(\mathit{ManipSA}\) problem, one can simply try the \(m!\) possible preference rankings and see which ones yield the maximum utility value. However, a more clever approach uses the following result.

\begin{fact} [From Propositions 7 and 8 in \cite{bouveret2011general}]
Given a specific set of items \(S\), it is possible to determine in polynomial time whether there exists a preference ranking \(\succ\) such that \(S \subseteq \phi_{\succ}(a_1)\). In such case, it is also easy to compute such a ranking.
\end{fact}

Hence, one can try all the \(\binom{m}{\mu(a_1)}\)
possible sets of \(\mu(a_1)\) items to determine which is the best one that \(a_1\) can get. This approach shows that the \(\mathit{ManipSA}\) problem is in XP w.r.t. parameter \(\mu(a_1)\).

\begin{example}[Example~\ref{example:running} continued] As in this example \(\mu(a_1) = 2\), \(a_1\) just has to determine which one of the \({4 \choose 2}\) following sets she must obtain: \(\{i_1,i_2\}, \{i_1,i_3\}, \{i_1,i_4\}, \{i_2,i_3\}\), \(\{i_2,i_4\}, \{i_3,i_4\}\).
\end{example}

To obtain further positive results, we first design a dynamic programming scheme.
We will then explain how this scheme entails several positive parameterized complexity results.
\subsection{A Dynamic Programming Scheme}
Our dynamic programming approach considers pairs \((k,S)\) where \(S \subseteq \mathcal{I}\) and \(k \in \{0,1,\ldots,\mu(a_1)\}\).  In a state characterized by the pair \((k,S)\), we know that the items in \(S\) have been picked by some agents in \(\mathcal{A}\) as well as \(k\) other items that have been picked by agent \(a_1\). However, while the items in \(S\) are clearly identified, the identities of these \(k\) other items are unspecified.

Given a pair \((k,S)\), the number of items that have already been picked is \(|S| + k\). Hence, the next picker is \(\pi(|S| + k + 1)\). Let us denote this agent by \(a\). If \(a = a_1\), i.e., she is the manipulator, then she will pick one more item within the set \(\mathcal{I} \setminus S\) and we move to state \((k+1,S)\).
Otherwise, let \(b(a,S)\) denote the preferred item of agent \(a\) within the set \(\mathcal{I} \setminus S\). Then, two cases are possible:
\begin{itemize}
    \item In the first case, \(b(a,S)\) has already been picked by agent \(a_1\). Then, we move to state \((k - 1, S \cup \{b(a,S)\})\). Note that this is only possible if \(k\) was greater than or equal to one.
    \item Otherwise \(b(a,S)\) is picked by agent \(a\) and we move to state \((k,S\cup \{b(a,S)\})\).
\end{itemize}

Let us denote by \(V(k,S)\) the maximal utility that the manipulator can get from items in \(\mathcal{I}\setminus S\) starting from state \((k,S)\). Then the value of an optimal manipulation is given by \(V(k = 0, S = \emptyset)\). From the previous analysis, function \(V\) verifies the following dynamic programming equations:
\begin{align}
    V(k,S) \!&= \!V(k+1 , S) \text{ if } \pi(|S| + k + 1) = a_1 \label{eq:dp1}\\
    V(k=0,S) \!&=\! V(k,S\!\cup\!\{b(a,S)\}) \!\text{ if }\! \pi(|S| + k + 1)\! =\! a \!\neq\! a_1 \label{eq:dp2}\\
    V(k>0,S) \!&=\! \max\big(V(k-1,S\cup\{b(a,S)\}) + u(b(a,S)), \notag\\
          V(k&,S\cup\{b(a,S)\})\big) \text{ if } \pi(|S| + k + 1) = a \neq a_1 \label{eq:dp3}
\end{align}
where the termination is guaranteed by the fact that \(V(k,S) = \sum_{i \in \mathcal{I} \setminus S} u(i)\) when \(|S| + k = m\).

Equations~\ref{eq:dp1}-\ref{eq:dp3} induce a directed acyclic state graph \(\DPG=(\DPV,\DPA)\), where \(\DPV\) is the set of states generated from state \((k=0,S=\emptyset)\) when using these equations and the arcs in \(\DPA\) connect each state to its successor states. We will also denote by \(\DPS = \{S|(k,S)\in\DPV\}\) the set of item-sets \(S\) that are involved in \(\DPV\).

Notably, solving Equations~\ref{eq:dp1}-\ref{eq:dp3} can be performed by building graph \(\DPG\) and running backward induction on it (from the lastly generated states to the initial state \((k=0,S=\emptyset)\)). By standard bookkeeping techniques one can also identify the items that are taken in an optimal manipulation and the order in which they are taken and then recover an optimal ranking to report (where these items are ranked first and in the same order).

\begin{example}[Example \ref{example:running} continued]
Let us illustrate our approach on our running example. We let \(u(i_1) = 5\), \(u(i_2) = 4\), \(u(i_3) = 3\) and \(u(i_4) = 1\). Figure \ref{fig:Dynprog} displays the resulting state graph \(\DPG\). The values of the states are given next to them and the optimal branches are displayed with thick solid arrows. In this example, \(\DPS = \{\emptyset, \{i_3\}, \{i_1,i_3\},\{i_3,i_4\},\{i_1,i_2,i_3\},\{i_1,i_3,i_4\}\}\). As we can see, the optimal choices for \(a_1\) is to first pick \(i_3\) so that \(i_2\) is still available the second time she becomes the picker. Hence, an optimal manipulation is given by \(\succ = i_3 \succ i_2 \succ i_1 \succ i_4\) which results in an allocation \(\phi_{\succ}(a_1) =\{i_2, i_3\}\) with a utility of $7$ whereas \(u_T = 6\).
\end{example}
\begin{figure}[!t]
   \centering
    \scalebox{0.9}{\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=7cm,semithick]
  \node[rectangle,draw,text=black] (A0)   at (0,2)  {$(0,\emptyset)$};
  \node[text=black] (A0V)   at (1, 2) {$7$};
  \node[text=black] (A0V)   at (-7, 2) {$\pi(1) = a_1$};
  \node[rectangle,draw,text=black] (A)   at (0,0.5)  {$(1,\emptyset)$};
  \node[text=black] (AV)   at (1, 0.5) {$7$};
  \node[text=black] (A0V)   at (-7, 0.5) {$\pi(2) = a_2$};
  \node[rectangle,draw,text=black] (B)   at (-2,-3) {$(1,\{i_3\})$};
  \node[text=black] (BV)   at (-0.9, -3) {$6$};
  \node[text=black] (A0V)   at (-7, -3) {$\pi(3) = a_3$};
  \node[text=black] (A0V)   at (-7, -6.5) {$\pi(4) = a_1$};
  \node[rectangle,draw,text=black] (C)   at (1,-1.5) {$(0,\{i_3\})$};
  \node[text=black] (CV)   at (2, -1.5) {$4$};
  \node[rectangle,draw,text=black] (D)   at (-5,-6.5) {$(1,\{i_1,i_3\})$};
  \node[text=black] (DV)   at (-3.8, -6.5) {$5$};
  \node[rectangle,draw,text=black] (E)   at (-2,-5) {$(0,\{i_1,i_3\})$};
  \node[text=black] (EV)   at (-0.5, -5) {$1$};
  \node[rectangle,draw,text=black] (F)   at (3, -3) {$(0,\{i_3,i_4\})$};
  \node[text=black] (FV)   at (4.5, -3) {$4$};
  \node[rectangle,draw,text=black] (G)   at (-5, -8) {$(2,\{i_1,i_3\})$};
  \node[text=black] (GV)   at (-3.8, -8) {$5$};
  \node[rectangle,draw,text=black] (H)   at (-2, -6.5) {$(0,\{i_1,i_2,i_3\})$};
  \node[text=black] (HV)   at (-0.5, -6.5) {$1$};
  \node[rectangle,draw,text=black] (I)   at (-2, -8) {$(1,\{i_1,i_2,i_3\})$};
  \node[text=black] (IV)   at (-0.5, -8) {$1$};
  \node[rectangle,draw,text=black] (J)   at (3, -6.5) {$(0,\{i_1,i_3,i_4\})$};
  \node[text=black] (JV)   at (4.5, -6.5) {$4$};
  \node[rectangle,draw,text=black] (K)   at (3, -8) {$(1,\{i_1,i_3,i_4\})$};
  \node[text=black] (KV)   at (4.5, -8) {$4$};
  \node[text=black,text width = 4cm] (L)   at (-5, -9.5) {$a_1$ has picked $i_2,i_4$, \(u(i_2) + u(i_4) = 5\)};
  \node[text=black,text width = 2.8cm] (M)   at (-2, -9.5) {$a_1$ has picked $i_4$, \(u(i_4) = 1\)};
  \node[text=black,text width = 2.8cm] (N)   at (3, -9.5) {$a_1$ has picked $i_2$, \(u(i_2) = 4\)};

  \path (A0) edge[line width=1.0pt]  node {} (A)
     (A) edge [dotted,line width=0.5pt,left] node {\(a_2\) picks \(i_3\)} (B)
	  (A) edge [line width=1.0pt,text width = 2.8cm, pos = 0.8] node {\(a_1\) has picked \(i_3\), \(u(i_3) = 3\)} (C)
	(B) edge[left,dotted,line width=0.5pt]  node {\(a_3\) picks \(i_1\)} (D)
	(B) edge [line width=1.0pt,text width = 2.8cm]  node {\(a_1\) has picked \(i_1\), \(u(i_1) = 5\)} (E)
	(C) edge [line width=1.0pt] node {\(a_2\) picks \(i_4\)} (F)
		(D) edge [line width=1.0pt] node {} (G)
			(E) edge [line width=1.0pt]  node {\(a_3\) picks \(i_2\)} (H)
				(H) edge [line width=1.0pt] node {} (I)
					(F) edge [line width=1.0pt] node {\(a_3\) picks \(i_1\)} (J)
						(J) edge [line width=1.0pt] node {} (K)
						(G) edge [line width=1.0pt] node {} (L)
						(I) edge [line width=1.0pt] node {} (M)
						(K) edge [line width=1.0pt] node {} (N);

	 \path [draw = black, rounded corners, inner sep=100pt,dotted]
               (-7.8,2.5)
            -- (4.7,2.5)
	    -- (4.7,1)
            -- (-7.8,1)
            -- cycle;
    \path [draw = black, rounded corners, inner sep=100pt,dotted]
               (-7.8,0.8)
            -- (4.7,0.8)
	    -- (4.7,-2.3)
            -- (-7.8,-2.3)
            -- cycle;
   \path [draw = black, rounded corners, inner sep=100pt,dotted]
               (-7.8,-2.5)
            -- (4.7,-2.5)
	    -- (4.7,-6)
            -- (-7.8,-6)
            -- cycle;
    \path [draw = black, rounded corners, inner sep=100pt,dotted]
               (-7.8,-6.1)
            -- (4.7,-6.1)
	    -- (4.7,-7.5)
            -- (-7.8,-7.5)
            -- cycle;
	  \end{tikzpicture}}
    \caption{\label{fig:Dynprog} Directed acyclic state graph \(\DPG\) in Example \ref{example:running}}
\end{figure}
\subsection{Complexity Analysis}
We now provide
positive parameterized complexity results by proving several upper bounds on \(|\DPV|\). In fact, we will prove bounds on \(|\DPS|\) and use the observation that \(|\DPV| \le (\mu(a_1)+1) |\DPS| \le m |\DPS|\) as there are only \(\mu(a_1)+1\) possible values for $k$ in a state $(k,S)$.

\paragraph{The algorithm is XP w.r.t. parameter \(n\).}
Let \(D(a,i)\) denote the set of items that agent \(a\) prefers to item \(i\), i.e., \(D(a,i) = \{j \in \mathcal{I} | j \succ_a i\}\). Then, for any set \(S\subseteq\mathcal{I}\), the definition of \(b(a,S)\), which we recall is the preferred element of agent \(a\) in set \(\mathcal{I} \setminus S\) implies that \(\bigcup_{a \in \mathcal{A}\setminus\{a_1\}}D(a,b(a,S)) \subseteq S\). Let us denote by \(\Delta\) the set of item-sets for which the equality holds, i.e., \(\Delta = \{S\subseteq\mathcal{I} | \bigcup_{a \in \mathcal{A}\setminus\{a_1\}}D(a,b(a,S)) = S \}\). Note that a set \(S\in \Delta\) is completely determined by the vector \((b(a_2,S), \ldots, b(a_n,S))\) and thus \(|\Delta| \leq m^{n-1}\). Our first key insight is that \(\DPS\) is a subset of \(\Delta\).

\begin{lemma} \label{lemma:Delta}
The set \(\DPS\) is a subset of \(\Delta\).
\end{lemma}
\begin{proof}
Let us show by induction that for each state \((k,S)\in \DPV\), \(S\) is in \(\Delta\).
The result is true for the initial state in which \(S = \emptyset\). Assume that the result is true for a state \((k,S)\). We show that the result also holds for the successor states.  If \(\pi(|S| + k + 1) = a_1\), then the successor state is \((k+1,S)\) so the result is also true for this new state as \(S\) is unchanged. Otherwise, let \(\pi(|S| + k + 1) = a^*\), then the successor states are \((k,S\cup\{b(a^*,S)\})\) and \((k-1,S\cup\{b(a^*,S)\}) \). Then we have the following two inclusion relationships:
\begin{align*}
D(a^*,b(a^*,S))\cup\{b(a^*,S)\} \subseteq D(a^*,b(a^*,S\cup\{b(a^*,S)\})),     \\
\forall a \in \mathcal{A} \setminus \{a_1\}, D(a,b(a,S)) \subseteq D(a,b(a,S\cup\{b(a^*,S)\})).
\end{align*}
 These relationships imply that $S\cup\{b(a^*,S)\}$ is equal to:
 \begin{align*}
     \bigcup_{a \in \mathcal{A}\setminus\{a_1\}}\!\!\!\!\!\!D(a,b(a,S)) \cup \{b(a^*,S)\} \subseteq \!\!\!\!\! \bigcup_{a \in \mathcal{A}\setminus\{a_1\}} \!\!\!\!\!\!D(a,b(a,S \cup \{b(a^*,S)\})),
 \end{align*}
by the induction hypothesis. As already stated, the reverse inclusion relationship is always true and hence \(S\cup\{b(a^*,S)\} \in \Delta\).
\end{proof}
Consequently from Lemma~\ref{lemma:Delta}, each state in \(\DPV\) admits two possible representations that we call {\em agent representation} and {\em item representation}. In the item representation, a state \((k,S)\) is represented by a vector of size \(m+1\), i.e., \(S\) is represented by a binary vector of size \(m\). In the agent representation,  a state \((k,S)\) is represented by a vector of size \(n\). In this case, \(S\) is replaced by the vector \((b(a_2,S), \ldots, b(a_n,S))\). Note that processing a state (computing the successor states and the optimal value of the state according to the ones of the successor states) in the agent (resp. item) representation can be done in $O(nm)$ (resp. $O(m)$) operations.
We now show that the \(\mathit{ManipSA}\) problem can be solved in polynomial time for any bounded number of agents.

\begin{theorem} \label{theorem : n}
Problem \(\mathit{ManipSA}\) is solvable in \(O(n \cdot m^{n+1})\). As a result, \(\mathit{ManipSA}\)  is in XP w.r.t. parameter \(n\).
\end{theorem}
\begin{proof}
The result follows from the fact that our dynamic programming scheme runs in \(O(n \cdot m^{n+1})\). To obtain this complexity bound, one should use the agent representation. In this case, processing a state requires \(O(nm)\) operations, and one can use a dynamic programming table of size \(m^n\) with one cell per possible vector \((k,b(a_2,S), \ldots, b(a_n,S))\).
\end{proof}

We now argue that our dynamic programming approach yields an FPT algorithm w.r.t. parameters \(n + \mu(a_1)\), \(n + \mathtt{rg}^{\max}\) and \(\mathtt{rg}^{\max}\) by providing tighter upper bounds on \(|\DPS|\). To use these bounds, we will need the two following lemmata:

\begin{lemma} \label{lemma: building graph}
Under the item representation, the graph \(\DPG\) can be build in $O(m|\DPV|^2)$.
\end{lemma}
\begin{proof}
First note that \(\DPG\) is indeed acyclic. Indeed, given a state that can occur at time step \(t\) of the allocation process (i.e., \(k+|S| = t\)), its successors will either correspond to time step \(t+1\) or will still correspond to time step \(t\) but with a strictly lower value for parameter \(k\). We now show how to incrementally build \(\DPG\) from state \((k = 0,S = \emptyset)\). For each new state generated at the previous iteration, compute its successor states, add edges towards them, and label them with the corresponding utility values. Moreover, each time a state is generated, compare it to the states already generated to avoid the creation of duplicates. If it is indeed a new state, its successors will be computed in the next iteration. This process is repeated until all states are generated. Note that because each state is only processed once, we will generate at most \(2|\DPV|\) states. However, because of the duplicate removal operation performed each time a state is generated, the method runs in $O(m|\DPV|^2)$. Indeed, this step will trigger \(O(|\DPV|^2)\) comparisons, each requiring \(m+1\) operations.
\end{proof}

\begin{lemma} \label{lemma: solving graph}
Under the item representation, problem \(\mathit{ManipSA}\) can be solved in $O(m|\DPV|^2)$.
\end{lemma}
\begin{proof}
By Lemma~\ref{lemma: building graph}, we can build \(\DPG\) in $O(m|\DPV|^2)$ and compute an optimal manipulation by backward induction in $O(m|\DPV|)$.
\end{proof}

\paragraph{The algorithm is FPT w.r.t. parameter \(n + \mu(a_1)\).}
We further argue that \(|\DPS|\) can be upper  bounded by \(m(\mu(a_1)+1)^{n-1}\). This is a consequence of the following lemma, where \(\mu(a,t)\) denotes the number of items that agent \(a\) gets to pick within the \(t\) first time steps.

\begin{lemma} \label{lemma: n + mu}
For each time step \(t\), there is a set \(S_t\) of \(t - \mu(a_1,t)\) items that are always picked within the \(t\) first time steps, whatever the actions of the manipulator.
\end{lemma}
\begin{proof}[Sketch of the proof]
Given an instance \(\mathcal{J}\) of the \(\mathit{ManipSA}\) problem, consider the instance \(\mathcal{J}^{-a_1}\) obtained from \(\mathcal{J}\) by removing \(a_1\). Moreover, let us denote by \(S_t^{-a_1}\) the set of items picked at the end of the \(t^{th}\) time step in \(\mathcal{J}^{-a_1}\). This set of size \(t\) is clearly defined as all agents behave truthfully in \(\mathcal{J}^{-a_1}\). We argue that after \(t\) time steps in \(\mathcal{J}\), all items in \(S_{t- \mu(a_1,t)}^{-a_1}\) have been picked whatever the actions of \(a_1\). This can be showed by induction because at each time step where the picker is a non-manipulator, she will pick the same item as in \(\mathcal{J}^{-a_1}\) unless this item has already been picked.
\end{proof}
As a consequence of Lemma~\ref{lemma: n + mu}, for each possible set \(S\) that can appear at time step \(t\) and agent \(a\in \mathcal{A}\setminus\{a_1\}\), \(b(a,S)\) can only be \(\mu(a_1,t-1)+1\) different items. More precisely, \(b(a,S)\) has to be one of the \(\mu(a_1,t-1)+1\) preferred items of \(a\) in \(\mathcal{I}\setminus S_{t-1}\). As a result, the number of possible vectors \((b(a_2,S), \ldots, b(a_n,S))\) associated to all the possible sets \(S\) that can appear at time step \(t\) is upper bounded by \((\mu(a_1,t-1)+1)^{n-1}\). Lastly, by using the facts that each set \(S\in \DPS\) is characterized by the vector \((b(a_2,S), \ldots, b(a_n,S))\), that \(\mu(a_1,t) \le \mu(a_1)\) for all \(t\),  and by considering all possible time steps, we obtain that \(|\DPS| \le m(\mu(a_1)+1)^{n-1}\).
\begin{theorem} \label{theorem n + mu}
Problem \(\mathit{ManipSA}\) is solvable in \(O(m^3 (\mu(a_1)+1)^{2n})\).  As a result, \(\mathit{ManipSA}\)  is FPT w.r.t. parameter  \(n + \mu(a_1)\).
\end{theorem}
\begin{proof}
This result is a consequence of Lemma~\ref{lemma: solving graph} and the fact that \(|\DPV| \le (\mu(a_1)+1)|\DPS| \le m(\mu(a_1)+1)^{n}\).
\end{proof}

\paragraph{The algorithm is FPT w.r.t. parameter \(n + \mathtt{rg}^{\max}\).}
We show that \(|\DPS|\) is also upper bounded by \(m(2\mathtt{rg}^{\max})^{n-2}\). This is a consequence of the following lemma.
\begin{lemma}\label{lem : diff of rk and rg}
For any set \(S \subseteq \mathcal{I}\), and any two agents \(a_s,a_t \in \mathcal{A}\setminus\{a_1\}\),
\[| \mathtt{rk}_{a_s}(b(a_s,S)) - \mathtt{rk}_{a_t}(b(a_t,S))| \leq \mathtt{rg}^{\max} - 1.\]
\end{lemma}
\begin{proof}
If we assume for the sake of contradiction that \(\mathtt{rk}_{a_s}(b(a_s,S)) \ge \mathtt{rk}_{a_t}(b(a_t,S)) + \mathtt{rg}^{\max}\) and  use the fact that \(|\mathtt{rk}_{a_s}(b(a_t,S)) - \mathtt{rk}_{a_t}(b(a_t,S))| < \mathtt{rg}^{\max}\) (by definition of \(\mathtt{rg}^{\max}\)), then we can conclude that \(b(a_t,S) \succ_{a_s} b(a_s,S)\), which contradicts the definition of \(b(a_s,S)\).
\end{proof}
Lemma~\ref{lem : diff of rk and rg} implies that for each of the \(m\) possible items for \(b(a_2,S)\), there are only \(2\mathtt{rg}^{\max}-1\) possible items for other parameters \(b(a_j,S)\) with \(j>2\). Then, by using the facts that a set \(S\in \DPS\) is characterized by the vector \((b(a_2,S), \ldots, b(a_n,S))\), we obtain that \(\DPS \le m(2\mathtt{rg}^{\max})^{n-2}\).

\begin{theorem} \label{theorem : n + rg}
Problem \(\mathit{ManipSA}\) is solvable in \(O(m^5(2\mathtt{rg}^{\max})^{2(n-2)})\). As a result, \(\mathit{ManipSA}\)  is FPT w.r.t. parameter  \(n + \mathtt{rg}^{\max}\).
\end{theorem}
\begin{proof}
This result is a consequence of Lemma~\ref{lemma: solving graph} and the fact that \(|\DPV| \le m|\DPS| \le m^2(2\mathtt{rg}^{\max})^{n-2}\).
\end{proof}

\paragraph{The algorithm is FPT w.r.t. parameter \(\mathtt{rg}^{\max}\).}
Lastly, \(|\DPS|\) can also be upper bounded by \(m 2^{2 \mathtt{rg}^{\max}}\). This claim is due to the fact that the set \(S\setminus D(a_2,b(a_2,S))\) cannot contain an item whose rank w.r.t. \(a_2\) is ``too high'', which is proved in the following lemma.
\begin{lemma} \label{lem : for th rg}
Given \(S\in \DPS\), all \(i\) in \(S\setminus D(a_2,b(a_2,S))\) verify
\[\mathtt{rk}_{a_2}(b(a_2,S)) + 1 \le \mathtt{rk}_{a_2}(i) \le \mathtt{rk}_{a_2}(b(a_2,S)) +2\mathtt{rg}^{\max}.\]
\end{lemma}
\begin{proof}
First note that by definition \(b(a_2,S)\!\! \not \in\!\! S\) (because \(b(a_2,S)\!\! \in\!\!\mathcal{I}\setminus S\)) and \(D(a_2,b(a_2,S)) \!\!= \!\!\{i\in \mathcal{I} | \mathtt{rk}_{a_2}(i) < \mathtt{rk}_{a_2}(b(a_2,S))\}\). Hence, the first inequality of the lemma hold.

Let us assume for the sake of contradiction that there exists \(i\!\in\! S\setminus D(a_2,b(a_2,S))\) such that \(\mathtt{rk}_{a_2}(i) \!>\! \mathtt{rk}_{a_2}(b(a_2,S)) +2\mathtt{rg}^{\max}\).
Because \(S\) belongs to \(\Delta\), we have that \(S\setminus D(a_2,b(a_2,S)) = \bigcup_{a \in \mathcal{A}\setminus\{a_1\}}D(a,b(a,S))\setminus D(a_2,b(a_2,S))\). Hence, there exists \(a_j\) with \(j\ge 3\) such that \(i\in D(a_j,b(a_j,S))\).
By definition of \(\mathtt{rg}^{\max}\), we have that \(\mathtt{rg}^{\max} > \mathtt{rk}_{a_2}(i) - \mathtt{rk}_{a_j}(i)\), or equivalently that \(\mathtt{rk}_{a_j}(i) > \mathtt{rk}_{a_2}(i) - \mathtt{rg}^{\max}\), which yields that \(\mathtt{rk}_{a_j}(b(a_j,S)) > \mathtt{rk}_{a_j}(i) > \mathtt{rk}_{a_2}(i) - \mathtt{rg}^{\max} > \mathtt{rk}_{a_2}(b(a_2,S)) +\mathtt{rg}^{\max}\). This contradicts Lemma~\ref{lem : diff of rk and rg}.
\end{proof}
As a consequence of Lemma~\ref{lem : for th rg}, \(|\DPS|\) is upper bounded by \(m 2^{2 \mathtt{rg}^{\max}}\) because there are at most \(m\) possible items for \(b(a_2,S)\), and for each of them, there are at most \(2^{2 \mathtt{rg}^{\max}}\) possible sets for \(S\setminus D(a_2,b(a_2,S))\).
\begin{theorem} \label{theorem : rg}
Problem \(\mathit{ManipSA}\) is solvable in \(O(m^5 2^{4 \mathtt{rg}^{\max}})\). As a result, \(\mathit{ManipSA}\)  is FPT w.r.t. parameter  \( \mathtt{rg}^{\max}\).
\end{theorem}
\begin{proof}
This result is a consequence of Lemma~\ref{lemma: solving graph} and the fact that \(|\DPV| \le m|\DPS| \le m^2 2^{2 \mathtt{rg}^{\max}}\).
\end{proof}

\textit{Remark.} Note that it is easy to prove that, in contrast, the problem is NP-hard even if the average range of the items is of 2.\footnote{ One can use a reduction with a sufficiently large number of dummy items ranked last and in the same positions by all agents.} Furthermore, Theorem \ref{theorem : n + rg} might seem less appealing as the \(\mathit{ManipSA}\) problem is FPT w.r.t. parameter \(\mathtt{rg}^{\max}\) alone. However, we would like to stress that the time complexity of Theorem \ref{theorem : n + rg} might be more interesting than the one of Theorem \ref{theorem : rg} for a small number of agents.

\begin{comment}
The most simple approach to solve the \(\mathit{ManipSA}\) problem is probably to try the \(m!\) possible preference rankings and see which one yields the maximum utility value. However, a more clever approach can use the following result from \cite{bouveret2011general}:

\begin{fact} [From Propositions 7 and 8 in \cite{bouveret2011general}]
Given a specific set of items \(S\), it can be determined in polynomial time if there exists a preference ranking \(\succ\) such that \(S \subseteq \phi_{\succ}(a_1)\). In such case, it is also easy to compute such a ranking.
\end{fact}

Hence, one can try the \({m \choose \mu(a_1)}\) possible sets of \(\mu(a_1)\) items to determine which is the best one that \(a_1\) can get. This approach shows that \(\mathit{ManipSA}\) is in XP w.r.t. parameter \(\mu(a_1)\).

\begin{example}[Example~\ref{example:running} continued] In our running example, \(\mu(a_1) = 2\). Hence, \(a_1\) just has to determine which one of the \({4 \choose 2}\) following sets she must obtain: \(\{a_1,a_2\}, \{a_1,a_3\}, \{a_1,a_4\}, \{a_2,a_3\}\), \(\{a_2,a_4\}, \{a_3,a_4\}\).
\end{example}

To obtain further positive results, we first
design a dynamic programming scheme for the \(\mathit{ManipSA}\) problem. We will then explain how this scheme entails several positive parameterized complexity results.
\subsection{A Dynamic Programming Scheme}
Our dynamic programming approach considers pairs \((k,S)\) where \(S \subseteq \mathcal{I}\) and \(k \in \{0,1,\ldots,\mu(a_1)\}\).  In a state characterized by the pair \((k,S)\), we know that the items in \(S\) have been picked by some agents in \(\mathcal{A}\) as well as \(k\) other items that have been picked by agent \(a_1\). However, while the items in \(S\) are clearly identified, the identities of these \(k\) other items are unspecified.

Given a pair \((k,S)\) the number of items that have already been picked is \(|S| + k\). Hence, the next agent to become a picker is \(\pi(|S| + k + 1)\). Let us denote this agent by \(a\). If \(a = a_1\), i.e., she is the manipulator, then she will pick one more item within the set \(\mathcal{I} \setminus S\) and we move to state \((k+1,S)\).
Otherwise, let \(b(a,S)\) denote the preferred item of agent \(a\) within the set \(\mathcal{I} \setminus S\). Then, two cases are possible:
\begin{itemize}
    \item either \(b(a,S)\) has already been picked by agent \(a_1\). In this case, we move to state \((k - 1, S \cup \{b(a,S)\})\). Note that this is only possible if \(k\) was greater than or equal to one.
    \item otherwise \(b(a,S)\) is picked by agent \(a\) and we move to state \((k,S\cup \{b(a,S)\})\).
\end{itemize}

Let us denote by \(V(k,S)\) the maximal utility that the manipulator can get from items in \(\mathcal{I}\setminus S\) starting from state \((k,S)\). Then the value of an optimal manipulation is given by \(V(k = 0, S = \emptyset)\). From the previous analysis, function \(V\) verifies the following dynamic programming equations:
\begin{align*}
    V(k,S) &= V(k+1 , S) \text{ if } \pi(|S| + k + 1) = a_1\\
    V(k=0,S) &= V(k,S\cup\{b(a,S)\}) \text{ if } \pi(|S| + k + 1) = a \neq a_1\\
    V(k>0,S) &= \max\big(V(k-1,S\cup\{b(a,S)\}) + u(b(a,S)),\\
          &V(k,S\cup\{b(a,S)\})\big) \text{ if } \pi(|S| + k + 1) = a \neq a_1
\end{align*}

The termination is guaranteed by the facts that \(V(k,S) = \sum_{i \in \mathcal{I} \setminus S} u(i)\) when \(|S| + k = m\). By standard bookkeeping techniques one can identify the items that are taken in an optimal manipulation and the order in which they are taken and then recover an optimal ranking to report (where these items are ranked first and in the same order).
Before analyzing the complexity of this dynamic programming scheme, we illustrate it on our running example.

\begin{example}[Example \ref{example:running} continued]
Let us illustrate our approach on our running example. We let \(u(i_1) = 5\), \(u(i_2) = 4\), \(u(i_3) = 3\) and \(u(i_4) = 1\). We show in Figure \ref{fig:Dynprog} the directed acyclic state graph of the dynamic programming algorithm. The values of the states are given next to them and the optimal branches are displayed with thick solid arrows. As we can see, the optimal choices for \(a_1\) is to first pick \(i_3\) so that \(i_2\) is still available the second time she becomes the picker. Hence an optimal manipulation is given by \(\succ = i_3 \succ i_2 \succ i_1 \succ i_4\) which results in an allocation \(\phi_{\succ}(a_1) =\{i_2, i_3\}\) with a utility of $7$ whereas \(u_T = 6\).
\begin{figure}[!h]
   \centering
    \scalebox{1}{\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=7cm,
                    semithick]
  \node[rectangle,draw,text=black] (A0)   at (0,1)  {$(0,\{\})$};
  \node[text=black] (A0V)   at (1, 1) {$7$};
  \node[text=black] (A0V)   at (-7, 1) {$\pi(1) = a_1$};
  \node[rectangle,draw,text=black] (A)   at (0,-0.5)  {$(1,\{\})$};
  \node[text=black] (AV)   at (1, -0.5) {$7$};
  \node[text=black] (A0V)   at (-7, -0.5) {$\pi(2) = a_2$};
  \node[rectangle,draw,text=black] (B)   at (-2,-3.5) {$(1,\{i_3\})$};
  \node[text=black] (BV)   at (-0.9, -3.5) {$6$};
  \node[text=black] (A0V)   at (-7, -3.5) {$\pi(3) = a_3$};
  \node[text=black] (A0V)   at (-7, -6.5) {$\pi(4) = a_1$};
  \node[rectangle,draw,text=black] (C)   at (1.5,-2) {$(0,\{i_3\})$};
  \node[text=black] (CV)   at (2.5, -2) {$4$};
  \node[rectangle,draw,text=black] (D)   at (-5,-6.5) {$(1,\{i_1,i_3\})$};
  \node[text=black] (DV)   at (-3.8, -6.5) {$5$};
  \node[rectangle,draw,text=black] (E)   at (-2,-5) {$(0,\{i_1,i_3\})$};
  \node[text=black] (EV)   at (-0.5, -5) {$1$};
  \node[rectangle,draw,text=black] (F)   at (3, -3.5) {$(0,\{i_3,i_4\})$};
  \node[text=black] (FV)   at (4.5, -3.5) {$4$};
  \node[rectangle,draw,text=black] (G)   at (-5, -8) {$(2,\{i_1,i_3\})$};
  \node[text=black] (GV)   at (-3.8, -8) {$5$};
  \node[rectangle,draw,text=black] (H)   at (-2, -6.5) {$(0,\{i_1,i_2,i_3\})$};
  \node[text=black] (HV)   at (-0.5, -6.5) {$1$};
  \node[rectangle,draw,text=black] (I)   at (-2, -8) {$(1,\{i_1,i_2,i_3\})$};
  \node[text=black] (IV)   at (-0.5, -8) {$1$};
  \node[rectangle,draw,text=black] (J)   at (3, -6.5) {$(0,\{i_1,i_3,i_4\})$};
  \node[text=black] (JV)   at (4.5, -6.5) {$4$};
  \node[rectangle,draw,text=black] (K)   at (3, -8) {$(1,\{i_1,i_3,i_4\})$};
  \node[text=black] (KV)   at (4.5, -8) {$4$};
  \node[text=black] (L)   at (-5, -9) {$a_1$ has picked $i_2,i_4$};
  \node[text=black] (M)   at (-2, -9) {$a_1$ has picked $i_4$};
  \node[text=black] (N)   at (3, -9) {$a_1$ has picked $i_2$};

  \path (A0) edge[line width=1.0pt]  node {} (A)
     (A) edge [dotted,line width=0.5pt,left] node {\(a_2\) picks \(i_3\)} (B)
	  (A) edge [line width=1.0pt] node {\(a_1\) has picked \(i_3\)} (C)
	(B) edge[left,dotted,line width=0.5pt]  node {\(a_3\) picks \(i_1\)} (D)
	(B) edge [line width=1.0pt]  node {\(a_1\) has picked \(i_1\)} (E)
	(C) edge [line width=1.0pt] node {\(a_2\) picks \(i_4\)} (F)
		(D) edge [line width=1.0pt] node {} (G)
			(E) edge [line width=1.0pt]  node {\(a_3\) picks \(i_2\)} (H)
				(H) edge [line width=1.0pt] node {} (I)
					(F) edge [line width=1.0pt] node {\(a_3\) picks \(i_1\)} (J)
						(J) edge [line width=1.0pt] node {} (K)
						(G) edge [line width=1.0pt] node {} (L)
						(I) edge [line width=1.0pt] node {} (M)
						(K) edge [line width=1.0pt] node {} (N);

	 \path [draw = black, rounded corners, inner sep=100pt,dotted]
               (-7.8,1.5)
            -- (4.7,1.5)
	    -- (4.7,-0.)
            -- (-7.8,-0.)
            -- cycle;
    \path [draw = black, rounded corners, inner sep=100pt,dotted]
               (-7.8,-0.2)
            -- (4.7,-0.2)
	    -- (4.7,-2.8)
            -- (-7.8,-2.8)
            -- cycle;
   \path [draw = black, rounded corners, inner sep=100pt,dotted]
               (-7.8,-3)
            -- (4.7,-3)
	    -- (4.7,-6)
            -- (-7.8,-6)
            -- cycle;
    \path [draw = black, rounded corners, inner sep=100pt,dotted]
               (-7.8,-6.1)
            -- (4.7,-6.1)
	    -- (4.7,-7.5)
            -- (-7.8,-7.5)
            -- cycle;
	  \end{tikzpicture}}
    \caption{\label{fig:Dynprog} \small Directed acyclic state graph of the dynamic programming approach applied to the instance of Example \ref{example:running}}
\end{figure}
\end{example}

\subsection{Complexity of the Dynamic Programming Scheme}

We now provide
positive parameterized complexity results by proving several bounds on the number of states involved in the dynamic programming scheme described above.

\paragraph{The algorithm is XP w.r.t. parameter \(n\).}
Let \(D(a,i)\) denote the set of items that agent \(a\) prefers to item \(i\), i.e., \(D(a,i) = \{j \in \mathcal{I} | j \succ_a i\}\). Then, for any set \(S\subseteq\mathcal{I}\), the definition of \(b(a,S)\), which we recall is the preferred element of agent \(a\) in set \(\mathcal{I} \setminus S\) implies that \(\bigcup_{a \in \mathcal{A}\setminus\{a_1\}}D(a,b(a,S)) \subseteq S\). Let us denote by \(\Delta\) the set of sets for which the equality holds, i.e., \(\Delta = \{S\subseteq\mathcal{I} | \bigcup_{a \in \mathcal{A}\setminus\{a_1\}}D(a,b(a,S)) = S \}\). Note that a set \(S\in \Delta\) is completely determined by the vector \((b(a_2,S), \ldots, b(a_n,S))\) and thus \(|\Delta| \leq m^{n-1}\). Our first key insight is that all the sets \(S\) involved in our dynamic programming scheme belong to \(\Delta\).

\begin{lemma} \label{lemma:Delta}
For all pairs \((k,S)\) involved in our dynamic programming scheme, we have that \(S\) belongs to \(\Delta\).
\end{lemma}
\begin{proof}
The result follows simply by induction. The result is true for the initial state in which \(S = \emptyset\). Assume that the result is true for a state characterized by a pair \((k,S)\). We show that the result also holds for the successor states.  If \(\pi(|S| + k + 1) = a_1\), then the successor state is \((k+1,S)\) so the result is also true for this new state as \(S\) is unchanged. Otherwise, let \(\pi(|S| + k + 1) = a^*\), then the successor states are \((k,S\cup\{b(a^*,S)\})\) and \((k-1,S\cup\{b(a^*,S)\}) \). Then we have the following two inclusion relationships:
\begin{align*}
D(a^*,b(a^*,S))\cup\{b(a^*,S)\} \subseteq D(a^*,b(a^*,S\cup\{b(a^*,S)\})),     \\
\forall a \in \mathcal{A} \setminus \{a_1\}, D(a,b(a,S)) \subseteq D(a,b(a,S\cup\{b(a^*,S)\})).
\end{align*}
 These relationships imply that:
 \begin{align*}
     S\cup\{b(a^*,S)\} =  \bigcup_{a \in \mathcal{A}\setminus\{a_1\}}D(a,b(a,S)) \cup\{b(a^*,S)\}
                       \subseteq  \bigcup_{a \in \mathcal{A}\setminus\{a_1\}}D(a,b(a,S\cup\{b(a^*,S)\})),
 \end{align*}
where the first equality is due to the induction hypothesis. As already stated, the reverse inclusion relationship is always true and hence \(S\cup\{b(a^*,S)\} \in \Delta\).
\end{proof}
Consequently from Lemma~\ref{lemma:Delta}, each state of the dynamic program admits two possible representations that we will denote by {\em agent representation} and {\em item representation}. In the item representation, a state \((k,S)\) is represented by a vector of size \(m+1\), i.e., \(S\) is represented by a binary vector of size \(m\). In the agent representation,  a state \((k,S)\) is represented by a vector of size \(n\). In this case, \(S\) is replaced by the vector \((b(a_2,S), \ldots, b(a_n,S))\). Note that processing a state (computing the succesor states and the value of the state) in the {\em agent representation} (resp. {\em item representation}) can be done in $O(nm)$ (resp. $O(m)$) operations.
We now show that the \(\mathit{ManipSA}\) problem can be solved in polynomial time for any bounded number of agents. Indeed, the problem is in XP w.r.t. parameter \(n\).

\begin{theorem} \label{theorem : n}
Problem \(\mathit{ManipSA}\) is solvable in \(O(n \cdot m^{n+1})\). As a result, \(\mathit{ManipSA}\)  is in XP w.r.t. parameter \(n\).
\end{theorem}
\begin{proof}
The result follows from the fact that our dynamic programming scheme runs in \(O(n \cdot m^{n+1})\). To obtain this complexity bound, one should use the agent representation. In this case, processing a state requires \(O(nm)\) operations, and one can use a dynamic programming table of size \(m^n\) to run the dynamic program. More precisely, this table has one cell for each possible vector \((k,b(a_2,S), \ldots, b(a_n,S))\).
\end{proof}

We now argue that our dynamic programming approach yields an FPT algorithm w.r.t. parameters \(n + \mu(a_1)\), \(n + \mathtt{rg}^{\max}\) and \(\mathtt{rg}^{\max}\) by providing tighter bounds on the number of sets \(S\) involved in our dynamic programming scheme. To use these bounds, we will need the following lemma:

\begin{lemma} \label{lemma: building graph}
Under the item representation, the directed acyclic state graph of our dynamic program can be build in $O(m\mathcal{S}^2)$, where $\mathcal{S}$ denotes the number of states involved in our dynamic programming scheme.
\end{lemma}
\begin{proof}
First note that the directed state graph, i.e., the graph where each state is connected to its successor states is indeed acyclic. Indeed, given a state that can occur at timestep \(t\) of the allocation process (i.e., \(k+|S| = t\)), its successors will either correspond to timestep \(t+1\) or will still correspond to timestep \(t\) but with a strictly lower value for parameter \(k\). We now show how to incrementally build the directed acyclic state graph from state \((k = 0,S = \{\})\). For each new state generated at the previous iteration of the method, compute its successor states, add edges towards them, and label them with the corresponding utility values. Moreover, each time a state is generated, compare it to the states already generated to remove duplicates. If it is indeed a new state, its successors will be computed in the next iteration. This step is repeated until we have generated all states. Note that because each state is only processed once, we will generate at most \(2\mathcal{S}\) states. However, because of the duplicate removal operation performed each time a state is generated, the method runs in $O(m\mathcal{S}^2)$. Indeed, this step will trigger \(O(\mathcal{S}^2)\) comparisons, each requiring \(m+1\) operations.
\end{proof}

\paragraph{The algorithm is FPT w.r.t. parameter \(n + \mu(a_1)\).}
We further argue that the number of different sets \(S\) involved in our dynamic programming scheme can be upper  bounded by \(m(\mu(a_1)+1)^{n-1}\). This is a consequence of the following lemma, where \(\mu(a,t)\) denotes the number of items that agent \(a\) gets to pick within the \(t\) first time steps.

\begin{lemma} \label{lemma: n + mu}
For each time step \(t\), there is a set \(S_t\) of \(t - \mu(a_1,t)\) items that are always picked within the \(t\) first time steps, whatever the actions of the manipulator.
\end{lemma}
\begin{proof}[Sketch of the proof]
Given an instance \(\mathcal{J}\) of the \(\mathit{ManipSA}\) problem, consider the instance \(\mathcal{J}^{-a_1}\) obtained from \(\mathcal{J}\) by removing \(a_1\). Moreover, let us denote by \(S_t^{-a_1}\) the set of items picked at the end of the \(t^{th}\) time step in \(\mathcal{J}^{-a_1}\). This set of size \(t\) is clearly defined as all agents behave truthfully in \(\mathcal{J}^{-a_1}\). We argue that after \(t\) time steps in \(\mathcal{J}\), all items in \(S_{t- \mu(a_1,t)}^{-a_1}\) have been picked whatever the actions of \(a_1\). This can be showed by induction because at each time step where the picker is a non-manipulator, she will pick the same item as in \(\mathcal{J}^{-a_1}\) unless this item has already been picked.
\end{proof}
As a consequence of Lemma~\ref{lemma: n + mu}, for each possible set \(S\) that can appear at time step \(t\) and agent \(a\in \mathcal{A}\setminus\{a_1\}\), \(b(a,S)\) can only be \(\mu(a_1,t-1)+1\) different items. More precisely, \(b(a,S)\) has to be one of the \(\mu(a_1,t-1)+1\) preferred items of \(a\) in \(\mathcal{I}\setminus S_{t-1}\). As a result, the number of possible vectors \((b(a_2,S), \ldots, b(a_n,S))\) associated to all the possible sets \(S\) that can appear at time step \(t\) is upper bounded by \((\mu(a_1,t-1)+1)^{n-1}\). Lastly, by using the facts that each set \(S\in \Delta\) is characterized by the vector \((b(a_2,S), \ldots, b(a_n,S))\), that \(\mu(a_1,t) \le \mu(a_1)\) for all \(t\),  and by considering all possible time steps, we obtain that the number of different sets \(S\) involved in our dynamic programming scheme can be upper bounded by \(m(\mu(a_1)+1)^{n-1}\).

\begin{theorem} \label{theorem n + mu}
Problem \(\mathit{ManipSA}\) is solvable in \(O(m^3 (\mu(a_1)+1)^{2n})\).  As a result, \(\mathit{ManipSA}\)  is FPT w.r.t. parameter  \(n + \mu(a_1)\).
\end{theorem}
\begin{proof}
 We use the fact that the number of states involved in our dynamic programming scheme is bounded by \(m(\mu(a_1)+1)^{n}\), as there are at most \(\mu(a_1)+1\) possible values for \(k\) and \(m(\mu(a_1)+1)^{n-1}\) possible sets for \(S\) in a state \((k,S)\). Using the item representation and Lemma \ref{lemma: building graph}, we can hence build the directed acyclic state graph  in \(O(m \cdot m^2 (\mu(a_1)+1)^{2n})\) and then perform backward induction in \(O(m \cdot m (\mu(a_1)+1)^{n})\).
\end{proof}

\paragraph{The algorithm is FPT w.r.t. parameter \(n + \mathtt{rg}^{\max}\).}
The number of different sets \(S\) involved in our dynamic programming scheme is also upper bounded by \(m(2\mathtt{rg}^{\max})^{n-2}\). This is a consequence of the following lemma.
\begin{lemma}\label{lem : diff of rk and rg}
For any set \(S \subseteq \mathcal{I}\), and any two agents \(a_s,a_t \in \mathcal{A}\setminus\{a_1\}\), we have the following inequality:
\[| \mathtt{rk}_{a_s}(b(a_s,S)) - \mathtt{rk}_{a_t}(b(a_t,S))| \leq \mathtt{rg}^{\max} - 1.\]
\end{lemma}
\begin{proof}
If we assume for the sake of contradiction that \(\mathtt{rk}_{a_s}(b(a_s,S)) \ge \mathtt{rk}_{a_t}(b(a_t,S)) + \mathtt{rg}^{\max}\) and  use the fact that \(|\mathtt{rk}_{a_s}(b(a_t,S)) - \mathtt{rk}_{a_t}(b(a_t,S))| < \mathtt{rg}^{\max}\) (by definition of \(\mathtt{rg}^{\max}\)), then we can conclude that \(b(a_t,S) \succ_{a_s} b(a_s,S)\), which contradicts the definition of \(b(a_s,S)\).
\end{proof}
Lemma~\ref{lem : diff of rk and rg} implies that for each of the \(m\) possible items for \(b(a_2,S)\), there are only \(2\mathtt{rg}^{\max}-1\) possible items for other parameters \(b(a_j,S)\) with \(j>2\). Then, by using the facts that a set \(S\in \Delta\) is characterized by the vector \((b(a_2,S), \ldots, b(a_n,S))\), we obtain that the number of different sets \(S\) involved in our dynamic programming scheme can be upper bounded by \(m(2\mathtt{rg}^{\max})^{n-2}\).

\begin{theorem} \label{theorem : n + rg}
Problem \(\mathit{ManipSA}\) is solvable in \(O(m^5(2\mathtt{rg}^{\max})^{2(n-2)})\). As a result, \(\mathit{ManipSA}\)  is FPT w.r.t. parameter  \(n + \mathtt{rg}^{\max}\).
\end{theorem}
\begin{proof}
The proof is similar to the one of Theorem \ref{theorem n + mu}. We use the fact that the number of states involved in our dynamic programming scheme is bounded by \(m^2(2\mathtt{rg}^{\max})^{n-2}\), as there are at most \(m\) possible values for \(k\) and \(m(2\mathtt{rg}^{\max})^{n-2}\) possible sets for \(S\) in a state \((k,S)\). Using the item representation and Lemma \ref{lemma: building graph}, we can hence build the directed acyclic state graph  in \(O(m \cdot m^4(2\mathtt{rg}^{\max})^{2(n-2)})\) and then perform backward induction in \(O(m \cdot m^2(2\mathtt{rg}^{\max})^{n-2})\).
\end{proof}

\paragraph{The algorithm is FPT w.r.t. parameter \(\mathtt{rg}^{\max}\).}
Lastly, the number of different sets \(S\) involved in our dynamic programming scheme can also be upper bounded by \(m 2^{2 \mathtt{rg}^{\max}}\). This claim is due to the fact that the set \(S\setminus D(a_2,b(a_2,S))\) cannot contain an item whose rank w.r.t. \(a_2\) is ``too high'', which is proved in the following lemma.
\begin{lemma} \label{lem : for th rg}
Given \(S\in \Delta\), all \(i\) in \(S\setminus D(a_2,b(a_2,S))\) verify the following inequalities:
\[\mathtt{rk}_{a_2}(b(a_2,S)) + 1 \le \mathtt{rk}_{a_2}(i) \le \mathtt{rk}_{a_2}(b(a_2,S)) +2\mathtt{rg}^{\max}.\]
\end{lemma}
\begin{proof}
First note that by definition \(b(a_2,S)\!\! \not \in\!\! S\) (because \(b(a_2,S)\!\! \in\!\!\mathcal{I}\setminus S\)) and \(D(a_2,b(a_2,S)) \!\!= \!\!\{i\in \mathcal{I} | \mathtt{rk}_{a_2}(i) < \mathtt{rk}_{a_2}(b(a_2,S))\}\). Hence, any item \(i\!\in\! S\setminus D(a_2,b(a_2,S))\) verifies $\mathtt{rk}_{a_2}(i) \!\ge\! \mathtt{rk}_{a_2}(b(a_2,S)) + 1$.

Let us assume for the sake of contradiction that there exists \(i\!\in\! S\setminus D(a_2,b(a_2,S))\) such that \(\mathtt{rk}_{a_2}(i) \!>\! \mathtt{rk}_{a_2}(b(a_2,S)) +2\mathtt{rg}^{\max}\).
Because \(S\) belongs to \(\Delta\), we have that \(S\setminus D(a_2,b(a_2,S)) = \bigcup_{a \in \mathcal{A}\setminus\{a_1\}}D(a,b(a,S))\setminus D(a_2,b(a_2,S))\). Hence, there exists \(a_j\) with \(j\ge 3\) such that \(i\in D(a_j,b(a_j,S))\).
By definition of \(\mathtt{rg}^{\max}\), we have that \(\mathtt{rk}_{a_j}(i) > \mathtt{rk}_{a_2}(i) - \mathtt{rg}^{\max}\) which yields that \(\mathtt{rk}_{a_j}(b(a_j,S)) > \mathtt{rk}_{a_j}(i) > \mathtt{rk}_{a_2}(i) - \mathtt{rg}^{\max} > \mathtt{rk}_{a_2}(b(a_2,S)) +\mathtt{rg}^{\max}\). This contradicts Lemma~\ref{lem : diff of rk and rg}.
\end{proof}
As a consequence of Lemma~\ref{lem : for th rg}, the number of sets \(S\) is upper bounded by \(m 2^{2 \mathtt{rg}^{\max}}\), because there are at most \(m\) possible items for \(b(a_2,S)\) and for each of them there are at most \(2^{2 \mathtt{rg}^{\max}}\) possible sets for \(S\setminus D(a_2,b(a_2,S))\).
\begin{theorem} \label{theorem : rg}
Problem \(\mathit{ManipSA}\) is solvable in \(O(m^5 2^{4 \mathtt{rg}^{\max}})\). As a result, \(\mathit{ManipSA}\)  is FPT w.r.t. parameter  \( \mathtt{rg}^{\max}\).
\end{theorem}
\begin{proof}
The proof is similar to the one of Theorem \ref{theorem n + mu}. We use the fact that the number of states involved in our dynamic programming scheme is upper bounded by \(m^2(2^{2 \mathtt{rg}^{\max}})\), as there are at most \(m\) possible values for \(k\) and \(m 2^{2 \mathtt{rg}^{\max}}\) possible sets for \(S\) in a state \((k,S)\). Using the item representation and Lemma \ref{lemma: building graph}, we can hence build the directed acyclic state graph  in \(O(m \cdot m^4(2^{4 \mathtt{rg}^{\max}}))\) and then perform backward induction in \(O(m \cdot m^2(2^{2 \mathtt{rg}^{\max}}))\).
\end{proof}

\textit{Remark.} Note that it is easy to prove that, in contrast, the problem is NP-hard even if the average range of the items is of 2.\footnote{ One can use a reduction with a sufficiently large number of dummy items ranked last and in the same positions by all agents.} Furthermore, Theorem \ref{theorem : n + rg} might seem less appealing as the \(\mathit{ManipSA}\) problem is FPT w.r.t. parameter \(\mathtt{rg}^{\max}\) alone. However, we would like to stress that the time complexity of Theorem \ref{theorem : n + rg} might be more interesting than the one of Theorem \ref{theorem : rg} for a small number of agents.
\end{comment}
\begin{comment}

\section{\(\mathit{ManipSA}\) and Parameter \(n\)}\label{Sect:NumberOfAgents}
We now show that the problem can be solved in polynomial time if the number of agents is bounded. Indeed, we will design a dynamic programming approach whose complexity is \(O(nm(m+1)^{n})\). Stated differently, the problem is in XP w.r.t. the parameter \(n\).

Denote by \(\mathtt{top}_a(j)\) the set compounded of the \(j\) preferred items of agent \(a\) and by \(\mathtt{it}_a(j)\) the  \(j^{th}\) preferred item of agent \(a\). The dynamic programming approach will consider \(n\)-tuples \((k_1,i_2,\ldots,i_n)\). Such a tuple gives the following information about what has happened so far in the picking process:
\begin{itemize}
    \item all items in \(\bigcup_{j=2}^n\mathtt{top}_{a_j}(i_j) \) have already been picked by some agent.
    \item items \(\mathtt{it}_{a_j}(i_j+1)\) for \(j\in\{2,\ldots,n\}\) have not been picked yet by agents in \(\{a_2,\ldots,a_n\}\) but they may have been picked by the manipulator \(a_1\).
    \item up to this point, no item has been picked by agents in \(\{a_2,\ldots,a_n\}\) within the set \(O \setminus(\bigcup_{j=2}^n\mathtt{top}_{a_j}(i_j))\).
    \item up to this point, \(a_1\) has picked \(k_1\) items within the set \(O \setminus(\bigcup_{j=2}^n\mathtt{top}_{a_j}(i_j))\). However, the identity of these items remains to be specified.
\end{itemize}
Given a tuple \((k_1,i_2,\ldots,i_n)\) the number of items that have already been picked is \(|\bigcup_{j=2}^n\mathtt{top}_{a_j}(i_j)| + k_1\). Hence, the next agent to become a picker is \(\pi(|\bigcup_{j=2}^n\mathtt{top}_{a_j}(i_j)| + k_1 + 1)\). If this agent is the manipulator, then he will pick one more item within \(O \setminus(\bigcup_{j=2}^n\mathtt{top}_{a_j}(i_j))\) and we move to state \((k_1+1,i_2,\ldots,i_n)\).

Otherwise, let us assume the picker is agent \(a_2\). Then, two cases are possible: either \(\mathtt{it}_2(i_2+1)\) has already been picked by agent \(a_1\), or it will be picked by agent \(a_2\). To restate this fact more formally, let us denote by \(t_i^j\) the rank of the preferred item of agent \(a_i\) in \(O\setminus(\mathtt{top}_{a_j}(i_j+1)\cup\bigcup_{k=2, k\neq j }^n\mathtt{top}_{a_k}(i_k))\) to which we subtract one. Then:
\begin{itemize}
    \item either \(\mathtt{it}_{a_2}(i_2+1)\) has already been picked by agent \(a_1\) and we move to state \((k_1-1,t_2^2,\ldots,t_n^2)\). Note that this is only possible if \(k_1\) was greater than or equal to one.
    \item otherwise \(\mathtt{it}_{a_2}(i_2+1)\) is picked by agent \(a_2\) and we move to state \((k_1,t_2^2,\ldots,t_n^2)\).
\end{itemize}
A similar analysis can be made if another non-manipulator is the picker.

Let us denote by \(V(k_1,i_2,\ldots,i_n)\) the maximal utility that the manipulator can get from items in \(O\setminus(\bigcup_{j=2}^n\mathtt{top}_{a_j}(i_j))\) starting from state \((k_1,i_2,\ldots,i_n)\). Then the value of an optimal manipulation is given by \(V(k_1=0,i_2=0,\ldots,i_n=0)\). From the previous analysis, function \(V\) verifies the following dynamic programming equations:

\begin{align*}
    V(k_1,i_2,\ldots,i_n) &= V(k_1+1,i_2,\ldots,i_n) \\&\text{ if } \pi(|\bigcup_{j=2}^n\mathtt{top}_{a_j}(i_j)| + k_1 + 1) = a_1\\
    V(k_1,i_2,\ldots,i_n) &= \max(V(k_1,t_2^j,\ldots,t_n^j), V(k_1-1,t_2^j,\ldots,t_n^j) + u(\mathtt{it}_{j}(i_j+1)) \\&\text{ if } \pi(|\bigcup_{j=2}^n\mathtt{top}_{a_j}(i_j)| + k_1 + 1) = a_j \neq a_1
\end{align*}
Note that each of the \(t_i^j\) values can be computed in \(O(m)\). Hence computing the value of each state can be performed in \(O(mn)\).
The termination is guaranteed by the fact that \(V(k_1,i_2,\ldots,i_n) = \sum_{o \in O \setminus(\bigcup_{j=2}^n\mathtt{top}_{a_j}(i_j))} u(o)\) when \(|\bigcup_{j=2}^n\mathtt{top}_{a_j}(i_j)| + k_1 = m\). Hence, the number of tuples is bounded by \(O((m+1)^n)\).\\
\end{comment}
\begin{comment}
To illustrate this approach we will consider the case of 3 agents. Denote by \(\mathtt{top}_a(j)\) the set compounded of the \(j\) preferred items of agent \(a\) and by \(\mathtt{it}_a(j)\) the  \(j^{th}\) preferred item of agent \(a\). The dynamic programming approach will consider triples \((k,i,j)\) (of course with \(n\) agents we would consider \(n\)-tuples instead of triples). Such a triple gives the following information about what has happened so far in the picking process:
\begin{itemize}
    \item all items in \(\mathtt{top}_2(i) \cup \mathtt{top}_3(j)\) have already been picked by some agent.
    \item items \(\mathtt{it}_2(i+1)\) and \(\mathtt{it}_3(j+1)\) have not been picked yet neither by agent 2 nor agent 3 but they may have been picked by agent 1.
    \item up to this point, no item has been picked by agent 2 nor 3 within the set \(O \setminus(\mathtt{top}_2(i)\cup\mathtt{top}_3(j))\).
    \item up to this point, agent 1 (the manipulator) has picked \(k\) items within the set \(O \setminus(\mathtt{top}_2(i)\cup\mathtt{top}_3(j))\). However, the identity of these items remains to be specified.

\end{itemize}
Given a triple \((k,i,j)\) the number of items that have already been picked is \(|\mathtt{top}_2(i)\cup\mathtt{top}_3(j)| + k\). Hence, the next agent to become a picker is \(\pi(|\mathtt{top}_2(i)\cup\mathtt{top}_3(j)| + k + 1)\). If this agent is the manipulator, then he will pick one more item within \(O \setminus(\mathtt{top}_2(i)\cup\mathtt{top}_3(j))\) and we move to state \((k+1,i,j)\).

Otherwise, let us assume the picker is agent 2. Then, two cases are possible: either \(\mathtt{it}_2(i+1)\) has already been picked by agent 1, or it will be picked by agent 2. To restate this fact more formally, let us denote by \(h_1(i,j)\) (resp. \(h_2(i,j)\)) the rank of the preferred item of agent 2 (resp. 3) in \(O\setminus(\mathtt{top}_2(i+1)\cup\mathtt{top}_3(j))\) to which we subtract one. Then:
\begin{itemize}
    \item either \(\mathtt{it}_2(i+1)\) has already been picked by agent 1 and we move to state \((k-1,h_1(i,j),h_2(i,j))\). Note that this is only possible if \(k\) was greater than or equal to one and that agent 2 remains the picker.
    \item otherwise \(\mathtt{it}_2(i+1)\) is picked by agent 2 and we move to state \((k,h_1(i,j),h_2(j,i))\).
\end{itemize}
A similar analysis can be made if agent 3 is the picker.

Let us denote by \(V(k,i,j)\) the maximal utility that the manipulator can get from items in \(O \setminus(\mathtt{top}_2(i)\cup\mathtt{top}_3(j))\) starting from state \((k,i,j)\). Then the value of an optimal manipulation is given by \(V(0,0,0)\). From the previous analysis, function \(V\) verifies the following dynamic programming equations:
\begin{align*}
    V(k,i,j) &= V(k+1,i,j) \\&\text{ if } \pi(|\mathtt{top}_2(i)\cup\mathtt{top}_3(j)| + k + 1) = 1\\
    V(k,i,j) &= \max(V(k, h_1(i,j), h_2(i,j)), V(k-1, h_1(i,j),h_2(i , j)) + u(\mathtt{it}_{2}(i+1)) \\&\text{ if } \pi(|\mathtt{top}_2(i)\cup\mathtt{top}_3(j)| + k + 1) = 2\\
    V(k, i , j) &= \max(V(k, h_3(i,j), h_4(i,j)), V(k-1 , h_3(i,j) , h_4(i,j)) + u(\mathtt{it}_{3}(j + 1)) \\&\text{ if } \pi(|\mathtt{top}_3(j)\cup\mathtt{top}_3(j)| + k + 1) = 3
\end{align*}
where, \(h_3(i,j)\) (resp. \(h_4(i,j)\)) is the rank of the preferred item of agent 2 (resp. 3) in \(O \setminus(\mathtt{top}_2(i)\cup\mathtt{top}_3(j+1))\) to which we subtract 1. Each of these values can be computed in \(O(m)\). The termination is guaranteed by the fact that \(V(-1, i,j) = -\infty\) and that \(V(k,i,j) = \sum_{o \in O \setminus(\mathtt{top}_2(i)\cup\mathtt{top}_3(j))} u(o)\) when \(|\mathtt{top}_2(i)\cup\mathtt{top}_3(j)| + k = m\). Hence, the number of triples to evaluate is bounded by \(O(m^n)\).
\end{comment}
\begin{comment}
\begin{example}[Example \ref{example:running} continued]
Let us illustrated our approach on the instance described in Example \ref{example:running}. For this purpose, we show in Figure \ref{fig:Dynprog} the directed acyclic state graph of the dynamic programming algorithm.
\begin{figure}[!h]
   \centering
    \scalebox{.7}{\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm,
                    semithick]
  \node[circle,draw,text=black] (A0)   at (0,1)  {$(0,0,0)$};
  \node[circle,draw,text=black] (A)   at (0,0)  {$(1,0,0)$};
  \node[circle,draw,text=black] (B)   at (-4,-1) {$(1,1,0)$};
  \node[circle,draw,text=black] (C)   at (4,-1) {$(0,1,0)$};
  \node[circle,draw,text=black] (D)   at (-8,-2) {$(1,1,1)$};
  \node[circle,draw,text=black] (E)   at (-4,-2) {$(0,1,1)$};
  \node[circle,draw,text=black] (F)   at (4, -2) {$(0,2,0)$};
  \node[circle,draw,text=black] (G)   at (-8, -3) {$(2,1,1)$};
  \node[circle,draw,text=black] (H)   at (-4, -3) {$(0,1,3)$};
  \node[circle,draw,text=black] (I)   at (-4, -4) {$(1,1,3)$};
  \node[circle,draw,text=black] (J)   at (4, -3) {$(0,3,1)$};
  \node[circle,draw,text=black] (K)   at (4, -4) {$(1,3,1)$};
  \node[text=black] (L)   at (-8, -4) {$a_1$ has picked $i_2,i_4$};
  \node[text=black] (M)   at (-4, -5) {$a_1$ has picked $i_4$};
  \node[text=black] (N)   at (4, -5) {$a_1$ has picked $i_2$};

  \path (A0) edge  node {} (A)
     (A) edge  node {\(a_2\) picks \(i_3\)} (B)
	  (A) edge  node {\(a_1\) has picked \(i_3\)} (C)
	(B) edge  node {\(a_3\) picks \(i_1\)} (D)
	(B) edge  node {\(a_1\) has picked \(i_1\)} (E)
	(C) edge  node {\(a_2\) picks \(i_4\)} (F)
		(D) edge  node {} (G)
			(E) edge  node {\(a_3\) picks \(i_2\)} (H)
				(H) edge  node {} (I)
					(F) edge  node {\(a_3\) picks \(i_1\)} (J)
						(J) edge  node {} (K)
						(G) edge  node {} (L)
						(I) edge  node {} (M)
						(K) edge  node {} (N);
	  \end{tikzpicture}}
    \caption{\label{fig:Dynprog} \small Directed acyclic state graph of the dynamic programming approach applied to the instance of Example \ref{example:running}}
\end{figure}
\end{example}

We now argue that the dynamic programming approach that we have designed is an FPT algorithm w.r.t. parameters \(n + \mu(a_1)\) and \(n + \mathtt{rg}^{\max}\).

\paragraph{The algorithm is FPT w.r.t. parameter \(n + \mathtt{rg}^{\max}\).}
Indeed, the number of tuples \((k_1, i_2,\ldots, i_n)\) can be bounded by \((m+1)^2(2\mathtt{rg}^{\max}-1)^{n-2}\). This is because there are only \(m+1\) possible values for \(k_1\) and for each of the \(m+1\) possible values of \(i_2\), there are only \(2\mathtt{rg}^{\max}-1\) possible values for other parameters \(i_j\). Indeed, if \(i_2 = l\), then \(i_j\) with \(j>2\) cannot be greater than \(l + \mathtt{rg}^{\max} - 1\) as this would imply that \(\mathtt{it}_{2}(l+1)\) is already consider to be taken and this would in turn imply that \(i_2 > l\). Similarly, by inverting the roles of \(a_2\) and \(a_j\), we can conclude that \(i_j\) cannot be lower than \(l - \mathtt{rg}^{\max} + 1\).

\paragraph{The algorithm is FPT w.r.t. parameter \(n + \mu(a_1)\).}
The number of tuples \((k_1, i_2,\ldots, i_n)\) can also be bounded by \((m+1)(\mu(a_1)+1)^n\). This is because there are only \(\mu(a_1)+1\) possible values for \(k_1\) and for each of the \(m+1\) possible time steps (number of items that have already been picked), there are only \(\mu(a_1)+1\) possible values for other parameters \(i_j\). This relies on the following observation, each time a non-manipulator gets to pick an item we can identify an item that we are sure is picked afterwards whatever the actions of the manipulator. Identifying these items can be done by using the following rule. At each time step \(t\) such that \(\pi(t) = a_i\) is a non-manipulator, find the preferred item of \(a_i\) that we did not already marked as taken. Then this item can be marked as taken for the future time steps. Indeed, either it has already been picked (which depends on the actions of the manipulator), or it will be picked at time step \(t\) by \(a_i\). Hence, at time step \(t+1\), within the \(t\) items that have already been picked, there are at least \(t - \mu(a_1)\) that are always the same. It is easy to conclude from there that \(i_j\) can only take \(\mu(a_1)+1\) different values.

\end{comment}
\section{Introduction}

Allocating resources to a set of agents in an efficient and fair manner is one of the most fundamental problems in computational social choice.
One challenging case is the allocation of indivisible items~\cite{bouveret2016fair,brams2003fair,lipton2004approximately}, e.g., allocating players to teams.
To address this problem, the sequential allocation mechanism has lately received increasing attention in the AI literature~\cite{aziz2015possible,aziz2016welfare,bouveret2011general,kalinowski2013social,kalinowski2013strategic,levine2012make}.
This mechanism works as follows: at each time step an agent, selected according to a predefined sequence, is allowed to pick one item among the remaining ones.
Such a protocol has many desirable qualities: it is simple, it can be run both in a centralized and in a decentralized way, and agents do not have to submit cardinal utilities.
For these reasons, sequential allocation is used in several real life applications, as for instance by several professional sports associations \cite{brams1979prisoners} to organize their draft systems (e.g., the annual draft of the National Basketball Association in the US), and by the Harvard Business School to allocate courses to students \cite{budish2012multi}.

Unfortunately, it is well known that the sequential allocation protocol is not strategy-proof. Stated otherwise, an agent can obtain a better allocation by not obeying her preferences, and this might lead to unfair allocations for the truthful agents \cite{bouveret2011general}. Such a drawback has motivated the algorithmic study of several issues related to strategic behaviors in the sequential allocation setting, the most important one being the computation of a ``successful'' manipulation. Hopefully, if finding a successful manipulation is computationally too difficult, then agents may be inclined to behave truthfully~\cite{walsh2016strategic}.

\paragraph{Related work on strategic behaviors in the sequential allocation setting.}
Aziz et al.~\cite{aziz2017equilibria} studied the sequential allocation setting by treating it as a one shot game. They notably designed a linear-time algorithm to compute a pure Nash equilibrium and a polynomial-time algorithm to compute an optimal Stackelberg strategy when there are two agents, a leader and a follower, and the follower has a constant number of distinct values for the items. If the sequential allocation setting is seen as finite repeated game with perfect information, Kalinowski et al.~\cite{kalinowski2013strategic} showed that the unique subgame perfect Nash equilibrium can be computed in linear time when there are two players. However, with more agents, the authors showed that computing one of the possibly exponentially many equilibria is PSPACE-hard.

Several papers focused on the complexity of finding a successful manipulation for a given agent, also called manipulator.
Bouveret and Lang~\cite{bouveret2011general} showed that determining if there exists a strategy for the manipulator to get a specific set of items can be done in polynomial time. Moreover, Aziz et al.~\cite{aziz2017complexity} showed that finding if there exists a successful manipulation, whatever the utility function of the manipulator, is a polynomial-time problem. Conversely, the same authors showed that determining an optimal manipulation (for a specific utility function) is an NP-hard problem. Bouveret and Lang~\cite{bouveret2014manipulating} provided further hardness results for finding an optimal manipulation for the cases of non-additive preferences and coalitions of manipulators.
On the other hand, finding an optimal manipulation can be performed in polynomial time if the manipulator has lexicographic or binary utilities~\cite{aziz2017complexity,bouveret2014manipulating} or if there are only two agents~\cite{bouveret2014manipulating}.  Tominaga et al.~\cite{tominaga2016manipulations} further showed that finding an optimal manipulation is a polynomial-time problem when there are only two agents and the picking sequence is composed of a sequence of randomly generated rounds. More precisely, in each round, both agents get to pick one item and a coin flip determines who picks first.

\paragraph{Our contribution.} We tackle the parameterized complexity of manipulating sequential allocations, and provide a complete picture of the problem w.r.t. the following three parameters: the number $n$ of agents, the number $\mu(a_1)$ of items the manipulator gets to pick in the allocation process, and the maximum range $\mathtt{rg}^{\max}$ of an item, a parameter measuring how close the preference rankings of the agents are. In particular, using a novel dynamic programming algorithm, we show that the problem is in XP with respect to $n$, that is it can be solved in polynomial time if $n$ is constant, and it is  Fixed-Parameter Tractable (FPT) w.r.t. $\mathtt{rg}^{\max}$. Moreover, we show that it is in XP w.r.t. $\mu(a_1)$ and FPT w.r.t. to the sum $n+\mu(a_1)$. Interestingly enough, we prove that the problem is W[1]-hard w.r.t. to the single parameters $n$ and $\mu(a_1)$. As a consequence, our XP results are both tight. Table~\ref{tab:sumup} summarizes our results. Lastly, we provide an integer programming formulation of the problem and show that the manipulator cannot increase the utility of her bundle by a multiplicative factor greater than or equal to 2, this bound being tight.

\begin{table}[h]
\caption{\label{tab:sumup} \small Our parameterized complexity results on the problem of manipulating sequential allocations.}
    \centering\begin{tabular}{|c|c|c|c|c|}
          \hline
        Parameter &    $n$ & $\mu(a_1)$ & $n + \mu(a_1)$ &  $\mathtt{rg}^{\max}$  \\
               \hline
          Results & In XP and W[1]-hard & In XP and W[1]-hard & In FPT  & In FPT\\
                & Theorems~\ref{theorem : n} and \ref{theorem: hardness on n} & Theorem~\ref{theorem: hardness} & Theorem~\ref{theorem n + mu} & Theorem~\ref{theorem : rg}\\
         \hline
    \end{tabular}
\end{table}

Two results presented in this paper (Theorems \ref{theorem : n} and \ref{theorem : bound}) have independently been found by Xiao and Ling~\cite{DBLP:journals/corr/abs-1909-06747}. Indeed, they present another XP algorithm for parameter $n$ as well as the same bound on the increase in utility that a manipulator can obtain. Interestingly, the proofs and the insights on the picking sequence allocation process that are used are quite different.
\section{An Upper Bound on the Optimal Value of \(\mathit{ManipSA}\)} \label{section : bound}
Our initial hope was that computational complexity could be a barrier to manipulating sequential allocation. Unfortunately, we have seen in Section~\ref{Sect:positive} that the \(\mathit{ManipSA}\) problem can be solved efficiently for several subclasses of instances. Another reason that could push agents towards behaving truthfully could be that it would not be worth it. Indeed, if the increase in utility that an agent can get by manipulating is very low, she might be reluctant to gather the necessary information and do the effort of looking for a good manipulation.  We provide the following tight bound on this issue.

\begin{theorem} \label{theorem : bound}
The manipulator cannot increase her welfare by a factor greater than or equal to 2, i.e., \(\max_{\succ} u(\phi_{\succ}(a_1)) < 2 u_T \)  and this bound is tight.
\end{theorem}
\begin{proof}
We proceed by induction on the value of parameter \(\mu(a_1)\). If \(\mu(a_1) = 1\), the bound is obvious because \(a_1\) cannot manipulate. If \(\mu(a_1) = 2\), the bound is also easy to prove because \(a_1\) will obtain only two items and the utility of each of them cannot be greater than the one of the first item \(a_1\) picks when behaving truthfully, one having a strictly lower utility. Note that \(u_T > 0\) when \(\mu(a_1) \ge 2\). Let us assume the bound true up to \(\mu(a_1) = k-1\) and let us further assume for the sake of contradiction that there exists an instance \(\mathcal{J}\) with \(\mu(a_1) = k\) where \(\max_{\succ} u(\phi_{\succ}(a_1)) \ge 2 u_T \). Moreover, let us denote by \(x_1, \ldots, x_k\) (resp. \(y_1,\ldots, y_k\)) the items picked by \(a_1\) when behaving truthfully (resp. according to one of her best manipulation that we denote by \(\succ_b\)), where the items are ordered w.r.t. the time step at which they are picked (e.g., \(x_1\) is picked first when \(a_1\) behaves truthfully). Our hypothesis implies that:
\begin{equation} \label{hyp}
    \sum_{i=1}^k u(y_i) \ge 2\sum_{i=1}^k u(x_i) =  2 u_T.
\end{equation}

We will now show how to build from \(\mathcal{J}\) an instance \(\mathcal{J}''\) with \(\mu(a_1) = k-1\) and where \(\max_{\succ} u(\phi_{\succ}(a_1)) \ge 2 u_T \), hence bringing a contradiction.  However, for ease of presentation this construction is decomposed into two parts: a first one where we work on an instance \(\mathcal{J}'\) obtained from \(\mathcal{J}\); and a second one where we analyse the desired instance \(\mathcal{J}''\) which is obtained from \(\mathcal{J}'\).\\

\textbf{Part 1:} Consider the instance \(\mathcal{J}'\) obtained from \(\mathcal{J}\) by removing the first occurrence of \(a_1\) in \(\pi\) (an arbitrary non-manipulator is added at the end of \(\pi\) so that the length of \(\pi\) remains \(m\)). We denote by \(t^1\) this particular time step, i.e., the one of the first occurrence of \(a_1\) in \(\pi\). We point out that in \(\mathcal{J}'\), the manipulator can manipulate to obtain the set of items \(y_2,\ldots,y_k\). Indeed, assume w.l.o.g. that items \(y_1,\ldots,y_k\) are ranked first in \(\succ_b\) (not necessarily in that order) and let \(\succ_b^{\downarrow y_1}\) be the ranking obtained from \(\succ_b\) by putting \(y_1\) in last position. Furthermore, let \(S^{\mathcal{J}}_t\) (resp. \(S^{\mathcal{J}'}_t\)) be the set of items picked at the end of time step \(t\) in instances \(\mathcal{J}\) (resp. \(\mathcal{J}'\)) when \(a_1\) follows strategy \(\succ_b\) (resp. \(\succ_b^{\downarrow y_1}\)). Then we have the following lemma.
\begin{lemma} \label{lemma: proof bound 1}
\(S^{\mathcal{J}'}_t = S^{\mathcal{J}}_t\) for \(t < t^1\) and \(S^{\mathcal{J}'}_t \subseteq S^{\mathcal{J}}_{t+1}\) for \(t \ge t^1\).
\end{lemma}
\begin{proof}[Proof of Lemma~\ref{lemma: proof bound 1}]
The first part of the lemma is obvious because the picking processes in \(\mathcal{J}\) and \(\mathcal{J}'\) are identical for \(t < t^1\).
We prove the second part of the lemma by induction.
Let us denote by \(\pi_{\mathcal{J}}(t)\) (resp. \(\pi_{\mathcal{J}'}(t)\)) the picker at time step \(t\) in instance \(\mathcal{J}\) (resp. \(\mathcal{J}'\)).
Then for all \(t \ge t^1\), we have that \(\pi_{\mathcal{J}'}(t) = \pi_{\mathcal{J}}(t+1)\).
Then, \(S^{\mathcal{J}'}_t \subseteq S^{\mathcal{J}}_{t+1}\) is true for \(t = t^1\) because \(S^{\mathcal{J}'}_{t^1-1} = S^{\mathcal{J}}_{t^1-1}\), \(S^{\mathcal{J}}_{t^1} = S^{\mathcal{J}}_{t^1-1} \cup \{y_1\}\), and hence the only item that \(\pi_{\mathcal{J}'}(t^1)\) could prefer to the one \(\pi_{\mathcal{J}}(t^{1}+1)\) picks is \(y_1\). Let us assume the inclusion relationship true up to \(t = l\). So \(S^{\mathcal{J}}_{l+1} = S^{\mathcal{J}'}_{l} \cup \{i\}\), where \(i\) is some item. Then, we obtain that \(S^{\mathcal{J}'}_{l+1} \subseteq S^{\mathcal{J}}_{l+2}\), because the only item that \(\pi_{\mathcal{J}'}(l+1)\) could prefer to the one \(\pi_{\mathcal{J}}(l+2)\) picks is item \(i\).
\end{proof}
A direct consequence of Lemma~~\ref{lemma: proof bound 1}, \(\succ_b^{\downarrow y_1}\) is successful in picking items \(y_2,\ldots,y_k\) in \(\mathcal{J}'\).\\

\textbf{Part 2:} Let us now consider the instance \(\mathcal{J}''\) obtained from \(\mathcal{J}'\) by removing \(x_1\) from the set of items as well as the last agent in the picking sequence (that we had artificially added in the first part of the proof). In \(\mathcal{J}''\) the set of items that \(a_1\) gets when behaving truthfully is \(x_2,\ldots, x_k\). Consider the preference ranking \(\succ_b^{\downarrow y_1, - x_1}\) obtained from \(\succ_b^{\downarrow y_1}\) by removing \(x_1\) and denote by \(S^{\mathcal{J}''}_t\) the set of items picked at the end of time step \(t\) in \(\mathcal{J}''\) when \(a_1\) follows strategy \(\succ_b^{\downarrow y_1, - x_0}\).
Moreover, let \(t^l\) (resp. \(t^1\)) be the time step in \(\mathcal{J}'\) at which \(a_1\) picks \(y_l\) (resp. at which \(x_1\) is picked by some agent) when \(a_1\) uses strategy  \(\succ_b^{\downarrow y_1}\) where \(2 \leq l \leq k\).
We show that \(a_1\) can get in \(\mathcal{J}''\) a set of items \(Y\) compounded of all items in \(\{y_2,\ldots, y_k\}\) up to one item.
This is a consequence of the following lemma.
\begin{lemma}\label{lemma: proof bound 2}
\(S^{\mathcal{J}''}_t = S^{\mathcal{J}'}_t\) for \(t < t^1\) and \(S^{\mathcal{J}''}_t\) is of the form \((S^{\mathcal{J}'}_t\setminus \{x_1\}) \cup \{i\}\) for \(t \ge t^1\) where \(i\) is some item in \(\mathcal{I}\).
\end{lemma}
\begin{proof}[Proof of Lemma~\ref{lemma: proof bound 2}]
The first part of the lemma is obvious because the picking processes in \(\mathcal{J}'\) and \(\mathcal{J}''\) are identical for \(t < t^1\).
We prove the second part of the lemma by induction.
Let us denote by \(\pi_{\mathcal{J}'}(t)\) (resp. \(\pi_{\mathcal{J}''}(t)\)) the picker at time step \(t\) in instance \(\mathcal{J}'\) (resp. \(\mathcal{J}''\)).
Then for all \(t\), we have that \(\pi_{\mathcal{J}'}(t) = \pi_{\mathcal{J}''}(t)\).
Then, the fact that \(S^{\mathcal{J}''}_{t^1}\) is of the form \((S^{\mathcal{J}'}_{t^1}\setminus \{x_1\}) \cup \{i\}\)  is just due to the fact that \(S^{\mathcal{J}'}_{t^1-1} = S^{\mathcal{J}''}_{t^1-1}\).
Let us assume this fact true up to \(t = l\). So \(S^{\mathcal{J}''}_{l} = S^{\mathcal{J}'}_{l} \setminus \{x_1\} \cup \{i\}\), where \(i\) is some item. We obtain that \(S^{\mathcal{J}''}_{l+1}\) is of the form \(S^{\mathcal{J}'}_{l} \setminus \{x_1\} \cup \{i'\}\), where \(i'\) is some item, because \(\pi_{\mathcal{J}''}(l+1)\) will pick the same item as \(\pi_{\mathcal{J}'}(l+1)\) except if this item is \(i\).
\end{proof}
Let \(j\) be the first index in \(\mathcal{J}''\) (if any) such that \(a_1\) cannot pick \(y_j\) at \(t^j \ge t^1\). Then, by Lemma \ref{lemma: proof bound 2},
we have that \(S^{\mathcal{J}''}_t = (S^{\mathcal{J}'}_t\setminus \{x_1\}) \cup \{y_{l+1}\}\) for \(t^j \le t^l \le t < t^{l+1}\). This is due to the fact that \(\succ_b^{\downarrow y_1}\) is successful in picking items \(y_2,\ldots,y_k\) in \(\mathcal{J}'\) and this proves the claim that \(a_1\) can get a set of items \(Y\) compounded of all items in \(\{y_2,\ldots, y_k\}\) up to one item.
Hence,
\begin{align*}
\sum_{y \in Y } u(y) &\ge \sum_{i = 1}^k u(y_i) - u(y_1) - \max_{2\le j\le k} u(y_j)\\
&\ge 2\sum_{i=1}^k u(x_i) - u(y_1) - \max_{2\le j\le k} u(y_j) \\
&\ge 2\sum_{i=2}^k u(x_i)
\end{align*}
where the second inequality is due to Inequality \ref{hyp} and the third one is due to fact that \(u(y_i) \le u(x_1), \forall i \in \{1,\ldots,k\}\). We obtain a contradiction because \(\mu(a_1) = k-1\) in \(\mathcal{J}''\).

The tightness of the bound is provided by the instance of Example \ref{example:running} with the following utility function \(u(i_1) = u(i_2) + \epsilon = u(i_3) + 2 \epsilon = 1\) and \(u(i_4) = 0\). We recall that in this instance \(u_T = u(i_1) + u(i_4) = u(i_1)\) whereas the manipulator can obtain by manipulating the set \(S=\{i_2,i_3\}\) with utility \(u(i_2) + u(i_3) = 2u(i_1) -3\epsilon\).
\end{proof}
We conclude from Theorem \ref{theorem : bound} that, while the increase in utility of the manipulator cannot be arbitrarily large, manipulating may often be worth it for the manipulator as doubling her utility can be a significant improvement.
\section{An Integer Programming Formulation}\label{Sect:IntProg}

In this last section, we provide an integer programming formulation of the \(\mathit{ManipSA}\) problem.
This integer program provides another tool than the dynamic programming algorithm of Section~\ref{Sect:positive} to solve the \(\mathit{ManipSA}\) problem which may be more efficient for some instances. Moreover, a more thorough analysis of this formulation and of it's solution polytope may lead to new results. For instance, some bounds on the number of variables could yield new parameterized complexity results via Lenstra's theorem \cite{lenstra1983integer}.

By abuse of notation, we will identify the set \(\mathcal{I}\) as the set \([m] = \{1,\ldots,m\}\). Let \(x_{it}\) be a binary variable with the following meaning: \(x_{it} = 1\) iff item \(i\) is picked at time step \(t\). Then, the constraint \(\sum_{i = 1}^m x_{it} = 1\) implies that there is exactly one item being picked at time step \(t\). Similarly, the constraint \(\sum_{t = 1}^m x_{it} = 1\) implies that item \(i\) is picked at exactly one time step.
Lastly, consider a time step \(t\) such that \(\pi(t) \neq a_1\). Then the following set of constraints implies that \(\pi(t)\) picks at time step \(t\) the best item available for her.
\begin{equation}
x_{it} + \sum_{j \succ_{\pi(t)} i} x_{jt} + \sum_{t' < t} x_{it'} \geq 1, \quad \forall i \in [m] \notag
\end{equation}
In words, this constraint says that: if \(\pi(t)\) does not pick item \(i\) at time step \(t\) (i.e., \(x_{it} = 0\)), it is either because she picks something that she prefers (i.e., \(\sum_{j \succ_{\pi(t)} i} x_{jt} = 1\) ), or because item \(i\) has already been picked at an earlier time step (i.e., \(\sum_{t' < t} x_{it'} = 1\)). To summarize, we obtain the following integer programming formulation\footnote{We note that we obtain an integer programming formulation which is very close to one of the mathematical program used to solve stable marriage problems \cite{gusfield1989stable}.} with \(m^2\) binary variables and at most \(m^2\) constraints (as we can assume the manipulator is the picker for at least two time steps),
\begin{align*}
    \max_{x_{it}} \sum_{i=1}^m\sum_{t : \pi(t) = a_1} x_{it} u(i)& \\
    \text{s.t. \hspace{1.cm}}    \sum_{t = 1}^m x_{it} &= 1, \quad \forall i \in [m]\\
    \sum_{i = 1}^m x_{it} &= 1, \quad \forall t \in [m]\\
    x_{it} + \sum_{j \succ_{\pi(t)} i} x_{jt} + \sum_{t' < t} x_{it'} &\geq 1, \quad \forall i,t \in [m]^2 \text{ s.t. } \pi(t) \neq a_1 \\
    x_{it} &\in \{0,1\}, \quad \forall i,t \in [m]^2
\end{align*}