Generalized Stable Matching in Bipartite Networks
Abstract
In this paper we study the generalized version of weighted matching in bipartite networks. Consider a weighted matching in a bipartite network in which the nodes derive value from the split of the matching edge assigned to them if they are matched. The value a node derives from the split depends both on the split as well as the partner the node is matched to. We assume that the value of a split to the node is continuous and strictly increasing in the part of the split assigned to the node. A stable weighted matching is a matching and splits on the edges in the matching such that no two adjacent nodes in the network can split the edge between them so that both of them can derive a higher value than in the matching. We extend the weighted matching problem to this general case and study the existence of a stable weighted matching. We also present an algorithm that converges to a stable weighted matching. The algorithm generalizes the Hungarian algorithm for bipartite matching. Faster algorithms can be made when there is more structure on the value functions.
1 Introduction
In this paper we analyze the following problem. Consider a weighted matching in a bipartite network in which the nodes derive value from the split of the matching edge assigned to them if they are matched. The value a node derives from the split depends both on the split as well as the partner the node is matched to. We assume that the value of a split to the node is continuous and strictly increasing in the part of the split assigned to the node. A stable weighted matching is a matching and splits on the edges in the matching such that no two adjacent nodes in the network can split the edge between them so that both of them can derive a higher value than in the matching. We extend the weighted matching problem to this general case and study the existence of a stable weighted matching. We also present an algorithm that converges to a stable weighted matching. The algorithm generalizes the Hungarian algorithm [8] for bipartite matching. Faster algorithms can be made when there is more structure on the value functions.
Weighted matching in bipartite networks has been studied in the context of linear valuations [10]. The problem is often posed as such.
In a bipartite network , whose nodes belong to and whose edges connect nodes from to nodes in with weights for the edge that can be split between and as and to give them values and , find a matching with characteristic function that maximizes the sum of weights of edges in the matching
The characteristic function must satisfy the following constraints to be the characteristic function of a matching.
(1)  
(2)  
(3) 
The last constraint is an integer constraint and can be neglected since the corners of the polytope resulting from the remaining constraints are integral. The above is called the maximum weight matching problem. In a finite graph with finite weights, the optimal solution exists and the optimal value is finite. The stable matching problem is the dual of the maximum weight matching problem which is to find the minimum sum of values given to the nodes in the network
(4)  
(5)  
(6) 
The existence of a stable matching is evident from the finiteness of the optimal value in the maximum weight matching problem. In fact at optimal solution for the stable matching problem, for any edge , . For any maximum weighted matching, there exists splits that is an optimal solution to the stable matching problem. This problem has been well understood and several algorithms have been proposed to find the optimal stable matching. The extensions, when the values are increasing functions of the split and do not depend upon the edge, can be reduced to the above problem.
We study the problem when the values depend upon the edge as well as the part of the split given to the node. The stable matching problem in this case is as such. Find a matching and a split such that
(7)  
(8)  
(9)  
(10) 
The existence of such a matching and a split is not evident. In this paper, we show that such a matching and a split exists and we give an algorithm to find such a matching and a split. The problem features in many practical problems. We give a few examples.
Consider the stable marriage problem and related problems studied in [4] and later by several others. A survey of related literature can be found in [9]. The classical formulation assumes exogeneous partner preferences. Other formulations including [1] study endogeneous partner preferences arising from types of partners. An important and more realistic formulation is to consider that utilities of individuals in a marriage depends both on the type or the identity of the partner as well as the effort the partner puts in the marriage. In this scenario, a stable marriage is the one in which the neither partner in the marriage has a proposal for mariage in which the partner will have a higher utility.
Another example is the exchanges in buyerseller networks [7]. The problem has been studied in the context of indivisible goods. An important scenario is the case of divisible goods with the buyerseller relations being exclusive. When the preferences for the goods are strictly convex, continuous and strongly monotone, we observe a connected contract curve or the set of individually rational paretoefficient exchanges between any adjacent buyerseller pair in the network. As we move along the contract curve in a given direction, the utility of buyer/seller strictly decreases and the utility of seller/buyer strictly increases. The stable set of exchanges in this network is the one in which all exchanges are stable or no adjacent buyerseller pair in the network can do better by simultaneously breaking their current contracts and forming a new contract among them.
An important example is the study of bargaining in networks. This problem has recently been studied widely and takes the form of the stable matching problem in teh case of linear utilities. However, often in real life bargaining situations, the utility is nontrasferable between the bargaining parties through a quasilinear numeraire. In such situations as the sum of offers to the two parties in bargaining is not constant. A stable bargaining solution in this case takes a different form as studied in this paper. Another line of work that can benefit by the results in this paper is the work on social games introduced in [5].
The organization of the rest of the paper is as such. In the next section, we introduce the setup. We try to maintain the notations close to the notations in the matching literature while introduce additional terminology as required. In section 3, we show introduce some important concepts that are needed to prove the existence of a stable matching. Finally in section 4, we show a contructive proof and an algorithm to find the stable matching.
2 Setup
In this section we formulate the problem and introduce necessary terminology.
2.1 Network and Payoffs
Assume and are two finite and mutually exclusive sets of nodes and . A bipartite network between and is a graph , whose nodes belong to and whose edges connect nodes from to nodes in . Given a bipartite network , we will refer to the set of nodes as , the sets of nodes in and as and respectively, and the set of edges as when necessary. When the node set is understood, we will refer to the network by the edge set . Without loss of generality, we will assume that the graph is connected.
A set of nodes induces a subgraph of , such that .
The set of neighbors of a node is . The set of neighbors of a node of is . When the context is well understood, we will also refer to as or just . The set of neighboring nodes of is .
A weight function assigns a weight to each edge. An edge with and has a weight that can be split between and .
A split on the edge is the pair , with .
The nodes derive payoffs from the part of the split given to them. For a split , the payoff of the node is and the payoff of the node is . The payoff of a node depends upon both the part of the split given to the node and the edge on which the split is made. Thus for each edge the payoff of a node is a unique function of the part of the split given to the person. We assume that these payoff functions are strictly increasing and continuous and hence they are invertible and the inverse functions are also strictly increasing and continuous.
We also define payoffs of nodes as a function of its neighbor when the split is made between them. The payoff of node for the split on edge is a function of the payoff of node is . So the payoffs of neighboring nodes for the split between them are strictly decreasing and continuous with respect to one another. For simplicity, we will assume that the function is defined for all and is strictly decreasing and continuous. We will refer to these functions as pareto payoff function.
2.2 Matching
A matching in the bipartite network is a subset of edges such that no two edges in share a common node. The size of the matching is the number of edges in the matching. The matching defines a characteristic function on the set of edges in the bipartite network where ,
such that
, and
, .
The match for a node in the matching is
.
We say that a node is matched if .
A split for a matching is a function such that
.
A weighted matching is a pair matching and a split for the matching.
The payoff profile for a weighted matching is a vector where each element is the payoff of a node for the given weighted matching. The payoff of a node for the weighted matching is
.
A weighted matching is stable if and all splits on ,
and
.
2.3 Paths
A path in the network is a subgraph , where is a set of nodes and is a set of edges with both end points in such that two nodes in have exactly one edge in and all other nodes in have exactly two edges in . The two nodes with exactly one edge will be referred to as the end nodes. A path also induces index function over its nodes as follows:

Pick an end node and set its index as . This node is the source node.

Set .

If is an end node, then stop else index the only unindexed neighbor of as (index of ). The end node with the highest index is the sink node.
This index generates a sequence of nodes where the subscript stands for the index and and are end nodes.
Thus a path of length can be seen as a sequence of nodes in , such that . We call this a path from the source to the sink node. Alternatively, a path is a sequence of nodes such that for each node in the sequence shares edges with both the immediately preceding and immediately succeeding nodes. When the source and sink is determined for the path , we will refer a path from the source to sink as . The reverse path from to will be refered to as .
A subpath of a path is a connected subgraph of the path . Alternatively, a subpath between nodes is a subsequence . A subpath is a path by itself.
The union of two paths and is also a path if and share exactly one end node.
We will denote the set of paths from to in a network as .
2.4 Offers
An offer profile is a vector where the element is node ’s offer. We will denote the restriction of an offer profile to a set of nodes as .
An offer profile is feasible, if weighted matching, with payoff profile .
An offer profile is stable if , .
Using the definition and properties of the pareto payoff functions, we can reformulate the stable matching problem as such. Find a matching and a split such that
(11)  
(12)  
(13)  
(14) 
The first, second and fourth inequalities provide the constraints for the offer profile to be feasible and the third inequality provide the constraints for the offer profile to be stable. Thus, if we have a feasible and stable offer profile, then we have a weighted stable matching. Hence, in this paper, we will focus on finding a feasible and stable offer profile.
Given an offer profile , the equality subgraph is the subset of edges with .
We will refer to the neighbors of a node in the equality subgraph as .
Given an offer profile , a path is feasible if .
Given a node with offer , a path with an end node induces an offer for each node in the path as follows:

, Therefore,

.
For any pair of nodes and a path from to , we define the path induced offer function where is the offer that induces for given has the offer . Clearly, is continuous since the pareto payoff functions are continuous. Also is strictly increasing if both or both and strictly decreasing if either and or and since pareto payoff functions are strictly decreasing.
Given a node with offer and another node , a path from to is maximum offer inducing path from to given the offer on if
The maximum offer inducing paths and the maximum path induced offers have important properties that we will use for the main result. In the following two lemmas we state these properties.
Lemma 1.
Assume and . Assume is a maximum offer inducing path from to given the offer on . If is the subpath between nodes and . Then is a maximum offer inducing path from to given the offer on .
Lemma 2.
Pick and .
For all set
For all , set
Then the following hold true about the equality subgraph

the equality subgraph is connected and the offer profile is stable. Therefore all nodes have at least one edge in the equality subgraph.

, either or all paths from to in include at least one of the nodes .

If and , then all paths from to in include at least one node in .

If , then for any path that does not include at least one node in , .
Proof.
Consider all nodes in for which the maximum offer inducing path is of length . Pick any of such nodes and its neighbor along the maximum offer inducing path. Clearly from the construction of . Assume . Then with , the inequality exists because the functions are strictly increasing. This implies that is not the maximum path induced offer induced on over all paths from to . Therefore by contradiction and is connected to in through a maximum offer inducing path.
Now assume that all nodes in for which the maximum offer inducing path is of length less than is connected to through a maximum offer inducing path. Then following lemma 1 for all nodes in for which the maximum offer inducing path is of length all nodes in along the path are connected to along the same path. Also by a similar argument as above all nodes in for which the maximum offer inducing path is of length is connected to through a maximum offer inducing path. Thus by induction, all nodes in are connected to through a maximum offer inducing path. As a consequence all nodes in that belong to any of the maximum offer inducing paths are also connected to through the respective maximum offer inducing paths.
Now since all nodes in that do not belong to any maximum offer inducing paths are connected to at least one node in , therefore they are also connected to through some path. Hence the equality subgraph is connected. The offer profile is stable because for all , .
We now prove the second claim. Assume that there exists and path from to in that does not include any of the nodes in . Then pick a node and consider the path . This path induces offers on and . This is a contradiction because by construction of , was the maximum offer induced on over all paths from to given the offer on . Hence the claims holds true.
We now prove the third claim. Assume there exists and . From the second claim, all paths from to in include a node from and a node from . First we will show that either all paths from to in include at least one node in or all paths from to in include at least one node in . Then we will show that it is actually the first case. Assume there exists a path from to in not including any node in and a path from to in not including any node in . Pick a path . This path includes a node with the highest index among all nodes in with the highest index. Consider the subpath . If , then the path is a path from to not including any node in . If , then the path is a path from to not including any node in . In either case, this contradicts the second claim, so either all paths from to in include at least one node in or all paths from to in include at least one node in . Now assume that all paths from to in include at least one node in . Pick a path from to in and the node on the path with the lowest index among all nodes in . From the assumption,
Pick a node and consider the subpaths . The path exists in . The path induces the following offers:
on {from the assumption in the claim}.
on .
on .
This is a contradiction because by construction of , was the maximum offer induced on over all paths from to given the offer on . Hence, all paths from to in include at least one node in .
We now prove the the fourth claim. Assume that there exists and path from to in that does not include any of the nodes in . Then pick a node and consider the path . Assume, . Then . The path induces offers on and . This is a contradiction because by construction of , was the maximum offer induced on over all paths from to given the offer on . Hence the claims holds true.
∎
2.5 Alternating Paths, Alternating Trees and NearPerfect Matchings
Given an offer profile and a matching , an alternating path is a path within the equality subgraph with alternating pair of nodes share an edge in the matching and not in the matching .
The matching also induces directionality on the alternating paths in the following way. Direct all edges from to and all edges from to .
An augmenting path is an alternating path that starts and ends at an unmatched vertex.
An alternating tree for a matching is a tree which contains exactly one unmatched node and has following properties:

every node at odd distance from has degree 2 in the tree

all paths from are alternating paths

all leaf nodes are at even distance from
Clearly, every alternating tree has one more node at even distance from than at odd distance from .
A matching is a maximum matching in the equality subgraph if . A maximum matching can be obtained using the augmenting path algorithm [10]. A matching is a maximum matching in , if and only if there is no augmenting path in with respect to the matching [10].
A nearperfect matching is a matching in the equality subgraph such that exactly one node is unmatched. A nearperfect matching exists only if .
Given a maximum matching , an alternating forest or a Hungarian forest [3] is a collection of alternating trees rooted at nodes in induced by the matching. The number of alternating trees in a Hungarian forest is equal to the number of unmatched nodes in . The Hungarian forest is the subgraph of induced by the set of nodes reachable through alternating path from unmatched nodes in .
Given a maximum matching and an alternating tree , an expanding node is a node with an edge with . We will refer to be the set of expanding nodes for the tree and for each , the respective expanding offer . We will also refer to as the set of joining nodes for the tree .
An alternating tree for a matching is an alternating spanning tree if it spans all the nodes in the network, i.e. .
An offer profile is a stable alternating spanning tree generating offer profile if is stable and has a near perfect matching and associated alternating spanning tree .
Lemma 3.
Consider a set of nodes and with and a graph that has a nearperfect matching generating an alternating spanning tree. Then:

Every has least neighboring nodes in .

Every has at least neighboring nodes in .
Proof.
Pick any subset . Since all nodes in are matched in a nearperfect matching, then from the Hall’s theorem [6], has edges to at least nodes in . Since all nodes in are interior nodes of an alternating tree, therefore, each node in has one unique child it is matched to and one parent it is not matched to. Clearly, there is one parent node different from all the child nodes, or else, there will be a loop in the alternating tree. Hence, has edges to at least nodes in in the alternating tree within the network .
For the second claim, pick any and a nearperfect matching with an alternating tree . If does not contain the root of the alternating tree, then all nodes in are matched and hence, the number of neighbors of the set must be at least . If contains the root of the alternating tree, then pick a node not in and change the matching by switching the edges within the matching with the edges outside the matching along the alternating path from the root of to . This creates a new nearperfect matching and an alternating spanning tree whose root is at . For this matching, all the nodes in are matched and hence the claim follows.
∎
Proposition 1.
Consider a set of nodes and with and an equality subgraph that is connected. Then has a nearperfect matching if with the following properties:

, is not a leaf node in .

, has exactly one child node in .
Proof.
Clearly , . Hence following Hall’s theorem, there exists a matching in , such that all of is matched. Therefore, is a nearperfect matching.
∎
3 Stable Alternating Spanning Tree Generating Offer Profiles
In this section, we introduce three main lemmas about the existence, uniqueness and strict monotonicity of the stable alternating spanning tree generating offer profiles. Using this, we prove the main theorem of this section that helps extend the Hungarian algorithm to find the generalized stable matching. The main theorem introduces a set of continuous and strictly monotonic offer generating functions for each pair of nodes in the bipartite network.
Lemma 4.
Assume there exists two stable offer profiles and .

If with and , then .

If with and , then .

If with and , then .

If with and , then .
The resulting inequalities are strict when the conditioning inequalities are strict.
Proof.
We only need to prove the first statement and the rest follow similarly. To prove the first inequality, assume that . Then, . The second inequality is due to the strict monotonicity of pareto payoff function. This implies that is not stable contradicting our assumption. Hence, by contradiction, the first statement is true.
∎
Lemma 5.
Assume . Pick any and offer . Assume there exists a stable alternating spanning tree generating offer profile with . Then is the unique stable alternating spanning tree generating offer profile with .
Proof.
Assume there exists two stable alternating spanning tree generating offer profiles and with . Then or else . Let and be the associated near perfect matchings and and be the associated alternating spanning trees. Clearly or else . Without loss of generality assume that is unmatched in both and . In both alternating spanning trees, the nodes at even distances from belong to and the nodes at odd distances from belong to . Define
Since both offer profiles are stable, therefore following the lemma 4:

In the alternating tree