A person is cutting a long board of wood into different length of pieces. Each cutting has fixed width 2 cm lengths. Given that each cutting with different length has a different price, Now, we are required to help this person to find the optimal cuts in order to increase his income. Consider following example showing different cut's lengths and their equivalent prices. Input: board length = 4 Length [] = [1, 2, 3, 4, 5, 6, 7, 8] Price [ ]= [2, 6, 8, 10, 14, 17, 19, 20] Output: Best cut is two pieces of length 2 each to gain revenue of 6 + 6 = 12 [Explanation: the possible cuts and profit of each is as follows: Cut Profit 4 10 1,3 2,2 3,1 1,1,2 1,2,1 2,1,1 1,1,1,1 (2+8) = 10 (6+6) = 12 (8+2) = 10 (2+2+6) = 10 (2+6+2) = 10 (6+2+2) = 10 (2+2+2+2) = 8 As noted the best cut is two pieces of length 2 each to gain revenue of 6 + 6 = 12 To answer question 1, you need to do the following: 1. Write an algorithm to find the optimal cuts in order to increase the person income's 2. Implement the algorithm using OUBuild script following the above steps.
A person is cutting a long board of wood into different length of pieces. Each cutting has fixed width 2 cm lengths. Given that each cutting with different length has a different price, Now, we are required to help this person to find the optimal cuts in order to increase his income. Consider following example showing different cut's lengths and their equivalent prices. Input: board length = 4 Length [] = [1, 2, 3, 4, 5, 6, 7, 8] Price [ ]= [2, 6, 8, 10, 14, 17, 19, 20] Output: Best cut is two pieces of length 2 each to gain revenue of 6 + 6 = 12 [Explanation: the possible cuts and profit of each is as follows: Cut Profit 4 10 1,3 2,2 3,1 1,1,2 1,2,1 2,1,1 1,1,1,1 (2+8) = 10 (6+6) = 12 (8+2) = 10 (2+2+6) = 10 (2+6+2) = 10 (6+2+2) = 10 (2+2+2+2) = 8 As noted the best cut is two pieces of length 2 each to gain revenue of 6 + 6 = 12 To answer question 1, you need to do the following: 1. Write an algorithm to find the optimal cuts in order to increase the person income's 2. Implement the algorithm using OUBuild script following the above steps.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Please create an algorithm for pseudo code and converting to Scratch
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education