The objective of the number drop game is to try and get a row of numbers in order by selecting certain ones that you want to drop to the end of the line. When you drop more than one number they move to the end while still keeping their relative order and the numbers you didn't drop move to the front while still keeping their relative order. You keep doing that until all the numbers are in order.
Solve these in the fewest moves possible:
1)1 3 5 7 9 2 4 6 8 10
2)10 9 8 7 6 5 4 3 2 1
For ex: 34521
drop 34 = 34521 -> 52134
drop 2 = 52134 -> 51342
drop 34 = 51342 -> 51234
drop 5 = 51234 -> 12345
(that wasn't the fewest moves possible but you get the idea)
I was operating under the assumption that the numbers had to be adjacent, which I realize from reading Danny's post is not the case ... but I thought I would post anyway because I like my solution:
Start: 1 3 5 7 9 2 4 6 8 10
Drop (2 4 6 8): 1 3 5 7 9 10 2 4 6 8
Drop (9 10 2 4 6): 1 3 5 7 8 9 10 2 4 6
Drop (7 8 9 10 2 4): 1 3 5 6 7 8 9 10 2 4
Drop (5 6 7 8 9 10 2): 1 3 4 5 6 7 8 9 10 2
Drop (3 4 5 6 7 8 9 10): 1 2 3 4 5 6 7 8 9 10
This is mathematically the minimum number of drops required for any sequence of 10 consecutive numbers that are mixed in such a way that no two consecutive numbers are adjacent.
Informal Proof: if you note that with each drop, you change the adjacencies of two sets of numbers, the number of adjacencies that can be "corrected" in N steps is 2N. Since there are 9 sets of adjacencies total for 10 numbers, the minimum number of steps required to correct them all is 5.
By the way, I believe that if you assume the adjacent drop requirement, the solution for #2 is the brute force method of dropping each number, because they are completely backwards.
|
Posted by Avin
on 2005-04-21 02:13:05 |