1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
babunello [35]
3 years ago
15

The rod-cutting problem exhibits optimal substructure - that is, the optimal solution to maximizing revenue for cutting a rod of

length n incorporates the optimal solution to some subproblems of cutting a rod of length less than n. (note that this allows the possibility that the optimal solution may not involve cutting the rod at all).
a. True
b. False
Computers and Technology
1 answer:
VladimirAG [237]3 years ago
3 0

Answer:

It is right to cut a rod into pieces to maximize revenue

when a rod is cut then rod lengths are an integral number of inches

Let's suppose length n and table of prices for i = 1,2,.......,n is given input and the maximum revenue for rods whose sum to n. If p is large, then the optimal solution requires no cuts.

Explanation:

Lets suppose possible cuts length and price

length i  = 1 2 3 4 5 6 7 8 9 10

price p   = 1 5 8 9 10 17 17 20 24 30

i       r        optimal solution

1      1          no cuts

2      5         no cuts

3     8          no cuts

4     10        2+2

5     13         2+3

6    17           no cuts

7      18        1+ 6

8       22       2+ 6

Optimal revenue in shorter rods :

r_{i} =max  p_{n} , r_{1} , r_{n-1} , r_{2} , r_{n-2} + r_{1}

After making a cut we have sub problems

For example, n= nine optimal solutions cut 2 inches; there are two sub problems of lengths two, and 7.there is a need to save both optimal. The optimal solution for the problem of length 2 is no cut and optimal solution for length seven is cut into length 5 and 2 then 2 is no cut then the optimal solution for length five is cut into length 2 and 3 then price will be 5$ + 5$ + 5$  + 8$ = 23$

You might be interested in
Determine the best access modifier for each of the following situations: a. A class Employee records the name, address, salary,
Lorico [155]

Answer:

a. Protected

b. Public

Explanation:

There are four acess modifier in Java.

Default: Acessible only within the same package.

Public: Can be acessed by any class.

Private: Acessible only within the class.

For example, you have a class employee and a private method. This method can only be accessed by an object that is an instance of an employee.

Protected: Used in classes that extend each other. For example, a class of employees would extend employee.

So:

a. A class Employee records the name, address, salary, and phone number.

The best acesses modifier is protected. A class may extended employee but have the same arguments(name, adress, salary, phone number), so it should also have acess to the method.

b. An adding method inside of a class BasicMath.

This method can be used in a variety of packages and projects and classes... and there is no important information regarding security. So the best method is public.

4 0
3 years ago
If a user has two texts selected, the Reveal Formatting pane allows the user to
olasank [31]
<span><span>The correct answer is: </span>compare the fonts of the two texts.</span>  

You can access Reveal Formatting by selecting the desired tet and pressing Shift+F1. By opening this pane you will be able to see the paragraph formatting, font size, font type and line spacing.
4 0
3 years ago
Read 2 more answers
Draw a flowchart that ask the user to enter number: if the number is less than then 10 number it is doubled if the number is mor
solong [7]

Answer:

please find the attachment of the flowchart.

Explanation:

In this question, a start block is used to start the program, in the parallelogram box we input the value from the user end and in the diamond box, we check the input is not equal to 0. In the next diamond box, it checks the given input value and print value, and at the last, we stop the code.

Please find the program and its output in the attached file.

8 0
3 years ago
What does ALU stand for?
ValentinkaMS [17]
It stands for arithmetic logic unit 
3 0
3 years ago
Read 2 more answers
What is a method that invokes itself called?
Anna11 [10]

Answer:

D. recursive method

Explanation:

I took the test on PLATO

6 0
3 years ago
Other questions:
  • Make sure to read all of these specifications carefully. Write a function, named array_shifter, that accepts an array of doubles
    12·1 answer
  • Brenda's working on improving a Google Search Ads quality score so it potentially gets a better ad rank and performs better in t
    9·1 answer
  • Given positive integer num_insects, write a while loop that prints that number doubled up to, but without exceeding 100. Follow
    8·1 answer
  • When assembling a desktop computer you should always install the drives before the motherboard?
    9·1 answer
  • Which of the following is the correct order of the SDLC?
    14·1 answer
  • Creating a chart using a spreadsheet Chart Wizard involves four steps. Which is the last step?
    6·1 answer
  • For each policy statement, select the best control to ensure Ken 7 Windows Limited fulfills the stated requirements and also pro
    6·1 answer
  • Python is an example of a low level programming language true or false?​
    14·1 answer
  • What is used to accurately position objects on the slide using a single horizontal and vertical line that intersects in the cent
    5·2 answers
  • What is computer viras? Loist 2 preventive measures against it​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!