122387
122387
A feasible solution to this problem is any point (x, y) that satisfies all the constraints
of the problem;
The problem’s feasible region is the set of all its feasible points.
Any equation ax + by = c, where coefficients a and b are not both equal to zero, defines a
straight line. Such a line divides the plane into two half-planes: for all the points in one of
them, ax + by < c, while for all the points in the other, ax + by > c. In particular, the set of
points defined by inequality x + y ≤ 4 comprises the points on and below the line x + y = 4,
and the set of points defined by inequality x + 3y ≤ 6 comprises the points on and below the
line x + 3y = 6. Since the points of the feasible region must satisfy all the constraints of the
problem, the feasible region is obtained by the intersection of these two half-planes and the
first quadrant of the Cartesian plane defined by the nonnegativity constraints x ≥ 0, y ≥ 0
(see Figure ).
Thus, the feasible region for problem is the convex polygon with the vertices (0, 0), (4,
0), (0, 2), and (3, 1). (The last point, which is the point of intersection of the lines x + y = 4
and x + 3y = 6, is obtained by solving the system of these two linear equations.)
Our task is to find an optimal solution, a point in the feasible region with the largest
value of the objective function z = 3x + 5y. The optimal solution to the linear programming
problem in question is x = 3, y = 1, with the maximal value of the objective function equal to
14.
The linear programming problems (LPP) discussed in the previous section possessed
unique solutions. This was because the optimal value occurred at one of the extreme points
(corner points). But situations may arise, when the optimal solution obtained is not unique.
In the above figure, there is no unique outer most corner cut by the objective function
line. All points from P to Q lying on line PQ represent optimal solutions and all these will give
the same optimal value (maximum profit) of Rs. 160. This is indicated by the fact that both
the points P with co-ordinates (40, 60) and Q with co-ordinates (60, 50) are on the line x 1 +
2x2 = 160. Thus, every point on the line PQ maximizes the value of the objective function and
the problem has multiple solutions.
The region located on the right of PQR includes all solutions, which satisfy the first and the
third constraints. The region located on the left of ST includes all solutions, which satisfy the
second constraint. Thus, the problem is infeasible because there is no set of points that
satisfy all the three constraints.
The three extreme points (corner points) in the finite plane are:
P = (90, 0); Q = (24, 22) and R = (0, 70)
The values of the objective function at these extreme points are:
Z(P) = 3600, Z(Q) = 2280 and Z(R) = 4200
2. Normalize restrictions.
The inequalities become equations by adding slack, surplus and artificial variables as
the following table:
Inequality Variable that
type appears
- surplus +
≥
artificial
= + artificial
≤ + slack
In this case, a slack variable (X3, X4 and X5) is introduced in each of the restrictions of
≤ type, to convert them into equalities, resulting the system of linear equations:
2X1 + X2 + X3 =
18
2X1 + 3·X2 +
X4 = 42
3X1 + X2 + X5 =
24
5. Stopping condition.
If the objective is to maximize, when in the last row (indicator row) there is no negative
value between discounted costs (P1 columns below) the stop condition is reached.
In that case, the algorithm reaches the end as there is no improvement possibility. The
Z value (P0 column) is the optimal solution of the problem.
Another possible scenario is all values are negative or zero in the input variable column
of the base. This indicates that the problem is not limited and the solution will always be
improved. Otherwise, the following steps are executed iteratively.
7. Update tableau.
9. Checking again the stop condition reveals that the pivot row has one negative value, -1. It
means that optimal solution is not reached yet and we must continue iterating (steps 6 and
7):
6.1. The input base variable is X5 (P5), since it is the variable that corresponds to the
column where the coefficient is -1.
6.2. To calculate the output base variable, the constant terms (P0) are divided by the
terms of the new pivot column: 6/(-2) [=-3] , 12/4 [=3] , and 6/1 [=6]. In this iteration, the
output base variable is X4 (P4).
6.3. The new pivot is 4.
7. Updating the values of tableau again is obtained:
The total amount of the material entering an intermediate vertex must be equal to the total
amount of the material leaving the vertex. This condition is called the flow-conservation
requirement. If we denote the amount sent through edge (i, j ) by xij , then for any
intermediate vertex i, the flow-conservation requirement can be expressed by the following
equality constraint:
where the sums in the left- and right-hand sides express the total inflow and outflow entering
and leaving vertex i, respectively.
The total amount of the material leaving the source must end up at the sink. Thus, we have
the following equality
This quantity, the total outflow from the source—or, equivalently, the total inflow into the sink
—is called the value of the flow. We denote it by v. It is this quantity that we will want to
maximize over all possible flows in a network.
Thus, a (feasible) flow is an assignment of real numbers xij to edges (i, j ) of a given network
The maximum-flow problem can be stated formally as the following optimization problem:
Ford-Fulkerson Algorithm:
It was developed by L. R. Ford, Jr. and D. R. Fulkerson in 1956. Inputs required are network
graph G, source node S and sink node T.
Limitation:
The complexity of Ford-Fulkerson algorithm cannot be accurately computed as it all
depends on the path from source to sink. For example, considering the network shown below,
if each time, the path chosen are S−A−B−T and S−B−A−T alternatively, then it can take a
very long time. Instead, if path chosen are only S−A−T and S−B−T, would also generate the
maximum flow.
A matching in a graph is a subset of its edges with the property that no two edges
share a vertex.
A maximum matching (maximum cardinality matching) is a matching with the
largest number of edges.
The maximum-matching problem is the problem of finding a maximum matching in
a given graph.
In a bipartite graph, all the vertices can be partitioned into two disjoint sets V and U,
not necessarily of the same size, so that every edge connects a vertex in one of these
sets to a vertex in the other set.
In other words, a graph is bipartite if its vertices can be colored in two colors so that
every edge has its vertices colored in different colors; such graphs are also said to be
2-colorable. The graph in Figure is bipartite.
In general, we increase the size of a current matching M by constructing a simple path from a
free vertex in V to a free vertex in U whose edges are alternately in E −M and in M. That is,
the first edge of the path does not belong to M, the second one does, and so on, until the last
edge that does not belong to M. Such a path is called augmenting with respect to the
matching M. For example, the path 2, 6, 1, 7 is an augmenting path with respect to the
matching Mb in Figure b. Since the length of an augmenting path is always odd, adding to the
matching M the path’s edges in the odd-numbered positions and deleting from it the path’s
edges in the even-numbered positions yields a matching with one more edge than in M. Such
a matching adjustment is called augmentation. Thus, in Figure, the matching Mb was
obtained by augmentation of the matching Ma along the augmenting path 1, 6, and the
matching Mc was obtained by augmentation of the matching Mb along the augmenting path
2, 6, 1, 7.
Consider a set Y = {m1, m2, . . . , mn} of n men and a set X = {w1, w2, . . . , wn} of n
women. Each man has a preference list ordering the women as potential marriage partners
with no ties allowed. (Figure a) Similarly, each woman has a preference list of the men, also
with no ties. (Figure b) . The same information can also be presented by an n × n ranking
matrix (Figure c).The rows and columns of the matrix represent the men and women of the
two sets, respectively. A cell in row m and column w contains two rankings: the first is the
position (ranking) of w in the m’s preference list; the second is the position (ranking) of m in
the w’s preference list. For example, the pair 3, 1 in Jim’s row and Ann’s column in the matrix
in Figure c indicates that Ann is Jim’s third choice while Jim is Ann’s first. Which of these two
ways to represent such information is better depends on the task at hand. For example, it is
easier to specify a match of the sets’ elements by using the ranking matrix, whereas the
preference lists might be a more efficient data structure for implementing a matching
algorithm.
A marriage matching M is a set of n (m, w) pairs whose members are selected from
disjoint n-element sets Y and X in a one-one fashion, i.e., each man m from Y is paired
Step 0 Start with all the men and women being free.
Step 1 While there are free men, arbitrarily select one of them and do the following:
Proposal The selected free man m proposes to w, the next woman on his
preference list (who is the highest-ranked woman who has not rejected him
before).
Response If w is free, she accepts the proposal to be matched with m. If she is
not free, she compares m with her current mate. If she prefers m to him, she
Theorem
The stable marriage algorithm terminates after no more than n2 iterations with a stable
marriage output.
Proof
The algorithm starts with n men having the total of n2 women on their ranking lists. On
each iteration, one man makes a proposal to a woman. This reduces the total number of
women to whom the men can still propose in the future because no man proposes to the
same woman more than once. Hence, the algorithm must stop after no more than n2
iterations.
The stable marriage algorithm has a notable shortcoming. It is not “gender neutral.” In the
form presented above, it favors men’s preferences over women’s preferences. We can easily
see this by tracing the algorithm on the following instance of the problem:
Woman 1 Woman 2
Man 1 1, 2 2, 1
Man 2 2, 1 1, 2
The algorithm obviously yields the stable matching M = {(man 1, woman 1), (man 2, woman
2)}. In this matching, both men are matched to their first choices, which is not the case for
the women. One can prove that the algorithm always yields a stable matching that is man-
optimal: it assigns to each man the highest-ranked woman possible under any stable
marriage. Of course, this gender bias can be reversed, but not eliminated, by reversing the
roles played by men and women in the algorithm, i.e., by making women propose and men
accept or reject their proposals.
8. Write down the optimality condition and algorithmic implementation for finding M-
augmenting paths in bipartite graphs. (May 2015)
9. How do you compute maximum flow for the following graph using Ford-Fulkerson method?
(May 2015)
10. Explain Max-flow problem. (Dec 2015)
11. Explain the working of the maximum matching algorithm on the following weighted tree.
(Dec 2015)