Download Open the File as a Word Document

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Shelf Tidying
The Problem:
The twenty volumes of Star Trek videos are slightly out of order…and it’s your job to
tidy them up.
We’ll count “taking a video off the shelf, pushing some of the others to one side, and
putting the first video back onto the shelf” as a single move that takes about, say, 5
seconds.
What is the quickest time you could get these twenty volumes back into their correct
order, reading 1 to 20 from left to right?
Can you prove it’s the quickest time possible?
Hint:
Are any of the Volumes in the right order?
Solution:
The quickest time possible is 60 seconds.
Reading from left to right, we can recognize several sequences of numbers already
in the correct order with respect to each other…
13 8 3 5 12 16 6 2 1 9 17 4 19 20 10 11 7 14 18 15
i.e.
8-12-16-17-19-20
13 8 3 5 12 16 6 2 1 9 17 4 19 20 10 11 7 14 18 15
i.e.
2-9-10-11-14-18
The longest such sequence we can find (of length 8) begins with Volume 3…
13 8 3 5 12 16 6 2 1 9 17 4 19 20 10 11 7 14 18 15
3-5-6-9-10-11-14-15
We could use Volume 18 instead of Volume 15, of course.
This then leaves the other 12 ‘out-of-order’ videos that need moving.
Hence the least number of ‘moves’ needed is 12 , and the quickest time for the task
will be 12 x 5 = 60 seconds.