UNIT IV - ITERATIVE IMPROVEMENT
SOLVED PROBLEMS
1. Solve the given linear equations by simplex method.
Maximize p = 3x + 4y subject to x+3y ≤ 30; method
Step 1: Insert slack variables S1 and S2.
x + 3y + S1 = 30
2x + y + S2 = 20
Step 2: Rewrite the objective function
x + 3y + S1 = 30
2x + y + S2 = 20
-3x - 4y + P = 0
Step 3: Form the initial simplex tableau
1 2x y S S P
1 3 1 0 0 30
2 1 0 1 0 20
3 4 0 0 1 0
 
   
   
Step4: Find the pivot element
1 2x y S S P
1 11 0 0 10
3 3
5 10 1 0 10
3 3
5 40 0 1 40
3 3
 
 
 
 
   
Repeat the above step till there is no negative value is last row.
1 2x y S S P
2 10 1 0 8
5 5
311 0 0 6
5 5
30 0 1 1 50
5
 
 
 
 
 
  
P reaches maximum value of 50 at x = 6 and y = 8.
2. Solve the given linear programming problem.
Maximize Z = -18x1 + 4x2 + 5x3
Subject to x1 ≥ 0, x2 ≥ 0, x3 ≥ 0
8x1 – 3x2 + 3x3  21
3x1 + 2x2 + x3 = 6
-2x1 + 4x2 + 3x3 ≥ 15
Step 1: Insert stack variable
8x1 – 3x2 + 3x3 + S1 = 21
3x1 + 2x2 + x3 = 6
-2x1 + 4x2 + 3x3 + S2 = 15
Step2: Rewrite the objective function
8x1 – 3x2 + 3x3 + S1 = 21
3x1 + 2x2 + x3 = 6
-2x1 + 4x2 + 3x3 + S2 = 15
Z + 181 – 4x2 – 5x3 = 15
Step 3: form the simplex tableau
1 2 3 1 2x x x S S Z
8 3 3 1 0 0 21
3 2 1 0 0 0 6
2 4 3 0 1 0 15
18 4 5 0 0 1 0
 
 
 
 
 
  
Step 4: select the pivot element and solve it iteratively.
The maximum value for Z = 30 at x1 = 0, x2 = 0 and x3 = 6.
3. Solve the following transportation problem.
fi – flow in ith
iteration
Iteration 1
S  4  3  t
f1 = min {2, 1, 1}
f1 = 1
Iteration 2
S  1  2  t
f2 = min {4, 4, 3}
f2 = 3
Iteration 3
S  4  t
f3 = min {1, 3}
f3 = 1
0/11/1
4
4
1
0/1
3
32
S
3 t
4
1 2
12
4
4
1
1
3
32
S
3 t
4
1 2
Iteration 4
S  1  3  4  t
f4 = min {1, 2, 1, 2}
f4 = 1
The maximum flow value = f1 + f2 + f3 + f4
= 1 + 3 + 1 + 1
= 6
0/10/2
0/4
1/3
1
0/1
2/1
0/32
S
3 t
4
1 2
4. Find the maximum flow of the network
O – source T – sink
Iteration 1
O  B  D  T
f1 = min {5, 6, 5}
f1 = 5
Iteration 2
O C  T
f2 = min {4, 5}
f2 = 4
Iteration 3
Redirect 1 unit of flow from path 0  B  D  T to path 0  B  C  T,
then freed capacity of arc D  T could be used.
O  A  D  T
 O  A  D  B  C  T
f3 = min {4, 4, 5, 4, 1}
f3 = 1
 Total flow = f1 + f2 + f3
= 4 + 5 + 1
= 10
44
4 4
5
6
5
50
B D
C
A
T
5. Find the maximal matching for the following graph: A  {1, 2, 4}, B  {1}, C 
{2, 3}, D  {4, 5}, E3.
Solution
Choose the path with unique matching
This is the maximal matching
A 1
B 2
C 3
D 4
E 5
A 1
B 2
C 3
D 4
E 5
6. Find the maximum matching for the following instance. Tcff  {Britta, Annie,
Super model} Vaugh  {Britta, Annie} Troy  {Annie, Lauch lady, Sherley}
Pierce  {Launch Lady} Abed  {Annie, Launch Lady }
The maximum matching
Teff Britta
Vaugh
n
Annie
Troy Launch lady
Pierce Shirley
Abed Super model
Teff Britta
Vaugh
n
Annie
Troy Launch lady
Pierce Shirley
Abed Super model
7. Find a good matching for marriage for the following people.
Men’s preference
Women’s preference
Finding the matching .
Solution: Men’s preference
Women’s preference
The matching M={(1, 4), (2, 3), (3, 2), (4, 1)}
1:
2:
3:
4:
2
4
1
2
1
3
4
1
1
1
1
1
1
1
4
1
3
4
2
2
3
3
1:
2:
3:
4:
2
3
2
4
4
1
3
1
1
1
1
1
1
1
1
4
1
3
3
2
4
2
1
2
3
4
2
4
1
2
1
3
4
1
1
1
1
1
1
1
4
1
3
4
3
2
2
3
1
2
3
4
2
3
2
4
4
1
3
1
1
1
1
1
1
1
1
4
1
3
3
2
4
2
8. Find the static matching for the following instance.
Men’ preference Women’s preference
If A  , B  β, C  , D  
A and β forms a blocking pair
A  , B  , C  β, D  
This is the stable matching.
1 2 3 4

β


A
C
C
B
B
A
B
A
D
D
D
C
C
B
A
D
1 2 3 4
A
B
C
D

β
β

β










β

Daa unit iv - problems

  • 1.
    UNIT IV -ITERATIVE IMPROVEMENT SOLVED PROBLEMS 1. Solve the given linear equations by simplex method. Maximize p = 3x + 4y subject to x+3y ≤ 30; method Step 1: Insert slack variables S1 and S2. x + 3y + S1 = 30 2x + y + S2 = 20 Step 2: Rewrite the objective function x + 3y + S1 = 30 2x + y + S2 = 20 -3x - 4y + P = 0 Step 3: Form the initial simplex tableau 1 2x y S S P 1 3 1 0 0 30 2 1 0 1 0 20 3 4 0 0 1 0           Step4: Find the pivot element 1 2x y S S P 1 11 0 0 10 3 3 5 10 1 0 10 3 3 5 40 0 1 40 3 3             Repeat the above step till there is no negative value is last row. 1 2x y S S P 2 10 1 0 8 5 5 311 0 0 6 5 5 30 0 1 1 50 5              P reaches maximum value of 50 at x = 6 and y = 8.
  • 2.
    2. Solve thegiven linear programming problem. Maximize Z = -18x1 + 4x2 + 5x3 Subject to x1 ≥ 0, x2 ≥ 0, x3 ≥ 0 8x1 – 3x2 + 3x3  21 3x1 + 2x2 + x3 = 6 -2x1 + 4x2 + 3x3 ≥ 15 Step 1: Insert stack variable 8x1 – 3x2 + 3x3 + S1 = 21 3x1 + 2x2 + x3 = 6 -2x1 + 4x2 + 3x3 + S2 = 15 Step2: Rewrite the objective function 8x1 – 3x2 + 3x3 + S1 = 21 3x1 + 2x2 + x3 = 6 -2x1 + 4x2 + 3x3 + S2 = 15 Z + 181 – 4x2 – 5x3 = 15 Step 3: form the simplex tableau 1 2 3 1 2x x x S S Z 8 3 3 1 0 0 21 3 2 1 0 0 0 6 2 4 3 0 1 0 15 18 4 5 0 0 1 0              Step 4: select the pivot element and solve it iteratively. The maximum value for Z = 30 at x1 = 0, x2 = 0 and x3 = 6.
  • 3.
    3. Solve thefollowing transportation problem. fi – flow in ith iteration Iteration 1 S  4  3  t f1 = min {2, 1, 1} f1 = 1 Iteration 2 S  1  2  t f2 = min {4, 4, 3} f2 = 3 Iteration 3 S  4  t f3 = min {1, 3} f3 = 1 0/11/1 4 4 1 0/1 3 32 S 3 t 4 1 2 12 4 4 1 1 3 32 S 3 t 4 1 2
  • 4.
    Iteration 4 S 1  3  4  t f4 = min {1, 2, 1, 2} f4 = 1 The maximum flow value = f1 + f2 + f3 + f4 = 1 + 3 + 1 + 1 = 6 0/10/2 0/4 1/3 1 0/1 2/1 0/32 S 3 t 4 1 2
  • 5.
    4. Find themaximum flow of the network O – source T – sink Iteration 1 O  B  D  T f1 = min {5, 6, 5} f1 = 5 Iteration 2 O C  T f2 = min {4, 5} f2 = 4 Iteration 3 Redirect 1 unit of flow from path 0  B  D  T to path 0  B  C  T, then freed capacity of arc D  T could be used. O  A  D  T  O  A  D  B  C  T f3 = min {4, 4, 5, 4, 1} f3 = 1  Total flow = f1 + f2 + f3 = 4 + 5 + 1 = 10 44 4 4 5 6 5 50 B D C A T
  • 6.
    5. Find themaximal matching for the following graph: A  {1, 2, 4}, B  {1}, C  {2, 3}, D  {4, 5}, E3. Solution Choose the path with unique matching This is the maximal matching A 1 B 2 C 3 D 4 E 5 A 1 B 2 C 3 D 4 E 5
  • 7.
    6. Find themaximum matching for the following instance. Tcff  {Britta, Annie, Super model} Vaugh  {Britta, Annie} Troy  {Annie, Lauch lady, Sherley} Pierce  {Launch Lady} Abed  {Annie, Launch Lady } The maximum matching Teff Britta Vaugh n Annie Troy Launch lady Pierce Shirley Abed Super model Teff Britta Vaugh n Annie Troy Launch lady Pierce Shirley Abed Super model
  • 8.
    7. Find agood matching for marriage for the following people. Men’s preference Women’s preference Finding the matching . Solution: Men’s preference Women’s preference The matching M={(1, 4), (2, 3), (3, 2), (4, 1)} 1: 2: 3: 4: 2 4 1 2 1 3 4 1 1 1 1 1 1 1 4 1 3 4 2 2 3 3 1: 2: 3: 4: 2 3 2 4 4 1 3 1 1 1 1 1 1 1 1 4 1 3 3 2 4 2 1 2 3 4 2 4 1 2 1 3 4 1 1 1 1 1 1 1 4 1 3 4 3 2 2 3 1 2 3 4 2 3 2 4 4 1 3 1 1 1 1 1 1 1 1 4 1 3 3 2 4 2
  • 9.
    8. Find thestatic matching for the following instance. Men’ preference Women’s preference If A  , B  β, C  , D   A and β forms a blocking pair A  , B  , C  β, D   This is the stable matching. 1 2 3 4  β   A C C B B A B A D D D C C B A D 1 2 3 4 A B C D  β β  β           β