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, 03.07.2019 15:10
Apiston-cylinder with a volume of 0.25 m3 holds 1 kg of air (r 0.287 k/kgk) at a temperature of 100 c. heat transfer to the cylinder causes an isothermal expansion of the piston until the volume triples. how much heat is added to the piston-cylinder?
Answers: 3
question
Engineering, 04.07.2019 18:10
The filament of an incandescent lamp has a temperature of 2000k. calculate the fraction of radiation emitted in the visible light band if the filament is approximated as blackbody
Answers: 2
question
Engineering, 04.07.2019 18:10
Water at 55c flows across a flat plate whose surface temperature is held constant at 95c. if the temperature gradient at the plate's surface for a given value of x is 18 c/mm, find a) local heat transfer coefficient. b) heat flux
Answers: 3
question
Engineering, 04.07.2019 18:10
Which of the following ziegler nichols tuning methods the response of the controller to a step input should exhibit an s-shaped curve? a)-open loop mode b)-closed loop mode c)-both modes (open & closed) d)-none of the modes (open & closed)
Answers: 3
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
English, 15.07.2021 14:00
Questions on the website: 13722360