0% found this document useful (0 votes)
18 views6 pages

END332 EMid 1 Solns

The document outlines solutions to a midterm exam, focusing on decision variables and integer programming models for analyzing team performances in games. It includes constraints related to wins, losses, and total points for three teams, as well as alternative modeling approaches using binary variables. Additionally, it presents various models and solutions for optimization problems, including knapsack and traveling salesman problems.

Uploaded by

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views6 pages

END332 EMid 1 Solns

The document outlines solutions to a midterm exam, focusing on decision variables and integer programming models for analyzing team performances in games. It includes constraints related to wins, losses, and total points for three teams, as well as alternative modeling approaches using binary variables. Additionally, it presents various models and solutions for optimization problems, including knapsack and traveling salesman problems.

Uploaded by

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

SOLUTIONS TO MIDTERM EXAM I

Answer 1
Decision variables (10 pts):
xij: number of games team i played with a result of j (i=1,2,3; j=1,2,3,4)
i=1: Fenerbahçe Medicana, i=2: Eczacıbaşı Dynavit, i=3: Vakıfbank;
j=1: standard win (3-0 or 3-1), j=2: win in the deciding set (3-2),
j=3: loss in the deciding set (2-3), j=4: standard loss (1-3 or 0-3).

IP MODEL:

Objective function:
Since we are only interested in feasible solutions that satisfy the constraints, we can use a
dummy (null) objective function. This means we are not trying to maximize or minimize any
particular value.
Constraints (20 pts):

Number of wins/losses
3

� 𝑥𝑥𝑖𝑖𝑖𝑖 = 𝑟𝑟𝑗𝑗 for all 𝑗𝑗


𝑖𝑖=1
r1 = 10 (number of standard wins), r2 = 2 (number of wins in the deciding set),
r3 = 2 (number of losses in the deciding set), r4 = 1 (number of standard losses)
Number of games played
4

� 𝑥𝑥𝑖𝑖𝑖𝑖 = 5 for all 𝑖𝑖 (number of games played by team 𝑖𝑖)


𝑗𝑗=1

Equal total points


3 xi1 + 2 xi2 + xi3 = 3 x(i+1)1 + 2 x(i+1)2 + x(i+1)3 for 𝑖𝑖 = 1 𝑎𝑎𝑎𝑎𝑎𝑎 2
Based on the first constraint (i=1), points won by the 1st team and the 2nd team are equalized
Based on the second constraint (i=2), points won by the 2nd team and the 3rd team are equalized
In this case, there is no need to equalize points won by the 1st team and the 3rd team
Equal total points (alternative representation)
3 xi1 + 2 xi2 + xi3 = 12 for all 𝑖𝑖 (points won by team 𝑖𝑖)
As three favorite teams won ten games 3-0 or 3-1, two games 3-2, and lost two games 2-3, total
points they won would be 36. So each team should have 12 points.
Sign restriction (5 pts):
All xij ≥ 0 and integer
Answer 1 Open-form
Decision variables:
xij: number of games team i played with a result of j (i=1,2,3; j=1,2,3,4)
i=1: Fenerbahçe Medicana, i=2: Eczacıbaşı Dynavit, i=3: Vakıfbank;
j=1: standard win (3-0 or 3-1), j=2: win in the deciding set (3-2),
j=3: loss in the deciding set (2-3), j=4: standard loss (1-3 or 0-3).

IP MODEL:
Objective function:
Since we are only interested in feasible solutions that satisfy the constraints, we can use a
dummy (null) objective function. This means we are not trying to maximize or minimize any
particular value.
Constraints:
Number of wins/losses
x11 + x21 + x31 = 10 (number of standard wins)
x12 + x22 + x32 = 2 (number of wins in the deciding set)
x13 + x23 + x33 = 2 (number of losses in the deciding set)
x14 + x24 + x34 = 1 (number of standard losses)
Number of games played
x11 + x12 + x13 + x14 = 5 (number of games played by Fenerbahçe Medicana)
x21 + x22 + x23 + x24 = 5 (number of games played by Eczacıbaşı Dynavit)
x31 + x32 + x33 + x34 = 5 (number of games played by Vakıfbank)
Equal total points
3 x11 + 2 x12 + x13 = 3 x21 + 2 x22 + x23 (points won by Fenerbahçe = points won by Eczacıbaşı)
3 x11 + 2 x12 + x13 = 3 x31 + 2 x32 + x33 (points won by Fenerbahçe = points won by Vakıfbank)
Based on these two constraints, there is no need to equalize points won by Eczacıbaşı and points
won by Vakıfbank
Equal total points (alternative representation)
3 x11 + 2 x12 + x13 = 12 (points won by Fenerbahçe Medicana)
3 x21 + 2 x22 + x23 = 12 (points won by Eczacıbaşı Dynavit)
3 x31 + 2 x32 + x33 = 12 (points won by Vakıfbank)
As three favorite teams won ten games 3-0 or 3-1, two games 3-2, and lost two games 2-3, total
points they won would be 36. So each team should have 12 points.
Sign restriction:
All xij ≥ 0 and integer
Answer 1 Alternative modeling: Binary variables
Modeling in this way using binary variables is not recommended. It would be inefficient and
impractical due to the complexity introduced by the increased number of variables and
constraints.
Decision variables:
xijk: a binary variable that equals 1 if team i has a result of j in game k, and 0 otherwise
(i=1,2,3,4; j=1,2,3; k=1,2,3,4,5)
i=1: Fenerbahçe Medicana, i=2: Eczacıbaşı Dynavit, i=3: Vakıfbank;
j=1: standard win (3-0 or 3-1), j=2: win in the deciding set (3-2),
j=3: loss in the deciding set (2-3), j=4: standard loss (1-3 or 0-3);
k: game (round/week) number.

Variables:
yij: number of games team i played with a result of j

BIP MODEL:

Objective function:
Since we are only interested in feasible solutions that satisfy the constraints, we can use a
dummy (null) objective function. This means we are not trying to maximize or minimize any
particular value.
Constraints:

One outcome per game


4

� 𝑥𝑥𝑖𝑖𝑖𝑖𝑖𝑖 = 1 for all 𝑖𝑖 and 𝑘𝑘


𝑗𝑗=1

Number of wins/losses
3 5

� � 𝑥𝑥𝑖𝑖𝑖𝑖𝑖𝑖 = 𝑟𝑟𝑗𝑗 for all 𝑗𝑗


𝑖𝑖=1 𝑘𝑘=1
r1 = 10 (number of standard wins), r2 = 2 (number of wins in the deciding set),
r3 = 2 (number of losses in the deciding set), r4 = 1 (number of standard losses)

Equal total points


5 5 5 5 5 5

3 � 𝑥𝑥11𝑘𝑘 + 2 � 𝑥𝑥12𝑘𝑘 + � 𝑥𝑥13𝑘𝑘 = 3 � 𝑥𝑥21𝑘𝑘 + 2 � 𝑥𝑥22𝑘𝑘 + � 𝑥𝑥23𝑘𝑘


𝑘𝑘=1 𝑘𝑘=1 𝑘𝑘=1 𝑘𝑘=1 𝑘𝑘=1 𝑘𝑘=1
(points won by Fenerbahçe Medicana = points won by Eczacıbaşı Dynavit)

5 5 5 5 5 5

3 � 𝑥𝑥11𝑘𝑘 + 2 � 𝑥𝑥12𝑘𝑘 + � 𝑥𝑥13𝑘𝑘 = 3 � 𝑥𝑥31𝑘𝑘 + 2 � 𝑥𝑥32𝑘𝑘 + � 𝑥𝑥33𝑘𝑘


𝑘𝑘=1 𝑘𝑘=1 𝑘𝑘=1 𝑘𝑘=1 𝑘𝑘=1 𝑘𝑘=1
(points won by Fenerbahçe Medicana = points won by Vakıfbank)
Based on these two constraints, there is no need to equalize points won by Eczacıbaşı Dynavit
and points won by Vakıfbank
Equal total points (alternative representation)
5 5 5

3 � 𝑥𝑥11𝑘𝑘 + 2 � 𝑥𝑥12𝑘𝑘 + � 𝑥𝑥13𝑘𝑘 = 12 (points won by Fenerbahçe Medicana)


𝑘𝑘=1 𝑘𝑘=1 𝑘𝑘=1
5 5 5

3 � 𝑥𝑥21𝑘𝑘 + 2 � 𝑥𝑥22𝑘𝑘 + � 𝑥𝑥23𝑘𝑘 = 12 (points won by Eczacıbaşı Dynavit)


𝑘𝑘=1 𝑘𝑘=1 𝑘𝑘=1
5 5 5

3 � 𝑥𝑥31𝑘𝑘 + 2 � 𝑥𝑥32𝑘𝑘 + � 𝑥𝑥33𝑘𝑘 = 12 (points won by Vakıfbank)


𝑘𝑘=1 𝑘𝑘=1 𝑘𝑘=1
As three favorite teams won ten games 3-0 or 3-1, two games 3-2, and lost two games 2-3, total
points they won would be 36. So each team should have 12 points.
Team performance
The aim is to determine the number of standard wins, wins in the deciding set, losses in the
deciding set, and the standard losses for each team; therefore, we need additional variables
to represent the team performances.
5

𝑦𝑦𝑖𝑖1 = � 𝑥𝑥𝑖𝑖1𝑘𝑘 for all 𝑖𝑖 (standard wins for team 𝑖𝑖)


𝑘𝑘=1
5

𝑦𝑦𝑖𝑖2 = � 𝑥𝑥𝑖𝑖2𝑘𝑘 for all 𝑖𝑖 (wins in the deciding set for team 𝑖𝑖)
𝑘𝑘=1
5

𝑦𝑦𝑖𝑖3 = � 𝑥𝑥𝑖𝑖3𝑘𝑘 for all 𝑖𝑖 (losses in the deciding set for team 𝑖𝑖)
𝑘𝑘=1
5

𝑦𝑦𝑖𝑖4 = � 𝑥𝑥𝑖𝑖4𝑘𝑘 for all 𝑖𝑖 (standard losses for team 𝑖𝑖)


𝑘𝑘=1

Sign restriction:
All xijk = 0 or 1
Answer 2

b4 = 300 ≤ x = 310 ≤ b5 = 400 (2 pts.)


 y4 = 1 (4 pts.);

y1=y2=y3=y5=0 (2 pts.);
z1=z2=z3=z6=0 (2 pts.);
z4 + z5 = 1 (2 pts.)

x = 310 = 300z4 + 400z5 (2 pts.)


 z4 = 0.9 (3 pts.), z5 = 0.1 (3 pts.)

Answer 3
MODEL (5 pts.)
If xj is 1 then item j will be in the knapsack, 0 otherwise
max 9 x1 + 16 x2 + 14 x3 + 5 x4
st 3 x1 + 4 x2 + 4 x3 + 2 x4 ≤ 10
xj = 0 or 1 j = 1, … 4

SOLUTION (20 pts.)


Ratios: 9/3, 16/4, 14/4, 5/2
Priorities of the items: 2 – 3 – 1 – 4
LR sol’n: x2 = 1, x3 = 1, x1 = 2/3; z = 36
P1: x1 = 0; x2 = 1, x3 = 1, x4 = 1; z = 35 (Candidate)
P2: x1 = 1; x2 = 1, x3 = 3/4; z = 35.5
P3: x1 = 1, x3 = 0; x2 = 1, x4 = 1; z = 30 < 35 ---
P4: x1 = 1, x3 = 1; x2 = 3/4, x4 = 0; z = 35
P5: x1 = 1, x3 = 1, x2 = 0; x4 = 1; z = 28 < 35 ---
P6: x1 = 1, x3 = 1, x2 = 1; infeasible

INTERPRETATION (5 pts.)
Items 2, 3, and 4 should be in the knapsack, in this case total value would be 35
Answer 4

A-B-C-D-A (2 pts.): 50+100+70+130=350 km (2 pts.)

B-A-C-D-B (2 pts.): 60+100+70+120=350 km (2 pts.) -> A-C-D-B-A (1 pts.)


C-D-B-A-C (2 pts.): 70+120+60+100=350 km (2 pts.) -> A-C-D-B-A (1 pts.)

D-C-A-B-D (2 pts.): 70+90+50+110=320 km (2 pts.) -> A-B-D-C-A (1 pts.)

The NNH method identifies the best tour as A-B-D-C-A, with a total distance of 320 km.
The best tour (2 pts.); A-B-D-C-A (2 pts.); total distance 320 km (2 pts.)

You might also like