ps3n3 - Problem 3 0) Construction of the Algorithm We began...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Problem 3 0) Construction of the Algorithm We began with the observation that at the last step of the algorithm, there will be one stack of boxes on the truck and then one more stack somewhere else that needs to be moved en mass onto the truck in the optimal solution. Lemma: At any point in the algorithm to find the optimal solution, there must exists at least two locations x and y such that both have stacks of boxes and the boxes in each stack are completely disjoint with those of the other stack throughout every other step of the algorithm. Because if any element of x was already in a stack with y, and they were transfered to x, then they would have to be remerged at the end of the algorithm, which by the triangle inequality means that were taking more time than just staying with the x pile the entire way through, which means that that instance could not have been an optimum. So given the above lemma, we know that at that last step of the algorithm, there exists two contiguous stacks of boxes at y and x, where the sum of the height of the two stacks is n. Now because the two stacks are completely disjoint up until this step, we know that we can partition the problem into these two distinct cases. For each stack, we know that there exists a previous step where some subset of that stack was from another location...
View Full Document

Page1 / 3

ps3n3 - Problem 3 0) Construction of the Algorithm We began...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online