Distributed Envy Minimization for Resource Allocation
Arnon Netzer and Amnon Meisels
Department of Computer Science, Ben-Gurion University of the Negev, Beer-Sheva, Israel
Keywords:
Resource Allocation, Indivisible Goods, Envy Minimization, Distributed Search.
Abstract:
The allocation of indivisible resources to multiple agents generates envy among the agents. An Envy Free allo-
cation may not exist in general and one can search for a minimal envy allocation. The present paper proposes
a formulation of this problem in a distributed search framework. Distributed Envy Minimization (DEM) - A
Branch and Bound based distributed search algorithm for finding the envy minimizing allocation is presented
and its correctness is proven. Two improvements to the DEM algorithm are presented - Forward Estimate
(DEM-FE) and Forward Bound (DEM-FB). An experimental evaluation of the three algorithms demonstrates
the benefit of using the Forward Estimate and Forward Bound techniques.
1 INTRODUCTION
Consider the allocation of resources (or tasks) to mul-
tiple agents, where agents associate their personal
utilities to the allocated resources. A desirable alloca-
tion can in principle satisfy any of a number of social
welfare functions.
In most cases the target social state is the Util-
itarian state, widely known as Social Welfare, in
which the goal is to maximize the sum of utilities of
all agents (Rosenschein and Zlotkin, 1994; Moulin,
1988). However, in many cases reaching a Fair
allocation may be more desirable than an Efficient
one (Kleinberg et al., 2001; Lee et al., 2004). In some
cases Fairness and Efficiency can be combined by
looking for a Pareto Optimal Fair allocation (Cheva-
leyre et al., 2007). A key concept in the literature
on Fair Division is Envy Freeness (Brams and Taylor,
1996). An allocation is envy free if no agent values
another agent’s bundle over its own.
A socially desirable allocation can be reached by
multiple agents that use a negotiation framework (En-
driss et al., 2006). However, such approaches typi-
cally require the existing of at least one divisible re-
source (money) in an adequate quantity. As a result,
in the presence of money, reaching an Envy Free al-
location can be addressed in a distributed negotiation
framework (Asadpour and Saberi, 2007; Chevaleyre
et al., 2007).
The research was supported by the Lynn and William
Frankel Center for Computer Science, and by the Paul
Ivanier Center for Robotics and Production Management
In some cases the use of money may not be ap-
plicable. Consider the allocation of tasks to workers
in a factory, or the allocation of shifts to nurses in a
hospital ward. It is reasonable to assume that each
nurse will have different preferences for shifts, and
having nurses paying money to other nurses in order
to switch shifts may be unacceptable. In this exam-
ple we need all tasks to be allocated and an envy free
allocation is clearly desirable. Unfortunately, when
money is not involved, and all resources must be allo-
cated, there is no guarantee that an envy free solution
exists.
Consider the case of three agents and two re-
sources in Figure 1. Denote by u
i
(r
j
) the utility of
agent i for getting resource j. It is easy see that in this
example agent 1 is only interested in r
1
, agent 3 is in-
terested in r
2
, and agent 2 has a non zero utility for
both resources. In fact, getting both resources is val-
uated by agent 2 more than the sum of the two single
utilities. Since we have three agents and only two re-
source, at least one agent will end up getting nothing,
and will necessarily be envious.
u
1
() = 0 u
2
() = 0 u
3
() = 0
u
1
(r
1
) = 3 u
2
(r
1
) = 3 u
3
(r
1
) = 0
u
1
(r
2
) = 0 u
2
(r
2
) = 6 u
3
(r
2
) = 4
u
1
(r
1
,r
2
) = 3 u
2
(r
1
,r
2
) = 10 u
3
(r
1
,r
2
) = 4
Figure 1: Example of utilities of three Agents, for two re-
sources.
Maximizing Social Welfare in the present exam-
ple, agent 2 would get both resources. For this alloca-
tion the sum of all utilities would be 10 (the utility of
15
Netzer A. and Meisels A..
Distributed Envy Minimization for Resource Allocation.
DOI: 10.5220/0004186700150024
In Proceedings of the 5th International Conference on Agents and Artificial Intelligence (ICAART-2013), pages 15-24
ISBN: 978-989-8565-38-9
Copyright
c
2013 SCITEPRESS (Science and Technology Publications, Lda.)
agent 2) which is higher than the sum of utilities for
any other allocation. However, in this allocation both
agent 1 and 3 envy agent 2.
Since an envy free allocation may not exist, and
even finding whether such an allocation exists is an
NP-Complete problem (Bouveret and Lang, 2008),
one can look for the allocation that minimizes the
envy between the agents. The envy of any agent a
i
of
any other agent a
j
may be measured in absolute terms
- the utility that agent a
i
associates with the bundle al-
located to a
j
minus the utility it associates with its
own allocated bundle. Another option is to use a rel-
ative term - the utility a
i
associates with the bundle
allocated to a
j
divided by the utility it associates with
its own (Lipton et al., 2004).
Regardless of the method for computing the envy
between two agents, there may be several global tar-
get functions for envy minimization. One may wish to
minimize the number of envious agents, or the sum of
all envy in the society (Utilitarian envy minimization).
Alternatively, one may minimize the envy of the agent
that is worst off (Egalitarian envy minimization), the
agent with the largest amount of envy.
Recently, a centralized Branch and Bound algo-
rithm for finding a fair allocation of indivisible goods
was proposed in (Vetschera, 2010). In that work a
centralized Branch and Bound algorithm was pro-
posed for minimizing global target functions that rep-
resent fairness, such as Maxmin and Nash bargaining.
Due to the nature of the problem, a distributed algo-
rithm for finding an envy minimizing allocation is de-
sirable.
The field of Distributed Constraint Reasoning pro-
vides a widely accepted framework for representing
and solving Multi Agent Systems (MAS) problems.
In a distributed constraint problem each agent holds
a set of variables representing its state. These vari-
ables take values from a finite domain and are subject
to constraints. A distributed constraint algorithm de-
fines an interaction protocol for coordinating a joint
assignment of variables.
Distributed Constraint Optimization Problems
(DCOPs) were successfully applied to various MAS
problems - coordinating mobile sensors (Lis
´
y et al.,
2010; Stranders et al., 2009), meeting and task
scheduling (Maheswaran et al., 2004) and many oth-
ers. Recent years have seen a large number of differ-
ent algorithms for optimally solving DCOPs. These
include Synchronous Branch and Bound (SBB) (Hi-
rayama and Yokoo, 1997), BnB-ADOPT (Yeoh et al.,
2010), ConcFb (Netzer et al., 2012) and others.
The present paper presents a formulation of envy
minimization for indivisible goods allocation as a
DCR problem. In this formulation an agent is con-
strained with another agent if both of them are “inter-
ested” in the same resource. For the example in Fig-
ure 1 this can be represented by the constraint graph
in Figure 2. The variables of agents represent the re-
source that the agent is interested in and their alloca-
tion, and the interaction protocol defines the commu-
nication between agents in the constraint graph. So,
a
2
is connected to a
1
since they are both interested in
r
1
, and to a
3
due to their common interest in r
2
. a
1
and a
3
have no resource they are both interested in,
and are not connected.
a
1
r
1
a
2
r
1
a
2
r
2
a
3
r
2
Figure 2: Constraints Graph for the example in Figure 1.
The formulation of envy minimization for indivis-
ible resource allocation as a DCR problem enables
the design of distributed algorithms for finding mini-
mal envy solutions. The present paper presents a new
Distributed Envy Minimization algorithm (DEM). In-
spired by state of the art DCOP algorithms two im-
proved algorithms are also presented (DEM-FE and
DEM-FB) and the performance of the algorithms is
compared.
The remainder of this paper is structured as fol-
lows: Section 2 formally defines envy minimization
for indivisible resource allocation as a DCR problem.
Section 3 presents the algorithms for solving these
problems and the correctness and completeness proof
of the algorithm are in Section 4. The experimental
evaluation and the conclusions are in sections 5 and 6
respectively.
2 INDIVISIBLE RESOURCE
ALLOCATION
2.1 Basic Definitions
An Indivisible Resource Allocation Problem consists
of a set of agents A =
{
a
1
...a
n
}
, and a finite set of
indivisible resources R =
{
r
1
...r
k
}
.
An agent allocation R
i
is the set of resources al-
located to agent a
i
. An allocation R
A
is a parti-
tioning of R among the agents in A. Formally:
R
A
=
{
R
1
...R
n
}
such that R
i
R
j
=
{}
for i 6= j and
S
iA
R
i
= R
In the general case every agent a
i
A has a util-
ity function u
i
that maps an agent allocation K
i
to a
non negative utility (u
i
: 2
R
R
+
). For the scope
ICAART2013-InternationalConferenceonAgentsandArtificialIntelligence
16
of this paper we will only consider super modular
utility functions. So, for the scope of this paper
u
i
(AB) u
i
(A)+u
i
(B)u
i
(AB) for all A,B R .
In order to avoid representation issues, our examples
and pseudo code use additive utility functions.
An agent a
i
envies another agent a
j
if it valu-
ates its allocation less than the allocation of the other
agent: u
i
(R
i
) < u
i
(R
j
) for i, j A. Note that the envy
of an agent depends only on the allocations and on
that agent’s utility function. The utility functions of
the other agents are irrelevant for the envy of a given
agent.
An allocation is Envy Free if every agent valu-
ates its allocation at least as much as the allocation
of any other agent. In other words, R
A
is Envy Free
iff u
i
(R
i
) u
i
(R
j
) for all i, j A.
2.2 Envy Minimization
It is easy to see that an envy free allocation may not
exist for Indivisible Resource Allocation. A simple
example would be a system with two agents and one
resource, that has a non zero utility for both agents.
Since the resource can only be allocated to one of
the agents, the other agent will envy. Since an Envy
Free allocation requires that no agent envies any other
agent, one may draw an analogy to constraint satisfac-
tion problems in which no constraint can be violated.
When an Envy Free allocation does not exist, one
may try to minimize the number of agents that are
envious. This is analogous to MaxCSP (Larrosa and
Meseguer, 1996) in which the goal is to minimize the
number of violated constraints.
Returning to the example in Figure 1, allocating
both r
1
and r
3
to agent 2 will maximize the social wel-
fare, but leaves both agents a
1
and a
3
envious of agent
a
2
. A better allocation in this case may be to allocate
r
1
to agent 1 and r
2
to agent 3. In this allocation only
agent 2 is envious.
The amount of envy of agent i in agent j can be
measured as E
i j
= u
i
(R
j
) u
i
(R
i
) , for all i, j A
(where negative envy is truncated to 0). Another op-
tion is to measure relative envy: E
i j
= u
i
(R
j
)/u
i
(R
i
),
for all i, j A. When an agent envies more than one
other agent, the agent’s envy is taken to be its maxi-
mum envy of all other agents: E
i
= max
j
(E
i j
).
Once the amount of envy of an agent is defined,
one can set a global goal function for the envy of
agents, and look for an allocation that minimizes this
global function. This is analogues to a Constraint Op-
timization Problem. One example of such a global
function would be the Utilitarian function, in which
the goal is to minimize the sum of the envy of all
agents. Another example may be the Egalitarian func-
tion, in which the goal is to minimize the envy of the
“worst off agent, the agent whose envy is the great-
est.
If one uses the absolute envy between two agents
in the example in Figure 1, minimizing the sum of all
envies will result in the allocation of r
1
to agent a
1
and r
2
to agent a
2
. This allocation will yield a total
envy = 4 (only agent 3 is enviuos). Optimizing for the
worst off agent will result in allocating r
1
to agent a
2
and r
2
to agent a
3
. In this allocation the maximum
envy of a single agent is 3 (for both a
1
and a
2
) and
this is the best allocation in terms of Egalitarian envy.
Figure 3 presents the search space for the utilities
in Figure 1, for absolute envy and a global target of
minimizing the sum of all envy. Each edge repre-
sents a variable, so, a
1
r
1
is the variable that repre-
sents resource 1 allocated to agent a
1
. The leafs are
the global envy for the corresponding full allocation.
An edge from a node down and right, represents a true
assignment (the resource is allocated to this variable),
in the same way an edge from a variable down and
left, represents a false assignment (the resource is not
allocated to this variable). The grayed out areas are
illegal parts of the search space. A part of the search
space is illegal either because it requires a resource to
be allocated twice, or not to be allocated at all.
One can see that for this example there are only
4 legal full allocations and the optimal solution allo-
cates r
1
to a
1
and r
2
to a
2
, to get a global envy of 4.
The only envious agent in this optimal allocation is
agent a
3
which valuates the bundle of a
2
to be 4, and
its own utility in the optimal allocation is 0.
6
7
9
4
a
1
r
1
a
2
r
1
a
2
r
2
a
3
r
2
Figure 3: Serach space for the example in Figure 1.
3 DISTRIBUTED ENVY
MINIMIZATION
Consider a distributed framework for a Branch and
Bound search algorithm that finds the allocation of
minimal Envy. This framework can be easily adapted
for a variety of envy minimization target functions.
The algorithms are based on Asymmetric Distributed
Constraint Optimization Problems (ADCOP) (Grub-
DistributedEnvyMinimizationforResourceAllocation
17
shtein et al., 2009), with the required modification for
envy minimization and for enforcing the global con-
straint that all resources must be allocated.
3.1 Algorithm Overview
In the proposed Distributed Envy Minimization
(DEM) algorithm each agent a
i
has a local boolean
variable x
ir
for each resource r for which a
i
has a non
zero utility u
i
(r) > 0. Assigning true to x
ir
means that
r is allocated to agent a
i
.
Each agent maintains a list of neighbors (NB List)
for each of its variables. The NB List of a variable
contains all other agents that are interested in the re-
source NB List
x
ir
= a
j
: j 6= i,u
j
(r) > 0.
The search algorithm maintains an invariant at-
tribute in which only one variable of all interested
agents that represents resource r can be true. In ad-
dition, in a full allocation at least one of the variables
that represents resource r must be true. This ensures
that all resources are allocated, and that at no stage of
the algorithm a resource is allocated to two agents.
All agents are ordered lexicographically. If agent
a
i
is before agent a
j
in the lexicographic order, we
say agent a
i
is a higher priority agent than agent
a
j
(Meisels, 2007).
Each agent orders its variables in a lexicographic
order. Each agent at its turn, tries to assign true to any
variable which represents a resource that was not al-
located by higher priority agents. Whenever an agent
has all of its variables assigned (true or f alse) it sends
a message to the next agent in the global order, in-
forming it on the assignments of all higher priority
agents, and signaling it that it is its turn to assign vari-
ables.
Whenever an agent assigns true to a variable, it
sends a message to all of the variable higher priority
neighbors (agents in the variable NB List that have
higher priority than the current agent). Each such
higher priority neighbor returns a message with its
envy evaluation for the current agent. Based on the
envy reports, and depending on the global minimiza-
tion target function, the agent decides whether to keep
the assignment or to backtrack.
If an agent needs to backtrack (change its assign-
ment from true to false) on a variable that has no lower
priority neighbors, it means that there is no other
agent that can take this resource, and the agent needs
to backtrack farther. If an agent needs to backtrack
on a variable that is already assigned a false value, it
needs to backtrack farther. If an agent needs to back-
track on its first variable, it backtracks to the previous
agent.
Whenever the last agent successfully assigns all
its variables, a new higher bound on the envy mini-
mization target function has been found. If the first
agent needs to backtrack on its first variable, then the
search has ended, the upper bound on the envy mini-
mization target function, is the minimal envy, and the
full allocation that is associated with it, is the optimal
allocation.
Consider the algorithm run example in Figure 4.
The order of the agents is lexicographic. The first
agent a
1
starts by assigning its variable r
1
to true.
Next a
2
must assign its r
1
variable to false, since re-
source 1 was already allocated to agent a
1
. Agent a
2
proceeds by assigning r
2
to true. Agent a
3
must as-
sign its r
2
to false, and the upper bound of the global
envy is calculated to be 4, which is the envy of agent
a
3
. Note that according to the definition of envy, agent
a
2
is not envious of agent a
1
even though it has a non
zero utility for r
1
. The reason is that a
2
values its as-
signed bundle by 6, and values the bundle assign to
a
1
(e.g. r
1
) by 3, which is less. Agent a
3
then back-
tracks to agent a
2
. If a
2
assigns false to its r
2
then its
envy will be 9, which is higher than the upper bound,
hence it backtracks on r
2
. Since r
1
of agent 2 is al-
ready set to false, it backtracks on it too. Now agent
a
1
changes its assignment of r
1
to false, followed by
true assignments of a
2
to both its variables. At this
stage agent a
3
is left with no resources to get, and the
total envy is calculated to be 7 (3 for agent a
1
and
4 for agent a
3
). Since this is more than the upper
bound, agent a
3
backtracks without updating the up-
per bound. Again, agent a
2
knows that assigning false
to its r
2
will breach the upper bound, and backtracks
further until the algorithm terminates.
6
7
9
4
a
1
r
1
a
2
r
1
a
2
r
2
a
3
r
2
Figure 4: A Branch and Bound run on the search space in
Figure 3.
3.2 DEM- Algorithm Description
The main data structures used by the algorithm are:
Agent Assignment. A vector of boolean values rep-
resenting the assignments of the agent’s variables.
CPA. - A CPA (Current Partial Assignment) main-
tains all assignments of all variables of currently
ICAART2013-InternationalConferenceonAgentsandArtificialIntelligence
18
assigned agents. That is, it contains a set of pairs
of the form
h
Agent,Agent Assignment
i
Envy List. The Envy List is a vector of Envy re-
ported by all assigned agents with respect to a
given CPA.
NB List. A list of all agents that has a non zero
utility as a given variable. The active SPs, held by
each agent. the NB List is maintained per variable
per agent.
The algorithm uses four types of messages to transfer
information and requests between agents:
CPA. A message containing a CPA and an
Envy List, sent by an agent after extending the
CPA, to an unassigned agent.
BT CPA. A backtrack message, notifying an agent
that a CPA needs to be backtracked.
Envy Request. A message containing a CPA, sent
to an agent asking it to compute its envy for the
given CPA and return it to the requesting agent.
Envy Report. A message sent as a reply to
Envy Request, reporting the Envy for a given
agent for a given CPA
The pseudo code of the main procedure of the
DEM algorithm is described in Figure 5. It starts with
the initializing agent calling Assign Val() trying to as-
sign its variables (line 3). The main loop (line 4) con-
tinuously looks for incoming messages (line 5), and
dispatches them according to the message type to the
appropriate functions (lines 7–15).
1 done f alse
2 if Initializing Agent then
3 Assign Val(new CPA)
4 while not done do
5 msg getNextMsg()
6 switch msg.type do
7 case CPA :
8 Receive CPA(msg)
9 case BT CPA :
10 Receive BT CPA(msg)
11 case Envy Request :
12 Receive Envy Request(msg)
13 case Envy Report :
14 Receive Envy Report(msg)
15 case Terminate :
16 done true
Figure 5: main().
Figure 6 describes the pseudo code for As-
sign Val() function. First, the function checks
if all variables are assigned (line 1). If so,
Agent Assignment is completed and the appropriate
function is called (line 2). Otherwise, the next unas-
signed variable is identified (line 4), and the CPA is
checked to see if the resource represented by this vari-
able is already assigned (line 5). If the resource is as-
signed then the variable gets a false value, the CPA is
updated, and Assign Val() is called again to try and
assign the next variable (lines 7–9). If the resource
was not assigned to a higher priority neighbor, then
the variable is set to true, the CPA is updated (line
12). If the variable has no higher priority neighbors
then its assignment cannot change the Envy valuation
for any of the higher priority neighbors, and one can
proceed to assign the next variable (lines 13–14). If
there are higher priority neighbors an Envy Request
message is sent to them.
1 if all variables are assigned then
2 Agent Assignment Complete(CPA)
3 else
4 var next unassigned variable
5 IsAssigned check CPA if relevant good
already assigned
6 if IsAssigned then
7 var = f alse
8 Update CPA(CPA, var)
9 Assign Val(CPA)
10 else
11 var = true
12 Update CPA(CPA, var)
13 if var has no higher priority neighbors then
14 Assign Val(CPA);
15 else
16 send Envy Request to all higher priority
neighbors
Figure 6: Assign Val(CPA).
1 Envy Calc Envy(CPA)
2 Envy List.put(agent,Envy)
3 Global Envy Calc Global Envy(Envy List)
4 if Global Envy U pper Bound then
5 Backtrack(CPA)
6 else
7 if Last Agent then
8 U pper Bound Global Envy
9 Backtrack(CPA)
10 else
11 send CPA message to next agent
Figure 7: Agent Assignment Complete(CPA).
When an agent reaches a full Agent Assignment
(Figure 7), the agent calculates its envy against all
higher priority agents (line 1). The global target func-
tion is then calculated based on the envy of the agent
and all its higher priority agents (line 3). if the up-
per bound known for the global target function is
breached, we do not need to proceed, and Backtrck()
DistributedEnvyMinimizationforResourceAllocation
19
is called (lines 4–5). Otherwise, if this is the last
agent, a new upper bound is registered, and a Back-
Trak() is called (lines 7–9). If this is not the last agent
then the CPA message is sent to the next agent (line
11).
Upon Backtrack() (Figure 8), if a backtrack is
needed to a higher priority agent, then, if this is the
first agent, the algorithm terminats (lines 3–5), and if
not, a Backtrack message is sent. If the backtrack is to
another variable in the agent then if the current vari-
able is already assigned f alse, or if there is no lower
priority agent that can take the relevant resource (line
9), there is no valid assignment for the variable and we
need to backtrack further (lines 10–11). If the variable
is assigned true and there is some lower priority agent
that can take the resource, the variable gets f alse and
we proceed to assign the next variable (lines 13–14).
1 var = last assigned variable
2 if var is first variable then
3 if Initializing Agent then
4 Done true
5 send terminate message to all agents
6 else
7 send Backtrack message to previous agent
8 else
9 if var == f alse or var has no lower priority
neighbors then
10 remove var from CPA
11 Backtrack(CPA)
12 else
13 var = f alse
14 Assign val(CPA)
Figure 8: Backtrack(msg).
In response to an Envy Request message (Figure
9) the agent calculates its envy against the CPA in the
message, and sends it back to the requesting agent
(lines 2–3). When an Envy Report message is re-
ceived (Figure 10), the Envy List is updated with the
new envy. If the Envy Reports of all higher priority
agents were received, the global envy target function
is calculated and compared to the known upper bound
(lines 3–4). If the upper bound was breached a back-
track is issued, otherwise we proceed to assign the
next variable.
1 CPA msg.CPA
2 Envy calc envy to CPA
3 send back Envy Report message
Figure 9: Receive Envy Request(msg).
1 Envy List.put(msg.sender, msg.envy)
2 if Envy Report received from all higher priority
neighbors then
3 Global Envy Calc Global Envy(Envy List)
4 if Global Envy U pper Bound then
5 Backtrack(CPA)
6 else
7 Assign Val(CPA)
Figure 10: Receive Envy Report(msg).
3.3 Forward Estimate - DEM-FE
Upon receiving an Envy Request message from a
lower priority neighbor, an agent a
i
calculates its envy
toward all agents on the CPA (Figure 9 line 2). How-
ever, there may be resources with positive utility to a
i
which are not yet allocated to any agent on the CPA.
Since eventually all resources will be allocated, if the
utility of a
i
for any of the resources not allocated on
the CPA is larger than the bundle of any agent on the
CPA, this can be used as a better bound on the envy of
a
i
. Note that since and does not know how resources
not currently assigned on the CPA would be allocated,
one can only consider the utility of each resource by
itself, and not the utility of bundles of unallocated re-
sources.
In order to incorporate the Forward Estimate (FE)
capability, the only change needed is in the Re-
ceived Envy Request() function. Figure 11 presents
the enhanced function. Line 3 loops through all re-
sources r
j
for which agent a
i
has a non zero utility ,
and are not yet allocated. For each of them, if the util-
ity of agent a
i
(r
j
) is higher than the calculated envy
(line 4), the envy is updated accordingly (line 5).
1 CPA msg.CPA
2 Envy calc envy to CPA
3 foreach r
j
not in CPA do
4 if u
i
(r
j
) > Envy then
5 Envy u
i
(r
j
)
6 send back Envy Report message
Figure 11: Receive Envy Request(msg)-FE.
3.4 Forward Bounding - DEM-FB
Forward Bounding is a method in which agents send
the CPA to lower priority, unassigned agents, and re-
ceive bounds on what the valuation of these lower pri-
ority agents may be if the CPA will be extended to the
responding agents. Though this method increases the
computation and communication needed for assign-
ing a new value, it may lead to a better pruning of the
search space. Forward bounding have been shown to
ICAART2013-InternationalConferenceonAgentsandArtificialIntelligence
20
give a significant boost in DCOP algorithms (Gersh-
man et al., 2009). In this section we show how for-
ward bounding can be added to the distributed envy
minimization algorithm described above.
The adaptation that is required is in the function
Assign Val(). Here we need to send Envy Request
(Figure 6 line 16) to all neighbors and not only to
higher priority ones. In the same way in function Re-
cieve Envy Report (Figure 10 line 2), the condition
needs to be modified to wait for Envy Reports from
all neighbors.
The last modification needed is in the envy com-
putation done by lower priority agents receiving an
Envy Request message. Since a lower priority agent
receiving an Envy Request does not have its variables
assigned yet, it can only give a bound on its envy. The
highest evaluating bundle that such an agent may be
allocated by extending the current CPA would be all
resources not already allocated on the CPA. So the
agent computes its envy based on the assumption that
its allocation would be composed of not yet allocated
resources.
The new Receive Envy Request() routine is de-
scribed in Figure 12. In line 2 the agent checks if
the Envy Request was originated by a higher priority
agent. If it was (line 3), the agent assumes its assign-
ment is all the resources currently unassigned on the
CPA. The Envy is computed (line 4) based on either
the agent assignment on the CPA (in case of a higher
priority agent) or on the tentative assignment (in case
of a lower priority one).
1 CPA msg.CPA
2 if msg.sender is higher priority agent then
3 My Tentative Assignment all unassigned
resources
4 Envy calc envy to CPA
5 foreach r
j
not in CPA do
6 if u
i
(r
j
) > Envy then
7 Envy u
i
(r
j
)
8 send back Envy Report message
Figure 12: Receive Envy Request(msg)-FB.
3.5 Envy Target Functions
The algorithms in sections 3.2, 3.3 and 3.4 can sup-
port all target functions of section 2.2. Supporting ab-
solute envy measures or relative ones will require the
correct envy calculation in Receive Envy Request()
(Figure 9, line 2), and similarly Agent Assignment-
Complete() (Figure 7, line 1).
A Utilitarian envy minimization is achieved
by setting the global envy calculation in Re-
ceive Envy Report() (Figure 10, line 3) and in
Agent Assignment Complete() (Figure 7, line 3) to
be the sum of the envy of all agents. An Egalitarian
global envy will require setting the same global envy
calculation to be the maximum of the minimal envy
among all agents.
In order to minimize the number of agents with
non zero envy, one can use a global envy calculation
that adds 1 for every agent that has a non zero individ-
ual envy. Requiring an Envy Free solution is identical
to minimizing the number of envious agents with the
U pper Bound set to 1.
4 ALGORITHM CORRECTNESS
To prove the algorithm’s correctness, one first proves
that it terminates and then proves that upon termina-
tion the value of the upper bound is the optimal envy
(completeness).
To prove that the algorithm terminates one needs
to prove that it will never go into an endless loop. To
do so, one needs to consider the algorithm’s state. A
state s
i
S
i
includes all agents, their variables and
current assignment. The following Lemma proves
that the same state is not generated more than once.
Lemma 1 (Unique States). A state S is never re-
peated.
Proof. Assume by negation that some partial assign-
ment
{h
a
1
,v
1
i
...
h
a
l
,v
k
i}
= S
lk
has bean duplicated.
There is some agent a
i
(1 i l) who is holding the
CPA and by assigning
a
i
,v
j
on it, generates for the
first time the duplicate partial assignment. Clearly,
being the first duplication of the CPA means that a
i
is
the highest in the order of agents to assign itself the
same assignment for the second time, with the same
partial assignment before it.
Any new assignment added to the CPA is selected
in the Assign Val function. This function is invoked
from either one of the following functions:
main() - This function only invokes Assign Val
once - at the beginning of the run. Hence it can-
not cause the same state to be produced more than
once.
Receive CPA() - The Receive CPA() function
is invoked whenever a higher priority agent a
j
(where j < i) sends a CPA message to a
i
(line 8
of main()). A duplicated CPA generated by a
i
in-
cludes the same assignments to all of its variables
and therefore the first j assignments must be the
same. This contradicts the assumption that a
i
is
the first agent which repeats a state.
DistributedEnvyMinimizationforResourceAllocation
21
Backtrack() - If Assign CPA() is invoked follow-
ing line 14 of Backtrack(), line 13 was also ex-
ecuted. Specifically, a variable that had a true
value, is now set to f alse. As a result, As-
sign Val() can never generate a duplicate CPA,
which contradicts our assumption.
Theorem 1 (Termination). Every run of the algo-
rithm terminates.
Proof. The algorithm will terminate if the following
conditions hold:
The number of states it goes through is finite.
It does not examine the same state more than once.
The algorithm maintains progress. That is, it
moves from one state to another within a finite
amount of time.
The first condition is trivially met by the fact that
the number of agents and the number of resources
are finite. The second one immediately follows from
Lemma 1.
Consider the state s
a
S
i
. This state can pro-
ceed to some other state s
b
S
i
whenever the As-
sign
CPA() and Receive BT CPA() functions are ex-
ecuted (assigning true or f alse to a variable) by
some agent. The only situation in which the al-
gorithm does not move trivially to the next state is
when the algorithm asks for Envy valuation of its
neighbors following an assignment (Assign val() line
16). In this case Envy Request will be sent to all
neighbors and the agent will wait for new messages
to arrive. However, since every agent receiving an
Envy Request responds to it by an Envy Report (Re-
ceive Envy Request() line 3), the agent assigning the
new value is guarantied to receive Envy Reports mes-
sages from every neighbor. This will result in ei-
ther Backtrack() or a new Assign Val() call in Re-
ceive Envy Report() lines 5 an 7 respectively.
To prove completeness one needs to prove that the
value returned upon completion is indeed the optimal
envy for a full allocation. We start by proving a mono-
tonicity characteristic of the CPA.
Lemma 2 (CPA Monotonicity). Any extension of a
CPA whose current envy is higher than a given upper
bound will also be higher than that upper bound.
Proof. The proof is divided into two parts. First one
needs to show that the envy between two agents can-
not decrease when the CPA is extended. Then, one
shows that for the set of global target functions, global
envy cannot decrease unless some agent’s envy de-
creases.
The envy between two agents can be mea-
sured between a fully assigned agent and any
other agent (Agent Assign Complete() line 1 or Re-
ceive Envy Request() line 2). Alternatively, envy
can be measured between an unassigned agent and
any other agent (in case of forward bound Re-
ceive Envy Request() line 4). For the first option, due
to the fact that utilities are super-modular, and since
a CPA extension can only add resources to agents
that were not fully assigned, the envy of them can-
not decrease. The second option deals with the for-
ward bounding mechanism which assumes that agents
will be allocated all available resources (see 12 line
3). Any extension of the CPA cannot result in the fu-
ture agent getting more resources than was assumed,
and due to super-modularity cannot result in a higher
utility, which means that its envy can only increase.
For the scope of this paper three global target
functions are considered: 1) the number of envious
agents 2) the sum of envy of all agents 3) the envy of
the agent that has the highest envy (see section 2.2). It
is easy to see that for any of these target functions for
the global envy to decrease, the envy of at least one
agent must decrease.
We now prove the completeness of the algorithm.
Proof. Upon termination the result is the upper bound
and the allocation that produced this upper bound.
One needs to prove that the last reported upper
bound is the minimal envy. Every full allocation
envy is compared to the known upper bound (in
Agent Assignment Complete line 4), and if it is
lower, the upper bound is replaced by the new value
(same place line 8). One needs to show that every
allocation that will improve the upper bound will be
checked.
If a full allocation is not checked, then it must have
been pruned in the search process by backtracking on
one of its possible partial assignments. For this not to
violate completeness two conditions need to hold:
Every CPA not extended has a higher global envy
valuation than the upper bound.
Every potential extension of a CPA not extended
will have a higher global envy valuation than the
upper bound.
For the first condition to hold we observe that a
CPA is not extended only if a Backtrack() was called
for the given CPA. A Backtrack() is called from the
following locations:
Agent Assignment Complete() line 9 - called
only after the CPA envy is checked against the up-
per bound (lines 1–4).
ICAART2013-InternationalConferenceonAgentsandArtificialIntelligence
22
Receive Envy Report() line 5 - conditioned on the
CPA envy exceeding the upper bound (line 4).
Backtrack() line 11 - this recursive call for Back-
track() is conditioned on the fact that the CPA can-
not be extended. Either because the relevant vari-
able is already assigned false, or that if the rele-
vant variable will not get the resource allocated to
it, no other variable can get it (line 9).
The second condition follows immediately from
Lemma 1 and 2.
5 EXPERIMENTAL EVALUATION
Two performance measures are routinely used to eval-
uate distributed search algorithms: network load mea-
sured by the total number of messages sent (Lynch,
1996; Yokoo, 2000) and run-time in the form of Non-
Concurrent Logic Operations (NCLOs) (Zivan and
Meisels, 2006). In DCOPs the measure of NCLO usu-
ally translates to Non-Concurrent Constraint Checks.
For envy minimization the logic operation is taken to
be the evaluation of utility of a bundle of resources.
The first experimental setup included 10 agents,
15 resources and the number of resources per agent
was varied between 5 and 8. The utility functions
where additive and each agent randomly assigned a
value in the range of 1–100, to each resource it was
interested in. Each agent was randomly assigned re-
sources it was interested in. The envy between two
agents was taken to be the absolute envy, and the
global optimization goal was the egalitarian social
welfare function.
Figure 13 shows a comparison of DEM, DEM-FE
and DEM-FB. Each point in the graph represents the
average result for 50 randomly generated problems.
The graph clearly demonstrates the pruning power
of forward bounding, resulting in better performance
of DEM-FB in both total message count and NCLO
time.
The second experiment (Figure 14) included 10
agents and 15 resources, 5 resources per agent and
the number of agents was varied from 10 to 14. As
before, utility functions where additive and each agent
randomly assigned a value in the range of 1–100 to
each resource it was interested in. One can see that the
performance enhancements between DEM and DEM-
FE and between DEM-FE and DEM-FB, resemble the
enhancements observed in the first experiment.
0.0E+00
5.0E+06
1.0E+07
1.5E+07
2.0E+07
2.5E+07
3.0E+07
3.5E+07
4.0E+07
4.5E+07
5
6
7
8
Total messages
Number of resources per Agent
DEM
DEM-FE
(a)
0.0E+00
1.0E+07
2.0E+07
3.0E+07
4.0E+07
5.0E+07
6.0E+07
7.0E+07
8.0E+07
9.0E+07
1.0E+08
5
6
7
8
NCLO
Number of resources per Agent
DEM
DEM-FE
DEM-FB
(b)
Figure 13: Algorithms comparison, 10 agents, 15 resources,
number of resources per agent varies from 5 to 8.
0.0E+00
1.0E+07
2.0E+07
3.0E+07
4.0E+07
5.0E+07
6.0E+07
10
11
12
13
14
Total messages
Number of Agents
DEM
DEM-FE
DEM-FB
(c)
0.0E+00
2.0E+07
4.0E+07
6.0E+07
8.0E+07
1.0E+08
1.2E+08
1.4E+08
1.6E+08
10
11
12
13
14
NCLO
Number of Agents
DEM
DEM-FE
DEM-FB
(d)
Figure 14: Number of agents varied from 10 to 14.
6 CONCLUSIONS
The problem of envy minimization among agents that
are assigned indivisible resources has been formu-
DistributedEnvyMinimizationforResourceAllocation
23
lated and a distributed algorithm for finding an alloca-
tion that minimizes envy among agents has been pro-
posed. Envy minimization generalizes the envy free-
ness idea, which does not exist in general for the allo-
cation of indivisible resources.
The Distributed Envy Minimization (DEM) algo-
rithm has been proven correct, and two extensions
presented. One uses Forward Estimation to bound
the amount of potential envy by unassigned agents
(DEM-FB). The other extension bounds envy by
considering potential allocation to unassigned agents
(DEM-FE).
Several global target functions are described, from
minimizing the sum of the total envy of all agents, to
the amount of envy of the most envious agent ( the
Egalitarian version of envy minimization).
All algorithms have been evaluated empirically
on randomly generated distributed envy minimiza-
tion problems. The DEM-FB algorithm performs
best on the random resource allocation problems that
were generated, in both performance measures: non-
concurrent run-time and network load. The results
hold consistently both for a range of number of agents
and for a range of number of resources.
REFERENCES
Asadpour, A. and Saberi, A. (2007). An approximation
algorithm for max-min fair allocation of indivisible
goods. In STOC, pages 114–121.
Bouveret, S. and Lang, J. (2008). Efficiency and envy-
freeness in fair division of indivisible goods: Logi-
cal representation and complexity. J. Artif. Intell. Res.
(JAIR), 32:525–564.
Brams, S. J. and Taylor, A. D. (1996). Fair division - from
cake-cutting to dispute resolution. Cambridge Univer-
sity Press.
Chevaleyre, Y., Endriss, U., Estivie, S., and Maudet, N.
(2007). Reaching envy-free states in distributed ne-
gotiation settings. In IJCAI, pages 1239–1244.
Endriss, U., Maudet, N., Sadri, F., and Toni, F. (2006). Ne-
gotiating socially optimal allocations of resources. J.
Artif. Intell. Res. (JAIR), 25:315–348.
Gershman, A., Meisels, A., and Zivan, R. (2009). Asyn-
chronous forward bounding. Journal of Artificial In-
telligence Research, 34:25–46.
Grubshtein, A., Grinshpoun, T., Meisels, A., and Zivan, R.
(2009). Asymmetric distributed constraint optimiza-
tion. In IJCAI-09, Pasadena.
Hirayama, K. and Yokoo, M. (1997). Distributed partial
constraint satisfaction problem. In Proc. 3rd Intern.
Conf. Princ. Pract. Const. Prog. (CP-97), pages 222–
236.
Kleinberg, J. M., Rabani, Y., and Tardos,
´
E. (2001). Fair-
ness in routing and load balancing. J. Comput. Syst.
Sci., 63(1):2–20.
Larrosa, J. and Meseguer, P. (1996). Phase transition in
max-csp. In Proc. 12th European Conference on Ar-
tificial Intelligence (ECAI-96), pages 190–194, Bu-
dapest, Hungary.
Lee, C. Y., Moon, Y. P., and Cho, Y. J. (2004). A lex-
icographically fair allocation of discrete bandwidth
for multirate multicast traffics. Computers & OR,
31(14):2349–2363.
Lipton, R. J., Markakis, E., Mossel, E., and Saberi, A.
(2004). On approximately fair allocations of indivis-
ible goods. In ACM Conference on Electronic Com-
merce, pages 125–131.
Lis
´
y, V., Zivan, R., Sycara, K. P., and Pechoucek, M.
(2010). Deception in networks of mobile sensing
agents. In 9th Intern. Conf. Auton. Agents Mult. Sys.
(AAMAS-10), pages 1031–1038, Toronto, Canada.
Lynch, N. A. (1996). Distributed Algorithms. Morgan
Kaufmann.
Maheswaran, R. T., Tambe, M., Bowring, E., Pearce, J. P.,
and Varakantham, P. (2004). Taking DCOP to the
real world: Efficient complete solutions for distributed
multi-event scheduling. In 3rd Intern. Joint Conf. Au-
ton. Agents Mult. Sys. (AAMAS-04), pages 310–317,
New York, USA.
Meisels, A. (2007). Distributed Search by Constrained
Agents: Algorithms, Performance, Communication.
Springer Verlag.
Moulin, H. (1988). Axioms of Cooperative Decision Mak-
ing. Cambridge University Press.
Netzer, A., Grubshtein, A., and Meisels, A. (2012). Concur-
rent forward bounding for distributed constraint opti-
mization problems. Artificial Intelligence, 193(0):186
– 216.
Rosenschein, J. S. and Zlotkin, G. (1994). Rules of En-
counter - Designing Conventions for Automated Ne-
gotiation among Computers. MIT Press.
Stranders, R., Farinelli, A., Rogers, A., and Jennings, N. R.
(2009). Decentralised coordination of continuously
valued control parameters using the max-sum algo-
rithm. In Proc. 8th Intern. Joint Conf. Auton. Agents
Mult. Sys. (AAMAS-09), pages 601–608, Budapest,
Hungary.
Vetschera, R. (2010). A general branch-and-bound algo-
rithm for fair division problems. Computers & OR,
37(12):2121–2130.
Yeoh, W., Felner, A., and Koenig, S. (2010). BnB-
ADOPT: An asynchronous branch-and-bound DCOP
algorithm. Jour. Artif. Intell. Res. (JAIR), 38:85–133.
Yokoo, M. (2000). Algorithms for distributed constraint sat-
isfaction problems: A review. Autonomous Agents and
Multi-Agent Systems, 3:198–212.
Zivan, R. and Meisels, A. (2006). Message delay and
DisCSP search algorithms. Annals of Mathematics
and Artificial Intelligence (AMAI), 46:415–439.
ICAART2013-InternationalConferenceonAgentsandArtificialIntelligence
24