You are given a rectangular piece of cloth with dimensions X by Y, where X and Y are positive integers, and a list of n products that can be made using the cloth. For each product i in [1,n] you know that a rectangle of cloth of dimensions ai by bi is needed and that the final selling price of the product is ci. Assume that ai, bi, and ci are all positive integers. You have a machine that can cut any rectangular piece of cloth into two pieces either horizontally or vertically. Design an algorithm that finds the best strategy for cutting an X by Y piece of cloth so that the products made from the resulting pieces give the maximum sum of selling prices. You are free to make as many copies of a given product as you wish, or none if desired. How can i prove that the recursion is exponential and that dynamic programming is polynomial

Answers

Answer 1

The proof that recursion is exponential and that dynamic programming is polynomial is given by the formula;

P(x,y) = max{

P(x,y)

max (1 <= h <= X) { P[h, Y] + P(X - h, Y) }

max (1 <= v <= Y) { P[X, v] + P[X, Y - v] }

}

To prove that the recursion is exponential and that dynamic programming is polynomial. we will do so as follows;

Let us first have the assumption that the cloth is in such a manner that  either way, a product can be oriented. This implies that that after a cut, we will now have two pieces of cloth.

Now, we will make a list of the side lengths of the products that can fit in the piece after which we will consider a vertical cut for each of the side length as well as a horizontal cut for each of the side length, then we apply the same algorithm to each of the two resulting pieces.  

Thus, after the point above, it is likely true that in some instances, there may be a place to cut that is not at a product side length. However, It might be better for us to make a list of lengths composed of one or more pieces side by side as long as the sum is less than the length of the side being considered.

 

Lastly, we would note that this recursive approach is not limited to just two -dimensional problems as It could also be applied to a single or more than two dimensions. A useful proof would be to prove it for one dimension, then assuming it is true for n dimensions, prove it is true for n + 1 dimensions.

Thus;

P(x,y) = max{

P(x,y)

max (1 <= h <= X) { P[h, Y] + P(X - h, Y) }

max (1 <= v <= Y) { P[X, v] + P[X, Y - v] }

}

Read more at; https://brainly.com/question/11665190


Related Questions

some roadways are tilted as they go around a turn. what is the purpose of this tilt?

Answers

Answer:

So no one hits each other

Explanation:

If they dont turn or stop everyone will crash

Question 2 (1 point)
Technician A says Radial ply Tires are used for carrying a heavy Load. Technician B says that Bias Ply Tires are made with the Plies laid diagnally.Which Technician is correct?

a)Technician A
b)Technician B
c)Both A & B
d)Neither

Answers

Answer:

c)

Explanation:

they are both correct because ply tires can carry and are made with the plies laid diagonally.

Question
The CNC is the primary interface between the machine operator and the machine. Is this statement TRUE or FALSE?
True
False

Answers

Answer:

True

Explanation:

The CNC is the primary interface between the machine operator and the machine.

kdjdjfjfhfj jdjrjfbbfbf(xmpqitexsy.)​

Answers

It’s cool wow good game

EverFi future smart pie chart
Bond: 20%
Mutual fund: 15%
Stock: 50%
Savngs account: 15%

Answers

Answer:

wow!!!!!! you pie chart is sweet

The representation of the following data in a pie chart is given in the diagram;

Bond: 20%Mutual fund: 15%Stock: 50%Savngs account: 15%

What is pie chart?

A pie chart is a circle which is used for the diagramatic representation of data. It is usually done by dividing the circle into different areas or slices to represent each data.

Each slice could be used to represent different units such as degree, percentage, centimeters, kilograms.

Bond: 20%

Mutual fund: 15%

Stock: 50%

Savngs account: 15%

Total = 20% + 15% + 50% + 15%

= 100%

Learn more about pie chart:

https://brainly.com/question/796269

#SPJ2

water 1°C.
12. Force is measured in
in the SI metric system.

Answers

Answer:

because metric units are decimal based they are easily converted by moving decimal points

Which of the following is NOT a type of soil structure?

Answers

Answer:

The main four types of soil structure are columns, blocky, granular and plate-like. Soil structure is based on the shape that is takes from its chemical and physical properties.

Explanation:

The different types of soil structure are: Granular, Platy, Prismatic, Blocky, and Columnar.

What is Soil Structure?

Soil Structure refers to the arrangement of the different layers of the soil. Some layers have more silt, clay, sand, stone, etc. Based on the arrangement, we can have the above five soil types.

From the options given to you, identify the option that does not correspond to the five soil structures mentioned above.

Learn more about soil structure here:

https://brainly.com/question/22575868

Hey answer quick for 20 points

Answers

Answer:

Hey.....Thanks but FYI this is only 8 points....If u want to put 20....try putting 40...
Thank you!!!!!!!!!!!!!!!!

Technician A says that all ATF (automatic transmission fluid)'s are interchangeable.
Technician B says that new ATF should be red or pink in color. Who is correct?
A only
B only
Both
Neither

Answers

Answer:

im guessing A

Explanation:

Which cars are least likely to have catalytic converter stolen

Answers

Answer: Cars most likely to have catalytic converter stolen

Vehicles that have had the most thefts are: Toyota Prius, SUV's of all makes, Pick up Trucks of all makes, van's (mostly Honda), passenger cars (mostly Honda), 2 U-Haul trucks. Gov. Roy Cooper recently signed a bill that makes catalytic converter theft a felony.

Explanation:

A change in what component of microscopy influences the apparent size of the objects being viewed?.

Answers

Magnification is known to often influence the size of an object under the microscope. A change in what component of microscopy influences the apparent size of the objects being viewed is called magnification.

An Increased magnification will lead to an increase the apparent size of the object. Magnification is simply known to be the process of making bigger the apparent size of something.

Magnifying glasses is also known to make objects looks bigger due to their convex lenses. The magnification can be said to be positive or negative in its work.

Learn more about magnification from

https://brainly.com/question/15744335

an HV battery radiator has intake air routed through the cooling fins of the ____ or heat exchanger before it circulates over the battery packs

Answers

Answer:

While inspecting the vehicle when it is hot, it is found to have excessive coolant in the coolant recovery container. After the engine cools the level returns to normal. Tech A says that this could be caused by a restriction in the radiator.

Explanation:

If the actual work is 0.85 MJ for a compressor, and the isentropic compressor work is 0.8 MJ, what is the isentropic compressor efficiency

Answers

Answer:0.94

Explanation:

nc=(wc,isentropic)/(wc,act)

Subject : SCIENCE

1. in a simple circuit, increasing the voltage will ______ the electric current

2. increasing the resistance will ________ the electric current

Answers

Answer:

Increase the eletric current

slow down the resistance

Explanation:

“We have to redo the deck we built last week,” Bennett tells his coworkers. “I just tested it, and it doesn’t hold the minimum weight that the county requires. We have to replace it even though the client likes it as is and fixing it will cost us money.” What type of behavior is this?

A.
needs-driven

B.
consumer-driven

C.
emotional

D.
ethical

Answers

Answer:

Consumer-driven

Explanation:

Bcz he told the cost of money

8. The two-stroke engine must still complete all four stages of operation-it just does this in two piston strokes instead of
O A. two
O B. four
OC. one
O D. three

Answers

Answer:

4

Explanation:

you are just doubling it

Answer:four

Explanation:

5. How is the hydrogen gas balloon different from the hot air balloon? explain this in terms of density

Answers

Answer:

either helium or hydrogen

Answer:

As air is heated, it becomes less dense than the surrounding cooler air. The less dense hot air has enough lifting power to cause the balloon to float and rise into the air.

Explanation:

Many engines in FWD vehicles must be removed with the transmission still attached.
O a. True
O b. False

Answers

Answer:

True

Explanation:

Question 9 (1 point)
In the Standard Automotive Tire Designation P205/65R 15 94 T, the ________ is 94.

a)Load Index
b)Tread Height
c)Speed Rating
d)Wheel Height

Answers

Answer:

The Load Capacity is 94

Explanation:

I hope this helps!

Question 8 (1 point)
In the Standard Automotive Tire Designation P205/65R 15 94 T, the "T" designates the Tires _______.

a)Aspect Ratio
b)Load Index
c)Speed Rating
d)Tread Width

Answers

Answer:

I believe it is B : Load Index. Please tell me if I'm wrong.

Explanation:

I'm taking Tech/Engineering and my dad works on cars. I don't know too much about tires, but I know a little. If you need help with engineering, Tell me!

Why does the compression-refrigeration cycle have a high-pressure side and a low-pressure side?


a.The pressure difference is the result of polar molecular alignment due to the intense magnetic field created by the compressor motor.


b.So the refrigerant can condense at a low pressure and temperature and evaporate at a high pressure and temperature


c.The pressure difference isn't intentionally created but is simply the result of circulating refrigerant within the compressor.


d.So the refrigerant can evaporate at a low pressure and temperature and condense at a high pressure and temperature

Answers

Answer: D

Explanation:

The refrigerant can evaporate at low pressure and temperature and condense at high pressure and temperature. The correct option is D.

What is the Vapor compression cycle?

The vapor compression cycle is a refrigeration cycle in which the heat is extracted from one place and is transferred to the atmosphere to cool the specified place.

Refrigeration is the process of keeping the temperature of the required place lower than that of the atmosphere by using different refrigeration processes like vapor compression, and vapor absorption processes.

In the vapor compression refrigeration cycle the refrigerant is evaporated at low pressure and temperature and condensed at high pressure and temperature.

The vapors of refrigerants are formed by taking the heat now these vapors are compressed in the compressor at a higher temperature and pressure than that of the atmosphere so that heat can be transferred to the atmosphere.

To know more about the Vapor compression cycle follow

https://brainly.com/question/23540990

#SPJ2

Sand is composed mostly of ____ and is used to make glass, bricks, and concrete for the construction of roads and buildings.

Answers

Answer:

minerals

Explanation:

Sand is composed mostly of silicon dioxide (SiO2) and is used to make glass, bricks, and concrete for the construction of roads and buildings.

What is the composition of sand?

Sand is defined as a granular material that is produced through the weathering of rocks.

The most common composition of sand is minerals which is silica or silicon dioxide (SiO2).

The mineral, silicon dioxide (SiO2), is used to make glass, bricks, and concrete for the construction of roads and buildings.

Learn more about sand here:

https://brainly.com/question/2458253

#SPJ2

Both model building codes and NFPA __________ can be used to determine the type of construction used in a building.

Answers

Answer:

Both model building codes and NFPA 220 can be used to determine the type of construction used in a building.

Which of the following maintenance items helps to ensure the vehicles engine lasts as long as possible?

A) cabin air filter

B) tire rotation

C) oil change

D) all of the above

Answers

Answer:

c

because oil is preventing corrosion and rust

Tensile strength is the amount of force necessary to:

Answers

Tensile strength is the amount of force required to pull something up to the point where it breaks.

Tensile strength is the amount of force required to pull something up to the point where it breaks. The tensile strength of a material is the maximum amount of tensile stress that it can be subjected to before failure.

Tensile stress is the ratio of the force applied to the cross sectional area. It is given by:

Tensile stress = Force / cross sectional area

Find out more at: https://brainly.com/question/17108735

The _______ is an exhaust manifold made of mandrel-formed steel tubes that are equal in length and joined at a common collector.

Answers

Answer:

header

Explanation:

Answer:

header

Explanation:

The __________ is an exhaust manifold made of mandrel-formed steel tubes that are equal in length and joined at a common collector. because quizlet said so  

Maintenance is performed to help ensure;

A) safety

B) longevity

C) reliability

D) all of the above

Answers

Answer: D) all of the above

Would appreciate brainly <3

A forced-air heating system uses a system of ____ air ducts to deliver warm air to the conditioned spaces.

Answers

Answer: A forced-air heating system uses a system of (supply) air ducts to deliver warm air to the conditioned spaces.

Mark has a baking tray with 24 muffins the muffins are arranged in 4 rows how many muffins are in each row

Answers

Answer:

6

Explanation:

I know this because if you divide 24 by 4 you get 6

How do you earn Brainliest?

Answers

But two people have to answer or one person after a while before it’ll pop up as an option
Other Questions
An angle measures 4. 3 radians. To the nearest degree, what is the measure of the angle? degrees. Could I get help - C C) C.P = Rs 20, profit Rs 2, S.P. - The six seventh grade classes held a fundraiser where they sold candy bars. The school's principal award a $1000 prize to be divided between the six classes. If each class sold a different quantity, what would be the most equitable way to divide the money based on their sales ? If 8, 200 candy bars were sold, simulate how you divide the money between the six classes . Which of the following organizations played a key role in bringing about the Scopes trial?A.The American Civil Liberties b.UnionC.The Modernist SocietyD.The Tennessee ZooE.The Federalist Society NEED HELP NOW PLEASE which statement describes the Democratic Party during Andrew Jacksons presidency? what does key points mean The vertices of a feasible region are (14, 2), (0, 9), (6, 8), and (10, 3). What is the maximum value of the objective function P if P = 180x 250y?. which movie star began his career with a recurring role on the sitcom the facts of life? i need help with this question please what is the answer to 6- (2)(3) and how would i solve it? A cylindrical water tank has a diameter of 4 m and a height of 3 m, while a water tank shaped like a rectangular prism has a length of 7 m, a width of 2 meters and a height of 2 meters. Which of the two tanks can hold more water? By how many cubic meters Student A: Jazmin is really interested in cooking and health. She has heared that it is healthier to eat raw food because cooking food damages some of the nutrients in the food. She is thinking of baking carrots at different temperatures in an oven. RQ: How does heating carrots at different temperatures affect vitamin C concentration After a person is treated for a sexually transmitted infection (STI), what should be the next step? Hide the treatment from sexual partners. Go to the doctor for regular checkups.Continue taking the medication.Have unprotected sex only on rare occasions. A rectangular pipe flowing full has the following cross-sectional dimensions Width: 6 m Height: 9 m Find the pipe's hydraulic radius in meters Hi, I am an independent learner of the Cambridge Latin course. I am looking for stage 22 test story. Does anyone have a pdf copy? Thank u so much! Kate is selling jars of homemade pickles (p) and jars of relish (r). She has enough cucumbers for at most 50 jars of her products. The pickles sell for $6 per jar, and the relish sells for $4 per jar. She needs to make at least $260. When modeling this situation with a system of inequalities, which statements are true? A) p + r 50 6p + 4r > 260 B) p + r 50 6p + 4r 260 C) p + r 50 6p + 4r 260 D) p = 32 and r = 18 is a solution to the system. E) p = 28 and r = 22 is a solution to the system. 100 POINTS!!!!!! hELP ASAP EXAMShow that ( + )^2 = ( + )( ) + 2 how can population pyramids asses the population growth and decline