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 23:20
Two technicians are discussing the intake air temperature (iat) sensor. technician a says that the computer uses the iat sensor as a backup to the engine coolant temperature (ect) sensor. technician b says that the powertrain control module (pcm) will subtract the calculated amount of fuel if the air measures hot. who is correct
Answers: 3
question
Engineering, 04.07.2019 18:10
Hydraulic fluid with a sg. of 0.78 is flowing through a 1.5 in. i.d. pipe at 58 gal/min. the fluid has an absolute viscosity of 11.8 x 105 lbf-sec/ft2. is the flow laminar, turbulent or within the critical range? give both a numerical reynolds number and a term answer.
Answers: 3
question
Engineering, 04.07.2019 18:20
Acertain flow of air (at stp) has a velocity distribution given by v i (in ft/s). if this flow is going through a 4 ft square area in the yz-plane (centered at the origin), what is the mass flow rate (in lbm/s)?
Answers: 2
question
Engineering, 04.07.2019 18:20
A2-m rigid tank initially contains saturated water vapor at 100 kpa. the tank is connected to a supply line through a valve. steam is flowing in the supply line at 600 kpa and 300 c. the valve is opened, and steam is allowed to enter the tank until the pressure in the tank reaches the line pressure, at which point the valve is closed. a thermometer placed in the tank indicates that the temperature at the final state is 200°c. determine (a) the mass of steam that has entered the tank (b) the amount of heat transfer.
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
Mathematics, 14.12.2020 17:10