Annals of Operations Research

, Volume 207, Issue 1, pp 181–200 | Cite as

Strategies in competing subset selection

  • Claudia Marini
  • Gaia Nicosia
  • Andrea Pacifici
  • Ulrich Pferschy


We address an optimization problem in which two agents, each with a set of weighted items, compete in order to minimize the total weight of their solution sets. The latter are built according to a sequential procedure consisting in a fixed number of rounds. In every round each agent submits one item that may be included in its solution set. We study two natural rules to decide which item between the two will be included.

We address the problem from a strategic point of view, that is finding the best moves for one agent against the opponent, in two distinct scenarios. We consider preventive or minimax strategies, optimizing the objective of the agent in the worst case, and best-response strategies, where the items submitted by the opponent are known in advance in each round.


Multi-agent optimization Combinatorial game theory Combinatorial optimization Minimax strategies Online algorithms 

1 Introduction

In this paper we study a multi-agent problem motivated by certain organizational processes in personnel management. We focus on the following situation: There are two agents, each of them owning one of two disjoint sets of weighted items. The agents have to select items from their set for putting them in a joint solution set. This process proceeds in a fixed number of rounds. In every round each of the two agents selects exactly one of its items and submits the item for possible inclusion in the solution set. A central decision mechanism chooses one of the items as “winner” of this round depending on the rule in force. The winning item is permanently included in the solution set. We consider two versions of the problem, depending on whether the losing item is permanently discarded or can be reused in the succeeding rounds. Each agent wants to minimize its total solution value which is given by the total weight of its items included in the solution set. We assume complete information, i.e. both agents know all items’ weights.

This problem is motivated by the following application scenario. Each of two departments of a company has its own qualified personnel to perform its relevant tasks. From time to time, the company head management temporarily requires workers for a set of similar tasks to be executed. For each of these tasks, the two departments are obliged to propose a candidate worker from their own personnel. The company management chooses, for each task, the most suitable candidate between the two, according to different criteria. From the department point of view, it is beneficial to minimize personnel loss (i.e. the number of workers or their total worth in terms of their abilities, skills or relevance). In a first scenario (Rule 1), the management prefers the more skilled worker while in other cases—for instance, when tasks do not require qualified personnel, or when internal costs proportional to skills are incurred and the management wants to keep its costs low—the coopted worker is the less skilled one (Rule 2).

1.1 Related literature

In the last decade multi-agent systems have received an increasing amount of attention in the optimization literature. In these systems two or more autonomous decision makers (agents) want to pursue their own objectives while sharing common resources. Clearly, whenever conflicts occur, the agents may want to negotiate over a suitable subset of the feasible agreements where a better solution for one agent necessarily results in a worse solution for the other. Papers dealing with multi-agent systems mainly focus on the determination of these kind of solutions, i.e. non-dominated or Pareto-optimal solutions (see Cardinal and Hoefer 2010; Felici et al. 2008; Leung et al. 2010 for examples of competing versions of facility location, assignment, and scheduling problems).

Another class of problems related to multi-agent systems and to our problem are those addressed in the research field of algorithmic game theory. A combinatorial game typically involves two agents, usually called players, alternatingly playing in well-defined moves with perfect information (i.e. all players know all information about rules and data). In this context, it is interesting to define agents strategies, i.e. how to best play the game against the opponent (Demaine 2001).

The problem we address in this paper can also be regarded as a single-suit card game in which each of two players chooses a card from its hand. In Schlag and Sela (1998) the authors study a zero-sum game in which the cards are submitted simultaneously, the highest value card wins, each card can be used only once, and the players want to maximize the total value of the won cards. In Kahn and Lagarias (1987), Wästlund (2005) the so called whistette game is addressed. There is a totally ordered suit of 2n cards, distributed between the two players. The player who has the lead plays first on each trick. The player with the highest card wins a trick and obtains the lead. Players want to maximize the number of won tricks.

Another problem strictly related to ours is addressed in Katoh et al. (1992), where the authors investigate optimal strategies on how to choose a player (item) for the next match (round) in a game consisting of a sequence of matches. Two types of games are considered, given a winning probability for every pair of competing players. In the first type, after each match, the loser is eliminated from the list of remaining players while the winner remains in the list. In the second type, both players are eliminated after each match.

In addition, our problem can be viewed as a special knapsack game where two agents try to fit their items in a bounded common solution set in order to maximize their profits. In our case, we have a unit size for the items and a special mechanism to decide which items fit, i.e. are accepted in the common knapsack. Although the problem that we address in this work is relatively new, 0–1 knapsack problems (KP) in a multi-decision environment have been considered in the literature for two decades: from game-theoretic to auction applications there is a variety of papers dealing with this classical combinatorial optimization problem. Hereafter, we limit to report a few of them.

A related problem in which different players try to fit their own items in a common knapsack is the so called knapsack sharing problem studied by several authors (see e.g. Fujimoto and Yamada 2006; Hifi et al. 2005). A single objective function that tries to balance the profits among the players is considered in a centralized perspective. Knapsack problems are also addressed in the context of auctions. For instance, in Aggarwal and Hartline (2006), an application for selling advertisements on Internet search engines is considered. In particular, there are n agents wishing to place an item in the knapsack and each agent gives a private valuation for having an item in the knapsack, while each item has a publicly known size. In Wang et al. (2010) a new model called the two-group knapsack game is introduced. Moreover, in Brotcorne et al. (2009), a two-agent knapsack problem where one agent (the leader) controls the capacity of a knapsack, and the other (follower) solves the resulting knapsack problem, is tackled by dynamic programming techniques.

A different version of the problem presented in this paper, where agents want to maximize the total weight of their winning solution sets, is addressed in Nicosia et al. (2011).

1.2 Problem statement

Let A and B indicate the two agents. Each agent owns a set of n items, where item i of agent A (B) has a nonnegative weight ai (bi). Throughout this paper we assume the items to be sorted in non-increasing order of weights, i.e. a1a2≥⋯≥an resp. b1b2≥⋯≥bn. Sometimes we will identify items by their weight. All information about the input list of items is public.

We consider a game performed over c rounds: In each round both of the two agents simultaneously submit one of their items, say ai and bj. We consider the two most natural rules for deciding which of the two submitted items wins and is added to the solution set.
  1. Rule 1 (R1)

    if ai>bj then A wins;

  2. Rule 2 (R2)

    if ai<bj then A wins.

In case of a tie we assume that A always loses.

This problem can be represented by a graph model. Each agent’s item is associated to a node of a weighted complete bipartite graph \(G = (V^{A} \cup V^{B}, E^{A} \mathbin{\dot{\cup}} E^{B})\). An arc (i,j) belongs to EA or to EB depending on the winner of a comparison of ai and bj, which of course depends on the applied selection rule. Every pair of items (ai,bj) submitted simultaneously in one round can be represented by an arc (i,j) between the two corresponding nodes. Hence, any solution may be represented as a set M of c arcs on G. The total weight of items in the solution for agent A is given by \(W^{A}(M) = \sum_{ij\in M\cap E^{A}} w_{ij}\) and that of B by \(W^{B}(M) = \sum_{ij\in M\cap E^{B}} w_{ij}\), where wij=ai if A wins and wij=bi otherwise.

Moreover, under both rules, we deal with two different scenarios.
Single-use items:

each losing item is discarded and cannot be submitted a second time;

Reusable items:

each losing item can be reused for submission in the succeeding rounds.

Note that, in the first scenario (single-use items), the solution M corresponds to a c-matching on the above defined bipartite graph.

In conclusion, we tackle four different versions of the minimum cost competitive subset selection problem (CSM), which we denote as CSM(α,β), with α∈{R1,R2} depending on the rule in force and β∈{single,reuse} depending on the treatment of the losing items.

1.3 Our contribution

In this paper we address the problem of devising strategies, that is algorithms that suggest to an agent which item to submit at each round, in order to minimize the agent’s weight under different information scenarios.

Here we consider two different “knowledge scenarios” for an agent, say B. In the first one, the strategy of agent A (the opponent) is completely unknown and we look for an algorithm guaranteeing the minimum weight in the worst possible case for B. In game theory literature, a similar situation is often referred to as a minimax strategy (see Sect. 2). We show that such a strategy always exists and it is also quite easy to find it, with the exception of the single-use case under Rule 2, for which a polynomial time algorithm based on dynamic programming is developed.

In the second scenario, agent B knows in advance the item submitted by the opponent A in each round before making its own move. We will try to answer the question how B should select its items under such an advantageous asymmetry of information. In this particular context, the strategy adopted by agent B is referred to as best-response strategy (see Sect. 3). In case of Rule 2, we are always able to devise an optimal strategy for B, i.e. a strategy which would be optimal also if all submission by A were known in advance. On the other hand, we show that under Rule 1 this is, in general, not possible. Therefore, we provide algorithms achieving an a priori worst-case guarantee on the quality of the solution found with respect to the optimal solution. The results concerning best-response strategies are summarized in Table 1, where the lower and upper bounds on the a priori worst-case guarantee performance of the algorithms are reported. In particular, the “LB” column reports the value of a lower bound on the performance ratio for any algorithm, while the “UB” column refers to the actual performance ratio attained by the algorithms proposed in this work.
Table 1

Results on competitive ratio for best-response strategies

Problem type














In Nicosia et al. (2011), the maximization version of CSM is studied. There, the problem is considered also from a centralized point of view as a bicriteria optimization problem and the structure of efficient, i.e. Pareto optimal (PO) solutions, is studied. Moreover, bounds on the ratio between the efficient solutions with largest and smallest total weight and a characterization of the computational complexity of finding one and/or all Pareto optimal solutions is provided. Very similar results can be found for CSM, where the agents are minimizing their objectives. Since the proof techniques are almost identical, such results are not presented in this paper, but can be found in Marini et al. (2010). For the readers convenience they are summarized in Table 2, where column “PO recogn.” refers to the complexity of the problem of finding Pareto optimal solutions, column “# PO sol.” reports the bounds on the number of efficient solutions, and column “Best-worst ratio” provides upper bounds on the ratios between the efficient solutions with largest and smallest total weight.
Table 2

Results for the centralized scenario, see Marini et al. (2010)

Problem type

PO recogn.

# PO sol.

Best-worst ratio

















2 Minimax strategies of agents

In this section, for all four scenarios, we want to develop a strategy for B such that its total gain is as small as possible under the worst possible conditions determined by the behavior of the opponent agent A. More formally, let ΩAB) be the set of strategies for agent A (B). For every pair of strategies SA∈ΩA,SB∈ΩB, M(SA,SB) denotes the resulting solution. Then, a minimax strategyMMSB∈ΩB of agent B is defined as follows:
$$\mathit{MMS}_B := \arg\min_{S_B\in {\mathrm{\Omega}}_B} \left( \max_{S_A\in {\mathrm{\Omega}}_A}W^B(M(S_A,S_B)) \right).$$

Solely for the purpose of analyzing the minimax strategies for agent B presented below, we assume that A behaves as an opponent to B interested only in worsening (i.e., maximizing) the solution of B as much as possible, independently on the consequences on its own objective. Under this assumption, we can immediately establish some useful properties.

In the single-use case, the order in which B submits its items is irrelevant. This can be easily seen observing that A can pick the worst possible answer for any c-tuple of items submitted by agent B, and execute this answer according to the ordering of B. Such an answer could be computed e.g. by solving a maximum weight matching problem. Therefore, when c=n, since B cannot decide anything in this case, the question of finding a minimax strategy is irrelevant.

On these grounds, it is easy to observe that, under Rule 1, if n>c, the minimax strategy of B for CSM(R1,single) consists of choosing its c smallest items, i.e. SB={bn,…,bnc+1}. Under Rule 2, the selection of SB is more involved and can be done by the algorithm described in Sect. 2.1.

For the reusable case, the problem becomes trivial under both rules: under Rule 1, i.e. CSM(R1,reuse), if bn<an, B may always lose by submitting bn in each round. Otherwise, A is always able to lose by submitting an and B must win with its c smallest items. Similarly, under Rule 2, i.e. CSM(R2,reuse), if b1>a1, B may always lose by submitting b1 in each round. Otherwise, A is always able to lose and B must win with its c smallest items.

Hereafter, we describe a minimax strategy for CSM(R2,single), based on dynamic programming.

2.1 A Minimax algorithm for CSM(R2,single)

Due to the above considerations, for the remainder of this section we assume:
  1. 1.


  2. 2.

    A will always submit its c largest items (ties can be broken in an arbitrary way) to hurt B as much as possible

Given a certain list of c submissions of B we can completely describe the outcome of the selection process even without an explicit matching computation. A will consider its items in nonincreasing order and try to lose. Therefore, A determines for each item the largest winning item of B which was not assigned in the matching before. Consider, for illustration, a1: All items bi>a1 will lose anyway against A. So A should submit a rather small item to win against these sure losers and not waste its largest items for winning. Instead, A will attempt to match its largest item a1 with a winning item of B. In order to keep the chances for losing alive for its smaller items, A should pick the largest possible winner of B. This harmful strategy is explained in detail in Algorithm 1.
Algorithm 1

Harmful strategy of agent A under Rule 2

Based on the structure resulting from the strategy of A described in Algorithm 1 we now develop an optimal strategy for B.

For notational conveniences we define the set of items of B with a weight between two items of A as Si:={bjai−1>bjai} for i=2,…,c, S1:={bjbja1} and Sc+1:={bjac>bj}. Note that several sets Si may be empty.

B can decide on the submission of items from some set Si+1 as follows: Items submitted from previous sets S1,…,Si either win or lose. In the former case they contribute to the total weight won by B, but their exact values are irrelevant at this later stage. In the latter case the weight of a losing item is again irrelevant. All together only the total weight won so far and the number of submitted items have to be taken into account to decide on the submissions from Si+1. In addition, we also have to know what happened to those items of A with a possibility to force B to win with items in Si+1, i.e. the items a1,…,ai. In this case, their individual weight is again irrelevant, since they are all larger than items in Si+1. The only interesting fact is how many of them were assigned in Algorithm 1 to be matched in one round against items already submitted by B from S1,…,Si. Or the other way round, how many of them are still unmatched and would lose against any submission from Si+1 by B.

Based on this informal description we will consider all relevant strategies of B in a dynamic programming procedure. We will go through the items of A in decreasing order of weights and update the entries of the following dynamic programming table d for every set Si+1 of B.

d(i,j,k) contains the total weight won by B after having considered all items with weight at least ai before, if B submits j items of weight at least ai+1 and wins with k of them.

Table d is defined for i=1,…,c, j=0,1,…,c and k=0,1,…,c. For technical reasons it will also be extended to i=0. Any state d(i,j,k) that is not reachable will be assigned a weight ∞. After computing the values of table d for some index i, all items with weight larger than ai+1 were taken into account. From A’s perspective an entry d(i,j,k) indicates that k items a1,…,ak were matched to lose against items submitted by B while the remaining i+1−k items ak+1,…,ai+1 remain available to lose against future submissions of B with weight less than ai+1.

Note that A will follow strictly the procedure outlined above and does not have any strategic decisions left. This means that through its submissions, B also decides on k.

In Algorithm 2 we compute the entries of d in increasing order of i and process one set Si+1 in each iteration. The maximum number of items j, which B can submit so far, is counted by nj=|S1|+⋯+|Si+1| (see lines 2 and 6). We initialize the table by ∞ except for d(0,j,0) which corresponds to the submission of items from set S1 (line 3). Since these items are all larger than a1, B will lose them all.
Algorithm 2

Minimax strategy for agent B under Rule 2

To update the table in line 11 we compute d(i,j,k) and consider in each iteration how many items s of Si+1 agent B might submit and how many items r out of these s would win against A thus contributing to the total weight won by B. Clearly, B will always choose the smallest s items \(b'_{n'-s+1}+\cdots+ b'_{n'}\) of Si+1 but cannot avoid to win with the largest r of these. The remaining js submitted items with kr winners among them are taken from the previously considered items recorded in entries d(i−1,js,kr). Since entries are only evaluated for ki we can be sure to have enough larger items of A available for losing against these k winners of B.

The optimal strategy follows by backtracking through the sequence of operations yielding the lowest total weight for c submitted items of B, i.e. mink=0,…,cd(c,c,k).

In conclusion the following theorem holds.

Theorem 1

Algorithm2is a minimax strategy forCSM(R2,single).

3 Best-response strategies of agents

We now consider the scenario where B only knows the submission of A in the current round and has to react immediately before both agents move on to the next round. Again we assume that n>c, since otherwise B could compute an optimal matching for all submissions of A beforehand.

Note that this information setting resembles on-line problems (Borodin and El-Yaniv 1998), where an algorithm must take decisions with only a limited knowledge of the problem instance: In the typical case of algorithms dealing with sequences of requests for some resources, this corresponds to the scenario where one has to decide on how to serve a request without knowing the following requests.

The performance of an on-line algorithm is usually compared with the performance of an optimal off-line algorithm that knows the complete sequence of events in advance. The maximum ratio between their respective performances, taken over all sequences, is denoted as the competitive ratio. The corresponding worst-case analysis is usually performed by assuming that the sequence of events or requests is supplied by an adversary who at each step provides the request that will result in the greatest overall cost ratio between the on-line algorithm and the optimum off-line algorithm. In the remainder of this section, we assume that agent A plays the role of “the adversary” of B.

In the following sections we show that for problems CSM(R1,single) and CSM(R1,reuse) there is no optimal strategy for B, i.e. no on-line algorithm that always determines the optimal off-line solution. Indeed we can show for problem CSM(R1,single) that no strategy of B can have a competitive ratio better than 2, for large c. For small c our lower bound is slightly below 2 starting at the golden ratio for c=2. Also, we provide an algorithm with competitive ratio 4 for the same problem. However, for problem CSM(R1,reuse), this competitive ratio is unbounded. In contrary, we show that under Rule 2, it is possible to devise algorithms yielding an optimal off-line solution for Problem CSM(R2,single) and CSM(R2,reuse).

3.1 Best-response for CSM(R1,single)

The following lower bound holds for any best-response algorithm for CSM(R1,single).

Theorem 2

For problemCSM(R1,single) with arbitraryc, no on-line strategy of agentBagainst an arbitrary strategy of agentAcan have a competitive ratio smaller than 2.


Consider the following instance of CSM(R1,single) with two parameters q and T, where q>1 and T is a large constant. For convenience, items are listed in increasing order of weights, i.e. in decreasing order of indices. We list only the smallest c items of both agents. All nc remaining items of both agents have weight T. An arbitrary small constant ε>0 is only used to avoid ties.
$$\setlength{\arraycolsep}{0.9ex}\begin{array}{cllllllllllllll}\hline \mbox{Item nr.} & n & n-1 & n-2 & n-3 & \ldots& n-k+1& n-k &\ldots& n-c+1 \\\hline \mbox{Agent } A& 1-\varepsilon & q-\varepsilon & q^2-\varepsilon & q^3-\varepsilon & \ldots & q^{k-1}-\varepsilon & q^k-\varepsilon & \ldots& q^{c-1}-\varepsilon \\\mbox{Agent } B& 1 & q& q^2 & q^3 & \ldots& q^{k-1} & q^k &\ldots& q^{c-1}\\\hline \end{array}$$
A submits the smallest item an=1−ε in the first round and thus forces B to win in any case. We can distinguish three main cases for a reaction by B:
Case 1.

B tries to win with the smallest possible item, i.e. item bn=1 in the first round. Then A continues to submit an−1 in the second round which gives the same situation as before. In Case 1 we consider the strategy where B sticks to the submission of the smallest possible winning item bnj+1 in the j-th round up to the final round c, where B submits bnc+1=qc−1 thus winning all rounds.

All together in Case 1 B wins \(W_{1}^{B}=\sum_{i=0}^{c-1}q^{i}=\frac{q^{c}-1}{q-1}\). An optimal strategy of B against this sequence of submissions by A would be to submit \(b_{n-c+1}=q^{c-1}=\mathit{OPT}_{1}^{B}\) in the first round and manage to lose all remaining rounds.

Case 2.
B starts by submitting bn and continues as in Case 1 but in some iteration k, k∈{2,…,c−1}, B deviates from the previous strategy by submitting some item larger than bnk+1, i.e. with weight at least qk. Note that kc−1 since B will not submit a larger item in round c where only items with weight T remain. But then A immediately changes its strategy and continues to submit only items with weight T allowing B to lose all remaining rounds. Now we have
$$W_2^B \geq\sum_{i=0}^{k-2}q^i + q^k =\frac{q^{k-1}-1}{q-1}+q^k.$$
For such a strategy of A an optimal answer of B would be to submit bnk+1=qk−1 in the first round and lose all other rounds which yields \(\mathit{OPT}_{2}^{B}= q^{k-1}\).
Case 3.

As a special case of Case 2 B might also submit an item larger than bn already in the first round, i.e. an item with weight at least q. Then A would continue by submitting only items with weight T. Thus, B loses all remaining rounds attaining \(W_{3}^{B} \geq q\), while an optimal strategy would be \(\mathit{OPT}_{3}^{B}=b_{n}=1\).

Putting the three cases together we get the following lower bound on the competitive ratio:
$$\max_q\min_{i=1,2,3} \biggl\{\frac{W_i^B}{\mathit{OPT}_i^B}\biggr\}=\max_q\min\biggl\{ \frac{q^c-1}{q^c-q^{c-1}},\,\frac{q^{k+1}-q^k+q^{k-1}-1}{q^k-q^{k-1}},\, q\biggr\}.$$

The first expression is monotonically decreasing in q (tending to 1) while the third expression is trivially increasing. The intersection point of these two cases approaches q=2 from below for c tending to infinity. Hence, the best lower bound we can get from this construction is 2 attained for q=2. A straightforward calculation shows that for q=2 the second expression of the minimum resulting from Case 2 is always larger than the first which completes the proof. □

For small c the lower bound is slightly below 2 with a starting point given by the following corollary.

Corollary 3

For problemCSM(R1,single) withc=2, no on-line strategy of agentBagainst an arbitrary strategy of agentAcan have a competitive ratio smaller than\(\phi=\frac{1}{2} (1+\sqrt{5})\), the golden ratio.


Considering the proof of Theorem 2 for c=2 we can see that Case 2 does not apply. Evaluating the intersection of Cases 1 and 3 for c=2 yields the result. □

In the following we complement the lower bound of 2 given in Theorem 2 by an upper bound of 4 attained by Algorithm Geometric Greedy Response 1 (Algorithm 3) for Problem CSM(R1,single). Its basic strategy is to lose, whenever possible, with the largest available losing item. Else, it wins with the largest item in a suitably defined interval.
Algorithm 3

Strategy for agent B responding to the submissions of agent A for Problem CSM(R1,single)

To avoid tedious but insignificant case distinctions caused by ties we will assume only for Algorithm 3 and its analysis that all items are different from each other. In the following we will assume w.l.o.g. that agent B always submits its c smallest items. Clearly, any deviation from this assumption can only worsen the outcome for B.

Theorem 4

AlgorithmGeometric Greedy Response 1has a competitive ratio of 4 for ProblemCSM(R1,single).


In the proof we will compare the items submitted by B according to Algorithm Geometric Greedy Response 1 with the submissions of an optimal off-line response strategy Opt. Recall that both strategies will submit the identical set of the c smallest items but possibly in a different ordering. To reduce ambiguity of the optimal strategy we will introduce the following statement (A1):
  1. (A1)

    There is an optimal strategyOptsuch that whenever it is possible forOptto lose a round, it will do so by using the largest possible losing item.


Note that this property can be shown by a simple exchange argument.

We will consider a strategy Opt fulfilling (A1). Furthermore, we will exclude all rounds from further consideration where B and Opt submit the same item. For ease of notation we will assume bn=1. Denote by I(bi) the interval containing some item bi.

In a generic round A submits a′, Opt submits some item bi and B submits bjbi. We will denote this outcome by an ordered pair (i,j). A label (i,j) taken from {⊕,⊖,0} will represent the outcome of this round regarding the total weights OPTB resp. WB collected so far:

(i,j)=⊕ represents an increase of WB by bj, while OPTB remains unchanged or receives an unspecified, smaller increase. (i,j)=⊖ denotes the case that OPTB gains bi>bj while WB is increased by only bj in this round. If B receives an increase at most twice as large as the increase of Opt (or none at all) we will set (i,j)=0.

Note that the labels are not used to calculate the actual values of OPTB and WB but only to bound the competitive ratio. Clearly, to show a bound ≥2 only labels ⊕ and ⊖ will be relevant.

We generate pairs and their labels in each round according to the following cases:
Case 1.
Case 1.1.

a′<bi, Opt and B win:

We generate a new pair (i,j). If bjI(bi) we set (i,j)=0, otherwise (i,j)=⊕.

Case 1.2.

a′>bi, Opt loses:

If bj<a′ then B loses and we add a new pair (i,j) with (i,j)=0.

If bj>a′ then B wins. We generate a new pair (i,j) with (i,j)=⊕.

Case 2.


Generate a new pair (i,j). If a′<bi then Opt wins and we set (i,j)=⊖. Otherwise, Opt and B lose and we set (i,j)=0.

The ordered pairs can always be concatenated into chains in a natural way, i.e. after (i,j), Opt might use bj in some later round where B submits bk which results in two consecutive pairs (i,j), (j,k) being part of a chain. Since both strategies use the same set of items, each chain will finally form a cycle. In this way, the outcome of all rounds can be represented by a collection of cycles.

In the following we will show that for the rounds in each cycle we always have WB≤4⋅OPTB which concludes the proof.

Every cycle can be partitioned into increasing and decreasing subchains. More formally, we say that ordered pairs (i1,i2),(i2,i3),…,(ik,ik+1) form a decreasing (increasing) subchain if \(b_{i_{\ell }} > b_{i_{\ell +1}}\) (\(b_{i_{\ell }} < b_{i_{\ell +1}}\)) for =1,…,k. It follows from their definition that labels ⊕ (labels ⊖) only occur for pairs in increasing (decreasing) subchains.

First, we will show several structural properties.
  1. (i)

    Ifbi>bjand(i,j)=0 thenI(bi)=I(bj).


Assume otherwise that I(bi)≠I(bj): Recall from Case 2 above that both Opt and B lost this round. Opt lost with item bi. By definition of the algorithm, B would rather submit bi than bj as a losing item. Hence, the submission of bj means that bi was not available anymore to B but was already used in some previous round and there exists some pair (k,i) from that round. If B had won that previous round, then by definition of the algorithm it would rather have won with bj (from a smaller interval) which was still available for B in that round. Hence, B must have lost that round with bi. However, in that round bi was still available for Opt as a possibility to lose. By (A1) Opt also lost that round with bk>bi and we have (k,i)=0.

Hence, we have the same situation for (k,i) as we had in the beginning for (i,j), and we can repeat the argument to show the existence of another pair (k′,k). Again, for winning B would have had the better possibility to submit bj and hence B must have lost with bk. Therefore, Opt also must have lost with bk>bk. This argument can be iterated yielding pairs of increasing weight until we finally run out of items. This yields a contradiction.
  1. (ii)

    Each increasing subchain can have at most one pair with labelin each interval.

Assume otherwise: Consider the round where the first pair (i,j) with (i,j)=⊕ was generated with biI(bj), i.e. B won with bj and Opt lost with bi. By definition of the algorithm all items brI(bj) with br>bj were submitted by B before, otherwise the largest item of these would have been chosen by B for winning in this round. Also all items with weight less than bi must have been submitted before, since otherwise B could have used them for losing. Hence, there are only items brI(bj) left with bi<br<bj. But these can not be part of an increasing subchain containing (i,j).
  1. (iii)

    If two increasing subchains are concatenated by a decreasing subchain consisting only of pairs with label 0, at most one of the two increasing subchains can have a labelin each interval.


Let (i,j) be the first pair with (i,j)=⊕ generated in a certain interval. As shown above only items brI(bj) with bi<br<bj remain available for submission by B. If a second pair (s,r) with (s,r)=⊕ is generated in a later round as part of a second increasing subchain, then no decreasing subchain can concatenate the two increasing subchains:

Assume otherwise: Then there must exist two pairs (u,v) and (x,y) in the decreasing subchain both with label 0, i.e. all four items have lost, such that bvbs<bu<by<br<bx, possibly bv=bs. (The simpler case where bu>br and (x,y) does not appear, follows by a similar argument.) Since B always loses with the largest available item, (x,y) must have been generated before (u,v). (This argument can be applied iteratively over all pairs possibly existing between (x,y) and (u,v) in the decreasing subchain.) If (x,y) was generated before (s,r) then B could have used br instead of by for losing with a larger item. If (s,r) was generated before (u,v) then B could have used bv for losing that round. Thus the order of generation of these three pairs yields a contradiction.

Each increasing subchain contains at most one pair with label ⊕ in some interval Ik by (ii). It either continues into the next interval Ik+1 or it ends in Ik. In the latter case it can either be followed by a decreasing subchain reaching into some smaller interval, or it is followed by a series of decreasing and increasing subchains in Ik. By (iii) these subchains can not include another pair with label ⊕ in Ik.

Recall from Case 2 and (i) that interval borders can only be crossed (crossing an interval border means that a pair in a subchain consists of two items belonging to neighboring intervals) in a decreasing subchain by pairs with label ⊖. We will sum up the contribution of these pairs for a decreasing subchain starting in interval Is and ending in interval It with s>t. There is at least one pair with label ⊖ starting in Is and contributing at least 2s−1 to the weight of Opt. In each intermediate interval I′ between Is and It a pair with label ⊖ may end and a new pair start. The contribution to WB of the pair ending in I′ is at most twice as large as the contribution to OPTB by the starting pair. Hence, these can be omitted in bounding the competitive ratio by 4. Finally, WB may gain at most 2t in the last interval.

Because of the cycle property, for each upper interval bound 2k of Ik for k=t,…,s−1 that is crossed by the decreasing subchain, there must be a pair crossing the same interval bound in an increasing subchain. In the worst case, there is a pair with a label ⊕ for each such interval crossing, contributing a weight of at most 2k. The final pair of the increasing subchain reaching into Is may yield a weight of 2s. Bounding the competitive ratio of the rounds belonging to one decreasing subchain and the induced increasing subchains yields:
$$ \frac{2^t + \sum_{i=t}^{s}2^i}{2^{s-1}}= \frac{2^t + 2^{s+1} -2^{t}}{2^{s-1}} = 4.$$

Again because of the cycle property, there can be no increasing subchain crossing an interval bound without a complementing decreasing subchain. Hence, the above construction includes all pairs with label ⊕ for all increasing subchains crossing interval bounds.

If a decreasing subchain does not cross any interval bounds it may also be part of a cycle containing only items from the same interval.

If at least one pair of the decreasing subchain is labeled ⊖ (which can be seen as the above case with s=t) it is easy to see that in the worst case both Opt and B win an item with weight (roughly) 2s−1 for the pair labeled ⊖. The single pair of the cycle (recall (ii) and (iii)) labeled ⊕ contributes at most 2s yielding a ratio of 2 for this special case.

If all pairs of the decreasing subchain are labeled 0, then B and Opt use the items contained in this cycle in the same rounds. If it is possible to lose, both will lose with the largest possible item. If it is unavoidable to win, then B will win with the largest possible item in the interval thus keeping the best possible chances to lose further rounds. In this way, B maximizes the number of lost rounds. Hence, Opt will win at least as often as B, while B may win with items at most twice as large as the winning submissions of Opt. □

3.2 Best-response for CSM(R1,reuse)

We can show that any best-response algorithm for CSM(R1,reuse) may perform as bad as possible compared to an optimal strategy.

Theorem 5

For problemCSM(R1,reuse) withc≥3, no on-line strategy of agentBagainst an arbitrary strategy of agentAcan have a bounded competitive ratio.


Consider the following instance of CSM(R1,reuse) with a parameter T>1. For convenience, items are listed in increasing order of weights, i.e. in decreasing order of indices. An arbitrary small constant ε>0 is only used to avoid ties.
$$\setlength{\arraycolsep}{1ex}\begin{array}{cllll}\hline \mbox{Item nr.} & n & n-1 & n-2, \ldots, n-c+1 & n-c, \ldots, 1\\\hline \mbox{Agent } A& 1-\varepsilon & T-\varepsilon &T-\varepsilon & T^2-\varepsilon \\\mbox{Agent } B& 1 & T& T^2 & T^2\\\hline \end{array}$$
A submits the smallest item an in the first round and thus forces B to win in any case. Since B has only items of three different weights, there are three main cases to consider for B:
Case 1.

At the first round B responds by playing bn. Now A submits bn−1 in the second round. In Case 1.1 B submits bn−1 and wins T. A continues to submit all remaining c−2 items with weight Tε. B cannot avoid to win all these rounds each with an item of weight T2 yielding a total gain of \(W_{1}^{B}=(c-2)T^{2} + T+1\).

An optimal answer of B against this strategy of A submits bn−1 in the first round and loses all subsequent rounds with item bn. Thus we have \(\mathit{OPT}_{1}^{B} = T\).

Case 1.2, where B submits an item of weight T2 in the second round, works in a completely analogous way and yields either the same total weight or even worse (c−1)T2+1.

Case 2.

At the first round B responds by playing bn−1. In this case A continues to submit all c−1 items with weight T2. B can lose all these rounds e.g. with item bn yielding \(W_{2}^{B} =T\).

An optimal strategy would submit bn in the first round and bn−1 in all subsequent rounds which gives \(\mathit{OPT}_{2}^{B} = 1\).

Case 3.

At the first round B responds by playing an item with weight T2. This case can be handled in the same way as Case 2.

In all cases we get a competitive ratio of at least T for c≥3 which concludes the proof. □

For the special case c=2 the same weaker lower bound holds as for CSM(R1,single) (see Corollary 3).

Theorem 6

For problemCSM(R1,reuse) withc=2, no on-line strategy of agentBagainst an arbitrary strategy of agentAcan have a competitive ratio smaller than\(\phi=\frac{1}{2} (1 + \sqrt{5})\), the golden ratio.


Consider the following instance of CSM(R1,reuse) with c=2 and n=3, where k>1 is a suitable parameter.
$$\setlength{\arraycolsep}{2ex}\begin{array}{cllll}\hline \mbox{Item nr.} & 1 & 2 & 3\\\hline \mbox{Agent } A& 2k & k-\varepsilon & 1- \varepsilon \\\mbox{Agent } B& k & k & 1\\\hline \end{array}$$
A submits the smallest item a3=1−ε in the first round and thus forces B to win in any case. Since B has only items of two different weights, there are only two cases to consider for B:
Case 1.

At the first round B responds by playing b3=1. Then A submits a2=kε and B cannot avoid to win with an item of weight k yielding a total gain of \(W_{1}^{B} =k +1\).

An optimal answer of B against this strategy of A submits an item of weight k in the first round and loses the other round with b3. Thus we have \(\mathit{OPT}_{1}^{B} = k\).

Case 2.

At the first round B responds by playing b2=k. In this case A submits a1=2k in the second round that B can lose.

An optimal strategy would submit b3 in the first round and b2 in all subsequent rounds which gives \(\mathit{OPT}_{2}^{B} = 1\).

Altogether we get a lower bound for the worst-case competitive ratio of
$$ \mathit{LB} = \min\biggl\{ \frac{k +1}{k},\; \frac{k}{1} \biggr\}.$$
The maximum of this lower bound is attained if both expressions of the minimum are equal. An elementary calculation yields the solution of this equation as the golden ratio
$$k = \frac{1}{2} \cdot(1 + \sqrt{5}\; )\,.$$

Observe that, when c=2, it is possible to design a trivial best-response algorithm attaining a competitive ratio equal to the golden ratio, by using the arguments in the above proof.

3.3 Best-response for CSM(R2,single)

In this section we provide an optimal best-response algorithm for problem CSM(R2,single). Before describing the algorithm, simple exchange arguments prove the following lemma.

Lemma 7

For problemCSM(R2,single), there is an optimal best-response algorithm for agentBsuch that
  • whenBis forced to win, it uses the smallest available item;

  • whenever possible, Bloses (i.e. there is no convenience to win a round).

So, for problem CSM(R2,single), the main issue for a best-response algorithm is to decide which item should be used to lose at each round. In fact, submitting a large item may reduce the chances of losing against large items of A in the future. On the other hand, small items can be useful when B is forced to win in a succeeding round.

Therefore, the proposed Algorithm 4 takes into account the above issues, determining at each round the best losing item. In particular, when B may lose, the procedure Best loser (Algorithm 5) returns the losing item for agent B as the largest available item \(\tilde{b}\) such that:
  • B loses the round;

  • the number of potential losing items of B larger than \(\tilde{b}\) is maximized.

Algorithm 4

Best-response algorithm for agent B under Rule 2

Algorithm 5

Procedure Best loser returns the item that should be used to lose

Let us briefly describe Algorithm 4 through a simple example.

Example 8

Consider the instance depicted in Fig. 1 in which, at a certain round (current round) the items of A are {19,15,12,10,5,4} and those of B are {16,13,9,3,2,1}. Assume A submits item a′=5. Then, B must choose, among the items greater than a′, the one to submit to lose the round. According to procedure Best loser, B decides to submit the item of value 9, since the two larger items of values 16 and 13 can be used to lose against A’s items of value 15 and 12 in succeeding rounds. (Note that in this case the procedure Best loser terminates because, in the repeat-loop, the variable found becomes true.)
Fig. 1

Best loser returns \(\tilde{b} = b'\)

If item a4=8 (instead of a4=10), the procedure Best loser would have “matched” all the items of B′ to smaller items of A′ (thus terminating with B′=∅).

In both cases the procedure Best loser returns \(\tilde{b} =b'= b_{3} = 9\), where b′ is the smallest item in RB larger than a′.

A different situation for agent B is depicted in Fig. 2 in which, at the current round the items of A have values {19,15,14,7,5} and those of B {16,13,9,4,3}. If A submits item a′=7, B responds with item b2=13, since only one larger item (b1=16) can be used to lose against larger items of A in succeeding rounds.
Fig. 2

Best loser returns \(\tilde{b} > b'\)

We may now prove the main result of this section.

Theorem 9

AlgorithmBest-Response Rule 2yields the optimal off-line solution of ProblemCSM(R2,single).


Hereafter, we prove that Algorithm 4 produces an off-line optimal solution for agent B by showing that, at each round, B responds in an optimal way to the submission of A.

For the sake of simplicity, in this proof we assume that all items are different from each other. In fact, by simply adapting the definitions of a few sets, the proof also holds in the case of ties.

As already observed, when B is forced to win, the choice of Algorithm 4 consisting in the smallest available item is optimal. We therefore focus our analysis on the rounds in which B can lose.

Let a′ be the item submitted by A in the current round. With respect to the sets of available items RA and RB in the current round, let b′=min{biRB| bi>a′}, B>={biRB| bi>b′}, B<={biRB| bi<b′}, A>={aiRA| ai>a′}, and A<={aiRA| ai<a′}.

Depending on the output of procedure Best loser in the current round, we may distinguish between two cases, namely, \(\tilde{b}> b'\) (Case 1) and \(\tilde{b} = b'\) (Case 2).

Case 1. When \(\tilde{b} > b'\), we consider two subcases depending on whether \(\tilde{b}\) coincides with bmax or not.

If \(\tilde{b} = b_{\max}\), then all the items in A> are larger than those in B>. Observe that, there is no convenience in keeping item bmax for losing or winning in one of the succeeding rounds. In fact, it can be used for losing only when agent A submits items in A< (and in this case any item not smaller than b′ can be used for losing and it does not matter which of them we submit now). On the other hand, if in the succeeding rounds, agent A submits items in A>, then B will be forced to win (therefore bmax is the worst choice).

If \(b' < \tilde{b} < b_{\max}\), then the items of B> that are strictly greater than \(\tilde{b}\) can be used in the succeeding rounds to lose with the items of A>. Note that, as in the previous case, there is no convenience in keeping item \(\tilde{b}\) for losing or winning in one of the succeeding rounds. In fact, if agent A submits items in A<, any item between b′ and \(\tilde{b}\) is still available to lose (and, again, it does not matter which of them we submit now). On the other hand, if agent A submits items in A> and agent B can lose, then B might as well use one of the items of B> that are greater than \(\tilde{b}\). If agent A submits items in A> and agent B must win, it is convenient to keep a smaller item to win, for instance b′.

Case 2. If \(\tilde{b} = b'\), there exists a matching between all the items of B> and items of A> such that all the items of B> lose, so every item of B> may be useful to lose against the items of A> in the succeeding rounds.

Since agent B according to Algorithm 4 plays item b′, we must show that this choice is optimal, that is, there is no convenience in keeping b′ for using it in a successive round, say the i-th round. Therefore, suppose that an optimal off-line algorithm for B (Opt, in the following) keeps b′ for losing (Case 2.a) or winning (Case 2.b) in round i. We show that in Case 2.a, Opt cannot obtain a better solution than Algorithm 4, while Case 2.b may never occur.

In Case 2.a, let us assume that during round i, A submits an item \({\bar{a}}<b'\), and B is forced to win (since b′ and all items of B> have been used to lose, they are not available anymore). Since Opt kept b′ for losing in round i, then it must win at least one extra round (with respect to Algorithm 4) before i. In conclusion, the number of winning rounds of B is not greater than in Opt and therefore losing with b′ against a′ is optimal (since B always wins with the smallest available item).

In Case 2.b, at round i, agent B according to Algorithm 4 wins with \(\bar{b}\) against \(\bar{a}\) and \(\bar{a} > \bar{b} > b'\) (otherwise, if \(\bar{b} < b'\) the choice of B in the current round is obviously optimal). Moreover, since b′>a′ one has that \(\bar{a}\in A^{>}\). In addition, we have that \(\bar{b}\) is the smallest item available in round i (line 11 of Algorithm 4). Let α=|A>|−|B>|. Since \(\tilde{b} = b'\), we have that α≥0. Note that α items of A> cannot be matched with larger items of B> (see Fig. 3).
Fig. 3

Illustration of Case 2.b with β>α

At round i all items of B< have been previously submitted and therefore matched to items of A: Let γ indicate the number of items in B< that lost and β the number of remaining items in B< that won between the current and the i-th rounds. Therefore:
$$ |B^<| = \gamma+ \beta.$$
Note that these γ items lost against items in A<, while the other β items won against items in A>: In fact, by contradiction, if an item of B< is forced to win against an item of A< in a round preceding the i-th, then B cannot lose against it and hence B>=∅. However, this contradicts the fact that at round i, B has at least one item available in B>, namely \(\bar{b}\).

During the rounds preceding i, the submitted items of B> were all used to lose (note that these items could not be used to win). Let δ indicate the number of items in B> that lost against items in A> and ξ those that lost against items in A< between the current and the i-th rounds.

If α=0, i.e. |A>|=|B>|, for each item in A> there is a corresponding item in B> that can be used to lose. Therefore, b′ cannot be used to win in round i (i.e. α=0, is not consistent with Case 2.b).

If α is strictly positive, i.e. |A>|>|B>|, we distinguish among three possible cases depending on the value of α with respect to that of β.

First, let β=α. Observe that |A>|=|B>|+α and |A>|+|A<|=|B>|+|B<|=n−1 which implies that |B<|=|A<|+α. Hence, recalling equation (4), we have γ=|A<|. Therefore, all losing items of B< lose against all items of A<. Moreover, agent B wins against exactly α items of A>. As a consequence, all remaining available items of B> may lose against all remaining items of A>, and therefore b′ cannot be used to win in round i (i.e. β=α is not consistent with Case 2.b).

Secondly, let β>α. Clearly, between the current and the i-th round, B wins against some items of A> which the procedure Best loser, in the current round, matches to items of B>. This is due to the fact that B must have used some of these “matched” items in rounds preceding the i-th necessarily for losing against items in A< and therefore ξ>0. In fact, these ξ items in B> could not have been used:
  • to lose against items in A>, nor

  • to win since, from the above considerations ((4) and the fact that the submitted items of B> were all used to lose), the number of winning items of B between current and i-th round is equal to β. Now, at round i, all items of B< have been previously submitted and in particular, β items of B have already won and, as a consequence, all the other items (and the ξ in particular) are losing.

This implies, together with the definition of ξ, that ξ=βα and therefore |A<|=ξ+γ (see Fig. 3). Similarly as in the previous case, all remaining available items of B> may lose against all remaining items of A. Therefore b′ cannot be used to win in round i (i.e. β>α is not consistent with Case 2.b).

Thirdly, let β<α. This implies that γ>|A<|. However, this cannot occur since no item in B< can lose against items larger than a′. Again, this is not consistent with Case 2.b.

From the above case analysis we can conclude that Algorithm 4 behaves optimally in each round. Note that, in the presence of items with the same weight, by slightly changing the definition of the sets B> and A<, and consequently adapting the quantities in Case 2.b, the same proof applies. □

3.4 Best-response for CSM(R2,reuse)

Designing a best-response algorithm for problem CSM(R2,reuse) is trivial. Differently from the single-use case where the main issue concerns which item to lose with, here losing items can be reused making the decision much easier.

Hence, a trivial optimal algorithm can be summarized as follows:

In a generic round, A plays a′. Let bmax (bmin) be largest (smallest) available B item. If bmax>a′, B loses with any losing available item (e.g., bmax); otherwise B wins with bmin.

4 Conclusions

In this paper we addressed a multi-agent optimization problem where two agents compete to add items in a solution set. We consider four different versions of the problem and, for all versions, we give results concerning the definition of strategies for optimizing the objective of a single agent against the other.

This work puts several directions forward for future research. Of course, whether the competitive ratio of best-response strategies for problem CSM(R1,single) (Sect. 3.1) could be improved is still an interesting question.

In addition, investigating new rules for deciding which of the two submitted items wins (e.g., the larger item wins, unless it is more than twice as large as the smaller item), or studying strategies under different knowledge scenarios (e.g., each agent, in alternating rounds, knows in advance the item submitted by the opponent before making its own move) are indeed challenging open issues.


  1. Aggarwal, G., & Hartline, J. D. (2006). Knapsack auctions. In Proceedings of the 17th annual ACM-SIAM symposium on discrete algorithms (pp. 1083–1092). CrossRefGoogle Scholar
  2. Borodin, A., & El-Yaniv, R. (1998). Online computation and competitive analysis. Cambridge: Cambridge University Press. Google Scholar
  3. Brotcorne, L., Hanafi, S., & Mansi, R. (2009). A dynamic programming algorithm for the bilevel knapsack problem. Operations Research Letters, 37, 215–218. CrossRefGoogle Scholar
  4. Cardinal, J., & Hoefer, M. (2010). Non-cooperative facility location and covering games. Theoretical Computer Science, 411, 1855–1876. CrossRefGoogle Scholar
  5. Demaine, E. D. (2001). In Lecture notes in computer science: Vol. 2136. Playing games with algorithms: algorithmic combinatorial game theory (pp. 18–33). Google Scholar
  6. Felici, G., Mecoli, M., Mirchandani, P. B., & Pacifici, A. (2008). Equilibrium in a two-agent assignment problem. International Journal of Operational Research, 6, 4–26. CrossRefGoogle Scholar
  7. Fujimoto, M., & Yamada, T. (2006). An exact algorithm for the knapsack sharing problem with common items. European Journal of Operational Research, 171, 693–707. CrossRefGoogle Scholar
  8. Hifi, M., M’Hallab, H., & Sadfi, S. (2005). An exact algorithm for the knapsack sharing problem. Computers and Operations Research, 32, 1311–1324. CrossRefGoogle Scholar
  9. Kahn, J., Lagarias, J. C., & Witsenhausen, H. S. (1987). Single-suit two-person card play. International Journal of Game Theory, 16, 291–320. CrossRefGoogle Scholar
  10. Katoh, N., Koyanagi, J., Ohnishi, M., & Ibaraki, T. (1992). Optimal strategies for some team games. Discrete Applied Mathematics, 35, 275–291. CrossRefGoogle Scholar
  11. Leung, J. Y.-T., Pinedo, M., & Wan, G. (2010). Competitive two-agent scheduling and its applications. Operations Research, 58, 458–469. CrossRefGoogle Scholar
  12. Marini, C., Nicosia, G., Pacifici, A., & Pferschy, U. (2010). Minimum cost subset selection with two competing agents. Dipartimento di Informatica e Automazione, Università “Roma Tre”, Technical Report RT-DIA-179-2010. Google Scholar
  13. Nicosia, G., Pacifici, A., & Pferschy, U. (2011). Competitive subset selection with two agents. Discrete Applied Mathematics, 159(16), 1865–1877. CrossRefGoogle Scholar
  14. Schlag, K. H., & Sela, A. (1998). You play (an action) only once. Economics Letters, 59, 299–303. CrossRefGoogle Scholar
  15. Wang, Z., Xing, W., & Fang, S.-C. (2010). Two-group knapsack game. Theoretical Computer Science, 411, 1094–1103. CrossRefGoogle Scholar
  16. Wästlund, J. (2005). A solution of two-person single-suit whist. The Electronic Journal of Combinatorics, 12, R43. Google Scholar

Copyright information

© Springer Science+Business Media, LLC 2012

Authors and Affiliations

  • Claudia Marini
    • 1
  • Gaia Nicosia
    • 1
  • Andrea Pacifici
    • 2
  • Ulrich Pferschy
    • 3
  1. 1.Dipartimento di Informatica e AutomazioneUniversità “Roma Tre”RomeItaly
  2. 2.Dipartimento di Informatica, Sistemi e ProduzioneUniversità “Tor Vergata”RomeItaly
  3. 3.Institut für Statistik und Operations ResearchKarl-Franzens-Universität GrazGrazAustria

Personalised recommendations