Cooperative and axiomatic approaches to the knapsack allocation problem

In the knapsack problem a group of agents want to fill a knapsack with several goods. Two issues must be considered. The first is to decide optimally what goods to select for the knapsack. This issue has been studied in many papers in the literature on Operations Research and Management Science. The second issue is to divide the total revenue among the agents. This issue has been studied in only a few papers, and this is one of them. For each knapsack problem we consider three associated cooperative games. One of them (the pessimistic game) has already been considered in the literature. The other two (realistic and optimistic games) are defined in this paper. The pessimistic and realistic games have non-empty cores but the core of the optimistic game could be empty. We then follow the axiomatic approach. We propose two rules: The first is based on the optimal solution of the knapsack problem. The second is the Shapley value of the so called optimistic game. We offer axiomatic characterizations of both rules.


Introduction
A mountaineer is planning a mountain tour with a knapsack, which is limited in size. Thus, he/she must decide what objects to carry in it. The idea is to select the most important objects, given its limited size. This is a classical example of the so called knapsack problem, which in general deals with a finite set of goods which has to be packed in a knapsack of limited size. Each good j has a revenue p j and a size w j . A subset of goods must be selected whose total size does not exceed the size of the knapsack and whose total revenue is as great as possible.
The knapsack problem has been applied to various real-world decisions. Examples (see Pisinger 1998) include investments (deciding how to split the investment of a fixed amount of money between several business projects) and cargo airlines (deciding how to fill an airplane given the demands of customers). Other applications (see Bretthauer  2002) include financial models, production and inventory management, stratified sampling, the optimal design of queuing network models in manufacturing, computer systems, and health care.
The most popular formulation is the so called 0-1 knapsack problem. There is a finite number of goods (one unit of each good) and it must be decided which ones are to be selected for the knapsack. The goods can enter either completely (1) or not at all (0). Since the number of goods is finite, there is an optimal solution (which maximizes the sum of the revenues of the goods included in the knapsack). The first issue addressed is the computational complexity of the optimal solution. Unfortunately, this problem is N P hard (see, for instance, Martello et al. 2000). Thus, the optimal solution must be approximated by algorithms.
There are more general formulations of the knapsack problem. They include the continuous knapsack problem, where fractions of each good can be included; the bounded knapsack problem, where there can be several copies of each good; the d-dimensional knapsack problem, where there are several constraints (for instance weight and volume) on filling the knapsack; the multiple knapsack problem, where there are several knapsacks rather than only one; the multiple choice knapsack problem, where there are several object types and one object of each type must be chosen; and the non-linear knapsack problem, where the objective function and the constraint are non-linear. Again, the main issue addressed by this literature is how to compute the optimal solution. Pisinger (1998), Martello et al. (2000), and Kellerer et al. (2004) survey this literature.
In all the literature mentioned above there is assumed to be a single agent involved in the situation. Of course, such an agent only cares about what the optimal solution is. However, in many situations several agents could be involved. For instance, several firms (agents) may decide to set up a partnership to embark together on some business projects (the goods). The total amount invested by the partnership of firms (the knapsack) must be divided between the business projects. Dror (1990) and Darmann and Klamler (2014) mention other possible applications where a group of agents seeks to allocate shares of the cost of a joint, fixed budget (such as the agricultural budget of the EU) among various different activities.
As in the classic situation, we consider a knapsack of limited size which has to be filled with several goods of a given size. But now agents can receive different revenues from the goods. We assume that a group of agents (N ) decide which goods (from a set M) should be included in a knapsack of fixed size W . Each good j ∈ M has a fixed size w j . The revenues of the agents for the goods are heterogeneous and are modeled by a vector p where for each i ∈ N and j ∈ M, p i j ∈ R + denotes the revenue obtained by agent i when one unit of good j is included in the knapsack. We assume that the revenue of each agent is linear in the quantities consumed. The goods could be public (if p i j > 0 for any agent i, then good j could be considered as a public good because every agent receives a revenue from it) or private (if p i j > 0 is taken for agent i and p k j = 0 when k = i, then good j could be considered as a private good of agent i).
The revenue of good j (the p j of the classical problem) can now be defined as i∈N p i j . We also assume (as in the classical model) that agents will select the goods by maximizing the total revenue (the sum of the revenue of all agents). Thus, the first part of the problem involves computing the optimal solution (or the approximation obtained). The second part is to divide the cost (or revenues) among the agents. The first part is mainly studied in the operations research literature, while the second part is also studied in economics. For instance, Borm et al. (2001) give a survey that focuses on connection problems, routing (Chinese postman and travelling salesman), scheduling (sequencing, permutation, assignment), production (linear production, flow), and inventory.
As far as we know, the paper by Darmann and Klamler (2014) is the only one in which the second part of the knapsack problem is studied. They focus on the continuous knapsack problem, where the optimal solution can be computed in polynomial time. They consider the following: "the goal is to divide the cost of the optimally packed knapsack among the individuals in a fair manner. In this paper, we assume that every unit of weight imposes a cost of one, and therefore the total cost of the knapsack is equal to the weight constraint W ". They then define a family of rules which is characterized by several properties. They also study a particular rule in that family which divides the cost associated with each good equally among the agents approving that good.
Our paper also considers the second part of the problem, but our approach is different. Firstly, Darmann and Klamler (2014) consider the case where agents either approve or disapprove each good, i.e., for each i and j, p i j = 1 when agent i approves good j and p i j = 0 when agent i disapproves good j. Secondly, Darmann and Klamler (2014) assume that each knapsack comes with a certain costs (equal to its weight) which has to be distributed among the agents. In our paper, however, no costs are assumed and our main goal is to divide the total revenue generated by the optimal knapsack among the agents.
We first clarify the difference between the two approaches with a simple example. Consider the knapsack problem with three agents (1, 2, and 3) and two goods (a and b). The size of the knapsack is 1 and the size of each good is also 1. Good a is approved by agents 1 and 2 and good b is approved by agent 3. In our model p 1 a = p 2 a = p 3 b = 1 and p 1 b = p 2 b = p 3 a = 0. Including good a in the knapsack results in an aggregate revenue of 2 (agents 1 and 2 receive a revenue of 1 and agent 3 gets 0). Including good b results in an aggregate revenue of 1 (agent 1 and 2 get a revenue of 0 and agent 3 gets 1). The optimal solution is to include good a in the knapsack. In the rule φ e of Darmann and Klamler (2014) agents 1 and 2 pay 0.5 and agent 3 pays nothing. This means that agent 1 and 2 obtain earnings (the revenue that they get from good a minus the amount that they pay) whereas agent 3 obtains nothing (he/she receives nothing and pays nothing). In our case agents must decide how to divide the revenue generated by the optimal solution (2 in this case) among themselves. Thus, we also consider the possibility of agent 3 being compensated by agents 1 and 2 (because good b is not included) and thus obtaining a positive revenue. Actually, one of the allocation rules that we consider does this.
In this paper we follow a cooperative approach and study how to divide the total revenue among the agents. Thus, we implicitly assume that agents who include many of "their goods" in the knapsack could compensate those agents who include few of "their goods" in order to obtain a fair allocation.
The continuous knapsack problem can be solved in polynomial time, but the optimal solution is not necessarily unique. Each optimal solution induces an obvious way of dividing the total revenue among the agents. Namely, each agent receives the revenue obtained by that agent under the optimal solution considered.
In the literature there is a way of associating a cooperative game with each knapsack problem (see, for instance, Kellerer et al. 2004). The value of a coalition S is defined as the revenue obtained by agents of that coalition when the knapsack is filled in the worst way for S. We call this the pessimistic game. The core of this game is known to be non-empty and contains the allocation induced by each optimal solution. We introduce two alternative cooperative games: The optimistic game and the realistic game. In the optimistic game the value of a coalition S is defined as the revenue obtained by the agents of that coalition when the knapsack is filled in the best way for S. It is easy to see that the core of the optimistic game could be empty. In the realistic game the value of a coalition S is defined as the maximal revenue obtained by agents of that coalition when agents in N \S fill the knapsack in the best way for N \S. We prove that the realistic game has a non-empty core that contain the allocation induced by each optimal solution.
We then follow the axiomatic approach: A knapsack rule is a function that divides the total revenue generated by an optimal solution among the agents for each knapsack problem. We introduce several properties of rules and discuss some relationships between the properties. One of them is core selection, which means that the allocation must be in the core of the realistic game. In several knapsack problems core selection implies that some non-dummy agents could receive 0, which seems a little unfair. Thus, we also consider the securement property (inspired by Moreno-Ternero and Villar 2004 ), which guarantees all agents a minimum amount. Securement states that each agent must receive at least (1/n) the amount that he/she obtains when the knapsack is assigned to him/her. Unfortunately there is no rule that satisfies both properties. Thus we consider two rules, each satisfying one of the properties.
We first consider the rule induced by the optimal solution (in this case we restrict our analysis to problems where such optimal solution is unique). It satisfies core selection but not securement. We present three characterizations of this rule. In the first we use core selection and no advantageous splitting. In the second we use maximum aspirations, independence of irrelevant goods, and composition up. In the third we use maximum aspirations and no advantageous splitting.
We then consider the Shapley value of the optimistic game, which satisfies securement but not core selection. We characterize it with equal contributions.
The rest of the paper is organized as follows. Section 2 formally introduces the knapsack problem. Section 3 studies the three cooperative games associated with the knapsack problem. Section 4 introduces the properties, rules, and axiomatic characterizations. Section 5 presents some concluding remarks. Some omitted proofs of our results are relegated to the Appendix, and the paper ends with a list of references.

The knapsack problem
In the knapsack problem a set of agents (N ) want to place some goods in a knapsack of a given size.
We assume that the set of potential agents is infinite. Thus, there exists an infinite set N such that N ⊂ N .
We focus on the continuous knapsack problem, where goods are assumed to be perfectly divisible. It is then possible select fractions of each good for inclusion in the knapsack.
A knapsack problem is defined as a 5-tuple P = (N , M, W , w, p) where . . , n} denotes a set of agents.
• W ∈ R + is the size of the knapsack.
• w = w j j∈M ∈ R M + where for each j ∈ M, w j denotes the size of good j.
where for each i ∈ N and j ∈ M, p i j ∈ R + denotes the revenue that agent i obtains for each unit of good j that is included in the knapsack. Darmann and Klamler (2014) consider the particular case where p i j ∈ {0, 1} for each i ∈ N , j ∈ M. Namely, agents approve or disapprove each good. Some notation used below needs to be introduced here. Given a knapsack problem P and M ⊂ M denote by P M the restriction of P to goods in M . Namely, Given a knapsack problem P and N ⊂ N denote by P N the restriction of P to agents in N . Namely, For each j ∈ M, the total revenue of good j is denote the vector of revenues associated with agent i.
The interesting case arises when not all goods can be fitted into the knapsack, namely, W < j∈M w j . The case W ≥ j∈M w j is solved easily by including all goods in the knapsack. It is assumed in the rest of the paper that W < j∈M w j .
x = x j j∈M ∈ R M is said to be a feasible solution for P if x j ∈ [0, 1] for each j ∈ M and j∈M w j x j = W . Denote by F S (P) the set of feasible solutions for P. As x j ∈ [0, 1], assume that at most one unit of each good is admitted. Since W < j∈M w j , F S (P) has infinitely many elements (when there are at least two goods).
Given a problem P, each feasible solution x induces a vector of revenues u (x) = (u i (x)) i∈N given by the goods included in the knapsack. For each feasible solution x and each i ∈ N , The first issue addressed in the literature (mainly from operations research) is how to select the goods to be included in the knapsack in such a way that the aggregated revenue of the agents is maximized. Formally, In what follows, it is assumed, without loss of generality, that the goods are sorted in such a way that 1 This problem has at least one optimal solution. One of them is where s is defined by When no confusion arises x * can be written instead of x * (P) . X * (P) (or X * ) denotes the set of all optimal solutions.
If it is assumed that p 1 w 1 > · · · > p m w m , it can be guaranteed that the previous problem has a unique optimal solution.
Denote by P the class of all knapsack problems and by P * the class of knapsack problems where p 1 w 1 > · · · > p m w m . We assume that agents choose the goods to be included in the knapsack in such a way as to maximize the total revenue. Focus now shifts to the problem of deciding how the total revenue is divided among the agents. For any problem P the set of feasible allocations is defined as

Cooperative knapsack games
This section associates with each knapsack problem three cooperative games with transferable utility known as pessimistic, optimistic, and realistic, depending on how the value of a coalition S is defined. The pessimistic game has already been studied in the literature (see, for instance, Kellerer et al. 2004). The value of a coalition S is computed in the worst scenario for coalition S. This is the most standard approach and it has been used in problems of many different kinds. In this case, it is assumed that the knapsack is filled by including the goods with the smallest aggregate revenue for agents in S. The optimistic game, inspired by Bergantiños and Vidal-Puga (2007) and Bergantiños and Lorenzo-Freire (2008) , is in some sense a dual of the pessimistic game because the value of a coalition S is computed in the best scenario for coalition S. Thus, it is assumed that the knapsack is filled by including the goods with the greatest aggregate revenue for agents in S. The realistic game seeks to be a kind of compromise between the pessimistic and optimistic games. A pessimistic approach is taken in the sense that coalition N \S is allowed to fill the knapsack in the best way for them. An optimistic approach is taken in the sense that of all the allocations that give greater aggregate revenue to N \S, coalition S can select the one that gives the greatest aggregate revenue to S.
We study the core of such games. The core of pessimistic and realistic games is always non-empty, while the core of the optimistic game could be empty.
A cooperative game with transferable utility (a T U game, for short) is a pair (N , v) where v : 2 N → R satisfies v (∅) = 0. When no confusion arises v can be written instead of (N , v) .
The core of a T U game v is defined as In the pessimistic approach the knapsack is assumed to be filled in the worst way for any proper coalition S N and all agents agree to fill the knapsack optimally. Formally, for each knapsack problem P the pessimistic game v When no confusion arises v p can be written instead of v p P .
In the optimistic approach it is assumed that agents in S can fill the knapsack as they want. Formally, for each knapsack problem P the optimistic game When no confusion arises v o can be written instead of v o P . In the realistic approach it is assumed that coalition S chooses its best allocation among those that optimize the space of the knapsack for coalition N \S. Let X * (P N \S ) be the set of optimal solutions of the problem P N \S . For each knapsack problem P, define the realistic When no confusion arises v r can be written instead of v r P .
Remark 1 It is obvious that for each problem P and each The vector p satisfies the following conditions.
• p 1 a > 0 and p 1 We now compute the three games. The computation for coalition {2, 3} is detailed. The worst feasible solution for agents 2 and 3 is {a, c} . Thus, v p (2, 3) = p 2 c + p 3 c . The best feasible solutions for agent 1 are {a, b} and {a, c} . Agents 2 and 3 obtain more revenue under The best feasible solution for agents 2 and 3 is {b, c} .
The core of the pessimistic game v p is non empty and contains u x for all x ∈ X * (see, for instance, Kellerer et al. 2004).
The core of the optimistic game v o could be empty.
We now prove that the core of the realistic game v r is non-empty by showing that u (x * ) belongs to that core.
Proof Let P be a problem. Assume, to obtain a contradiction, that there exists The next example shows that the core of v r could have other elements besides those induced for the optimal solutions (i.e. elements outside of u x : x ∈ X * ).
We now mention some elementary properties of T U games. We say that v satisfies mono- (T ) . We say that v satisfies total balancedness if for each S ⊂ N the game (S, v) has a nonempty core. We say that v satisfies convexity if for each S ⊂ T ⊂ N , In the next proposition we study the properties satisfied by each game.
Proposition 1 (a) The pessimistic game satisfies monotonicity, superadditivity, and total balancedness. The pessimistic game does not satisfy subadditivity and convexity.
(b) The optimistic game satisfies monotonicity and subadditivity. The optimistic game does not satisfy superadditivity, total balancedness, and convexity.
The proof is in the Appendix.

Knapsack rules and properties
This section looks at rules that could be used to share the total revenue of the knapsack between the agents. We introduce several properties and discuss some relationships between the properties. Core selection says that an allocation in the realistic core must be selected. Under core selection, agents who want goods which are not in great demand (those with small p j w j ) could receive zero. This can be seen as unfair in the sense that non-dummy agents (agents that have a positive valuation of at least one good) should receive a minimum amount. This idea of minimal rights has already been discussed in problems of other kind. See, for instance, the property of securement introduced by Moreno-Ternero and Villar (2004) in bankruptcy problems. We adapt this property to the knapsack problem. Unfortunately there is no rule that satisfies core selection and securement.
We then introduce two rules. The first is based on the optimal solution and satisfies core selection. The second is based on the Shapley value and satisfies securement. We study the properties satisfied by each rule. We also provide several axiomatic characterizations of both rules.
Formally, a rule is a function f that assign to each problem P a sharing of the maximal revenue v (P) , that is, i∈N f i (P) = v(P).
We now introduce several properties of rules and discuss some relationships between the properties.
Core selection says that the allocation proposed by the rule must belong to the core of the problem. Because of the definitions, we believe that v r (S) represents what agents of S could obtain by themselves better than v p (S) or v o (S) . Thus, we select the core of the realistic game to define this property.
Core selection (cs). For each problem P, f (P) ∈ c (v r ) .
Assume that a good not selected by the optimal solution is removed. Then the allocation proposed by the rule does not change. This property is inspired by the well known principle of independence of irrelevant alternatives (used, for instance, in bargaining problems by Nash (1950)).

Independence of irrelevant goods (iig).
Let P be a problem and j ∈ M satisfying that x j = 0 for any optimal solution x. Then, f (P) = f P M\{ j} .
We now introduce a property that guarantees that no agent has incentives to divide his/her revenue and present him/her self as a group of agents. This property is known as no advantageous splitting and it is inspired by the property of strategy-proofness introduced in O'Neill (1982). We define it in the same way as in Thomson (2003Thomson ( , 2015. Let P = (N , M, W , w, p) and P = N , M, W , w, p be such that N ⊂ N and there exists i ∈ N with p i = p i + k∈N \N p k and p k = p k for all k ∈ N \ {i} . Then, (2014) consider the property of pairwise split-proofness, which is related in its motivation to nas. There are several differences between pairwise splitproofness and nas. First, we only consider the case when an agent is divided into several agents. Second, when one agent is divided into several (or several join together as a single agent), in Darmann and Klamler (2014) each agent must approve different goods. Since our model is more general we allow different agents to approve the same good. Third, in Darmann and Klamler (2014) the property says that agents who do not split should not be affected. In our case (as in the bankruptcy problem) we say that agents that split are not better off.

Darmann and Klamler
The idea of the following property is to set an upper bound on the revenue received by each agent. In our case, each agent can receive no more than the revenue that he/she receives when he/she can use the whole knapsack.
For each problem P and each i ∈ N we define the maximum aspiration of agent i as

Maximum aspirations (ma) For each problem P and each i ∈ N , f i (P) ≤ M A i (P) .
The idea of the following property is the dual of the previous one. We try to guarantee each agent a minimum amount. In our case each agent must receive at least (1/n) the revenue that he/she obtains when the knapsack is assigned to him/her. Following Moreno-Ternero and Villar (2004) we call this securement, as they do for the case of bankruptcy problems.
For each problem P and each i ∈ N we define the secure allocation of agent i as Equal contributions is a principle widely used in the literature since Myerson (1980) introduced it in T U games. It says that if agent i leaves the problem, the change in the allocation of agent k coincides with the change in the allocation to agent i when agent k leaves the problem.

Equal contributions (ec)
For each problem P and each i, k ∈ N , In order to define this last property we assume a restriction of domain for f to P * , where the optimal solution is unique and thus well defined. Composition up says that we can fill the knapsack in one step or, first fill part of the knapsack and later the rest. This property has been used in several economic problems. See for instance the surveys of Thomson (2003Thomson ( , 2015 about bankruptcy problems. Darmann and Klamler (2014) also use this property.
Proposition 2 Let P = (N , M, W , w, p) , W 1 ≤ W and x ∈ [0, 1] M be the optimal solution of P (W 1 ) . Then The proof is in the Appendix. All the above properties can be considered as desirable for a rule, but clearly there could be incompatibilities between them. For example, if attention is focused solely on rules that satisfy core selection (securement) then securement (core selection) must be set aside because the two properties are incompatible. We also prove that under independence of irrelevant goods and maximum aspirations, securement is not possible. The proposition below examines these relationships between the properties.

Proposition 3 (1)
There is no rule that satisfies core selection and securement.
(2) If a rule satisfies independence of irrelevant goods and maximum aspirations, then it does not satisfy securement.
Core selection is a quite standard property in the literature. Nevertheless, allocations in the core can be very unfair (for instance, some non-dummy agents could receive nothing). In the knapsack problem this could also happen. For instance, in Example 1 there is only one core allocation, which gives 0 to agent 1. Thus, in attempting to find a fair allocation it is sometimes better to look outside the core. For instance, in T U games the Shapley value (Shapley, 1953) could be outside the core.
We believe that securement is a nice fairness property because it guarantees that all nondummy agents receive something. For instance, in Example 1 it says that agent 1 receives something.
By Proposition 3 core selection and securement are incompatible. Since we consider both properties to be of interest, we study two rules in the paper: One that satisfies core selection and the other securement.

The rule induced by the optimal solution
This section examines a rule that satisfies core selection. We focus on the rule induced by the optimal solution. We fill the knapsack in the optimal way and each agent receives the revenue given by the knapsack, i.e. there are no transfers between agents. A general knapsack problem can have several optimal solutions, but here we restrict our study to P * , where the optimal solution is unique and thus well defined. When we consider rules on P * , the properties defined in the previous section need to be supplemented by the additional requirement that each problem P, P , P M\{ j} , P(W 1 ), P (W − W 1 , x) and P N \{i} must be in P * . We study the properties satisfied by this rule and give several axiomatic characterizations.
Given P ∈ P * , let x * denote the unique optimal solution of P. Abusing our notation we denote the rule induced by x * also as x * . Namely, denotes the amount of good j in the optimal solution. We will be more precise when necessary to avoid confusion.
The optimal solution is used by Darmann and Klamler (2014) to define a rule. In that paper, the cost associated with each good, selected by the optimal solution, is divided equally among the agents who approve the good.
In the next theorem we give several axiomatic characterizations of the optimal rule.
Theorem 2 (1) x * is the unique rule that satisfies core selection and no advantageous splitting.
(2) x * is the unique rule that satisfies independence of irrelevant goods, composition up, and maximum aspirations.
(3) x * is the unique rule that satisfies no advantageous splitting, and maximum aspirations. Besides, the properties used in the above characterizations are independent.
The proof is in the Appendix. By Proposition 3, core selection and securement are incompatible, so by Theorem 2, x * fails securement. Furthermore, by Theorem 3 (in the next section) it is known that x * also fails equal contributions.

The rule induced by the Shapley value of the optimistic game
This section looks at a rule that satisfies securement. The knapsack is filled in the optimal way and each agent receives the revenue given by the Shapley value of the optimistic game associated with the knapsack problem 2 . In this section we consider the set of all problems P. We study the properties satisfied by this rule and give an axiomatic characterization.
The Shapley value of a game v (Shapley 1953 The Shapley value is probably, the most popular value in T U games. See Algaba et al. (2019) for a wide-ranging collection of papers that study different aspects of the Shapley value. In general, the Shapley value must be computed with exponential time algorithms, though in some cases, for instance in knapsack budgeted games (Bhagat et al. 2014), it is possible to find polynomial time algorithms or pseudo-polynomial time algorithms that can be used for computing it.
We define the optimistic Shapley rule, denoted by Sh o , as the rule induced by the Shapley value of the optimistic game.
We now study the properties satisfied by the optimistic Shapley rule.

Proposition 4 The optimistic Shapley rule satisfies maximum aspirations, securement and equal contributions.
The proof is in the Appendix. We now give a characterization of Sh o .

Theorem 3 The optimistic Shapley rule is the unique rule that satisfies equal contributions.
The proof is in the Appendix. It is obvious that Sh o does not satisfy iig. Since Sh o satisfies se, by Propositions 3 it follows that Sh o does not satisfy cs. Since Sh o satisfies ma, by Theorem 2 (3) it follows that Sh o fails nas. If W 1 = 1 is taken in Example 1, then Sh o 1 (P) = 1 3 p 1 a and Sh o 1 (P (W 1 )) + Sh o 1 (P (W − W 1 , x)) = 2 3 p 1 a . From this it can be deduced that Sh o does not satisfies cu. In this paper we focus on the Shapley value of the optimistic game, but the Shapley value of the pessimistic game (Sh p ) and the Shapley value of the realistic game (Sh r ) could also be considered. That is not the objective of this paper but some things can nevertheless be said.
We believe that Sh o has some advantages over Sh p and Sh r . First, Myerson (1980) characterized the Shapley value in T U games with the property of equal contributions (called balanced contributions in that paper). This property compares the impact of removing an agent from the problem. Thus, it could be used in problems of many kinds. Actually, many authors have used this property in different problems for characterizing rules based on the Shapley value of an associated cooperative game. If it is used in the knapsack problem the Shapley value of an associated cooperative game -the optimistic game-is also obtained.
Second, we believe that Sh p and Sh r could give too much to some agents because both fail maximum aspirations. Let P be such that N = {1, 2, 3}, Thus, according to Sh p and Sh r agent 1 obtains more than when the knapsack is assigned only to him/her. This seems unfair.
We now provide two examples of rules that satisfy securement. The first is the Shapley value of the pessimistic game 3 , which we call the pessimistic Shapley rule. The second is the constrained equal awards rule of an associated bankruptcy problem.
A bankruptcy problem is a triple (N , E, c) where N is the set of agents, E is an endowment to be divided among the agents, and c = (c i ) i∈N ∈ R N + is a claims profile. See Thomson (2003Thomson ( , 2015 for a detailed discussion on this kind of problems. The constrained equal-awards rule, C E A, selects, for each (N , E, c), the vector (min{c i , λ}) i∈N , where λ > 0 is chosen so that i∈N min{c i , λ} = E.
We now associate a bankruptcy problem (N , E, c) with each knapsack problem P. Even though the triple (N , E, c) must depend on the problem P we abuse our notation and do not include P in the definition. N is the set of agents. E is the total utility given by any optimal solution, namely, E = v (P). For each i ∈ N , we follow the most standard approach (see, for instance, Bergantiños and Moreno-Ternero 2020 ) and define c i as the "maximum reasonable amount" that agent i could obtain. In our case we define it according to the property of maximum aspirations. Namely, c i = M A i (P) . The rule C E A (N , E, c) , where (N , E, c) is the bankruptcy problem associated with a knapsack problem P, is called the constrained equal-awards rule.
The proof is in the Appendix.

Final remarks
Here, we summarize the main findings of the paper and present some conclusions. In the classical knapsack problem a single agent wants to fill a knapsack with several goods. That agent must decide optimally what goods to select for the knapsack. This problem has been studied in many papers in operations research literature.
We consider the case with several agents with heterogeneous, linear revenues from goods. Two issues need to be considered here: Firstly, as in the single agent case, we select the goods that maximize the aggregate revenue of all agents. Secondly, we divide the aggregated revenue generated by the selected knapsack among the agents. As far as we know the second issue has been studied in very few other papers.
We assign three cooperative games to each knapsack problem. The pessimistic game has already been studied in the literature. The optimistic and realistic games are introduced in this paper. The pessimistic and realistic games have non-empty cores but the optimistic game could have an empty core.
We also consider two rules. The first is based on the optimal solution of the knapsack problem. The second is the Shapley value of the optimistic game. We offer axiomatic characterizations of both rules. The main advantage of the first one is that it is always in the core of the realistic and pessimistic games. The main disadvantage is that it could be rather unfair and some non-dummy agents could get nothing. The rule based on the Shapley value is not so unfair because it guarantees each agent a minimum revenue. The main disadvantage is that it could be outside of the core of the pessimistic and realistic games.
Few papers have studied this problem, so there are many things that could be considered. We give a brief list.
We focus here mainly on the Shapley value of the optimistic game. The Shapley value of the pessimistic and realistic games could also be considered. Is it possible to find nice characterizations of such values?
Instead of studying the Shapley value, the nucleolus of some of the games could be considered.
Bankruptcy problems such as the one mentioned above can also be associated with each knapsack problem. Do the classical bankruptcy rules produce interesting allocations in this setting?

Declarations
Funding Open Access funding provided thanks to the CRUE-CSIC agreement with Springer Nature. Arribillaga acknowledges financial support from Universidad Nacional de San Luis, through grant 319502, and from Consejo Nacional de Investigaciones Científicas y Técnicas (CON-ICET), through grant PIP 112-200801-00655. The work of G. Bergantiňos is partially supported by research grants ECO2017-82241-R from "Ministerio de Economía y Competitividad", and ED431B 2019/34 from "Xunta de Galicia". Funding for open access charge: Universidade de Vigo/CISUG.

Conflict of interest Not applicable.
Availability of data and materials Not applicable.

Code availability Not applicable.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Proof of Proposition 1 (a)
Let P be a problem and S ⊂ N . Let y ∈ F S (P) be such that it follows that (u i (y)) i∈S belongs to the core of (S, v p ) . Thus, v p satisfies total balancedness. Total balancedness implies superadditivity, so v p satisfies superadditivity. Since superadditivity implies monotonicity when the game is non-negative and v p is non-negative, v p satisfies monotonicity.
(b) Let P be a problem and S ⊂ T . Let y ∈ F S (P) be such that Thus, v o satisfies monotonicity. Let P be a problem and S, T ⊂ N with S ∩ T = ∅. Let y ∈ F S (P) be such that Thus, v o satisfies subadditivity.
. Thus, v o does not satisfy superadditivity. It is argued above that the core of (N , v o ) could be empty. Thus v o does not satisfy total balancedness.
Since convexity implies superadditivity, so it can be deduced that v o does not satisfy convexity.
Since v r (3) = 2 and v r (2, 3) = 0 it can be deduced that v r does not satisfy monotonicity. Since convexity implies total balancedness, total balancedness implies superadditivity, and superadditivity implies monotonicity (for non-negative games), it can be deduced that v r does not satisfy superadditivity, total balancedness, or convexity.

Proof of Proposition 2 Let
Let x * = x * (P) . Let s ∈ N be given by ( 3) . Thus, there exists t ≤ s such that x j = 1 for all j < t, 0 < x t ≤ 1, and x j = 0 for all j > t.
Assume that x t < 1 and t < s (the other cases are similar and we omit them). Thus Let N ⊂ N be such that N \N = h i − 1. Consider P = N , M, W , w, p such that p i = p i h i , p k = p i h i for all k ∈ N \N and p k = p k for all k ∈ N \{i}. By nas, By (8), By cs, By (9), Since and (10), (2) Let f be a rule satisfying iig, cu, and nas. We prove that f i (P) = x * i (P) for all i ∈ N and all P ∈ P * . Let s be as in ( 3) .
The idea of the proof is to apply composition up several times. At each step, the solution of one of the problems is obtained under iig and nas. Start with P(w 1 ). Then, apply cu to the problem P (W − w 1 , x * ) to obtain the problems P (W − w 1 , x * ) (w 2 ) and P (W − w 1 − w 2 , x * ). Solve P (W − w 1 , x * ) (w 2 ) and then continue.
Take W 1 = w 1 . Let x = x * (P(W 1 )), thus x 1 = 1, x j = 0 for all j ∈ M\{1} and M x = { j ∈ M : j ≥ 2} , w x j = w j for each j ∈ M x , and p x i j = p i j for each i ∈ N and j ∈ M x .
By cu, f i (P) = f i (P (w 1 )) + f i (P (W − w 1 , x)) for all i ∈ N .
for each i ∈ N , f i (P (w 1 )) = f i P (w 1 ) {1} = p i 1 . Now apply cu to problem P (W − w 1 , x) by taking W 1 = w 2 . Abusing the notation, denote the first problem given by cu as P (w 2 ) and by the second as P (W − w 1 − w 2 ). Using arguments similar to those used for P (w 1 ) , it can be deduced that for each i ∈ N , f i (P (w 2 )) = p i 2 . Continuing to apply cu it is obtained that for each i ∈ N , Besides, for each j = 1, . . . , s − 1 and each i ∈ N , f i P w j = p i j , and for each i ∈ N , Thus, for each i ∈ N , (3) Let f be a rule satisfying ma and nas. We prove that f i (P) = x * i (P) for all i ∈ N and all P ∈ P * . The proof is obtained by induction on n, the number of agents.
This rule satisfies ma and iig but fails cu.
(3) f β satisfies ma but fails nas. f γ satisfies nas but fails ma. se. Let P be a problem and i ∈ N . Since v o (i) = S E i (P) n and v o (S ∪ i) ≥ v o (S) for all S ⊂ N , it holds that Sh o i (P) ≥ S E i (P) . ec. Let P be a problem and i, k ∈ N . Let N , v o P be the corresponding optimistic game. Myerson (1980) proved that the Shapley value satisfies equal contributions in T U games. Thus,

Proof of
Since