0% found this document useful (0 votes)
14 views

D1 Exercise 1E

The document provides examples and explanations for different bin packing problems. It discusses the lower bound calculation for one problem and compares first-fit and full-bin packing algorithms. It also analyzes examples of optimally packing items into bins.

Uploaded by

Wing Kai Cheung
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)
14 views

D1 Exercise 1E

The document provides examples and explanations for different bin packing problems. It discusses the lower bound calculation for one problem and compares first-fit and full-bin packing algorithms. It also analyzes examples of optimally packing items into bins.

Uploaded by

Wing Kai Cheung
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/ 2

Exercise 1E

1 a 2 c

Lower bound Lower bound =


30 + 30 + 30 + 45 + 45 + 60 + 60 + 60 + 60 + 75 + 90 + 120 + 120
18 + 4 + 23 + 8 + 27 + 19 + 3 + 26 + 30 + 35 + 32
= 180
50
225
=
50
Since a minimum of 5 tapes are needed and b
uses 5 tapes it is optimal.
Therefore 5 bins (4 bins will be insufficient)
d For example
b i Bin 1: 18 + 4 + 23 + 3 Bin 1: M(120)
Bin 2: 8 + 27 Bin 2: L(120)
Bin 3: 19 + 26 Bin 3: K(90) + A(30)
Bin 4: 30 Full bins
Bin 4: G(60) + F(60)
Bin 5: 35 Bin 5: H(60) + I(60)
Bin 6: 32 Bin 6: J(75) + E(45)
Bin 7: B(30) + C(30) + D(45)
ii Putting list into descending order
3 a First-fit does not rely on observation, it takes
35 32 30 27 26 23 19 18 8 4 3 the items in the order given.
Whereas full-bin uses observation to find
Bin 1: 35 + 8 + 4 + 3 combinations of items.
Bin 2: 32 + 18
Bin 3: 30 + 19 b Bin 1: A(4) + B(7) + C(13) + D(6)
Bin 4: 27 + 23 Bin 2: E(13) + F(4) + G(12)
Bin 5: 26 Bin 3: H(14) + I(6)
Bin 4: J(11)
iii For example This uses 4 lanes.
Bin 1: 32 + 18
Bin 2: 27 + 23 Full bins c By inspection,
Bin 3: 35 + 8 + 4 + 3 A(4) + B(7) + C(13) + D(6) = 30
Bin 4: 19 + 26 E(13) + I(6) + J(11) = 30
Bin 5: 30 F(4) + G(12) + H(14) = 30
Bin 1: A, B, C, D
2 a Bin 1: A(30) + B(30) + C(30) + D(45) + E(45) Bin 2: E, I, J
Bin 2: F(60) + G(60) + H(60) Bin 3: F, G, H
Bin 3: I(60) + J(75) Each of the three lanes is full, so solution is
Bin 4: K(90) optimal.
Bin 5: L(120)
Bin 6: M(120) 4 a
3+3+ 4+ 4+ 4+ 4+5+5+5+7+8+8
b Bin 1: M(120) + I(60) =4
15
Bin 2: L(120) + H(60) rolls
Bin 3: K(90) + J(75)
Bin 4: G(60) + F(60) + E(45) b For example,
Bin 5: D(45) + C(30) + B(30) + A(30) Bin 1: L(8) J(7)
Bin 2: K(8) I(5)
Bin 3: H(5) G(5) F(4)
Bin 4: E(4) D(4) C(4) B(3)
Bin 5: A(3)
5 rolls used and 15 m wasted.
4 c Doesn’t always give an optimal solution.

© Pearson Education Ltd 2019. Copying permitted for purchasing institution only. This material is not copyright free. 1
d For example,
Bin 1: A(3) + C(4) + L(8)
Bin 2: B(3) + D(4) + E(4) + F(4)
Bin 3: G(5) + H(5) + I(5)
Bin 4: J(7) + K(8)
4 rolls used and no carpet is wasted, so
solution is optimal.

5 a Bin 1: H(25) + A(8)


Bin 2: G(25)
Bin 3: F(24) + B(16)
Bin 4: E(22) + C(17)
Bin 5: D(21)

∴ Lower bound is 4.

c There are 5 programs over 20MB. It is not


possible for any two of these to share a bin. So
at least 5 bins will be needed, so 4 will be
insufficient.

© Pearson Education Ltd 2019. Copying permitted for purchasing institution only. This material is not copyright free. 2

You might also like