You are on page 1of 8

THE HCM UNIVERSITY OF TECHNOLOGY (HCMUT) Course: Computer Applications in Industry

Department of Industrial System Engineering Question code 01

Lecturer: 22/12/2022 Approved by:


Assoc. Prof. Hồ Thanh Phong Assoc. Prof. Đỗ Ngọc Hiền
(The above part must be hidden when copying for exam)

Semester/Academic year 1 2022-2023


FINAL EXAM
Date 26/12/2022

Course title Computer Applications in Industry


UNIVERSITY OF TECHNOLOGY - VNUHCM
Course ID ME2049
FACULTY OF ME
Duration 120 mins. Question sheet code 01
Notes: - This is an open book examination. There are two parts: part 1 writing and part 2 computer works. Student
submit part 1 firstly and perform part 1 later.
- Use of calculator is allowed in part 1; discussion and material transfer are strictly prohibited.
- Submit the question sheet together with the answer sheet
Date 26/12/2022 from 9:00 AM – 11:00 AM

Full name:
Student ID:
PART I: Writing 75 minutes (70 points):
A. Statistics
Q1 (8 pts).
Solutions
4 .𝐶 3 )
(𝐶11 13
a. P(there are exactly 4W in the group) = 7 = 0.2727 (4pts)
𝐶24
3 4
b. Number of ways: 𝑛 = (𝐶11 . 𝐶13 ) = 117975 (4pts)
Q2 (8 pts).
Solutions
Let CP: Car phone user;
NC: Not a car phone;
SV: Speed violation;
NS: No Speed violation.
𝑃(𝐶𝑃 ∩𝑁𝑆) 305
a. 𝑃(𝐶𝑃|𝑁𝑆) = = 725 = 0.4207 (4pts)
𝑃(𝑁𝑆)

b. P(SV) = 75/800 = 0.0938 (4pts)


Q3 (8 pts).
Solutions
a. (4 pts)
Sorting data: 42 48 50 51 52 52 52 57 62 66 68 70 73 77 80 82 84 89 90 93 (2 pts)
Stu.ID: ........................................ Stu. Fullname: ........................................................................................................... Page 1/8
THE HCM UNIVERSITY OF TECHNOLOGY (HCMUT) Course: Computer Applications in Industry
Department of Industrial System Engineering Question code 01

Find 70th percentile:


Position: i 70 = (np)/100 = 20*70/100 = 14, i is whole number ➔ average of position 14 and position 15.
Value 70th percentile = (77+80)/2 =78.5 (1 pts)
Find 85th percentile. Position i 85 = np/100 = 20*85/100 = 17 whole number
Value of 85th percentile is (84+89)/2 = 86.5 (1 pts)
b. There are 6 classes, range of a class ~ (93-42)/6 = 8.5
Frequency Relative Cumulative Re. CF
Frequency Frequency
Class 1: From 42 to < 50.5: 3 0.15 3 0.15
Class 2: From 50.5 to < 59: 5 0.25 8 0.40
Class 3: From 59 to < 67.5: 2 0.10 10 0.50
Class 4: From 67.5 to < 76: 3 0.15 13 0.65
Class 5:From 76.0 to < 84.5: 4 0.20 17 0.85
Class 6: From 84.5 to <= 93: 3 0.15 20 1.00
Total 20 1.00
(3 pts)
Histogram chart (1 pts)

B. LINEAR PROGRAMMING
Q4 (23 pts).
Solutions
a. (5 pts) Let X1 (or A or XA) volume of product A, X2 (or B or XB) volume of product B.
Model will be:
Maximize Z = 40 X1 + 90 X2
Subject to:
X1 >= 0.8(X1+X2)
X1 <= 100
X2 >= 20
2X1 + 4 X2 <= 300
OR
Maximize Z = 40 X1 + 90 X2 (1pt)
Subject to:
0.2 X1 – 0.8 X2 >= 0 ; (1pt)

Stu.ID: ........................................ Stu. Fullname: ........................................................................................................... Page 2/8


THE HCM UNIVERSITY OF TECHNOLOGY (HCMUT) Course: Computer Applications in Industry
Department of Industrial System Engineering Question code 01

X1 <= 100; (1pt)


X2 >= 20 ; (1pt)
2X1 + 4 X2 <= 300; (1pt)
X1, X2 > = 0;

At point 1 (80, 20), Z1 = 5000


At point 2 (100, 25), Z2 = 6250 (*) Optimal
At point 3 (110, 20), Z3 = 6200
Solve problem using graphical solution (5 pts): Draw each constraint: 1 pts * 4 = 4pts.
Identify optimal solution: 1pt
- Shadow price (3pts):
New constraint: 2X1 + 4 X2 <= 301 (1pts)

Stu.ID: ........................................ Stu. Fullname: ........................................................................................................... Page 3/8


THE HCM UNIVERSITY OF TECHNOLOGY (HCMUT) Course: Computer Applications in Industry
Department of Industrial System Engineering Question code 01

Solve system: 2*X1 + 4*X2 = 301


and X1 - 4*X2 = 0
X1 = 100.33 and X2 = 25.08, Z = 6270.83
Shadow price = 6270.83 – 6250 = 20.83 (2pts)
b. Formulating using SET (10pts)
MODEL:
SETS:
Tainguyen /material/: Capacity;
Product /PA PB/: Profit, sanluong;
Lienket(Tainguyen, Product): FORMULA;
ENDSETS
2 pts
DATA:
Capacity = 300;
Profit = 40 90 ;
FORMULA = 2 4 ;
ENDDATA
2 pts

MAX = @SUM( Product( I): Profit( I) * sanluong(I));


1 pts

@FOR( Tainguyen( I):


@SUM( Product( J):
FORMULA( I, J) * sanluong( J) ) <= Capacity( I));
2 pts

sanluong(@index(product,PA)) <= 100;


1 pts

sanluong(@index(product,PB)) >= 20;


1 pts

0.2*sanluong(@index(product,PA)) - 0.8* sanluong(@index(product,PB)) >= 0;


1 pts
END

Stu.ID: ........................................ Stu. Fullname: ........................................................................................................... Page 4/8


THE HCM UNIVERSITY OF TECHNOLOGY (HCMUT) Course: Computer Applications in Industry
Department of Industrial System Engineering Question code 01

C. AHP
Q5 (20 pts)
Mr. ABC wants to find the best car from three alternatives: Honda, Ford and Toyota. There are three criteria
named Price, Fashion and Utility. Importance judgments are given:

Choose the “best” car

Price Fashion Utility

Honda Ford Toyota

Solutions
Criteria (3pts)
Price Fashion Utility Price Fashion Utility
Price 1.000 3.000 5.000 Normalization Price 0.652 0.500 0.769 Average Price 0.640
Fashion 0.333 1.000 0.500 Fashion 0.217 0.167 0.077 Fashion 0.154
Utility 0.200 2.000 1.000 Utility 0.130 0.333 0.154 Utility 0.206
Sum 1.533 6.000 6.500 1.000 1.000 1.000 1.000

Checking Inconsistency (4 pts)


Checking n= 3 RI 0.58
Inconsistency
0.640 1.000 3.000 5.000 2.131 0.640 3.327
0.154 0.333 1.000 0.500 = 0.470 / 0.154 3.059 Lamda max 3.167
0.206 0.200 2.000 1.000 0.641 0.206 3.115

CI 0.0835305 CR 0.144

Weighting for each criterion (9 pts)


Price
Honda Ford Toyota
Honda 1.000 5.000 2.000 Honda 0.588 0.800 0.286 0.558
Ford 0.200 1.000 4.000 Ford 0.118 0.160 0.571 0.283
Toyota 0.500 0.250 1.000 Toyota 0.294 0.040 0.143 0.159

Stu.ID: ........................................ Stu. Fullname: ........................................................................................................... Page 5/8


THE HCM UNIVERSITY OF TECHNOLOGY (HCMUT) Course: Computer Applications in Industry
Department of Industrial System Engineering Question code 01

Sum 1.700 6.250 7.000 1.000 1.000 1.000 1.000


3pts
Fashion
Honda Ford Toyota
Honda 1.000 0.333 3.000 Honda 0.231 0.063 0.706 0.333
Ford 3.000 1.000 0.250 Ford 0.692 0.188 0.059 0.313
Toyota 0.333 4.000 1.000 Toyota 0.077 0.750 0.235 0.354
Sum 4.333 5.333 4.250 1.000 1.000 1.000 1.000
3pts
Utility
Honda Ford Toyota
Honda 1.000 3.000 0.200 Honda 0.158 0.500 0.118 0.259
Ford 0.333 1.000 0.500 Ford 0.053 0.167 0.294 0.171
Toyota 5.000 2.000 1.000 Toyota 0.789 0.333 0.588 0.570
Sum 6.333 6.000 1.700 1.000 1.000 1.000 1.000
3pts

Final weights (4 pts)

Final Weights

Honda 0.4618 =W(Price)* W(Price-Honda)+W(Fashion)* W(Fashion-Honda)+W(Utility)* W(Utility-Honda) The best


Ford 0.2646 =W(Price)* W(Price-Ford)+W(Fashion)* W(Fashion-Ford)+W(Utility)* W(Utility-Ford)
Toyota 0.2737 =W(Price)* W(Price-Toyota)+W(Fashion)* W(Fashion-Toyota)+W(Utility)* W(Utility-Toyota)
1.000

PART II: Computer works 45 minutes (30 points):


Q6 (23 pts)
Solutions

a.

MODEL:
SETS:
Tainguyen /material/: Capacity;
Product /PA PB/: Profit, sanluong;
Lienket( Tainguyen, Product): FORMULA;
ENDSETS

DATA:
! Tainguyen;
Capacity, Profit, Formula, ConstA, ConstB = @OLE("P:\Giang day BK - 2021 -
2022\COmputer Application\Exam\Tai lieu\Lingo interface Exam 26-12-22 Index 1-
Solutions.xlsx", 'Capacity', 'Profit', 'Formula', 'ConstA', 'ConstB');

Stu.ID: ........................................ Stu. Fullname: ........................................................................................................... Page 6/8


THE HCM UNIVERSITY OF TECHNOLOGY (HCMUT) Course: Computer Applications in Industry
Department of Industrial System Engineering Question code 01

@OLE("P:\Giang day BK - 2021 - 2022\COmputer Application\Exam\Tai lieu\Lingo interface


Exam 26-12-22 Index 1-Solutions.xlsx", 'Sanluong')= Sanluong;

ENDDATA

MAX = @SUM( Product( I): Profit( I) * sanluong(I));

@FOR( Tainguyen( I):


@SUM( Product( J):
FORMULA( I, J) * sanluong( J) ) <= Capacity( I)
);

sanluong(@index(product,PA)) <= ConstA;


sanluong(@index(product,PB)) >= ConstB;
0.2*sanluong(@index(product,PA)) - 0.8* sanluong(@index(product,PB)) >= 0;

END

b.

MODEL:
SETS:
Tainguyen /material/: Capacity;
Product /PA PB/: Profit, sanluong;
Lienket( Tainguyen, Product): FORMULA;
ENDSETS

DATA:
! Tainguyen;
Capacity, Profit, Formula, ConstA, ConstB = @OLE("P:\Giang day BK - 2021 -
2022\COmputer Application\Exam\Tai lieu\Lingo interface Exam 26-12-22 Index 1-
Solutions.xlsx", 'Capacity', 'Profit', 'Formula', 'ConstA', 'ConstB');
@OLE("P:\Giang day BK - 2021 - 2022\COmputer Application\Exam\Tai lieu\Lingo interface
Exam 26-12-22 Index 1-Solutions.xlsx", 'Sanluong')= Sanluong;

!Material= 300 ;
! Lambong 100;

!Profit = 40 90
;
! FORMULA = 2 4 ;
ENDDATA

MAX = @SUM( Product( I): Profit( I) * sanluong(I));

@FOR( Tainguyen( I):


@SUM( Product( J):
FORMULA( I, J) * sanluong( J) ) <= Capacity( I)
);

sanluong(@index(product,PA)) <= ConstA;


sanluong(@index(product,PB)) >= ConstB;
0.2*sanluong(@index(product,PA)) - 0.8* sanluong(@index(product,PB)) >= 0;

END

Stu.ID: ........................................ Stu. Fullname: ........................................................................................................... Page 7/8


THE HCM UNIVERSITY OF TECHNOLOGY (HCMUT) Course: Computer Applications in Industry
Department of Industrial System Engineering Question code 01

c.

MODEL:
SETS:
Tainguyen /material/: Capacity;
Product /PA PB/: Profit, sanluong;
Lienket( Tainguyen, Product): FORMULA;
ENDSETS

DATA:
! Tainguyen;
!Capacity, Profit, Formula, ConstA, ConstB = @OLE("F:\Giang day BK - 2021 -
2022\COmputer Application\Exam\Tai lieu\Lingo interface Exam 26-12-22 Index 1-
Solutions.xlsx", 'Capacity', 'Profit', 'Formula', 'ConstA', 'ConstB');
! @OLE("F:\Giang day BK - 2021 - 2022\COmputer Application\Exam\Tai lieu\Lingo
interface Exam 26-12-22 Index 1-Solutions.xlsx", 'Sanluong')= Sanluong;
!Material= 300 ;
! Lambong 100;

!Profit = 40 90 ;
! FORMULA = 2 4 ;

Capacity =@file("Exam Q6-b.txt");


Profit =@file("F:\Giang day BK - 2021 - 2022\COmputer Application\Exam\Tai lieu\Exam
Q6-b.txt");
Formula =@file("F:\Giang day BK - 2021 - 2022\COmputer Application\Exam\Tai lieu\Exam
Q6-b.txt");
ConstA =@file("F:\Giang day BK - 2021 - 2022\COmputer Application\Exam\Tai lieu\Exam
Q6-b.txt");
ConstB =@file("F:\Giang day BK - 2021 - 2022\COmputer Application\Exam\Tai lieu\Exam
Q6-b.txt");
@TEXT("F:\Giang day BK - 2021 - 2022\COmputer Application\Exam\Tai lieu\Exam Q6-b.txt",
'a')= sanluong ;

ENDDATA

MAX = @SUM( Product( I): Profit( I) * sanluong(I));

@FOR( Tainguyen( I):


@SUM( Product( J):
FORMULA( I, J) * sanluong( J) ) <= Capacity( I)
);

sanluong(@index(product,PA)) <= ConstA;


sanluong(@index(product,PB)) >= ConstB;
0.2*sanluong(@index(product,PA)) - 0.8* sanluong(@index(product,PB)) >= 0;

END

Q7 (10 pts).
As in Q5.

GOOD LUCK!

Stu.ID: ........................................ Stu. Fullname: ........................................................................................................... Page 8/8

You might also like