Algorithms, bin packing and sortingEdexcel A-Level Further Maths: Mind map
Algorithms
Order
Algorithms
sorting and packing
orderbinssorts
Bin packing
Bubble sort
Quick sort
Exam questions on Algorithms, bin packing and sorting
- The following algorithm is applied to two positive integers and , where . Step 1: input and . Step 2: let be the remainder when is divided by . Step 3: if , output and stop. Step 4: replace by and replace by . Step 5: go back to Step 2.State what the algorithm finds, and explain why it must eventually stop.2 marks
- Nine files of sizes 7, 13, 8, 3, 5, 9, 4, 14 and 12 MB are to be saved on memory cards, each of capacity 20 MB. A file cannot be split between cards.Use the first-fit decreasing algorithm to pack the files. State the number of cards used and the contents of each.2 marks
- The list 23, 8, 31, 15, 4, 19, 27 is to be sorted into ascending order using quick sort. The pivot is always the middle item of the list or sublist: in position if is odd and if is even. Items smaller than the pivot go to its left and larger items to its right, each keeping their original order.Show the result of the first pass of quick sort, stating the pivot used.3 marks
Written by the Exaim team, led by Shaun Daswani (Head of Upper Secondary, Improve ME Institute; MSc Financial Mathematics, Imperial College London; BSc, UCL) and Jason Daswani (operational lead, Improve ME Institute; LSE).