Professional Documents
Culture Documents
220211010083-Jeremy Tombiling-Assignment04
220211010083-Jeremy Tombiling-Assignment04
Please add the profit in the Knapsack problem with the last digit of your student ID, in case of the
last digit is 0, please add it with 10. Afterwards, please conduct the greedy algorithm procedure
and also using solver.
m 15
P 10 5 15 7 6 18 3
W 2 3 5 7 1 4 1
NIM akhir 8
m 15
P 12 7 17 9 8 20 5
W 2 3 5 7 1 4 1
X 1 0.666667 1 0 1 1 1
constraint 15
objective 66.66667
Please add the distance in the Travel Salesman Problem with the last digit of your student ID as in
previous task and carry out the Hill Climbing algorithm for both Simple and Steepest Ascent Hill
Climbing.
NIM = 2 = +2 for the distance
7.3
A B
9 6.8
7 5.5
C D
2.9
Steps
• Develop the problem dynamic tree
• Operator used is the operator with different cities combination, i.e. by swapping the sequence of
cities visited
= 6 operator combination
a) Swap 1, 2
b) Swap 2, 3
c) Swap 3, 4
d) Swap 4, 1
e) Swap 2, 4
f) Swap 1, 3
• Next the search starts from the most left
ABCD (17)
ABCD (17)