Bonus Question (10 points): You are designing the shape of a new room in some building. You have been given n columns, e

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Bonus Question (10 points): You are designing the shape of a new room in some building. You have been given n columns, e

Post by answerhappygod »

Bonus Question 10 Points You Are Designing The Shape Of A New Room In Some Building You Have Been Given N Columns E 1
Bonus Question 10 Points You Are Designing The Shape Of A New Room In Some Building You Have Been Given N Columns E 1 (88.92 KiB) Viewed 43 times
Bonus Question (10 points): You are designing the shape of a new room in some building. You have been given n columns, each of the same unit thickness, but with different heights: A[1], A[2], ..., A[n]. You can permute the columns in a line to define the shape of the room. To make matters difficult, you need to hang a large rectangular picture on the columns. If j consecutive columns in your order all have a height of at least k, then we can hang a rectangle of size j x k. i12345678 AU64502712 The example in the picture contains 3 consecutive columns with heights of at least 4, so we can hang a rectangle of area 12 on the first three columns a) Give an efficient algorithm to find the largest area of a hangable rectangle for the initial order A[1], A[2], ..., A[n] of columns. b) Devise an efficient algorithm to permute the columns into an order that maximizes the area of a hangable rectangle.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply