Algorithms, flow charts and bin packingEdexcel International A Level Maths: Mind map
Algorithms
Flow charts
Trace tables
Algorithms
flow charts and bin packing
stepstracebins
Middle item
Bin packing
Exam tips
Exam questions on Algorithms, flow charts and bin packing
- An algorithm is described as follows.
Step 1: Input a number .
Step 2: Set equal to 0.
Step 3: Add to .
Step 4: Replace by .
Step 5: If , go to Step 3.
Step 6: Print .Find the value printed when the input is .2 marks
- Eight files of sizes 9, 7, 11, 6, 5, 13, 12 and 10 megabytes (MB) are to be stored on memory sticks. Each memory stick can hold at most 20 MB.Use the first-fit decreasing algorithm to pack the files, and write down the contents of each memory stick.2 marks
- An algorithm is described as follows.
Step 1: Input two positive integers and , with .
Step 2: Let be the remainder when is divided by .
Step 3: If , print and stop.
Step 4: Replace by and by , then go to Step 2.Apply the algorithm to the inputs and , showing the values of , and each time Step 2 is performed.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).