subject
Engineering, 11.12.2019 00:31 Naysa150724

The positive subset sum problem takes as input a set of positive integers s and a positive integer n. it produces as output a subset of s that adds up to n, or it reports that no such subset exists. the bin packing problem takes as input a list b of two-dimensional bins (containers) and a list o of two-dimensional packages. it tries to find a way to fit the packages into the bins. if it finds a way, it returns a list of list of objects that shows how to pack the bins. otherwise, it reports that no solution exists. for example, supposeb = [ (8,4), (2,2) ]o = [ (8,1), (4,3), (1,2), (3,4) ]it is possible to arrange the 8x1 object, the 4x3 object, and the 3x4 object so that they fit into the 8x4 bin, and it is possible to fit the 1x2 object into the 2x4 bin. thus, a solution is[ [ (8,1), (4,3), (4,3) ], [ (1,2) ] ]think of the 8x4 bin as being 8 units wide and 4 units high. moving left to right and top to bottom through the bin, the answer says to first put in the 8x1 object (along the top of the bin), then the 4x3 object (below the 8x1 object, snug up against the left side of the bin), and finally the 3x4 object (rotated 90 degrees and placed in the remaining space). the precise details of how position and orientation is specified is unimportant to this problem; just assume that it is specified. on the other hand, ifb = [ (8,4), (2,2) ]o = [ (8,1), (4,3), (1,2), (4,4) ]there is no solution. in this problem you will prove that the bin packing problem is np complete. questions: 1. suppose that you have a list of bins b and a list of objects o (which we will write as ) and are given a proposed solution for the bin packing problem. in two or three precise sentences, explain what you would have to do to verify the proposed solution.

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Fluids at rest possess no flow energy. a)- true b)- false
Answers: 3
question
Engineering, 04.07.2019 18:10
Afluid flows with a velocity field given by v=(x/t)i.. determine the local and convective accelerations when x=3 and t=1.
Answers: 2
question
Engineering, 04.07.2019 18:10
Adouble-strand no. 60 roller chain is used to transmit power between a 13-tooth driving sprocket rotating at 300 rev/min and a 52-tooth driven sprocket. a) what is the allowable horsepower of this drive? b) estimate the center-to-center distance if the chain length is 82 pitches. c) estimate the torque and bending force on the driving shaft by the chain if the actual horsepower transmitted is 30 percent less than the corrected (allowable) power.
Answers: 3
question
Engineering, 04.07.2019 18:10
A-mn has a cubic structure with a0 0.8931 nm and a density of 7.47 g/cm3. b-mn has a different cubic structure, with a0 0.6326 nm and a density of 7.26 g/cm3. the atomic weight of manganese is 54.938 g/mol and the atomic radius is 0.112 nm. determine the percent volume change that would occur if a-mn transforms to b-mn.
Answers: 2
You know the right answer?
The positive subset sum problem takes as input a set of positive integers s and a positive integer n...
Questions
question
Business, 20.01.2021 18:20
Questions on the website: 13722361