Engineering
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.

answer
Answers: 1

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, jadeochoa4466
The temperature of air decreases as it is compressed by an adiabatic compressor. a)- true b)- false
Answers: 2
image
Engineering, 04.07.2019 18:10, koolgurl2003
Apump is used to circulate hot water in a home heating system. water enters the well-insulated pump operating at steady state at a rate of 0.42 gal/min. the inlet pressure and temperature are 14.7 lbf/in.2, and 180°f, respectively; at the exit the pressure is 60 lbf/in.2 the pump requires 1/15 hp of power input. water can be modeled as an incompressible substance with constant density of 60.58 lb/ft3 and constant specific heat of 1 btu/lb or. neglecting kinetic and potential energy effects, determine the temperature change, in °r, as the water flows through the pump.
Answers: 1
image
Engineering, 04.07.2019 18:10, heidiburgos1own6c0
Fluids at rest possess no flow energy. a)- true b)- false
Answers: 3
image
Engineering, 04.07.2019 18:10, alyssabailey7545
Give heat transfer applications for the following, (i) gas turbines (propulsion) ) gas turbines (power generation). (iii) steam turbines. (iv) combined heat and power (chp). (v) automotive engines
Answers: 1
Do you know the correct answer?
The positive subset sum problem takes as input a set of positive integers s and a positive integer n...

Questions in other subjects:

Konu
Mathematics, 05.10.2020 17:01
Konu
Mathematics, 05.10.2020 17:01