Fair decomposition of group obligations

We consider the problem of decomposing a group norm into a set of individual obligations for the agents comprising the group, such that if the individual obligations are fulﬁlled, the group obligation is fulﬁlled. Such an assignment of tasks to agents is often subject to additional social or organisational norms that specify per-missible ways in which tasks can be assigned. An important role of social norms is that they can be used to impose ‘fairness constraints’, which seek to distribute individual responsibility for discharging the group norm in a ‘fair’ or ‘equitable’ way. We propose a simple language for this kind of fairness constraints and analyse the problem of computing a fair decomposition of a group obligation, both for non-repeating and for repeating group obligations.


Introduction
Norms have been widely proposed as a means of achieving coordination and guaranteeing desirable system-level properties in multi-agent systems (MAS).Much of the literature on normative MAS has focussed on obligations and prohibitions associated with roles in an organisational structure or directed to individual agents (see, for example, [17]).However, many norms apply to groups of agents rather than to an agent enacting a role, or a particular agent in a MAS.For example, the members of the programme committee for a workshop may have a collective obligation to review the papers submitted to the workshop, or the occupants of a shared apartment may have an obligation to keep the apartment clean (e.g., as part of the rental agreement).Such group norms specify a sequence of actions that should be performed by members of the group, leaving the details of how the norm is to be complied with to the members of the group themselves.In general, there will be many possible ways to comply with a group norm, i.e., several different assignments of agents to particular tasks.Each assignment gives rise to a set of individual obligations that specify what each agent should do in order to discharge the group obligation.(Note that this paper will focus on ought-to-do norms, rather norms for ought-to-be.The two are closely related, see e.g., [16]).
The assignment of agents to tasks specified by a group norm is often subject to additional social or organisational norms that specify permissible ways in which tasks can be assigned.An important type of social norms are 'fairness constraints', that seek to distribute individual responsibility for discharging the group norm in a 'fair' or 'equitable' way.For example, there may be a constraint that no single agent should be required to do all the work necessary to discharge the group norm, or that no agent should have to do a particular task more than once a week, etc. The social norms codifying what counts as 'fair' vary from organisation to organisation.For example, in some computer science departments, all members of academic staff may be assigned teaching duties, while in other departments, more senior academics are not obliged to teach.A key problem in normative MAS with group norms is determining whether a particular task allocation is both effective (i.e., it discharges the group norm) and fair, in the sense of respecting the social norms or fairness constraints in force within the organisation of which the group is a part.
This paper builds upon and extends [4], in which we made a first step towards defining the notion of a fair decomposition of a group obligation into individual obligations for agents in the group.In [4], a group obligation is considered to be a sequential or parallel composition of actions that have to be performed by the agents in the group, either once or repeated indefinitely (for example, the obligation to keep the household running involves repeated execution of the same sequence of cleaning, cooking etc. actions).In this paper, we generalise this by relaxing the requirement of a fixed sequence of actions to allow disjunctions over different orders of executing actions.We generalise results from [4] to this new setting, and prove new results (Theorem 3).We also give additional examples and expand related work.As in [4], we show how to specify agents' individual offers to contribute to a group norm, and analyse the problem of producing a set of individual obligations for the agents in the group, such that if those individual obligations are fulfilled, the group obligation is fulfilled (i.e., an implementation of the group norm).We propose a simple language for fairness constraints and analyse the problem of computing a fair implementation of a group obligation, for both non-repeating and repeating group obligations.We also address the notion of minimality: an implementation should not unnecessarily demand contributions from agents.
The structure of the paper is as follows.In Section 2 we introduce the formal preliminaries, including the formal language we use to talk about group obligations and the structures used to interpret the language.In Section 3 we introduce the basic setting of non-repeating group obligations and prove that the problem of whether an implementation of a group norm exists is NP-complete.We also analyse the problem of the existence of minimal and fair implementations.In Section 4 we analyse similar problems for repeating group obligations.We place our work in the context of existing research in Section 5 and discuss future work in Section 6.

Formal setting
Several approaches to norms have been proposed in the literature, including state-based norms (where norms are defined in terms of states that should or should not occur), e.g., [25], and event or action-based norms (where norms are defined in terms of what agents should or should not do), e.g., [20,14].In this paper we take an action-based view of norms, in which norms are interpreted as specifying a sequence of actions (possibly containing gaps) that should occur, either once or repeatedly. 1  We work in a propositional language of linear-time temporal logic.We assume that we have a set of propositional variables P rop that, in addition to 'normal' propositional variables such as c for 'the room is clean', contain a special kind of variables of the form done(a, i), where a is a type of action from a set of actions Ac (which includes the noop action skip) and i is the name of an agent in the set of agent names Ag = {1, . . .n}. Intuitively, done(a, i) is true in a state if immediately before that state, agent i has performed action a.
The syntax of Linear Time Temporal Logic (LTL), see, e.g., [30], is defined as follows: φ, ψ where p ∈ P rop, means next state, and U means until.
Definition 1.A transition system for a set Ag of n agents and a set Ac of actions is a tuple S, R, V, s I , where • S is a non-empty set of states; • R ⊆ Ac n × S × S. Intuitively, ( a 1 , . . ., a n , s, s ) ∈ R means that there is a transition from s to s which corresponds to actions a 1 , . . ., a n executed by agents 1, . . ., n in parallel.(For a = a 1 , . . ., a n ∈ Ac n , we will write (s, s ) ∈ R a instead of ( a, s, s ) ∈ R); • V : S × P rop → {true, f alse} assigns a truth value to each proposition in each state; • s I ∈ S is the initial state.
In addition, the following conditions are satisfied: 1 State-based norms require a state of affairs to be achieved rather than particular actions to be executed.Grossi et al [23] argue that a complex action or plan may be seen as equivalent to an action of the form achieve(α) where α is a state of affairs.This means that action-and state-based norms can be considered equivalent on the assumption that there is a single agreed action or sequence of actions that achieves the desired state.The first condition is a standard simplifying condition for temporal logics [30].A transition system that does not satisfy it can easily be transformed into one where all states with no outgoing transitions have a self-loop that can be interpreted as a no-op skip action performed by each agent.(To be precise, to satisfy Condition (1), from the terminal state we add a skip link to a new state which has a skip link to itself.)Condition (2) requires that for each state there should be a unique tuple of actions by all agents that produces it (note this is not the same as requiring that each state has a unique predecessor state; it is possible that (s 1 , s) ∈ R a and (s 2 , s) ∈ R a , s 1 = s 2 , however a is the unique tuple of actions generating s).Conditions (2) and (3) are related and are imposed in order to be able to correctly interpret propositions of the form done(a i , i) which mean that agent i has just executed action a i .Together, (2) and (3) imply that for each state s and agent i, there is at most one action a such that done(a, i) holds in s.This is also a standard feature in agent logics, for example [15], that need to be able to express which action or event causes the current state.Again, it is easy to transform any transition system into a system that satisfies condition (2), by unravelling it [7].
Note that our transitions between states is general, in the sense that we assume each agent to contribute to the transition (more precisely, in R, each agents chooses an action).Here again, the no-op skip action can be of use, this time to model nonparallel actions, or actions that are performed by only a subset of the agents (the others perform skip, i.e., they wait. For example, consider the transition system on the left in Figure 1 (with a single agent 1).There are no actions executable in s, so condition (1) is violated.If the agent executes action a in s I , the resulting state is s, and the same holds if the agent executes action b.So condition (2) is also violated.We can transform the system to the system on the right in Figure 1 that encodes the same information but has a successor for every state and allows us to make an assignment to action propositions done(a, 1) and done(b, 1) in a meaningful way.In the new system, t 1 and t 2 have the same propositional assignment as s apart from the action propositions, and t 3 and t 4 have the same assignment (apart from satisfying the action proposition done(skip, 1) where skip stands for the no-op action).Given a transition system M = (S, R, V, s I ), a path through M is a sequence s 0 , s 1 , s 2 , . . . of states such that (s i , s i+1 ) ∈ R a for i = 0, 1, 2, . ... A fullpath is a maximal path (where every element in the sequence has a successor) and a run of M is a fullpath which starts from a state s I ∈ S. We denote runs by ρ, ρ , . . ., and the state at position i on ρ by ρ[i].
The truth definition for formulas is given relative to a model, a run ρ and the state at position i on ρ: Other boolean connectives are defined as usual, for example φ → ψ := ¬(φ ∧ ¬ψ).3φ (some time in the future) is defined as Uφ, 2φ (always in the future) is defined as ¬3¬φ.We use m , m ∈ N, to denote a sequence of modalities of length m.

Non-repeating norms
In this setting, a group obligation specifies a sequence of actions that should be performed collectively by a group of agents.Each step in the sequence specifies some actions that must be performed in parallel by the agents in the group.We allow actions that must be performed by more than one agent simultaneously, e.g., if two agents are necessary to move a table.The obligation specifies what must be done, and in which order; however it does not specify which actions should be performed by each agent in the group.For example a group of agents may be required to clean a room, where 'cleaning the room' is interpreted as "some agent has to vacuum the room and some agent has to do the dusting".We also consider group obligations where the order of actions is not specified, but the number of times or frequency of some action is; for example, someone has to water the plants twice a week (at least two days apart).This can be easily expressed as a disjunction of group obligations of the first kind (the plants have to be watered on Monday and Thursday, or on Monday and Friday, or on Monday and Saturday, or on Monday and Sunday, or on Tuesday and Friday, etc.).
We assume that each agent in the group proposes one or more individual contributions to implementing the group norm.Each contribution specifies a set of actions the agent is prepared to perform in order to discharge the group norm.For example, an agent may specify that it is prepared to vacuum but not to dust.Where the group obligation specifies that the same action must be performed several times, we allow an agent's individual contribution to specify the maximum number of times the agent is prepared to perform the action.For example, if a group obligation for a week in a shared house involves cooking dinner each evening, an agent may specify that it is prepared to cook dinner at most twice during the week.
Before giving formal definitions of group norms and individual contribution schemes, we need some abbreviations.Let hapd(a 1 . . .a m ) (where {a 1 , . . ., a m } is a multiset of actions) stand for actions 'a 1 , . . ., a m were executed in parallel'.This is definable as If A = {a}, we write hapd(a) for hapd(A).Moreover, hapd(∅) is defined as true.

.))
where each A i is in the scope of i nested operators.In particular, Note that in this definition, the actions start 'tomorrow' rather than 'now', which is more or less an arbitrary decision, made for convenience.Finally, to allow expression of additional constraints such as 'watering plants should happen twice during the week, at least two days apart', we allow disjunctions of haps(A p −1 (1) ; . . .; A p −1 (N ) ) for all possible permutations p of multisets of actions A 1 , . . ., A N which satisfy some simple condition.A permutation is a bijection p : {1, . . ., N } → {1, . . ., N } which shuffles the multisets of actions in the sequence, that is, it changes their position, but does not alter them internally, or their multiplicity in the sequence.For a permutation p, we will abuse notation and write p(A 1 , . . ., A N ) to denote A p −1 (1) ; . . .; A p −1 (N ) .Consider the plant watering example.One sequence of executions that satisfies this norm is haps(w; ∅; ∅; w; ∅; ∅; ∅).A possible permutation p of {1, . . ., 7} sends 1 to 2, 2 to 3, . . ., 7 to 1; thus, p(w; ∅; ∅; w; ∅; ∅; ∅) = ∅; w; ∅; ∅; w; ∅; ∅.This satisfies the constraint that the distance between the two occurrences of w is at least 2: |p(1) − p(4)| > 2 (since p(1) is 2 and p(4) is 5).Another permutation sends 2 to 4 and 4 to 2, and leaves all other indices the same.It results in w; w; ∅; ∅; ∅; ∅; ∅, which does not satisfy the constraint.To sum up, the norm can be expressed as haps(p(w; ∅; ∅; w; ∅; ∅; ∅)) Definition 2 (Non-repeating group norms).Given N ∈ N, a group norm η is defined as follows: where p is a permutation, and cond(p) is a conjunctive condition on p expressed in terms of arithmetic operators, equality, inequality, and natural numbers between 1 and N .
We write group norms of the form (where p is an identity function) as and refer to them as non-disjunctive norms.
Again, the obligation starts being executed 'tomorrow' rather than 'at some point in the future'.All formal results in the paper would hold if we used 3 p:cond(p) haps(p(A 1 ; . . .; A N )) instead.
Example 1. Two flatmates need to decide who contributes in which way to the tasks of dusting (d), doing groceries (g), vacuum cleaning (v) and watering the plants (w) for the next week: η = haps(w g; d v; ∅; w; ∅; d; ∅) That is, on Monday groceries and watering need to be done, on Tuesday, dusting and vacuuming, on Thursday the plants need to be watered again, and on Saturday dusting needs to be done.There are no constraints for Wednesday, Friday, and Sunday.
Note that ∅ means that no actions are required to be performed, so the agents can perform any action at this point in the sequence and still comply with the norm.In this paper, we are only concerned with obligations, and not with prohibitions on executing actions.We can extend the framework to prohibitions by using ¬done(a, i) expressions.
We will use do(a, i) m to indicate that i is prepared to perform a at most m times: Definition 3 (Individual contribution schemes).Given an agent i, an individual contribution scheme D i is defined as C j i (with j ranging over disjuncts) where where n j k ∈ N is the number of times i is prepared to perform a k as part of the offer C j i .We will refer to C j i as individual contribution offers or simply offers.
Sometimes we will treat D i as a set and write Each C i specifies a possible combination of actions i is prepared to contribute and does not refer to actions by other agents.For example, do(a, i) 2 ∧ do(b, i) 1 is an offer by agent i to execute action a at most twice and action b at most once.
Example 2 (Example 1 continued).Consider the following offers by the agents: The offer C 1 1 = D 1 expresses that agent 1 does not mind doing the groceries and the watering, but is prepared to do the chores of dusting and vacuuming at most once.Agent 2 (with individual contribution scheme ) is willing to either do the groceries once (C 1 2 ), or to do the dusting once and watering twice (C 2 2 ).
Note that there is a gap between a group norm and the offers of the agents, in the sense that although the agents may offer to perform all the actions needed for the group norm, in order for the group norm to be discharged, the agents need to synchronise and commit to performing actions at particular times.An implementation of a group obligation is a set of individual obligations that particular agents should perform a subset of the actions specified in one of their individual contribution offers (this is called a complete decomposition of the group obligation in [23]).Clearly an implementation should be effective, that is, if the agents discharge their individual obligations, the group norm is also discharged, and minimal, i.e., it should not create individual obligations unnecessarily.
We introduce two types of individual obligation O i .The first kind of obligation makes sense when an action that needs to be performed by an agent has to be performed in any case, regardless of whether the preceding actions have been performed.

Definition 4 (Unconditional individual obligation
).An unconditional obligation for i is a formula of the form j done(a, i), where j is a positive natural number.
Intuitively, j done(a, i) denotes an obligation to perform a at step j.The second kind of individual obligation is similar to those considered in [23].They make sense for actions whose preconditions are created by the preceding actions.For example, where an agent is required to decorate a house and the action of decorating can only be carried out if other agents build the house first.In this case, it does not make sense to require the agent assigned to the decorating task to execute it unconditionally.

Definition 5 (Conditional individual obligation). A conditional obligation for i is a formula of the form
That is, i has an individual obligation to do a if the group obligation haps(A 1 ; . . .; A m ) is discharged.
An individual obligation O i for agent i is a conjunction of unconditional and conditional individual obligations for i.
Given a tuple of individual obligations by agents in a group G (consisting of k agents), O G = O 1 , . . ., O k , we will identify O G with the conjunction of those O i 's.We say that O G respects the individual offer Essentially this means that O G does not require i to perform each action a more than the maximal number of times specified by C j i .
Definition 6 (Implementation of a norm).Given a group norm η = η , a set of agents G ⊆ Ag and their individual contributions Note that the first action A 1 in any implementation of a group obligation haps(A 1 ; . . .; A N ) can be implemented only by unconditional obligations.Note also that if O G is an implementation of η, then O G is logically equivalent to a conjunction of unconditional obligations.

Example 3 (Examples 1 and 2 continued.).
There is no implementation that implements η using the contributions C 1 1 and C 1 2 , because on Tuesday both the dusting and the vacuuming would have to be performed by agent 1, which is impossible given Definition 1 (condition 2): done(d, 1) and done(v, 1) cannot hold in the same state since d and v are different actions.On the other hand, we can assign all individual actions to agents consistently using C 1 1 and C2 2 : agent 1 is assigned g on Monday, v on Tuesday, w on Thursday, and d on Saturday.This is consistent with its offer C 1 1 .Agent 2 is assigned w on Monday and d on Tuesday; this is consistent with its offer C 2 2 .The individual obligation for agent 1 is g done(g, 1) ∧ g 2 done(v, 1) ∧ g 4 done(w, 1) ∧ g 6 done(d, 1) and for agent 2 g done(w, 2) ∧ g2 done(d, 2).Together both obligations entail η.Call this implementation I 1 .There is one other implementation, I 2 , which is as I 1 except that it assigns the watering task on Thursday to agent 2.
In order to compute individual obligations, and hence an implementation of a group norm η, we also need an auxiliary notion of an assignment of agents to actions in η.Essentially, given a group norm η and a set of agent offers, an assignment specifies which agent is asked to perform which individual action in η, and which agent offer justifies the assumption that the agent is willing to perform the assigned action.Definition 7 (Assignment).An assignment of agents in G ⊆ Ag to actions in η = p:cond(p) haps(p(A 1 ; . . .; A N )) is a function f that for some disjunct η = haps(p(A 1 ; . . .; A N )), for every A j = ∅ in η assigns an agent i ∈ G and a contribution C i to every element a of A j subject to the following constraints: and a = b or l = l , then i = k (only one action can be executed by the agent i in a single transition); and If the agents' offers are specified by then the following function describes an assignment: • • f (w, 4, w, 1) = (1, C 1 1 ) It is clear that f above is a function (it assigns a value to every component of every joint action in η apart from ∅).Condition C1 holds since no agent i is assigned two different actions to perform at the same step (for the same joint action in η).Condition C2 holds: agent 1 is assigned g, v, w and d to perform, which is consistent with its offer to perform each of these actions at least once (more often for g and w), and agent 2 is assigned w and d, which is also consistent with C 2 2 .Condition C3 holds because only one offer is used for each agent (C 1  1 for 1 and C 2 2 for 2).
The following theorem will be useful for analysing the implementation of a norm as a computational problem.
Theorem 1.Every assignment of agents to actions in η satisfying the conditions of Definition 7 gives rise to an implementation of η, and every implementation gives rise to such an assignment.
Proof.Assume that we have an assignment f for a group norm η that uses some disjunct η = haps(p(A 1 ; . . .; A N )) of η.Let η = haps(A 1 ; . . .; A N ) By C3, for each agent i involved in the assignment, there is a single contribution C i .Given the assignment, generate O i as f (A j ,j,a,l)=(i,Ci) j done(a, i).Clearly O i respects C i by C1. i∈G O i is satisfiable by C2.Finally since f is an assignment, any run that satisfies i∈G O i also satisfies η .Hence, i O i is an implementation of η.
Now assume that we have an implementation i∈G O i for η = p:cond(p) haps(p(A 1 ; . . .; A N )).By definition, at least one of the disjuncts η = haps(p(A 1 ; . . .; A N )) is entailed by the implementation.Let η = haps(A 1 ; . . .; A N ).We will show how to extract an assignment f for η from the implementation.First of all, to satisfy C3, we assign only one contribution C i with which O i is consistent to every i ∈ G. Now we construct f for each of A 1 , . . ., A N in turn.Since O i |= η and η |= haps(A 1 ), there are enough conjuncts in O i to make sure done(a, i j ) holds for every a ∈ A 1 and there are enough different i j to for every occurrence of a in A 1 (no agent is asked to perform more than one action in parallel since O i is satisfiable).We take some subset of those to assign to f (A 1 , a).Similarly in order for O i to entail haps(A 1 ; . . .; A m+1 ) provided it entails haps(A 1 ; . . .; A m ) there must be contributions in O i of agents promising to execute an action in A m+1 after haps(A 1 ; . . .; A m ) (or in m + 1 time steps unconditionally), and enough of them to entail haps(A 1 ; . . .; A m+1 ).Assign some subset of those agents to actions in A m+1 .Now we consider the complexity of the problem whether an implementation of η by G exists.In the statement of the theorem below, the size of the input to the problem is measured in the size of the compact representation of η (the size of expression p:cond(p) haps()) and D i (using do(a, i) j ), rather than the size of the underlying LTL expressions.Otherwise, since the LTL expressions are exponential in the size of the compact representation, there exists a trivially polynomial algorithm for solving the problem.
Theorem 2. Given a group norm η, a group of agents G, and agent contributions D i for i ∈ G, the problem of whether an implementation of η by G exists is NP-complete.
Proof.By Theorem 1, the problem of finding an implementation can be reduced to the problem of finding an assignment.For membership of NP, observe that an assignment can be guessed in time polynomial in the size of the group norm and checked that it satisfies the conditions C1-C3 in time polynomial in the group norm and the set of agents' contributions.For NP-hardness, we reduce SAT to the problem of finding an assignment of agents to actions in a simple non-disjunctive group norm.Let φ be a propositional formula in CNF containing n variables and k clauses.Without loss of generality, we assume that each clause is unique and none of them contains both p i and ¬p i for some variable p i .The corresponding group norm will be where c j is an action corresponding to making the jth clause in φ true.Let G contain n agents, one for each propositional variable p i in φ.Each agent i has two offers.Intuitively, the offer C t i corresponds to setting p i to true and the offer C f i corresponds to setting p i to false.
Since we assume that each clause is unique, the agents offer to make each c j true at most once.Now assume that we have a function f that assigns to clauses pairs (i, C t i ) or (i, C f i ).By C3, only one of C t i or C f i is used for each i in this assignment.Hence for each p i where i ∈ G (i was used in the assignment of agents), we can extract a unique assignment of a truth value true or false to p i .Because of the way the offers were defined, this assignments of truth values to p i for i ∈ G will make all the clauses true.
However, there is a natural special case for which the problem of whether an implementation of a group obligation exists is tractable.
Theorem 3. Given a non-disjunctive group norm η, a group of agents G, and agent contributions where 1. all agent contributions D i are identical 2. D i does not contain disjunctions the problem of whether an implementation of η by G exists is in PTIME.
Proof.Intuitively, the algorithm to solve the problem would simply allocate arbitrary agents to arbitrary actions in η while ensuring that: (i) the same agent is not assigned to two action executed in parallel, and (ii) the agent's offer is respected.This process continues until all actions have an assigned agent, or no agent can be assigned to an action without violating constraints (i) and (ii).A simple check is sufficient to ensure that it is possible to complete an assignment without violating conditions (i) and (ii).In order to make sure that (i) is not violated, we need to check that the maximal number of actions that must be executed in parallel at any step in η (that is, max N 1 (|A j |) where η = haps(A 1 ; . . .; A N )) is at most |G|.To make sure that (ii) is not violated, we need to count, for each action type a occurring in η, how many times it occurs in η, and compare this number with the number of times the action is offered in D i multiplied by |G|.If each action is offered at least as many times as it is required by η, an implementation exists.

Minimality
A natural and desirable property of an implementation of a group norm is that the agents are not obliged to do more than the norm requires.Definition 8 (Minimality).Let η be a group norm.Let O 1 , . . ., O k be individual obligations for agents in G, and • I is a minimal implementation of η if it is an implementation of η and there is no implementation • I is an i-minimal implementation of η if there is no obligation O i for i such that • I is an individually minimal implementation of η if it is an i-minimal implementation for every i ∈ G.
Clearly, a minimal implementation I of η is individually minimal.The opposite also holds: Proof.The left to right direction is obvious, so consider Since it is an implementation of η, using Theorem 1 we can use an assignment f to write each individual obligation O i in the following normal form: where each γ i k is of the form done(a, i) (i is required to do a at step k) or (no requirement for i at step k), and there is a contribution C i so that the number of times done(a, i) occurs for every a is consistent with Now, if I is not minimal, there is a logically weaker implementation I = g (Γ 1 ∧ g (Γ 2 ∧. . .g Γ N ) . . .).However, since no done(a, i) entails any done(a , i ) unless a = a and i = i , the implementation I can only be weaker than I if there is some Γ j and Γ j for which some |= Γ j → done(a, i) while |= Γ j → done(b, i) for any action b (that is, Γ j requires i to do a at step j, while Γ j does not impose a requirement on i at j).But then, O i is not minimal, since replacing done(a, i) by in O i would be a weaker obligation for i, and hence I is not individually minimal.Given the result above, it is clear that the problem of computing a minimal implementation is no harder than the problem of computing an implementation, since it is possible to check if an implementation (or rather the corresponding assignment) is individually minimal in polynomial time.

Fairness
Now we arrive at the main concern of this paper, that is how to define a notion of group norm implementation that agrees with the social norms accepted by the agents as a way to regulate the fairness of task assignments.Some implementations of a group norm may be better than others from the point of view of the group's or the wider organisation's notion of fairness as captured in social norms.For example, fairness may require that all agents should contribute equally to the implementation of the group norm, or that agents with less experience are required to contribute less.LTL offers a natural setting to consider fairness constraints on implementations.By fairness constraints in this setting we do not mean just the notion of fairness as defined for processes in computer science (e.g., every request will be eventually granted).Instead we mean some additional constraints on possible implementations that reflect the organisation's view of what is reasonable to require from the agents.For example, it could be that the organisation does not consider it fair that the same agent performs an action a (for example, a work shift) twice in a row: Another example is that each agent gets a rest from all chores every seventh day: where χ i = a∈{d,g,v,w} done(a, i).
Definition 9 (Fair implementation).Let φ be an LTL formula expressing a fairness constraint.An implementation I of a group norm is fair with respect to φ (or φ-fair) if |= I → ¬φ (in other words, if I is consistent with φ).
Checking fairness of an implementation can be done by checking whether I ∧ φ is satisfiable.
If group norms are assumed to be fixed length sequences of actions, it arguably does not make sense to consider arbitrary LTL formulas as fairness constraints.In fact, most natural fairness constraints in human work allocation do not have the form 'everyone eventually gets a holiday' but 'everyone gets a holiday after working for n months'.We therefore restrict the syntax of fairness constraints to talk about fixed finite patterns of actions.
Definition 10 (Fairness constraint).An LTL formula φ is a fairness constraint if it is of the form 2ψ, where ψ only contains g modalities.
Examples of fairness constraints 2ψ are as follows, where N is a given number: (1) no agent i performs an action a twice in the next N steps, without another agent i performing it in between those occurrences; (2) agents i 1 , . . ., i m take perfect turns in all occurrences of action a; (3) if action a happens k times in the next N steps, then at least m different agents should be involved in their execution; (4) agent i is allowed to do something other than any of a 1 , . . ., a k at least once in every k steps; and (5) if i does a then j does it within k steps.
Example 5. Consider the implementation that we gave in Example 3. Implementation I 1 satisfies fairness constraint (1) above, but I 2 does not; likewise for (2).Constraint (3) holds for I 1 in the sense that every action a that occurs twice in the week is assigned to a different agent, again I 2 does not have this property.Regarding (4), note that each agent is allowed to do anything other than one of the duties {w, g, d, v} in any three steps; however, none of the implementations allows agent 1 to do anything other than {g, v} at least once in every 2 steps, throughout the week.Finally, constraint (5) does not hold for I 2 , with a = w and k = 4, but does hold for I 1 for those values.

Repeating norms
In the previous section, we looked at group norms that correspond to performing some group task/obligation once.In state-based terms, such norms correspond to achievement goals: a sequence of actions that must be executed in order to achieve a certain desirable state.In this section, we consider the case where a group norm relates, in state-based terms, to a maintenance goal: some condition needs to be maintained in perpetuity.In order to achieve this condition, some group task has to be executed periodically.For example, every week the agents in a household need to execute some combination of cleaning, shopping and cooking tasks: A 1 ; . . .; A 7 .
The norm itself requires them to iterate this sequence forever, which we write as haps(A 1 ; . . .; A 7 ) ∞ .We will refer to the number of sequentially composed actions in the repeated sequence in η as the cycle of η, c(η) (in the example above, c(η) = 7).
An infinite repetition of a sequence A 1 ; . . .; A N can be defined in LTL as follows: similarly for disjunctive norms.
Definition 11 (Repeating group norm with cycle N ).A repeating norm with cycle N is an obligation to repeat A 1 ; . . .; A N infinitely often: η = p:cond(p) haps(p(A 1 ; . . .; A N )) ∞ where p is a permutation, and cond(p) is a conjunctive condition on p expressed in terms of arithmetic operators, equality, inequality, and natural numbers between 1 and N .As before, we refer to norms where cond(p) is identity as nondisjunctive repeating norms, and write them as η = haps(A 1 ; . . .; A N ) ∞ The syntax of agents' individual contribution schemes is similar to Definition 3, apart from the addition of the norm cycle N : do(a, i) m,N means that the agent offers to perform a at most m times in every N = c(η).The most straightforward way to define this in LTL is to rule out all patterns of length N where the agent performs a more than m times, or, equivalently, to state that in every pattern of length N there are at least N − m steps when the agent is not performing a.Let K m,N = {K ⊆ {1, . . .N } | |K| = N − m}.Intuitively, this defines all possible combinations of afree steps in a pattern of length N if the agent does a at most m times.Let not K (a, i) for k ∈ K m,N stand for k∈K gk ¬done(a, i).This formula says that the agent does not do a on each of the time steps in K. Then do(a, i) m,N = K∈K m,N not K (a, i) says that the agent does a at most m times in N steps.Finally, to make this apply not just to the first N steps but indefinitely, the offer is prefixed with 2.
Definition 12 (Individual contribution schemes for repeating norms).Given an agent i, and a repeating norm η with cycle N , an individual contribution scheme D i for η is defined as C i where where n j k ≤ N for all k.
Example 6.The existing examples 1 and 2 can be straightforwardly transformed in the setting of repeating norms.That is, haps(w g; d v; ∅; w; ∅; d; ∅) ∞ expresses that in all coming weeks, on Monday watering and groceries need to be done, etc.Moreover, the offer from Example 2 for agent 1 becomes When an agent commits to a repeated group obligation, it may need to commit to several different 'shift patterns': for example, one week the agent will be working on Mondays, and in another week on Tuesdays.This means that the definition of an individual obligation for repeated norms becomes a sequence of shift patterns: Definition 13 (Unconditional individual obligation for repeating norms).Given an agent i, and a repeating norm η with cycle N , an unconditional individual obligation for i with respect to η is a formula of the form for some natural number m, where each Γ n , 1 ≤ n ≤ m, describes all actions agent i is committed to perform in the nth N -step period, or 'shift'.Γ n is of the form γ 1 ∧ 2 γ 2 ∧ . . .∧ N γ n where each γ j is either done(a j , i) or if i is not committed to performing any action at step j.
An implementation of a repeating norm by a set of agents G is as before a conjunction of obligations I = O i∈G such that |= I → η and I is consistent with agent offers.A minimal implementation is defined as before, and the same type of fairness constraints as in the previous section can be applied to repeating norms.
A single cycle assignment of agents to actions in η = p:cond(p) haps(p(A 1 ; . . .; A N )) ∞ is defined as an assignment for a non-repeating norm η = p:cond(p) haps(p(A 1 ; . . .; A N )).Clearly any single cycle assignment repeated every N steps gives rise to an implementation for a repeating norm.However for repeating norms it makes sense to consider implementations obtained by 'gluing' several different assignments together and repeating the resulting pattern, as repetition affects fairness in a non-trivial way.Considering the example fairness constraints in the previous section, we can see that 'gluing' together two (even identical) assignments satisfying fairness constraint (2) stated at the end of Section 3 may make the resulting implementation unfair (if the last occurrence of a in the implementation is done by i k with k < m), and also two unfair implementations (not satisfying fairness constraint (5) in Section 3, for instance) may become fair when glued together.
A consequence of this is that when solving the problem of finding a φ-fair implementation of a repeating obligation η, it is not sufficient to consider only single cycle assignments.If none of those when repeated correspond to a fair implementation of η, this does not mean that η has no fair implementation.We may need to consider a combination of several assignments.For example, let φ = 2( i∈G (done(a, i) → g ¬done(a, i))) and η = haps(a) ∞ .The cycle of η is 1.Suppose there are two possible one cycle assignments for η, one where agent 1 does a, and another where agent 2 does a.If either of them alone is repeated, the resulting implementation is not fair: either all occurrences of action a are done by agent 1, or all of them are done by agent 2. Clearly, if we combine these two one cycle assignments or produce a one cycle assignment to an 'unravelling' of η of length two: η 2 = haps(a; a) ∞ , we can produce an assignment that gives rise to a fair implementation: for example, the first a is done by agent 1 and the second by agent 2. However to solve the problem of finding a φ-fair implementation of a repeating norm η (if it exists) we need to know how long such an unravelling should get before we give up.
Theorem 5. Let η be a group obligation with cycle N that has k different one cycle assignments S 1 , . . ., S k (for different disjuncts and different assignments to each disjunct), and φ be a fairness constraint of modal depth d. 3 If a φ-fair implementation of η exists, then there exists a φ-fair implementation of η based on the a single cycle assignment to an m-unravelling of η, where m ≤ max(k, k d/N +1 ).
Proof.Let τ be an assignment corresponding to a fair implementation of η.Without loss of generality, we can assume that τ corresponds to a (possibly infinite) sequence of one cycle assignments for η, S i1 , . . ., S it , . ... Given τ , we are going to construct a sequence of assignments of length m, that is, some sequence τ = S 1 , . . ., S m (a single cycle assignment to η m ) that when repeated infinitely often, gives rise to a φ-fair implementation of η.
Note that τ (or any other assignment of agents to actions) corresponds to a description of a run in terms of action propositions.Observe that a run violates φ if it has a pattern of d consecutive states s 1 , . . ., s d that is a counterexample to φ.Clearly, τ describes a run that does not contain such a counterexample sequence of states (since it corresponds to a fair implementation).Note also that none of single-cycle implementations of η that occur in τ contain such a sequence of states (otherwise τ would not satisfy φ).
Let us first consider a simpler case when d < N .Then the only way a sequence of single-cycle assignments S j1 , . . ., S jn would violate φ is when there is a sequence on the 'joint' between two assignments S j l and S j l+1 that violates it.Let us build a sequence of assignments of length at most k that does not have such a violating joint.For convenience, let us say that S j l and S j l+1 compose if their concatenation does not contain a subsequence violating φ.To start building our sequence of length at most k, • md(p) = 0 • md(¬φ) = md(φ) • md(φ ∧ ψ) = max(md(φ), md(ψ)) • md( φ) = 1 + md(φ) • md(φ U ψ) = 1 + max(md(φ), md(ψ)).
For the defined connective 2, md(2φ) = md(¬ U ¬φ) = 1 + md(φ).take the first assignments in τ , S j1 .Clearly it composes with some other assignments, since τ does not violate φ.If S j1 composes with itself (there is a subsequence in τ that has S j1 ; S j1 ), we are done: τ = S j1 .Otherwise we consider the first two assignments in τ , S j1 ; S j2 .If S j2 composes with itself, we are done and τ = S j2 , or if it composes with S j1 , then τ = S j1 ; S j2 .Otherwise we consider a 3-element prefix of τ .Note that eventually we are going to encounter S j f which composes with S j f +1 that already occurs in the prefix of the sequence (the maximal possible value for f is k, the total number of single-cycle implementations).Then we set τ to be the subsequence of the current sequence that starts from the first occurrence of S j f +1 and continues until S j f .Clearly, τ has length at most k and nowhere in the 'joints' of the single cycle implementations in τ there is a counterexample to φ (including the joint of τ to itself).Now let d ≥ N .Then a counterexample sequence s 1 , . . ., s d can span multiple single cycle assignments.Let d ≤ p • N (p iterations of N are required to produce a counterexample to φ, so p ≤ (d/N ) + 1).Then we make a set of 'viable multi-cycle assignments' Z 1 , . . ., Z k p of all p-sequences of single-cycle assignments occurring in τ .We treat them as we treated single cycle assignments S i before, as the building blocks for τ .Similarly to the previous construction, we are bound to start to encounter the same 'viable multi-cycle assignments' after k p steps.So τ is of length at most k d/N +1 .This means that to construct a φ-fair implementation of η, we only need to consider assignments to sequences of actions of length m ≤ max(k, k d/N +1 ).This gives us an (exponential) algorithm for finding a φ-fair implementation of a repeating norm η (generate all possible one cycle assignments and then check all concatenations of them of length m for consistency with φ).

Related work
Social laws have long been recognised as an important mechanism to facilitate coordination in multi-agent systems [12], and there exists an extensive literature on formal approaches to social laws and norms, for example, [33,28,35,32,1,8,17,10,11,3].Logics for social laws often build upon dynamic or temporal logics such as LTL, CTL, ATL and STIT.(A recent paper that questions the suitability of temporal logic as a framework to model norms is [21]; a response is given in [5]).Most of this work specifies norms and their effects on the multi-agent system semantically by labelling certain transitions as forbidden (in the case of prohibitions) or labelling certain states as 'green' (good, or encouraged states) or 'red' (forbidden ones, see, e.g., [27]).In this paper, we model only obligations (and not prohibitions) and specify obligations in the object language.
Group norms have been studied in, for example, [2,23].Our definition of nonrepeating group norms is a generalisation of that given in [23].However in [23] the emphasis is on formalising synchronisation, and they abstract from the problem of computing individual obligations necessary to implement a group norm.In [2] group norms are considered at a much more abstract level.In that framework, a group norm is defined as making a state formula φ true, and the set of agents responsible for carrying out (an abstract STIT-like) action to achieve φ and the set of agents responsible for the violation are explicitly given as part of the norm.Our approach is closer to [23], in that the notion of agents responsible for the violation of a group norm given a particular implementation is definable in terms of the set of individual obligations.An agent that does not fulfil an unconditional obligation is responsible for a violation, and an agent with a conditional obligation where the condition of which has not been made true, is not responsible.
Team formation and coordination of joint actions has been extensively studied in Artificial Intelligence, for example [18,24,34].However the emphasis of that work is on efficient and flexible team work rather than on fairness.An exception is the work in [6], where the authors consider the problem of repeatedly choosing actions (which could, for example, be actions that assign jobs to people) in a fair way, where fairness has a decision theoretic interpretation in terms of minimising loss for worseoff beneficiaries of actions.The motivation of their work is very similar to our problem of finding a fair implementation of a repeated norm, but they have a specific notion of fairness and reduce the problem of fair selection of actions to an optimisation problem.
Another strand of related work is found in the behaviour composition literature, e.g., [36,29].The behaviour composition problem aims at the synthesis of a controller which can implement a desired target specification by controlling a collection of behaviours, running in some environment.Roughly, a controller corresponds to our notion of implementation, the target specification corresponds to our norm, and the behaviours correspond to our individual contribution schemes.However, standard behaviour composition does not consider parallel composition of actions, nor fairness constraints.
The problem we address is also somewhat related to several other topics in AI and Computer Science generally.In the remainder of this section, we briefly summarise the key similarities and differences between our approach and some of this work.
Our setting has some similarities to resource allocation problems discussed in the social choice literature [9] and in particular the fair allocation of indivisible goods [13].However, there are some important differences.In fair allocation, a set of (indivisible) objects must be allocated to a set of agents.Each agent is assigned a subset of objects, and is assumed to have a preference ordering over sets of objects (bundles).Our notion of an individual contribution scheme has some similarities to logic-based representation languages for preferences over bundles [26].However in our setting an offer is maximal-an agent is satisfied if the set of actions it is assigned is a subset of one of its offers.In fair allocation, the converse holds: agents are satisfied if their goal is a subset of the bundle they are allocated.Moreover, in resource allocation, an allocation which assigns an agent a bundle containing none of its preferred objects may still be complete, in the sense of allocating each object to some agent.However, in our setting, we assume agents will simply refuse to perform any action (or combination of actions) not included in one of its offers.Any allocation that assigns a 'refused' action to an agent is thus incomplete in an important sense (i.e., the action will not be performed).Finally, the notion of fairness we consider (essentially any LTL formula) is much more general than the notion of envy-freeness found in ordinary resource allocation.
As noted in Section 3.2, our work differs from the notion of fairness used in resource allocation problems in computing.In such settings, a resource allocation policy or protocol is assumed, and the aim is to verify that the policy satisfies some LTL property (e.g., that a request for a resource is eventually granted) under some fairness assumption, such as strong or weak fairness.In our work, the allocation of agents to actions is computed rather than assumed, and LTL is used to express arbitrary fairness constraints on the allocation, rather than to specify that, e.g., an action will eventually be performed.
The problem of allocating a sequence of parallel tasks to a set of resources has some similarities to production (job shop) scheduling [22].However there are important differences.In general production scheduling each job consists of a set of operations, where each operation must be performed by a single machine.Each job may have a release, a due date, and jobs may be partially ordered.In contrast our language of norms specifies not just which actions (operations) should be performed, but when they should be performed (the release and due dates are the same), and at each point in time, a set of actions must be performed in parallel.Moreover, we consider repeating patterns of actions.This has no counterpart in production scheduling, where the aim is simply to process a set of jobs once (the jobs do not repeat).Lastly, we consider fair allocations of tasks to agents, where fairness is defined as any pattern LTL-expressible on a fixed length interval.In scheduling the aim is to find a (near) optimal schedule, where the optimality criterion is specified in terms of makespan, tardiness or some other cost function.
Our work is also related to the problem of personnel scheduling or rostering [19].In personnel scheduling, the aim is to find a (near) optimal allocation staff to 'shifts', while taking into account staff availability, preferences etc. Shifts (and their associated constraints, e.g., tasks that must be performed, levels of seniority of staff that must be present etc.) correspond to the parallel execution of a set of actions in our setting, and staff availability has some similarities to our notion of individual contribution schemes.Similarly to our work, rosters are often repeating (the same shift pattern may be used for several weeks or months), and schedules may be subject to 'fairness' constraints, e.g., legal regulations, organisation personnel policies, etc. However our notion of fairness is more general than the constraints normally considered in personnel scheduling.
There is also work on allocating resources to tasks in a workflow, e.g., [31].This work considers parallel execution of tasks, and constraints on allocation of the resources to tasks (e.g., if task1 is executed by agent1, then task2 must also be executed by agent 1).However this work does not consider cyclic or repeating workflows, and constraints on resource allocation are restricted to cost constraints and control constraints, rather than any pattern expressible in LTL over a fixed length interval of time as in our approach.

Conclusions and Future Work
We describe an approach to expressing and reasoning about implementations of group obligations taking into account fairness constraints.The notion of fairness constraints was introduced in [4].In this paper, we extend fairness constraints to group norms in which the order in which actions are performed is not fixed.We formalise our approach in Linear Time Temporal Logic, and give some preliminary results.Our approach has a number of limitations.We model only obligations and do not consider prohibitions.Our notion of group obligation does not allow arbitrary disjunctions of tasks, but only disjunctions over some permutations of the same set of tasks.We also consider only a restricted class of fairness constraints.Moreover, neither the norms nor the offers are state-based, in the sense that one can refer to the state of the environment to say whether some action should be executed, or whether one is able to perform it.Relaxing these limitations, and a more compact syntax for representing, for example, individual offers, are the subject of future work.For example, it would be interesting to explore using automata for the formulation of the problem and transfer of results from the field of behaviour composition.It would also be interesting to investigate relaxation of norms and fairness constraints when a fair implementation does not exist.
for which both |= I → I and |= I → I.

Theorem 4 .
Let I = O 1 ∧ • • • ∧ O k be an implementation of a group norm η = p:con(p) haps(p(A 1 ; . . .; A N )) by G. Then I is a minimal implementation iff I is an individually minimal implementation.
only one offer by i is used by the assignment throughout).