This action might not be possible to undo. Are you sure you want to continue?

These weights can represent capacity, length, cost etc. of an edge. Formally, a weight is a mapping from set of edges to real numbers, w : E → R. Notice that weight of an edge can be zero or negative also. We will learn of some economic applications where this makes sense. If a weight system is given for a (di)graph, then we write (N, E, w) as the (di)graph.

1.1

Modeling Using Graphs: Examples

Example 1: Housing/Job Market Consider a market of houses (or jobs). Let there be H = {a, b, c, d} houses on a street. Suppose B = {1, 2, 3, 4} be the set of potential buyers, each of whom want to buy exactly one house. Every buyer i ∈ B is interested in ∅ = Hi ⊆ H set of houses. This situation can be modeled using a graph. Consider a graph with the following set of vertices: N = H ∪ B (note that H ∩ B = ∅). The only edges of the graph are of the following form: for every i ∈ B and every j ∈ Hi , there is an edge between i and j. Graphs of this kind are called bipartite graphs, i.e., a graph whose vertex set can be partitioned into two non-empty sets and the edges are only between vertices which lie in separate partitions. Figure 2 is a bipartite graph of this example. Here, H1 = {a}, H2 = {a, c}, H3 = {b, d}, H4 = {c}. Is it possible to allocate a unique house to every buyer?

1 a

2

b

3

c

4

d

Figure 2: A bipartite graph If every buyer associates a value for every house, then it can be used as a weight of the graph. Formally, if there is an edge (i, j) then w(i, j) denotes the value of buyer i ∈ B for house j ∈ Hi .

2

Example 2: Coauthor/Social Networking Model Consider a model with researchers (or agents in Facebook site). Each researcher wants to collaborate with some set of other researchers. But a collaboration is made only if both agents (researchers) put substantial eﬀort. The eﬀort level of agent i for edge (i, j) is given by w(i, j). This situation can be modeled as a directed graph with weight of edge (i, j) being w(i, j). Common question here: if there is some utility function of every researcher, in equilibrium what kind of graphs will be formed with what weights? Example 3: Transportation Networks Consider a reservoir located in a state. The water from the reservoir needs to be supplied to various cities. It can be supplied directly from the reservoir or via another cities. The cost of supplying water from city i to city j is given and so is the cost of supplying directly from reservoir to a city. What is the best way to connect the cities to the reservoir? How should the cost of connection be split amongst the cities? The situation can be modeled using directed or undirected graphs, depending on whether the cost matrix is asymmetric or symmetric. The set of nodes in the graph is the set of cities and the reservoir. The set of edges is the set of edges from reservoir to the cities and all possible edges between cities. The edges can be directed or undirected. For example, if the cities are located at diﬀerent altitudes, then cost of transporting from i to j may be diﬀerent from that from j to i, in which case we model it as a directed graph, else as an undirected graph.

2

Definitions of (Undirected) Graphs

If {i, j} ∈ E, then i and j are called end points of this edge. The degree of a vertex is the number of edges for which that vertex is an end point. So, for every i ∈ N, we have deg(i) = #{j ∈ N : {i, j} ∈ E}. In Figure 1, degree of vertex 2 is 3. Here is a simple lemma about degree of a vertex. Lemma 1 The number of vertices of odd degree is even. Proof : Let O be the set of vertices of odd degree. Notice that if we sum of the degrees of every vertex, we will count the number of edges exactly twice. Hence, i∈N deg(i) = 2#E. Now, i∈N deg(i) = i∈O deg(i) + i∈N \O deg(i). Hence, we can write, deg(i) = 2#E −

i∈O i∈N \O

deg(i).

3

Now, right side of the above equation is even. This is because 2#E is even and for every i ∈ N \ O, deg(i) is even by deﬁnition. Hence, left side of the above equation i∈O deg(i) is even. But for every i ∈ O, deg(i) is odd by deﬁnition. Hence, #O must be even. A path is a sequence of distinct vertices (i1 , . . . , ik ) such that {ij , ij+1 } ∈ E for all 1 ≤ j < k. The path (i1 , . . . , ik ) is called a path from i1 to ik . A graph is connected if there is a path between every pair of vertices. The middle graph in Figure 1 is not connected. A cycle is a sequence of vertices (i1 , . . . , ik , ik+1 ) with k > 2 such that {ij , ij+1 } ∈ E for all 1 ≤ j ≤ k, (i1 , . . . , ik ) is a path, and i1 = ik+1 . In the leftmost graph in Figure 1, a path is (1, 2, 3) and a cycle is (2, 3, 4, 2). A graph G′ = (N ′ , E ′ ) is a subgraph of graph G = (N, E) if ∅ = N ′ ⊆ N, E ′ ⊆ E, and for every {i, j} ∈ E ′ we have i, j ∈ N ′ . A connected acyclic (that does not contain a cycle) graph is called a tree. Graphs in Figure 1 are not trees, but the second and third graph in Figure 3 are trees. A graph may contain several trees (i.e. connected acyclic subgraphs). The spanning tree of a connected graph is a subgraph (N, E ′ ) such that (N, E ′ ) is a tree. Note that E ′ ⊆ E and a spanning tree does not contain a cycle. By deﬁnition, every tree (N ′ , E ′ ) is a spanning tree of graph (N ′ , E ′ ). Figure 3 shows a connected graph (which is not a tree) and two of its spanning trees.

4 4 4

1

1

1

2

3

2

3

2

3

Figure 3: Spanning trees of a graph

2.1

Properties of Trees and Spanning Trees

We now prove some properties of trees and spanning trees. Proposition 1 Every tree G′ = (N ′ , E ′ ), where G′ is a subgraph of a graph G = (N, E), satisﬁes the following properties. 1. There is a unique path from i to j in G′ for every i, j ∈ N ′ . 2. If there is an edge {i, j} ∈ E \ E ′ with i, j ∈ N ′ , adding {i, j} to E ′ creates a cycle. 4

3. By removing an edge from E ′ disconnects the tree. 4. Every tree with at least two vertices has at least two vertices of degree one. 5. #E ′ = #N ′ − 1. Proof : 1. Suppose there are at least two paths from i to j. Let these two paths be P1 = (i, i1 , . . . , ik , j) and P2 = (i, j 1 , . . . , j q , j). Then, consider the following sequence of vertices: (i, i1 , . . . , ik , j, j q , . . . , j 1 , i). This sequence of vertices is a cycle or contains a cycle if both paths share edges, contradicting the fact that G′ is a tree. 2. Consider an edge {i, j} ∈ E \ E ′ (if no such edge exists, then we are vacuously done). In graph G′ , there was a unique path from i to j. The edge {i, j} introduces another path. This means the graph G′′ = (N ′ , E ′ ∪ {i, j}) is not a tree (from the claim above). Since G′′ is connected, it must contain a cycle. 3. Let {i, j} ∈ E ′ be the edge removed from G′ . By the ﬁrst claim, there is a unique path from i to j in G′ . Since there is an edge between i and j, this unique path is the edge {i, j}. This means by removing this edge we do not have a path from i to j, and hence the graph is no more connected. 4. We do this using induction on number of vertices. If there are two vertices, the claim is obvious. Consider a tree with n vertices. Suppose the claim is true for any tree with < n vertices. Now, consider any edge {i, j} in the tree. By (1), the unique path between i and j is this edge {i, j}. Now, remove this edge from the tree. By (3), we disconnect the tree into trees which has smaller number of vertices. Each of these trees have either a single vertex or have two vertices with degree one (by induction). By connecting edge {i, j}, we can increase the degree of one of the vertices in each of these trees. Hence, there is at least two vertices with degree one in the original graph. 5. For #N ′ = 2, it is obvious. Suppose the claim holds for every #N ′ = m. Now, consider a tree with (m + 1) vertices. By the previous claim, there is a vertex i that has degree 1. Let the edge for which i is an endpoint be {i, j}. By removing i, we get another tree of subgraph (N ′ \ {i}, E ′ \ {i, j}). By induction, number of edges of this tree is m − 1. Since, we have removed one edge from the original tree, the number of edges in the original tree (of a graph with (m + 1) vertices) is m.

We prove two more important, but straightforward, lemmas.

5

E) be a graph and G′ = (N. .. G′′ has no cycles. So. j}}). . one can imagine one of the vertices as “source” (of water) and other vertices to be cities. j} ∈ E.. w). Lemma 3 Let G = (N. then it is a spanning tree. by Proposition 1 the number of edges in component Gj is nj − 1 for 1 ≤ j ≤ q. i. w ∈ R#E . E ′ ) be a subgraph of G such that #E ′ = #N − 1. E. there must be a vertex with degree 1. If G′ is connected. consider a graph G = (N. Proof : We show that G′ has no cycles. In graph G′ = (N.e. . The claim holds for #N = 2 and #N = 3 trivially. . which is the same graph. By our induction hypothesis. Let this vertex be i and let {i. E ′ ) be a subgraph of G such that #E ′ = #N − 1. Assume G to be connected. In this ﬁgure. the number of edges in G is #N − 1. Clearly. which is a contradiction. . . Hence. Gq is (n1 − 1) + . + nq ) − q = #N − q. the graph G is a component. . the total number of edges in components G1 . . Since the components have no vertices and edges in common. every vertex has degree at least two (it cannot have degree zero since it is connected). Consider the graph G′′ = (N \{i}. E) and let G1 . E ′ \{{i. The weights on edges may represent cost of supplying 6 . i. G′′ is connected and number of edges in G′′ is one less than n − 1. The minimum cost spanning + tree (MCST) problem is to ﬁnd a spanning tree of minimum cost in graph G. i. and hence a spanning tree. Figure 4 shows a weighted graph. Else. j}}. the total degree of all vertices is 2#E ≥ 2n or #E = n − 1 ≥ n.Lemma 2 Let G = (N. any graph can be partitioned into its components with a connected graph having one component. Imagine the weights to be costs of traversing an edge. Now. In that case. . Since every component is a tree. which equals the number of edges in E ′ \ {{i. We do the proof by induction on #N. Suppose the claim holds for all graphs with #N < n. Proof : Call a subgraph of a graph G a component of G if it is maximally conntected. E) be a graph and G′ = (N. j} be the unique edge for which i is an endpoint. a weighted graph. 3 The Minimum Cost Spanning Tree Problem Consider a graph G = (N.e.e. Gq be the components of G with number of vertices in component Gj being nj for 1 ≤ j ≤ q. E ′ ). q = 1. G′′ = (N ′′ . Clearly. . .. and this will show that G′ is a spanning tree. By our assumption in the claim. G′ cannot have any cycle. If G′ has no cycles then it is a spanning tree. E ′′ ) is a component of G = (N. . Consider #N = n > 3. E) if G′′ is connected and there does not exist vertices i ∈ N ′′ and j ∈ N \ N ′′ such that {i. Hence. + (nq − 1) = (n1 + n2 + .

which is a subset of an MCST. j} that is safe for A. and hence called the Kruskal’s algorithm. In that case. We discuss one such rule. N \ V ) respects a set of edges A if no edge from A crosses the cut. {a. The algorithm we discuss is due to Kruskal. A). Remark: After Step 1. and show one speciﬁc algorithm that falls in this generic class. A light 7 . c}. j} is added to A such that A ∪ {{i. Here is the formal procedure: 1. A can be taken to be {{b. We say a cut (V. then ﬁnd an edge {i. d}. then return (N. The generic greedy algorithm grows an MCST one edge at a time. A safe edge for A is {a. 3. Also. the invariant (that in every step we maintain a set of edges which belong to some MCST) is trivially satisﬁed. At each step of the algorithm. A cut in a graph G = (N.a 2 b 1 3 1 2 d 4 c Figure 4: The minimum cost spanning tree problem water from one city to another. The algorithm manages a subset A of edges that is always a subset of some MCST. The question is how to identify safe edges. In Figure 4. If (N. Set A ← A ∪ {{i. For this. the MCST problem is to ﬁnd a minimum cost arrangement (spanning tree) to supply water to cities. If (N. we provide some deﬁnitions. We call such an edge a safe edge for A (since it can be safely added to A without destroying the invariant). N \ V ) if i ∈ V and j ∈ N \ V . j}} is a subset of some MCST. Set A = ∅. An edge {i. 2. then there must exist an edge which is safe. We give a generic algorithm. d}}. N \ V ) with V = N and V = ∅. There are many greedy algorithms that ﬁnd an MCST. j} crosses a cut (V. j}} and repeat from Step 2. E) is a partition of set of vertices (V. A) is a spanning tree. an edge {i. A) is not a spanning tree. if A is not a spanning tree but a subset of an MCST.

j}). b} ∈ T . T ) is an MCST. the diﬀerence of edge weights of T and T ′ is equal to w({a. j}}) \ {{a. If {i.once at {i. j}). This proves that (A ∪ {{i. we consider the case when {i. (T ∪ {{i. j} is a safe edge for A. N \ V ) be any cut of G that respects A and let {i. 6}. T ′ ) is an MCST. 6}} and the set of edges {{1. Let T ′ = (T ∪{{i. {4. b})−w({i. Since (N. G′′ also has #N − 1 edges. This cycle must cross the cut (V. If we remove edge {a. w({a. Theorem 1 Let G = (N. G′′ is a spanning tree. T ). j}})\{{a. So. Since (N. b}. then we are done. 5}. there are #N − 1 edges in (N. j}} contains a cycle between vertex i and j (this is the only cycle). j}}) ⊆ T ′ . 3}.edge crossing a cut (V. Hence. The ﬁrst cut is ({1. T ) is a spanning tree. N \ V ). j} ∈ T . b} = {i. the set of edges {{4. Note that {a. b}) ≥ w({i. N \ V ) is an edge that has the minimum weight among all the edges crossing the cut (V. N \ V ) at least twice . j} ∈ T . Proof : Let A be a subset of edges of MCST (N. 5. {5. Then edge {i. 4} cross this cut. T ) is an MCST of G. w) be a connected graph. Hence. {3. 2}. Let A ⊂ T ⊆ E be a subset of edges such that (N. 6}). b}}. j} be a light edge crossing (V. By Proposition 1. By Lemma 2. Figure 5 shows a graph and two of its cuts. j} such that a ∈ V . Also. Now. 3}. T ). the sequence of vertices in the set of edges T ∪ {{i. 3}}. N \V ) and {a. 2. 8 . 5}} respect this cut. b})−w({i. {1. j} is safe for A. adding edge {i. 4 1 4 1 5 3 2 2 6 3 5 6 Figure 5: Cuts in a graph The following theorem says how a light edge of an appropriate cut is a safe edge. N \ V ). Hence. 4}. then this cycle is broken and we have no cycle in the graph G′′ = (N. {2. j}) ≤ 0. j}). b ∈ N \ V which crosses the cut (V. b} crosses this cut. The following set of edges respect this cut {{1. Since {i. {i. E. Edges {1. {4. j} is a light edge of cut (V. Let (V. N \ V ). b}}). we know that w({a. j} and the other at some edge {a. j} / to T creates a cycle (Proposition 1). b}) = w({i. Hence (N. Hence. we have w({a.

c}. this is a spanning tree. c : Ω → R. we add an edge which is safe. Since (N. 4. To see this. we consider the cut ({a. we set A = {{a. By Theorem 1. c) where N is a ﬁnite set of agents and c is a characteristic function deﬁned over set of coalitions Ω. {b}). d}. 4 Application: The Minimum Cost Spanning Tree Game In this section. In the ﬁrst iteration of the algorithm. {b. j}} and repeat from Step 3. A light edge of this cut is {b. A subset S ⊆ N of agents is called a coalition. c}. Else. in which case notations will change. j} be a light edge of this cut. this is an MCST. 5. Then. To do so. c}. This algorithm produces an MCST. Let {i. {a. c}. 1. Let {i. we choose vertex a and consider the cut ({a}. d}). c}}. Let Ω be the set of all coalitions. If A contains #N − 1 edges then return A and stop. we set A = {{a. Then set A ← A ∪ {{i. Consider the cut (V (A).1 Cooperative Games Let N be the set of agents. This means the output of the algorithm contains #N − 1 edges and no cycles. 2. We apply this algorithm to the example in Figure 4. d}. Consider the following algorithm. A light edge of this cut is {a. d}. So. Hence. {b. c. c. we deﬁne a coopearative game corresponding to the MCST problem. d}). 4. d}) is a spanning tree. N \ {i}). it is an MCST. in every step of the algorithm. d}}. but ideas remain the same. A cooperative game is a tuple (N. i. 2 9 .. d}. j}}. we ﬁrst deﬁne the notion of a cooperative game and a well known stability condition for such games. Set A ← A ∪ {{i. j} be a light edge of this cut. Then. The total weight of this spanning tree is 1 + 2 + 1 = 4. Choose any vertex i ∈ N and consider the cut ({i}. Cooperative games can be deﬁned with value functions also.The above theorem almost suggests an algorithm to compute an MCST. we stop. 3. {a. Denote by V (A) the set of vertices which are endpoints of edges in A. we consider the cut ({a. Set A = ∅. N \ V (A)). which gives the minimum weight over all spanning trees. A light edge of this cut is {a. {a. By Lemma 2. {b.e. Now. by Theorem 1. The number c(S) can be thought to be the cost incurred by coalition S when they cooperate 2 . go to Step 4.

We give an example of a cooperative game and analyze it below. T ′ ). Core conditions tell us x1 ≤ 2 and x2 ≤ 2 but x1 + x2 = 5. The core of a cooperative game (N. let {p(i). 2}. .2 The Minimum Cost Spanning Tree Game The minimum cost spanning tree game (MCST game) is deﬁned by set of agents N = {1. the edge ei = {p(i). T ). consider the MCST corresponding to nodes S + (which only use edges having endpoints in S + ). n} and a source agent to whom all the agents in N need to be connected. Assume for contradiction c(S) < i∈S xi . 3} and c(123) = 4. they form an MCST using edges between themseleves. 2. look at the following game with N = {1. The next theorem shows that this is always the case. i} from this new graph. x2 = 1 = x3 is in the core. c) is the set of cost vectors which satisﬁes a stability condition. The underlying graph is (N ∪ {0}. by deﬁnition i∈N xi = c(N). j} : i. c(13) = 3. j) denotes the cost of edge {i. i = j} and c(i. c(12) = 4. delete for every i ∈ S. The. c) = {x ∈ R#N : i∈N xi = c(N).named after the inventor of this allocation. A cost vector x assigns every player a cost in a game (N. i∈S xi ≤ c(S) ∀ S N} Every cost vector in the core is such that it distributes the total cost c(N) amongst agents in N and no coalition of agents can be better oﬀ by forming their independent coalition. Here N = {1. Consider any coalition S N. c(1) = 2. Such an MCST has #S edges by Proposition 1. For any S ⊆ N. . . An example is given in Figure 6. we describe a well known solution concept of core. Let c(S) be the total cost of an MCST when agents in S form an MCST with the source. i} be the last edge in the unique path from 0 to agent i. Thus. . c(3) = 4. For example. let S + = S ∪ {0}. Before that. Theorem 2 Any Bird allocation is in the core of the MCST game. Let this graph be (N. Core(N. Proof : For any Bird allocation x. c) where E = {{i. c) deﬁnes a cooperative game. Deﬁne xi = c(p(i). E. Add the edges of this tree to the MCST corresponding to nodes N + . (N. For any MCST (N. Let c(12) = 5 and c(1) = c(2) = 2. c(23) = 4. It can be veriﬁed that x1 = 2. i) for all i ∈ N. j ∈ N ∪ {0}. 4. We discuss one such game. 10 . j}. Then.The problem is to divide the total cost c(N) amongst the agents in N when they cooperate. Call this the Bird allocation . When a coalition of agents S connect to source. c). But there are certain class of games which have non-empty core (more on this later). There can be many cost vectors in a core or there may be none. c(2) = 3.

the endpoints of the edges are distinct. Case 2: Consider any vertex i ∈ S. We consider two cases. By Lemma 3. T ′) by the MCST corresponding S + . j ∈ Bi }. A set of edges are disjoint if every pair of edges in 11 . (N. Take the path in the MCST corresponding to N + from / 0 to i and let j be the last vertex such that j ∈ S. T ′ ) is connected and has #N − 1 edges. j}. We have a path from 0 to i in (N. In (N.. This violates the fact that the original tree is an MCST. This shows that (N. j} : i ∈ L. We say two edges {i. 5 Hall’s Marriage Theorem Consider a society with a ﬁnite set of boys B and a ﬁnite set of girls L with #L ≤ #B. T ′ ) is a spanning tree. It is enough to show that there is a path from source to every vertex i ∈ N. We show that (N. Case 1: Consider any vertex i ∈ S. j ′ are all distinct. This can be represented as a bipartite graph with vertex set B ∪ L and edge set E = {{i. We say girl i likes boy j if and only if j ∈ Bi . For every girl i ∈ L. Now.1 2 1 0 2 3 4 3 2 1 Figure 6: An MCST game Note that (N.e. T ′ ). i′ . We will denote such a bipartite graph as G = (B ∪ L. a set of boys ∅ = Bi are compatible. the new spanning tree has cost c(N) − i∈S xi + c(S) < c(N) by assumption. {Bi }i∈L ). T ′ ) has the same number (#N − 1) edges as the MCST corresponding to N + . {i′ . T ′ ) is connected. j. We want to ﬁnd if boys and girls can married in a compatible manner. i. j ′ } in a graph are disjoint if i. we can take 0 to j path in MCST corresponding to S + and continue on the remaining path in the path from 0 to i in the MCST corresponding to N + .

we deﬁne M(S) = {j ∈ B : {i. {2. i ∈ S} . then we cannot match some girls. For example. we have #S ≤ #D(S). and consider the edge {i. By deﬁnition M(S) ⊆ D(S). we have #L disjoint edges. A matching in graph G is a set of edges which are disjoint. Now consider the 12 . for any set of girls ∅ = S ⊆ L. {3. every girl likes the same boy . a matching will not always exist. i. every edge in M has a unique girl and a unique boy as endpoints. if we pick a set of 5 girls who like only a set of 3 boys. Proof : Suppose a matching with #L edges exists in G. {4. Figure 7 shows a bipartite graph with a matching: {{1. number of boys who girls in S like are less. we have #S ≤ #D(S). Suppose a matching with #L edges exists for any society with less than l + 1 girls. Hall’s marriage theorem states that this condition is also suﬃcient. j}. and so some girl cannot be matched. {Bi }i∈L ) exists if and only if for every ∅ = S ⊆ L. 1 a 2 b 3 c 4 d Figure 7: A bipartite graph with a matching Clearly. j} ∈ M we have j ∈ Bi . d}. In general. Then choose an arbitrary girl i ∈ L and any j ∈ Bi . j} ∈ M. where D(S) = ∪i∈S Bi . b}. Then. if we take a subset S ⊆ L of girls and take the set of boys that girls in S like: D(S) = ∪i∈S Bi . Case 1: Suppose #S < #D(S) for every ∅ = S ⊂ L (notice proper subset). We will show that a matching with #L edges exists for any society with #L = l + 1 girls. we have Bi = {j} for some j ∈ B.the set of boys matched to girls in S in matching M. We know that #S = #M(S). then #S ≤ #D(S) is necessary for a matching to exist.j. We use induction to prove that a matching with #L edges exists. There are two cases to consider. Theorem 3 A matching with #L edges in a bipartite graph G = (B ∪ L. c}}. Suppose for every ∅ = S ⊆ L. Denote this set of edges as M. Consider the case where #L ≥ 2 and for every i ∈ L. and for every {i.that set are disjoint. a}. Else. If #L = 1.e. Hence #S ≤ #D(S). then we just match her to one of the boys she likes (by our condition she must like at least one boy). Now. No matching is possible in this case. We ask whether there exists a matching with #L edges. By deﬁnition.

. 5. I will illustrate a use of Hall’s theorem to an economics setting. D1 = {1. 2}. . {Bi \ D(S)}i∈L\S ). Case 2: For some ∅ = S ⊂ L. It is silent on the problem of ﬁnding a matching when it exists.1 Application: Competitive Markets with Indivisible Goods The matching literature in economics in long.) and a set of buyers each of whom want to buy exactly one good. Clearly. 3. we apply the induction assumption to ﬁnd a matching in G′′ with #(L \ S) edges. This model can be represented using a bipartite graph G = (M ∪ N. {Bi}i∈S ) with #S edges. Note that a matching may leave some goods unmatched to any buyer. Now. we have #S = #D(S). By deﬁnition #S < #L. #(T ∪S) = #T +#S ≤ #D(S)+#D ′(T ). A set of goods ∅ = S ⊆ N is overdemanded at price vector p if #S < #O p (S). Deﬁne D ′ (T ) = D(T ) \ D(S). We will show that the condition in the theorem holds in graph G′′ . The question is how to verify if a price vector is competitive. consider M = {1. . We can write #D(T ∪ S) = #D(S) + #(D(T ) \ D(S)) = #D(S) + #D ′ (T ). cars etc. Hence. and they can be combined to get a matching of G with #L edges. n} and set of buyers is denoted by M = {1. As an example. But #S = #D(S). . Remark: Hall’s marriage theorem tells you when a matching can exist in a bipartite graph. 13 . We will study other results about existence and feasibility later. . Buyers report + their demand at the price vector p. We say the price vector p is competitive if a matching exists in G with m edges. Hence. D2 = {2. Deﬁne the exclusive demanders of a set of goods ∅ = S ⊆ N at price vector p as p p O (S) = {i ∈ M : Di ⊆ S}. 4} and p p p for some price vector p. m}. The seller of the goods announce prices for the goods. 2. The set of indivisible goods is denoted by N = {1. We have to show that #T ≤ #D ′ (T ). the matchings of G′ and G′′ do not have common edges. Since we have removed one boy and one girl from G to form G′ and since #S ≤ #D(S) − 1 for all ∅ = S ⊂ L. Assume m ≤ n. 2. By induction assumption. j} forms a matching of graph G with #L edges. and hence by induction we have a matching in the graph G′ = (S ∪ D(S). Now consider the graph G′′ = ((B \ D(S)) ∪ (L \ S). . The demand of buyer i ∈ M at price vector p is denoted p p as Di . D3 = {2. G′ is a graph with l girls. Hence.bipartite graph G′ = (B \ {j} ∪ L \ {i}. {Bk \ {j}}k∈L\{i} ). Now. the condition in the theorem holds for graph G′′ . 3}. denoted by a price vector p ∈ Rn . 3} are {1. We know that #(T ∪ S) ≤ #D(T ∪ S). 2. a matching exists in graph G′ with #L − 1 edges. . 2}. This matching along with edge {i. exclusive demanders of {1. Consider a market with a set of indivisible goods (like houses. . By deﬁnition #(L \ S) < #L. 4}. we will satisfy the condition in the theorem for graph G′ . #T ≤ #D ′ (T ). 3} and N = {1. {Di }i∈M ). So. Consider any ∅ = T ⊆ (L \ S).

Here. if a price vector is competitive then no set of goods is overdemanded. in a graph G = (N. E). In this section. a matching M ⊆ E is a set of disjoint edges in G. there exists a matching in graph G with m edges. Hence #B ≤ #S. 6. By Hall’s marriage theorem (Theorem 3). Since S is not overdemanded. a price vector is competitive if and only if a matching exists in the p bipartite graph G = (M ∪ N. Note that an M-augmented path need not contain all the edges in M. {Di }i∈M ). E). we get #S ≥ #O p (S) ≥ #B. a set of vertices S ⊆ N is covered by a set of edges X ⊆ E if every vertex in S is an endpoint of some edge in X.dark edges represent a matching. The other direction of the proof is a straightforward application of Hall’s marriage theorem. the set of edges to be set of possible pairings of students. Figures 8 and 9 show two matchings in a graph . One side of the proof is obvious. Proof : By deﬁnition. consider a set of buyers ∅ = B ⊆ M. Given a graph G = (N. To remind. A path P (with non-zero length) in G is called M-augmenting if its ends are not covered by M and its edges are alternatingly out of and in M. This means. The problem of ﬁnding roommates for students can be thought to be a problem of ﬁnding a matching (of maximum size) in G. we cannot match buyers in O p (S). If we have an overdemanded set of goods. we ask the question . then #O p (S) > #S. Definition 1 Let M be a matching in a graph G = (N. Since an Maugmenting path has odd number of edges. Notice that B ⊆ O p (S). The length of a path (cycle) is the number of edges in a path (cycle). p Let S = ∪i∈B Di . Now.Theorem 4 A price vector is competitive if and only if no set of goods is overdemanded at that price vector. Suppose no set of goods is overdemanded. E).1 M-Augmenting Path We start with the notion of augmenting path in an arbitrary undirected graphs. 6 Maximum Matching in Bipartite Graph We saw in the last section that matching all girls in a bipartite matching problem requires a combinatorial condition hold. say S. one can think of nodes in G to be students. Hence.what is the maximum number of matchings that is possible in a bipartite graph? We will also discuss an algorithm to compute such a maximum matching. we introduce some terminology. Before we introduce the deﬁnition of an augmenting path. the number of edges in M is less than the 14 .

It can be veriﬁed that the matching in Figure 8 is a maximum matching. E) is maximum if there does not exist another matching M ′ in G such that #M ′ > #M. Figures 10 and 11 show two matchings and their respective M-augmenting paths. For example. 2 3 4 1 6 5 Figure 10: An M-augmenting path for a matching Definition 2 A matching M in graph G = (N.2 3 4 1 6 5 Figure 8: A matching in a graph 2 3 4 1 6 5 Figure 9: A matching in a graph number of edges out of M in an M-augmenting path. 15 . There is an obvious connection between maximum matchings and augmenting paths. An M-augmenting path may contain a single edge also.

suppose M is not a maximum matching and there is another matching M ′ larger than M. Each component has to be either an isolated vertex or a path or a cycle. Theorem 5 Let G = (N. Assume for contradiction that P is an Maugmenting path. Now. we can ﬁnd a 16 . Then. we have that the edges in (E P \ M) and edges in (M \ E P ) cannot share an endpoint. Now deﬁne. E P \ M contains more edges than E P ∩ M. Theorem 5 suggests a simple algorithm for ﬁnding a maximum matching. M ′ is a set of disjoint edges. The algorithm starts from some arbitrary matching. We cannot seem to ﬁnd an M-augmenting path for this matching. there must exist a component of G′ which is a path and which contains more edges from M ′ than from M.e. 1. Now. Let E P be the set of edges in P . as long as we can ﬁnd an augmenting path for a matching. If there is none. partition G′ into components. M ′ = (E P \ M) ∪ (M \ E P ). every vertex of graph G′ has degree in {0. Consider the graph G′ = (N. the set of edges in (M \ E P ) are disjoint. On the other hand. and we repeat. Also. by the deﬁnition of the augmenting path (ends of an augmenting path are not covered in M). E) be a graph and M be a matching in G. Also. and Figure 10 shows an augmenting path of this matching. Hence. Hence. 2}. the edges in E P \ M are disjoint. This observation is formalized in the theorem below. M ∪ M ′ ). Hence. Since the number of edges in M ′ is larger than that in M. Note that every cycle must contain equal number of edges from M and M ′ . i. Proof : Suppose M is a maximum matching. Then. may be the empty one. M ′ contains more edges than M. it searches for an augmenting path of this matching. else the augmenting path gives us a matching larger than the current matching. a matching with size larger than M. Hence. Since M is a matching. observe that the matching in Figure 9 is not a maximum matching (the matching in Figure 8 has more edges). By deﬁnition of an augmenting path. by deﬁnition of an augmenting path. This is a contradiction. then we have found a maximum matching.. Such a path forms an M-augmenting path (Think why this is true).2 3 4 1 6 5 Figure 11: An M-augmenting path for a matching notice the maximum matching M in Figure 8. either M is a maximum matching or there exists an M-augmenting path.

Denote the size of maximum matching in G as ν(G) . Further.this is also called the matching number of G. The minimum vertex cover problem ﬁnds the minimum set of squares where one needs to put a security oﬃcer to monitor all the streets. But this may not be a minimum vertex cover. we show that the minimum vertex cover and the maximum matching of a bipartite graph have the same size. 17 . a set of vertices C ⊆ N is called a vertex cover of G if every edge in E has at least one end point in C. A security oﬃcer deployed at a square can monitor all streets which have an endpoint in that square. In particular. E). Before we give an algorithm to ﬁnd an augmenting path. C is called a minimum vertex cover of G if there does not exist another vertex cover C ′ of G such that #C ′ < #C. the set of all vertices in a graph consists of a vertex cover.vertex covers are shown with black vertices. we present a useful result. We give some examples in Figure 12. 2 3 2 3 4 1 1 4 6 5 6 5 Figure 12: Vertex cover An application of the vertex cover can be as follows. Clearly. The city plans to deploy security oﬃce (or medical store or emergency service or park) at squares to monitor streets. Lemma 4 For any graph G. Suppose the graph represents a city: the vertices are squares and the edges represent streets.2 Minimum Vertex Cover and Maximum Matching The size of a maximum matching in a graph is the number of edges in the maximum matching. The ﬁrst one is not a minimum vertex cover but the second one is. We deﬁne vertex cover now and show its relation to matching. ν(G) ≤ τ (G). Figure 12 shows two vertex covers of the same graph .this is also called the vertex cover number of G. Denote the size of minimum cover in G as τ (G) .maximum matching. Fix a graph G. 6. Definition 3 Give a graph G = (N.

A maximum matching. A vertex cover will contain at least one vertex from every edge of this matching.Proof : Any vertex cover contains at least one end point of every edge of a matching. 1 2 3 Figure 13: Matching number and vertex cover number But the relationship in Lemma 4 is equality in case of bipartite graphs as the following theorem. n Theorem 6 (Ko¨ig’s Theorem) Suppose G = (N. Lemma 4 can hold with strict inequality in general graphs. ν(G) = n τ (G). For the bipartite graph in Figure 14 the matching number (and the vertex cover number) is two. 18 . Hence. due to Ko¨ ig shows. Then. 1 a 2 b 3 c 4 d Figure 14: Matching number and vertex cover number in bipartite graphs Figure 14 shows a bipartite graph and its maximum matching edges (in dark) and minimum vertex cover (in dark). as shown with black vertices. E) is a bipartite graph. consider the maximum matching. has two vertices. This implies that for every graph G. A minimum vertex cover. Consider the graph in Figure 13. as shown with the dashed edge. has one edge. ν(G) ≤ τ (G).

E \ E i ). We argue that P does not contain j. Since j is covered by M and not by M ′ . This also implies that k is not covered by M ′ and P has even number of edges. Suppose i ∈ B. this component must be a path . Note that j is not covered by M ′ and the other endpoint k of P ′ is also not covered by M ′ . Consider the path P ′ formed by adding edge {i. Note that P contains alternating edges from M and M ′ (not in M). j} ∈ E. Note that the edge {i. The theorem is clearly true if G has one or two vertices.else adding {i. So. ν(G′ ) = τ (G′ ). there must exist a vertex i ∈ N such that every maximum matching of G must cover i. This implies that j ∈ B. both the end points of P must be in B. j} to M gives another matching which is larger in size than M. The other endpoint of P must be a vertex k which is covered by M .denote this path by P . i must be an end point in this component. A graph may have multiple maximum matchings. we conclude that j is not in P . By Lemma 5. Suppose the theorem holds for any bipartite graph with less than n vertices. P deﬁnes an M-augmenting path. Consider the graph G′ = (N. Note that j must be covered by M . Lemma 5 Suppose G = (N. This is a contradiction by Theorem 5 since M ′ is a maximum matching. Similarly. Suppose i is not covered by maximum matching M and j is not covered by maximum matching M ′ . Such a component will have alternating edges in and out of M and M ′ . j must be an endpoint of P . This contradicts the fact that {i. let N = B ∪ L and every edge {u. We have alternating edges in and out of M ′ in P ′ . Note that G′ is bipartite and contains one less vertex. E) is a bipartite graph with E = ∅.We will require the following useful result for proving Theorem 6. Proof of Theorem 6 Proof : We use induction on number of vertices in G. 19 . there exists a vertex in G which is covered by every maximum matching. The following result says that there is at least one vertex which is covered by every maximum matching if the graph is bipartite. Hence. Hence. Then. E) be a bipartite graph with n vertices. v} ∈ E is such that u ∈ B and v ∈ L. Consider the graph G′ = (N \ {i}. Let G = (N. j} to P .else. P ′ deﬁnes an M ′ -augmenting path. Proof : Assume for contradiction that every vertex is not covered by some maximum matching. This means j is an end point of P ′ . contradicting that M is a maximum matching by Theorem 5. Further. i must be covered by M ′ . M ∪ M ′ ). Suppose P contains j. Since G is bipartite. j} is an edge in G. j} is not in (M ∪ M ′ ). Since i is covered by M ′ and not by M. Let E i be the set of edges in G for which i is an endpoint. A component of G′ must contain i (since M ′ covers i). Consider any edge {i. Since the number of edges in P is even.

This theorem has several corollaries. We use this fact.. / edge from j to i. This means τ (G) ≤ ν(G). Corollary 2 Every regular bipartite graph (with positive degree) has a perfect matching. ν(G′ ) ≥ ν(G)−1. ν(G′ ) ≥ ν(G). • For every {i. we get a matching of G′ . there exists a maximum matching of G′ . This means. Suppose ν(G′ ) > ν(G)−1. the minimum vertex cover of G must have no more than τ (G′ ) + 1 = ν(G) vertices. j} ∈ M with i ∈ B and j ∈ L. we create the edge (j. A matching of graph G is perfect if it covers all the vertices of G. j) in graph GM . By deleting the edge covering i in any maximum matching of G. Hence. Such a maximum matching of G′ must be a maximum matching of G as well and cannot cover i since i is not in G′ .3 Algorithm for Maximum Matching We describe a simple algorithm to ﬁnd a maximum matching. 20 . and has as many edges as the maximum matching matching of G. Hence. i) in graph GM . This shows that ν(G′ ) = τ (G′ ) = ν(G) − 1. edge from i to j.e. where we proved that any matching is either a maximum matching or there exists an augmenting path of that matching which gives a larger matching than the existing one. Let M be any matching of bipartite graph G = (N. E) has a perfect matching if and only if each 1 vertex cover has size at least 2 #N. Consider the minimum vertex cover C of G′ and add i to C. Corollary 1 A bipartite graph G = (N. i. We leave the proofs of these corollaries as an exercise. Hence. j} ∈ E we have i ∈ B and j ∈ L. we create the edge (i.We show that ν(G′ ) = ν(G) − 1. we construct a directed graph GM from G as follows: • The set of vertices of GM is N. A graph is regular if every vertex has equal degree. which is also a matching of G. Hence. E) and N = B ∪ L such that for every {i. i.. Given the matching M. τ (G) = ν(G). The algorithm starts from an arbitrary matching and searches for an augmenting path of that matching. • For every {i. Clearly C ∪ {i} is a vertex cover of G and has τ (G′ ) + 1 vertices. This is a contradiction since i is a vertex covered by every maximum matching of G. We have already laid the foundation for such an algorithm earlier in Theorem 5. j} ∈ M with i ∈ B and j ∈ L. 6.e. But we know from Lemma 4 that τ (G) ≥ ν(G).

Proof : Consider a directed path P in GM which starts from a vertex in LM and ends at vertex in B M . Since edges from L to B are not in M and edges from B to L are in M in GM . The corresponding path in G gives an M-augmenting path. This shows that P is a directed path in GM which starts from a vertex in LM and ends at a vertex in B M . a}. 4) is a path in GM which starts at LM and ends at B M (see Figure 16). 1.if the starting point belonged to B M . Consider the matching M shown in Figure 15 and the directed graph GM . c}. alternating edges in P is in and out of M. b}. Hence. Hence. to ﬁnd an augmenting path of a matching. Note that every vertex in B M has no outgoing edge and every vertex in LM has no incoming edge. we need to ﬁnd a speciﬁc type of path in the corresponding directed graph. Lemma 6 A path in G is an M-augmenting path if and only if it is the corresponding path of a directed path in GM which starts from a vertex in LM and ends at a vertex in B M . By deﬁnition. then there will be no incoming edge. For the converse. the corresponding directed graph GM is shown on the right in Figure 15. d} (see Figure 16). It is now easy to see that this is indeed 21 . For the matching M. Hence.1 a 1 a 2 b 2 b 3 c 3 c 4 d 4 d Figure 15: A bipartite graph with a matching Consider the bipartite graph in Figure 15 (left one) and the matching M shown with dark edges. a. {3. The directed path (b. We ﬁrst prove a useful lemma. the corresponding path in G is an M-augmenting path. consider an M-augmenting path in G and let P be this path in GM with edges appropriately oriented. Note that endpoints of P are not covered by M. For every directed path in GM the corresponding path in G is the path obtained by removing the directions of the edges in the path of GM . the endpoints of P are not covered by M. the starting point of P is in LM and the end point of P is in B M . 2. {4.{b}. There is only one vertex in LM . c. {2. then there will be no outgoing edge and if the end point belonged to LM . The new matching from this augmenting path assigns: {1. Let B M be the set of vertices in B not covered by M and LM be the set of vertices in L not covered by M.

1. deﬁne C := (L \ RM ) ∪ (B ∩ RM ). no edge of G connects L \ RM and B ∩ RM . So for each edge {i. d. and since no edge in M is contained in C. So. Call such a set of vertices RM . C is a minimum vertex cover. then it must be the last vertex in the path which starts from a vertex in LM . Figure 17 shows its maximum matching (in dark edges) M and the directed graph GM suggested by Lemma 6.a vertex i is reachable from a vertex j in a directed graph if there is a path from j to i. a}. which is a minimum vertex cover. and this will deﬁne an M-augmenting path. b}. we have #C ≤ #M. 1 a 2 b 3 c 4 d Figure 17: Minimum vertex cover from maximum matching 22 . since no edge of GM leaves RM . From our arguments. In Figure 17. we have LM = {c. i ∈ RM if and only if j ∈ RM .a maximum matching (if it was not. j} in M. we show how to compute a minimum vertex cover from a maximum matching in a bipartite graph. Consider the bipartite graph G in Figure 14. Therefore. a contradiction since M is a maximum matching.because if some vertex in i ∈ RM belongs to B M . Moreover. We ﬁrst consider the set of vertices reachable from the set of vertices in LM in GM . Since C is disjoint from B M ∪ LM . d} and RM = {c. C deﬁnes a vertex cover of G. we have C := {1. then we would have continued in the algorithm to ﬁnd an augmenting path of this matching). Note that RM ∩ B m = ∅ . In Figure 17. 1 a 1 a 2 b 2 b 3 c 3 c 4 d 4 d Figure 16: A bipartite graph with a matching Now.

. e. ik . f ). ik+1 ) such that (i1 . ik ) such that (ij . and w is a vector of weights on edges with w(i. f ) = 4. . . Then. and is denoted as l(P ) = w(i1 . We denote the length of the shortest path from i to j as s(i. ik+1 ) is the sum of the edge lengths in the path or cycle. Suppose there is at least one path from node i to node j. . . f ) is 5 + (−3) + (−2) + 4 = 4. A cycle is a sequence of nodes (i1 . d. . w). s(a. . • (a. ij+1 ) ∈ E for all 1 ≤ j ≤ k − 1. . f ): 5 + (−3) + (−2) + 4 = 4. The length of a path or a cycle P = (i1 . .7 Basic Directed Graph Definitions A directed graph is deﬁned by a triple G = (N. i2 ) + . b. j) ∈ R denoting the weight or length of edge (i. If (i1 . d. and the shortest path from a to f is (a. E ⊆ {(i. . . b. The length of the path (a. The length of the cycle (c. E. b. j). ik+1 ). and i1 = ik+1 . . e. . . + w(ik . Hence. e. A path from a to f is (a. where N = {1. i) = 0 for all i ∈ N. We denote s(i. e. A cycle in the graph is (c. b 5 10 a 4 c 2 1 −2 4 e 3 f −3 d Figure 18: A Directed Graph A path is a sequence of distinct nodes (i1 . f ): 4 + 1 + (−2) + 4 = 7. e. Figure 18 shows a directed graph. . d. d. j ∈ N} is the set of edges (ordered pairs of nodes). c) is 1 + (−2) + 2 = 1. . . ik . The possible paths from a to f with their corresponding lengths are: • (a. ik ) is a path. f ): 5 + 3 = 8. . b. . . b. f ). A graph is strongly connected if there is a path from every node i ∈ N to every other node j ∈ N \ {i}. . n} is the set of n nodes. then we say that it is a path from i1 to ik . . • (a. . ik+1 ) ∈ E. e. (ik . c). the shortest path from node i to node j is a path from i to j having the minimum length over all paths from i to j. e. f ): 10. d. . . c. 23 . A complete graph is a graph in which there is an edge between every pair of nodes. j) : i. d. d. j) ∈ E. • (a. . ik ) is a path. Notice that the length of an edge is not restricted to be non-negative.

Potentials do not always exist. we can write p(i2 ) − p(i1 ) ≤ w(i1 . where 0 is a new (dummy) vertex. . ik ) p(i1 ) − p(ik ) ≤ w(ik . (ij . Hence. there is a path from 0 to every vertex in G′ . Observe that if G contains no cycle of negative length then G′ contains no cycle of negative 24 . . i p(i) w(i. . Figure 19 illustrates the idea of potentials. The following theorem provides a necessary and suﬃcient condition.. i1 ) ∈ E. ij+1) ∈ E for all 1 ≤ j ≤ k − 1 and (ik .7. we get w(i1 . By deﬁnition of a cycle. The weights of new edges in G′ are all zero.. G′ has all the edges of G and new edges from 0 to every vertex in N.j) >= p(j) Figure 19: Idea of potentials Notice that if p is a potential of graph G. ik . so is {p(j) + α}j∈N for all α ∈ R. w) if and only if G has no cycles of negative length. ≤ . ik . The right had side of the inequality is the length of the cycle (i1 . which is shown to be non-negative. i1 ). . ik )+w(ik . . .e. j) for all (i. . i3 ) . i1 ).1 Potentials Definition 4 A potential of a directed graph G is a function p : N → R such that p(j) − p(i) ≤ w(i..+w(ik−1.. i1 ) ≥ 0. Clearly.. i2 )+. p(i ) − p(i k k−1 ) ≤ w(ik−1 . Theorem 7 There exists a potential of directed graph G = (N. i1 ). . i.. The set of edges of G′ is E ∪ {(0. . i2 ) p(i3 ) − p(i2 ) ≤ w(i2 . ≤ .. whereas weights of edges in G remain unchanged in G′ . Proof : Suppose a potential p exists of graph G.. Now. . . E.j) j p(j) p(i) + w(i. We construct another graph G′ from G as follows. j) : j ∈ N}.. The set of vertices of G′ is N ∪ {0}. Adding these inequalities. suppose every cycle in G has non-negative length. Consider a cycle (i1 . j) ∈ E.

j) creates a cycle. i)+s(i. j) = s(0. 0). s(0. s(0. 0) + w(i. j). 0) ≤ w(i.5 −2 4 0 −2 0 1 0 4 0 0 4 1 1 4 2 −3 2 1 0 2 3 2 −3 3 Figure 20: A directed graph and the new graph with the dummy vertex length. 0)) ≤ w(i. Consider any (i. Hence. there is a path from every vertex in N to 0. i) + w(i. We consider two cases. By our assumption. We claim that s(0. i) + w(i. s(j. j). j) − s(0. s(j. Now. Graph G′ still contains a new dummy vertex but new edges are now from vertices in G to the dummy vertex 0. s(j. Case 2: The shortest path from j to 0 includes vertex i. Hence s(0. Hence. by deﬁnition of shortest path s(0. 0). j). j) or s(0. j) = s(j. i) + w(i. 0) for all j ∈ N deﬁnes a potential for graph G. In that case. In that case. Consider any (i. j) ≥ 0. Hence. whose length is given by s(j. which gives 25 . We consider two cases. j). Case 1: The shortest path from j to 0 does not include vertex i. j) ≥ 0 (non-negative cycle length). We claim that −s(j. G′ contains no cycle of negative length if G contains no cycle of negative length. j). s(j. i) ≤ w(i. j) ∈ E. s(0. j) − s(0. Case 1: The shortest path from 0 to i does not include vertex j. j) is the length of cycle created by taking the shortest path from j to i and then taking the direct edge (i. Figure 20 shows a directed graph and how the graph with the dummy vertex is created. i) = s(0. i) ≤ w(i. i). But s(j. 0) + w(i. i) + w(i. j). By our assumption. i) + w(i. Hence. j). j) ≤ s(0. In both cases. j) + s(j. 0) − (−s(i. But the shortest path from j to i and then edge (i. j) ∈ E. s(0. An alternate way to prove this part of the theorem is to construct G′ slightly diﬀerently. j) ≥ s(0. j) + s(i. i) + w(i. s(j. Case 2: The shortest path from 0 to i includes vertex j. j). Moreover. j) + s(j. j) − s(0. by deﬁnition of shortest path s(i. 0). j) + s(j. 0). i) + w(i. i) + w(i. In such G′ . Hence. j) ≥ s(i. j) for all j ∈ N deﬁnes a potential of graph G. i) + w(i. −s(j. 0) = s(j. we have shown that s(0. Hence. j) for all j ∈ N deﬁnes a potential of graph G. Now. i) ≤ w(i.

To ﬁnd if the above system of inequalities have a solution or not. 3. we have established how to compute a potential when it exists. j). there exists no potential of this graph by Theorem 7. It also shows an elegant way of verifying when a system of inequalities (of the potential form) have a solution. 2. 3) in this graph has a length (−3) + 1 = (−2). a solution to these diﬀerence inequalities correspond to potentials of this graph. 0)) ≤ w(i. Figure 21 shows the graphical representation. It can be easily seen that the cycle (3. The proof of Theorem 7 shows a particular potential when it exists. Consider the following system of inequalities. Hence. Inequalities of this form are called diﬀerence inequalities. 26 . we construct a graph with vertex set {1. From the proof of Theorem 7.1 2 2 0 2 −1 −3 3 4 1 Figure 21: A graphical representation of diﬀerence inequalities −s(j. 4} and an edge for every inequality with weights given by the right hand side of the inequalities. then shortest such paths deﬁne a potential. Clearly. 4. 0) − (−s(i. x1 − x2 ≤ 2 x2 − x4 ≤ 2 x3 − x2 ≤ −1 x3 − x4 ≤ −3 x4 − x1 ≤ 0 x4 − x3 ≤ 1. It suggests that if we have a vertex from which a path exists to every vertex or a vertex to which a path exists from every other vertex.

So the budget set of the agent is S = {x ∈ Rm : p · x ≤ B}. −4) is a potential of this graph. For example. w) is a directed graph with no cycle of negative length and i is a vertex in G such that there is a path from i to every other vertex in G. D 2 . 2) = 3 and s(3. It can be veriﬁed that this graph does not have a cycle of negative length. Now. The agent has a ﬁxed budget B in each period from which he decides to consume some commodities x ∈ Rm . . The vector of data points is denoted by D = (D 1 . j) for all j ∈ N \ {i} and p(i) = 0 deﬁnes a potential of graph G. . 2) = 4. The agent faces the same price vector p ∈ Rm in each + period. Then p(j) = s(i. 0. ﬁx vertex 2. xi ). Let N = {1. then p(j) = −s(j. Hence. . 3) = −3. Proof : The proof is similar to the second part of proof of Theorem 7 . 1 −1 −2 3 4 −3 3 2 4 Figure 22: Potentials for a complete directed graph 8 Application: Rationalizability There is an agent (buyer) who is faced with a market with m commodities in n periods. −3) to be another potential of this graph. Figure 22 gives an example of a complete directed graph. + + where p · x = m pj xj . i) for all j ∈ N \ {i} and p(i) = 0 deﬁnes a potential of graph G. j=1 A data point in period i is D i = (p. The utility of an agent in period i is given by an utility function u as follows: u(xi ) + (B − p · xi ). Similarly. E. D n ). . One can also compute s(2. . 1) = −2 and s(2. . the agent chooses an element in S in every period. So. . if i is a vertex in G such that there is a path from every other vertex in G to i.Theorem 8 Suppose G = (N. 0.the only diﬀerence being we do not need to construct the new graph G′ and work on graph G directly. . a set of potentials can be computed using Theorem 8. n} be the set of periods. One can compute s(1. 27 . which gives (−2. (−3.

. Suppose it is rationalizable by u. . The rationalizable graph GD has a node for every period in N and a directed edge from every period (node) i to every other period j = i. the sequence of decisions D satisﬁes NCC. (1) ∀ j ∈ N. . GD has no cycle of negative length. . 1].where u(xi ) is the utility from receiving the quantity of goods xi and (B − p · xi ) is the utility from unspent money. D n ) is rationalizable if there exists a concave utility function u : Rm → R+ such that 3 + xi ∈ arg max[u(x) + (B − p · x)] x∈S ∀ i ∈ N. The central result is the characterization of rationalizability using NCC. x1 . Proof : Consider a sequence of decisions D. . Definition 5 A sequence of decisions D = (D 1 . First. Now. We denote this graph as GD . . suppose we do not know the utility function of the agent but observe his decisions. Now. j) = p · (xj − xi ). . αu(x) + (1 − α)u(y) ≤ + + u(αx + (1 − α)y). We say a sequence of decisions D satisﬁes non-negative cycle condition (NCC) if every cycle in the rationalizable graph GD has non-negative length.. xn ∈ S. and call it the rationalizable graph. A function u : Rm → R is concave if for every x. . Note that the budget set of the agent is same in every period. let us focus on the necessary conditions for rationalizability. j ∈ N. Then u must satisfy Inequalities 1. . The weight of the edge from period i to period j is w(i. when can we ﬁt a utility function to a sequence of purchase decisions? This question is formalized below. It is clear that if a sequence of decisions D is rationalizable by a utility function u then for every period i ∈ N u(xi ) + B − p · xi ≥ u(xj ) + B − p · xj In other words. y ∈ Rm and every α ∈ [0. u(x2 ). So. . u(xn ) give a potential of rationalizable graph GD . the utility function u must satisfy u(xj ) − u(xi ) ≤ p · (xj − xi ) ∀ i. 3 28 . Hence.e. When can we conclude that the agent is an utility maximizer? In other words. . This implies that u(x1 ). i. Theorem 9 A sequence of decisions D is rationalizable if and only if it satisﬁes NCC. D 2 . . we can associate a complete weighted directed graph with Inequalities (1).

. 1]. Consider the any potential π : N → R. the graph D has a potential. . . . Let u(z) = u(xj ) + p · (z − xj ). means NCC is easy to satisfy. suppose D satisﬁes NCC. t2 . j∈N To see that u is indeed rationalizable.Now. . low value of n. . We construct a concave utility function u from this potential as follows: u(xi ) = π i i∈N ∀i∈N ∀ x ∈ {x1 . Then. . 9 Application: One Agent Implementation Consider an agent coming to an interview. u is concave. his ability. . Note that having less data points.e. Let us assume that type of the agent is a real number in a ﬁnite set T = {t1 . The 29 . for better veriﬁcation of rationalizability. / u(x) = min[π i + p · (x − xi )] Note that for every i. u(xi ) = min[u(xj ) + p · (xi − xj )]. we must increase our data set. Finally. The agent has a private information. j∈N Thus. Hence. n} and t1 < t2 < . . j ∈ N. < tn . x2 . Consider z = αx + (1 − α)y. note that for every i ∈ N and for every x ∈ S i u(x) ≤ u(xi ) + p · (x − xi ) ⇒ u(x) − p · x ≤ u(xi ) − p · xi . we have u(x) = min[u(xj ) + p · (x − xj )]. Hence.. for every x. αu(x) + (1 − α)u(y) ≤ αu(xj ) + αp · (x − xj ) + (1 − α)u(xj ) + (1 − α)p · (y − xj ) = u(xj ) + p · [αx + (1 − α)y − xj ] = u(xj ) + p · (z − xj ) = u(z). As the number of data points increase. So. u(xi ) = π i ≤ π j + p · (xi − xj ) = u(xj ) + p · (xi − xj ). . . By deﬁnition. for every i ∈ N. tn }. xn }. which is called his type. the NCC condition becomes diﬃcult to satisfy. . to see that u is concave. where ti ∈ R for all i ∈ {1. . i. . take x and y and α ∈ [0.

30 . 1. called the allocation. Along with the allocation. t ∈ T and for allocation rule a w(s. s). 1] is implementable if there exists a payment rule p : T → R such that reporting true type is a dominant strategy. 2} and v(a(s). Deﬁne for every s. if it exists. Indeed. the agent derives some value from the job. i. we say payment rule p implements allocation rule a. t ∈ T. We can say an allocation rule a is implementable if there exists a payment rule p such that p(s) − p(t) ≤ w(t. The constraints of implementability admit a potential form. Then. his net utility is v(a(s). t) + p(s) ∀ s. In this case. Given an allocation and his ability. t) being w(s. This leaves the room open for the interviewer to report any type to increase his utility.e. t) + p(t) ≥ v(a(s). we can ﬁnd a particular payment rule. s) − v(a(t). 1]. Definition 6 An allocation rule a : T → [0.interviewer does not know the type of the agent. t) = v(a(s). 1] × T → R+ . an allocation rule is a mapping a : T → [0. Consider the complete directed graph Ga corresponding to allocation rule a with set of vertices being T and length of edge (s. This is again a function of the reported type. We give two examples of allocation rules for T = {0. say the lowest type t1 . there is a payment done to the agent. s). v(a(t). Such a payment rule exists if and only if Ga has no cycles of negative length. t).. t ∈ T . a payment rule is a mapping p : T → R. the payment rule deﬁnes the potential of Ga . This is captured by the valuation function v : [0. 1]. We assume that if an agent reports type s to an allocation rule a and payment rule p when his true type is t. The allocation reﬂects the probability of getting the job or the fraction of the responsibility assigned to the agent. and taking the shortest path from t1 to every other type in Ga . the interviewer assigns a number in [0. The agent reports some type and given this type. The interviewer knows the set T but does not know what the actual type of the agent. t) + p(s). by ﬁxing a particular type. t) = a(s) × t for all s. So. So.

So. 0) = v(a(1). 0) = v(a(2). 1) = v(a(2). 0) − v(a(1). 0) − v(a(1). 2) = v(a(0). 2) = 2. 0) = v(a(2). 0) − v(a(2).5. w(0. a(2) = 1.5 w(1.5 −1 1 2 Example 1 2 1 1 Example 2 2 Figure 23: Ga for Example 1 and Example 2 Example 2: Suppose a(0) = 0. 1) = v(a(2). It is easily seen that there is no negative length cycle of this digraph. 1) − v(a(2). which gives p(1) = 0. 1) = v(a(0). 2) = v(a(1). 1) − v(a(0). 2) = v(a(1). 1) = v(a(0). p(2) = −0.Example 1: Suppose a(0) = 1. 1) = 0. 0) = 0 w(0. 2) − v(a(1). 2) = 2 w(2. 2) = 1. the edge lengths of Ga is as shown below. 2) = 0 w(2. 1.5. 0) = 0 w(0. 2) − v(a(0). w(0. Then the edge lengths of Ga is as shown below. a is not implementable in this example. 1) = −0. 2) = v(a(0). 1) = −1 w(2. a is implementable in this example.5 w(2. 1) − v(a(0). 0) = 0 w(1. The digraph Ga is shown in ﬁgure 23. 0) − v(a(2). One particular payment rule which implements a in this example is to set p(0) = 0 and consider the shortest paths from 0. 0) = v(a(1). 0) is a negative length cycle of this digraph. 0) = 0 w(1. The digraph Ga is shown in ﬁgure 23. Then. It is easily seen that (0. So. 0 0 0 −1 0 0 0. 1) − v(a(2). 31 .5 0 2 0 −0. a(1) = 0. 1) = −1 w(1. a(2) = 1. 2) − v(a(1). a(1) = 0. 2) − v(a(0).

x ∨ y = (1. If a graph contains a potential. deﬁned by (x ∨ y)i = max(xi . Any rectangle in + R2 is also a lattice. then we can generate all the potentials of such a digraph by translating it by a constant. yi) for all i. It is instructive to look at a complete graph with two vertices and edges of length 2 and −1. In this section. There are other ways to construct new potentials from a given pair of potentials. y ∈ X implies x ∧ y. and x ∨ y. Without loss of generality. This shows that there is more structure shown by potentials of a digraph. there exists a constant α ∈ R such that p(j) = q(j) + α for all j ∈ N. Dashed regions in Figure 24 shows the set of potentials of this graph. q(i)) for all i ∈ N. Alternatively. then this ﬁgure would have been the 45-degree line passing through the origin. The following lemma shows that the set of potentials of a digraph form a lattice. We give some examples of lattices in R2 . We say a set of n-dimensional vectors X ⊆ Rn form a lattice if x. Consider any edge (j. This shows that p′′ is a potential. 1) does not belong here. consider the circular disk at origin of unit radius. Definition 7 We say a strongly connected digraph G = (N. x ∧ y and x ∨ y is also in R2 . E. To see this. we investigate conditions under which a unique potential (up to a constant) may exist. Potentials exist in this graph. deﬁned by (x ∧ y)i = min(xi . k ∈ N. Without loss of generality let p′′ (k) = p(k). The whole of R2 is a lattice since if we take x. Then p′ (k) − p′ (j) = p′ (k) − p(j) ≤ p(k) − p(j) ≤ w(j. This shows that p′ is a potential. w). w) satisﬁes potential equivalence if for every pair of potentials p and q of G we have p(j) − q(j) = p(k) − q(k) for all j. there may exist many potentials. then so is q. Indeed. k) (since p is a potential). Though x = (1. then the lemma is true.10 Unique Potentials We saw that given a digraph G = (N. We focus attention on strongly connected digraphs. let p′′ (i) = max(p(i). Proof : If a graph does not contain any potentials. So. Consider any edge (j. k) (since p is a potential). Then p′′ (k) − p′′ (j) = p(k) − p′′ (j) ≤ p(k) − p(j) ≤ w(j. Lemma 7 The set of potentials of a digraph form a lattice. 1) belong to this disk. consider two potentials p and q. q(i)) for all i ∈ N. if p is a potential. yi ) for all i both belong to X. if we ﬁnd one potential. where q(j) = p(j) + α for all j ∈ N and α ∈ R is some constant. Now. y ∈ R2 . Note that if edge lengths were 1 and −1. However. 0) and y = (0. E. Similarly. k) ∈ E. k) ∈ E. 32 . a circular disk in R2 is not a lattice. it says that if a digraph G satisﬁes potential equivalence then for every pair of potentials p and q. Let p′ (i) = min(p(i). R2 is a lattice. let p′ (j) = p(j).

k). k). Proof : Suppose the digraph G satisﬁes potential equivalence. k). we get p(k)−p(j) ≤ s(j. E. k). where p(j) = s(j. p(k) − p(j) = s(j. k). Hence. Indeed. p(j)−p(k) ≤ s(k. k) + s(k. However. j 1 . Consider any potential p of G. This gives. w(2. potential equivalence fails in this digraph. Hence. w(2. k) + s(k. j) = 0 for all j. and hence will have potentials). + w(j q . . . 1) = −1. k).p(2) p(2) − p(1) =−1 p(1) − p(2) = 2 p(1) Figure 24: Potentials of a complete graph with two vertices Let us go back to the digraph with two nodes N = {1. k ∈ N. we have s(j. j) = s(j. These insights are summarized in the following result. q(2) = 0. Let it be (j. . j) = 0. k ∈ N (note that such a digraph will always have cycles of non-negative length. 1) = −1. 2} and w(1. j 2 ) + . suppose s(j. p(2) = 2 and q(1) = −1. We can write s(j. q in this digraph as follows: p(1) = 0. 2) = 2. Then we have p(j) − q(j) = p(k) − q(k) or s(j. Then consider the potentials of G by taking shortest paths from j and k . if we modify edge weights as w(1. w) satisﬁes potential equivalence if and only if s(j. j) = 0 = p(k) = s(k. Note that p(1) − q(1) = 1 = p(2) − q(2) = 2. Consider two potentials p. . Theorem 10 A strongly connected digraph G = (N. Now. j) − s(k. . 2) = 1. + p(k) − p(j q ) = p(k) − p(j). k) − s(k. k) = w(j. . Similarly. j q . j 1 ) + w(j 1 . . k) + s(k. j) or p(k)−p(j) ≥ −s(k. now we can verify that potential equivalence is satisﬁed. k) ≥ p(j 1 ) − p(j) + p(j 2 ) − p(j 1 ) + . then the p above is no longer a potential. j) = s(j. for any two potentials p and q we have p(k) − p(j) = q(k) − q(j) = s(j. 33 . j) = 0 for all j. .denote them by p and q respectively. Consider the shortest path from j to k. k). Hence. So.

denoted by s. Notice that p and q do not diﬀer by constant.It is instructive to look at the right digraph in Figure 23. the maximum ﬂow problem tries to ﬁnd a feasible ﬂow that maximizes the value of the ﬂow. we imply that G is a digraph with a source vertex s and terminal vertex t. c). 1) = 0 and s(1.so by Theorem 10 potential equivalence must fail in this digraph. p(1) = 0.5. 0) = 0. A ﬂow of a ﬂow graph G = (N. E. j) A ﬂow f is a feasible ﬂow for a ﬂow graph G = (N. where the weight function c : E → R++ (positive) reﬂects the capacity of every edge. c) is given by ν(f ) = δt (f ). E. This can also be observed by noting that s(0. denoted by t. E. inﬂow. So.i)∈E + − δi (f ) = δi (f ) − δi (f ). the outﬂow. 11 The Maximum Flow Problem We are given a directed graph G = (N. j) and 2. c) is a ﬂow graph. E. c). j) ≤ c(i. and the terminal vertex. Given a ﬂow f for a ﬂow graph G = (N. f (i. So. q(1) = 0. E. c) if 1. We already saw that p(0) = 0. E. c) is a function f : E → R+ . c) such that for every feasible ﬂow f ′ of G. j) f (i. t}. p(2) = −0.5 is a potential of this digraph. f (i. So this digraph fails potential equivalence. feasibility requires that every ﬂow should not exceed the capacity and excess ﬂow at a node must be zero. δi (f ) = 0. The value of a feasible ﬂow f in ﬂow graph G = (N.5 .j)∈E + δi (f ) = (j. for every (i. Call such a digraph a ﬂow graph. we have δt (f ) ≥ δt (f ′ ). Note that it is customary to assume that there are no edges out of t and no edges into 34 . We are also given two speciﬁc vertices of this digraph: the source vertex. for every i ∈ N \ {s. j) ∈ E. Another potential can be obtained by taking shortest paths from vertex 1: q(0) = 0. So. q(2) = −0. whenever we say G = (N. we can ﬁnd out for every vertex i ∈ N. and excess as follows: − δi (f ) = (i. E. Definition 8 The maximum ﬂow problem is to ﬁnd a feasible ﬂow f of a ﬂow graph G = (N.5.

routes which pass through various other cities). The ﬁrst property is immediate. if we assume.the inﬂow of one node is the outﬂow of some other node. δs (f ) + δt (f ) = 0. This implies that the problem of ﬁnding a maximum ﬂow is equivalent to ﬁnding a ﬂow which maximizes ﬂow into the terminal node. Hence. 35 . But we know that i∈N δi (f ) = 0 . In the end..1 Analysis of the Maximum Flow Problem We now analyze some properties of the maximum ﬂow problem. We want to determine what is the maximum traﬃc that can go from Delhi to Mumbai. we will discuss a variety of these applications. The capacity of traﬃc from a city to another city is given (by the train services between these two cities). the solution of the problem is the solution to the max ﬂow problem. 2 1/1 1/0 1/1 s 2/2 t 2/1 1 Figure 25: Feasible ﬂow The maximum ﬂow problem has many applications. Figure 25 shows a ﬂow graph with a feasible ﬂow. Then. So. Suppose there are two cities.e. connected by several possible rail networks (i. It is easy to verify that this ﬂow is feasible (but verify that this is not a maximum ﬂow). δs (f ) + δt (f ) = 0. say Delhi and Mumbai. Lemma 8 Suppose f is a feasible ﬂow of ﬂow graph G = (N. c) with s and t being the source and terminal vertices. E. is equivalent to maximizing the outﬂow from source. Proof : Since δi (f ) = 0 for all i ∈ N \ {s. we have i∈N δi (f ) = δs (f ) + δt (f ). 11. t}.s. A consequence of this lemma is that the problem of ﬁnding a maximum ﬂow can be equivalently formulated as minimizing the excess ﬂow in the source or. On every edge. One original application was railways. capacity followed by ﬂow amount is written. the source cannot receive any ﬂow.

3. j). j) for all (i. 2}. j ∈ S} and S + = {(i. c) is deﬁned as κ(S) = (i. An (s. Figure 27 shows a cut in the same graph which meets the ﬁrst part of the deﬁnition (i. 2. N \ S) in ﬂow graph G = (N. ν(f ) ≤ κ(S). / / The capacity of a cut (S. {1. E. then f is a maximum ﬂow. N \ S) is saturated for ﬂow f . 36 . ﬂow in the cut equals capacity) but fails the second part since f (1. c) is (S. if (S. c) and any (s.The concept of a cut is important in analyzing the maximum ﬂow problem. t)-cut of digraph G = (N. For every such cut. N \ S) such that s ∈ S and t ∈ N \ S. (S. j) ∈ S + . Figure 26 shows a saturated cut: ({s. deﬁne S − := {(i.j)∈S − c(i. N \ S). N \ S) is saturated for ﬂow f . E. t}). t)-cut (S. i ∈ S}. In ﬂow graphs. 2) = 0. E. a cut is similar to a cut in an undirected graph: a partitioning of the set of vertices. j) ∈ S − and f (i. ν(f ) = κ(S). Lemma 9 For any feasible ﬂow f of a ﬂow graph G = (N.e. t)-cut (S. if (S. 2 1/1 1/1 1/0 s 2/2 t 2/2 1 Figure 26: Saturated cut The second part of the deﬁnition of saturated cut is equally important. E. j) ∈ E : i ∈ S. Definition 9 An (s. j) = 0 for all (i. N \ S) in ﬂow graph G = (N. N \ S) of G 1. j) = c(i. c) is called a saturated cut for ﬂow f if f (i. j) : j ∈ S.

we know that ν(f ′ ) ≤ κ(S) = ν(f ). 11. For any feasible ﬂow f ′ . then ν(f ) = κ(S). So (2) follows. We deﬁne the residual digraph Gf for ﬂow f as follows: • The set of vertices is N (same as the set of vertices in G). j) (i. Using Lemma 8. j) (i. The ﬁrst is the construction of a residual digraph. Hence. j) − f (i. j) = κ(S). For (3). 37 . where the inequality comes from feasibility of ﬂow. Let f be a feasible ﬂow in ﬂow graph G = (N. (3) follows. note that if (S.j)∈S − ≤ ≤ (i. we get ν(f ) = −δs (f ) = − i∈S δi (f ) f (i. Note that both the inequalities are equalities for saturated ﬂows. E.2 1/1 1/0 1/1 s 2/2 t 2/1 1 Figure 27: A cut which is not saturated Proof : We prove (1) ﬁrst. j) ∈ E.2 The Residual Digraph of a Flow We now proceed to identify some key properties which will help us identify a maximum ﬂow. • For every edge (i.j)∈S + = (i. c).j)∈S − f (i. N \ S) is saturated for ﬂow f .j)∈S − c(i.

j) = c(i. j) − f (i. In that case. So. the residual digraph Gf = (N. j). then (i. j) > 0. i) = f (i. c) and Gf be the residual digraph for ﬂow f . – Reverse Edge: if f (i. then (j. i) is an edge in Gf with capacity cf (j. The set of edges of Gf is denoted as E f . 38 . Note that this may create two edges from some i to some j in Gf . we keep the edge which has minimum capacity. The feasible ﬂow f is a maximum ﬂow for G if and only if there is no path from s to t in Gf . j). j). E f . Theorem 11 Let f be a feasible ﬂow of a ﬂow graph G = (N. j) < c(i. j) is an edge in Gf with capacity cf (i. E.– Forward Edge: if f (i. 2 2 1/1 1/0 1 1 1/1 s 2/2 t s 1 t 1 2/1 2 2 1 1 Figure 28: Residual digraph of a ﬂow 2 1 1/1 1/1 2 1 1/0 s 2/2 t s t 2/2 2 2 1 1 Figure 29: Residual digraph of a ﬂow The next theorem illustrates the importance of a residual digraph. cf ). We illustrate the residual digraphs for two ﬂows in Figures 28 and 29.

For any vertex i not part of path P . Then. Flow Balancing Constraints. v1 ) be the edge in P which is outgoing from s.Proof : Suppose f is a maximum ﬂow. j) ∈ E P . Then. . 4. j). and capacity constraints are satisﬁed. j) + δ ≤ c(i. the ﬂow balancing constraints hold. First. j) ∈ E P . Let (s. and − + • f ′ (i. j) − δ ≥ 0. Let E P be the set of edges in P and let E P be the set − of forward edges in P and E P be the set of reverse edges in P . we decrease ﬂow by δ ≤ cf (i. Then. 2. i) is a forward edge and (i. j) − δ if (i. (ip . i) be the edge incoming to i in P / s and (i. i) is a reverse edge and (i. i) but subtracted from the incoming ﬂow (by (i. . non-negativity constraints in these edges is satisﬁed. j) − f (i. So. i) and (i. j) + δ if (i. vk . j) = f (i. j) = f (i. . Call such a path P an augmenting path. δ is subtracted from the outgoing ﬂow (by (ip . j) ∈ E P . (ip . We show that in two steps: Capacity and Non-Negativity Constraints. Then. (ip . (ip . f is not a maximum ﬂow. is )). j). j) = 0 if (i. So. j) and let • f ′ (i. j) = f (i. So. j) = c(i. is ) are forward edges. t} in P . Hence. v1 . and hence. . So. For a forward edge (i. in which case δ is added to incoming ﬂow to i and δ is added from the outgoing ﬂow of i in G. f (i. ﬂow balancing holds. δ is subtracted from outgoing ﬂow and also subtracted from the incoming ﬂow. • f ′ (i. For any edge not corresponding to path P in Gf . δ is added to incoming ﬂow (by (ip . So. i) and (i. t) from s to t in Gf . So.j)∈E P cf (i. By deﬁnition δ > 0. let (ip . v2 . (s. 3. i ) be the edge outgoing from i in P . the capacity constraints are met since f is feasible. f (i. The following possibilities exist: 1. Hence. j). ﬂow balancing holds. is ) is a forward edge. This is a contradiction. For any vertex i ∈ {s. is )). ν(f ′ ) = ν(f ) + δ > ν(f ). is ) is a reverse edge. we increase the ﬂow by δ ≤ cf (i. ﬂow balancing holds. j) ∈ E P . v1 ) is a forward edge (since there is no incoming edge in G to s). For a reverse edge (i. So. Deﬁne δ = min(i. f ′ is a feasible ﬂow. 39 . i)) but added to the outgoing ﬂow (by (i. j) ∈ E \ E P . ﬂow balancing holds. is ) are reverse edges. Assume for contradiction that there is path P = + (s. we show that f ′ is a feasible ﬂow of G.

ν(f ) = κ(S) (by Lemma 9).e. f is a maximum ﬂow. Denote by S G . j) ∈ E such that i ∈ S and j ∈ (N \ S). This implies that the cut (S. Hence. This implies that ν(f ) = minS∈S G κ(S). E. 1. Now. t)-cut of G}. we have f (i. t). S0 Start with zero ﬂow. i) = 0.3 Ford-Fulkerson Algorithm The following algorithm. the set of all feasible ﬂows of a ﬂow graph G = (N. we push 1 unit of ﬂow more on (s. for every edge (j. for every edge (i. This implies that in the original ﬂow graph G. Let S be the set of nodes for which there is some path from s in Gf . i) ∈ E such that i ∈ S and j ∈ (N \ S). Let S be the set of all vertices i in Gf such that there is a path from s to i. known as the Ford-Fulkerson algorithm. (S. N \ S) is a saturated cut for ﬂow f . and 2. N \ S) deﬁnes an (s. j) = 0 for all (i. 11. the algorithm goes as follows. 40 . S1 Construct the residual digraph Gf . j) ∈ E f such that i ∈ S and j ∈ (N \ S) in Gf . c) with a source vertex s and a terminal vertex t f ∈F G max ν(f ) = min κ(S). there is no path from s to t in the residual digraph Gf . j) = c(i. So. the set {S ⊆ N : (S. and ﬁnally push 1 unit of ﬂow more on (1. there is no edge (i. Note that δ = 1. we have f (j. ﬁnds the maximum ﬂow of a ﬂow graph if the capacities are rational. 2). t)-cut in G. It is immediate that ν(f ) ≤ κ(S) for any S ∈ S G (by Lemma 9). S∈S G Proof : Suppose f is a maximum ﬂow. (S. Since there is no path from s to t in Gf . By Lemma 9. E. N \ S) is an (s. N \ S) is a saturated cut for ﬂow f in G. G Theorem 12 For every ﬂow graph G = (N. We are given a ﬂow graph G = (N. f (i. By Theorem 11. Denote by F . t)-cut in G.It is worth going to Figure 28. This theorem leads to one of the most well known results in graph theory. E. and understand the augmenting path a bit more. Since there is no path from s to t in Gf . j) ∈ E. (S. then push back 1 unit of ﬂow on (1. j). i. Assume that there is at least one path from s to t. N \ S) is an (s. the augmenting path in the residual digraph is (s. Suppose there is no path from s to t in Gf . 1. c). 2). So. Then. Here. c) with a source vertex s and a terminal vertex t. 2. t).

Theorem 13 If all capacities are rational. then the maximum ﬂow is also an integral ﬂow. If the ﬂows are integral.1 If not. 2}. j) ∈ E. Note that if all capacities are integral. stop . Then. ﬁnd the maximum ﬂow of the digraph in Figure 30. S2. 3. You can verify that the maximum ﬂow amount is 7. Iterate from Step S1. and this ﬂow value is also 7. S2. increase ﬂow along an augmenting path (i. then the algorithm outputs an integral ﬂow. if all capacities are integral. Let us start from a feasible ﬂow as shown in Figure 31.e. a path in Gf from s to t) by the minimum residual capacity on that path as shown in Theorem 11 (feasibility is maintained). then the Ford-Fulkerson algorithm terminates ﬁnitely with a maximum ﬂow. the ﬂow is augmented by at least 41 . We can augment ﬂow along this path by 3 units. {3.S2 Check if the residual digraph Gf has a path from s to t. then from Theorem 11 it must ﬁnd a maximum ﬂow. The new ﬂow is shown in Figure 33. j) is an integer for all (i. 2. 1. Then. Proof : If all capacities are rational then there exists a natural number K such that Kc(i. If the algorithm terminates. So. Figure 32 shows the residual digraph for this ﬂow. We now formally prove how the Ford-Fulkerson algorithm ﬁnds a maximum ﬂow if the capacities are rational numbers.2 If yes. then the algorithm must terminate since capacities are ﬁnite integers and in every iteration the ﬂow increases by at least one.. t}) has a capacity of 7. We see that there is a path from s to t in this graph: (s. As an exercise. This is a maximum ﬂow since if the cut ({s. 4.f is the maximum ﬂow. t). in every iteration. 1 2 3 5 4 3 s 5 2 2 4 2 3 t Figure 30: Maximum ﬂow We show some of the steps.

K . You are 42 1 . the algorithm must terminate ﬁnitely. However. the algorithm may not terminate in general for irrational capacities.1 2/2 3 5/2 4/2 3/0 s 5/2 2 2/2 4 2/0 3/2 t Figure 31: A feasible ﬂow 2 1 3 3 3 s 3 1 2 2 4 2 2 t 2 2 2 2 Figure 32: Residual digraph for ﬂow in Figure 31 1 2/2 3 5/5 4/2 3/3 s 5/5 2 2/2 4 2/0 3/2 t Figure 33: Maximum ﬂow for the ﬂow graph in Figure 30 Since the ﬂow value is bounded (by the minimum cut capacity).

The premise of this problem is a directed graph G = (N. i. where two paths are edge disjoint if they do not share an edge. and ensuing corollary. no path from s to t.with no incoming edges) and t (terminal . Suppose there is a path from s to t after deleting any (k − 1) edges from G. Then deleting (k − 1) edges from G will not delete one edge from at least one of the paths from s to t. E) (not weighted) and two special vertices s (source . E) with source vertex s and terminal vertex t has at least k disjoint paths from s to t if and only if there is a path from s to t after deleting any (k − 1) edges from G. The following theorem. and we are asked to ﬁnd the maximum number of disjoint paths in such a digraph.e. show that the two problems are related. This has applications in communication networks. j) ∈ E. In this problem. We want to ﬁnd out what is the minimum number of edges from G that must be removed to disconnect t from s. where the capacity function is deﬁned as follows: c(i. Two disjoint paths (in dark black and blue) for a digraph are shown in Figure 34. We are interested in ﬁnding the number of edge-disjoint paths from s to t. Hence. j) = 1 for all (i. Proof : Suppose there are at least k disjoint paths from s to t.encouraged to think of an example with irrational capacities. and a max-min relation on this. Suppose there is digraph G with source vertex s and terminal vertex t. there will remain at least one path from s to t. We convert G into a ﬂow graph. we are given a digraph and two vertices in it. 1 3 s t 2 4 Figure 34: Two disjoint paths Consider a network connectivity problem..with no outgoing edges). Since there is at least one path from s to t after deleting any (k − 1) edges from 43 . 12 Disjoint Paths We now study another graph problem. Theorem 14 (Menger’s Theorem) A digraph G = (N.

one edge can carry ﬂow of only one path from s to t. the capacity of any (s. So. E) is a digraph with source vertex s and terminal vertex t. note that any feasible integral ﬂow in G is either (a) a set of paths from s to t or (b) a cycle (not involving s or t). we can set the ﬂow in this cycle to zero without loss of generality. t)-cut in G must be at least k. each unit of ﬂow from s to t corresponds to a unique path from s to t. there are at least k disjoint paths from s to t.G. 44 . Hence. If a maximum ﬂow involves a cycle. Consider such an integral maximum ﬂow. Hence. Hence. a maximum ﬂow consists of a set of paths from s to t. An immediate corollary to this result is the following. Also. Corollary 3 Suppose G = (N. Since the capacity of every edge is just 1. the maximum ﬂow in G must be at least k. Now. and still get an integral maximum ﬂow. without loss of generality. The number of disjoint paths from s to t in G equals the minimum number of edges that need to be removed from G such that there are no paths from s to t. an integral maximum ﬂow exists.

- App 06 Guide
- Errata
- Unidad 1 Microbiologia
- tifr12
- Calendarios de Actividades
- Dinámica
- cu31924013993187 (1)
- Attachment
- Attachment (1)
- Attachment
- Lasso Inference RegionC NEng
- Lasso Inference Aggregate IMPROVED
- Presentation
- Lyx Beamer Sweave
- Does What You Export Matter Sept 2010
- [Oksendal B.] Introductiont to Malliavin Calculus (BookFi.org)
- [Christopher a. Pissarides] Equilibrium Unemployme(BookFi.org)
- [Koen Frenken (Editor)] Applied Evolutionary Econo(BookFi.org)
- it12_pisati
- r Graphics
- 2012 05 29 Data Analysis Using Stata
- Comparative Study on Export Policies in Egypt Morocco Tunisia and South Korea
- 5kgc3mq19s6d
- 2011.Rodrik.paper
- Within and Across Product Specialization Mukerji Panagariya June 2009.pdf

Sign up to vote on this title

UsefulNot useful- Graph Theory App to Economics
- Mrsara
- graph_theory_notes.pdf
- (de Werra
- 1-s2.0-0012365X9500342T-main
- Networks
- Conceptual Graph 3
- Lecture 2 - Graph Theory and Social Networks.pdf
- Undergraduate Thesis Slide - The Matrix-Tree Theorem and some related problems.
- tdm2013
- DFS
- ROUTING PROBLEMS
- grfthyex1
- Graphs BFS
- IJCER (www.ijceronline.com) International Journal of computational Engineering research
- Mincostflow Notes
- 2 Cutsets Cut Vertices and the Line Graphs
- Ar 25260265
- Graph Theory Presentation
- Handout Presentation 7-02-13 Graph Drawing
- Characterization of - s Padmanabhan
- A Nim Game Played on Graphs
- Chapter 1
- Graph Theory Conectivity
- Combinatorics
- Discrete Ch1
- Definition Graph Theory
- Lyon Lecture IIb
- graphs1-130126021226-phpapp01
- graph representation
- Lec Graph