subject
Mathematics, 27.03.2020 04:11 GreenHerbz206

You have mined a large slab of marble from a quarry. For simplicity, suppose the marble slab is a rectangle measuring n inches in height and m inches in width. You want to cut the slab into smaller rectangles of various sizes - some for kitchen counter tops, some for large sculpture projects, others for memorial headstones. You have a marble saw that can make either horizontal or vertical cuts across any rectangular slab. At any time, you can query the spot price P[x, y] of an x-inch by y-inch marble rectangle, for any positive integers x and y. These prices depend on customer demand, and people who buy marble counter tops are weird, so don’t make any assumptions about them; in particular, larger rectangles may have significantly smaller spot prices. Given the array of spot prices and the integers m and n as input, design a dynamic programming algorithm to compute how to subdivide an n × m marble slab to maximize your profit. Your solution must output both the maximum profit as well as the sequence of cuts necessary to obtain that profit. A sequence of cuts can be described as a sequence of tuples (V, x, ymin, ymax) for vertical cuts, (H, y, xmin, xmax) of horizontal cuts. For example, the rectangle depicted below has been subdivided via the sequence of cuts [(V, 10, 0, 13),(H, 8, 0, 10),(V, 4, 0, 8)]

ansver
Answers: 2

Other questions on the subject: Mathematics

image
Mathematics, 21.06.2019 16:00, ccompassimvu
Awall map has a scale of 128 miles = 6 inches. the distance between springfield and lakeview is 2 feet on the map. what is the actual distance between springfield and lakeview? 384 miles 512 miles 1.13 miles 42.7 miles
Answers: 1
image
Mathematics, 21.06.2019 20:30, iixyloa
Twelve less than a number is at most 20
Answers: 1
image
Mathematics, 21.06.2019 23:30, jlopez113
The bottom of ignacio's desktop is 74.5cm from the floor. ignacios sits in his adjustable chair, and the tops of his legs are 49.3cm from the floor. each clockwise rotation of the knob on the chair raises ignacio's legs by 4.8cm. write an inequality to determine the number of clockwise rotations, r, ignacio could make with the knob without his legs touching the desk.
Answers: 3
image
Mathematics, 22.06.2019 01:00, deon4257
The sum of five and a number n is at least 12
Answers: 1
You know the right answer?
You have mined a large slab of marble from a quarry. For simplicity, suppose the marble slab is a re...

Questions in other subjects:

Konu
Mathematics, 20.07.2020 07:01
Konu
Mathematics, 20.07.2020 07:01
Konu
Mathematics, 20.07.2020 07:01
Konu
Mathematics, 20.07.2020 07:01