|
|
Revision:Packing Algorithms
From The Student RoomTSR Wiki > Study Help > Subjects and Revision > Revision Notes > Mathematics > Packing Algorithms
First FitWork along the list, putting items in the first place where they fit. Remember you can go back and fill previous gaps if later pieces fit. First Fit DecreasingStart by sorting the items into decreasing order. Then proceed to work along the (newly ordered) list as with First Fit. ExampleTapes last 45 minutes. The songs to be recorded on the tapes have the following durations, in minutes. 8 4 5 3 6 9 4 10 7 12 5 8 4 5 The total duration is exactly 90 minutes. Can the songs be fitted onto 2 tapes? Using First Fit3 tapes are needed. Using First Fit decreasing2 tapes are needed. 12 10 9 8 8 7 6 5 5 5 4 4 4 3
Also SeeSee the other D1 notes:
Comments |

















