subject

A complex linear structure is to be assembled out of n smaller pieces. We will think of each piece as an interval [a; b]. The joining operation takes [a; b] and [b; c] and produces [a; c]. After joining, each subpart must be tested. Assume that the cost to test [u; v] is given by f(u; v) > 0 Different assembly orders potentially have different total testing cost. For example, suppose that we have three pieces corresponding to intervals [1, 2]; [2; 3); and [3; 4], and the cost of testing is given by: f(1; 3) = 3, f(2; 4) = 1, and f(1; 4) = 5. Then assembling the first and second pieces first and then joining them with the third has a total testing cost of f(1; 3) + f(1; 4) = 8, whereas assembling the second and third pieces first and then joining them with the first has a total testing cost of f(2; 4) + f(1; 4) = 6. Therefore, the second assembly order is preferable.

Design an O(n^3) algorithm using dynamic programming methodology to find an optimal (least total testing cost) assembly order. Note that you should

a. Use iterative implementation for the algorithm to find the optimal cost.
b. Show the algorithm for finding the optimal order.
c. Give a brief argument of correctness and analyze the running time.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 23:50
You need to design a circuit that implements the functions in the following table: s0 s1 function0 0 a + 10 1 a – b1 0 a + b1 1 a – 1s0 and s1 are 1-bit control inputs to select the function of the circuit. inputs a and b are 4-bitnumbers in 2s complement form. the output is also a 4-bit number in 2s complement form.you are allowed to use only one ttl 7483 4-bit adder to implement all the functions. but anynumber of other components (except the adder) can be used.hint: design a combinational logic circuit to modify the input b and the “carry input” of theadder depending on the control inputs s0 and s1.important: lab grade will depend on the working of the circuit & will be checked of by your labinstructor.1. is the output valid for the following input combinations: a. s0 = 0, s1 = 0, a = 7, b = 3? b. s0 = 0, s1 = 1, a = 7, b = 3? c. s0 = 1, s1 = 0, a = -4, b = -5? d. s0 = 1, s1 = 1, a = -8, b = 6? 2. what is the range of inputs (for both a and b) that will produce the valid output for all the functions?
Answers: 3
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. what does it indicate when a website displays https instead of http? a. the website is secure. b. there is no secure sockets layer. c. the secure sockets layer is hidden. d. the website is not secure.
Answers: 1
question
Computers and Technology, 24.06.2019 13:30
Which of the following is not a “fatal four” event?
Answers: 2
question
Computers and Technology, 24.06.2019 15:00
When a presentation is being planned, it is important to ensure that it covers all available information. appeals to the audience. uses multimedia tools. entertains the audience.
Answers: 1
You know the right answer?
A complex linear structure is to be assembled out of n smaller pieces. We will think of each piece a...
Questions
question
Physics, 05.05.2020 14:16
question
Mathematics, 05.05.2020 14:16
question
Mathematics, 05.05.2020 14:16
Questions on the website: 13722359