subject
Mathematics, 20.10.2021 14:20 jdchacon117

Let XX[1: nn] be a real array. A prefix of X is a subarray XX[1: kk] where 1 ≤ kk ≤ nn, and a suffix of X is a subarray XX[kk: nn]. The minimum-prefix-product problem is the problem of taking XX[1:nn] as input and returning the k such that XX[1] × XX[2] × … × XX[kk] is the smallest possible. The minimum-suffix-product problem is to find k such that XX[kk] × XX[kk + 1] × … × XX[nn] is the smallest possible. The minimum-subarray-product problem is the problem of taking XX[1: nn] as input and returning two integers k and r, (1 ≤ kk ≤ rr ≤ nn), such that XX[kk] × XX[kk + 1] × … × XX[rr] is the smallest possible. a. Write a divide-and-conquer algorithm for solving the minimum-prefix-product problem, and another divide-and-conquer algorithm for solving the minimum-suffix-product problem.
b. Write a divide-and-conquer algorithm for solving the minimum-subarray-product problem.
c. Analyze the time complexity of your algorithms.

ansver
Answers: 3

Another question on Mathematics

question
Mathematics, 21.06.2019 15:00
Which is the graph of the function y=2(4)^x
Answers: 2
question
Mathematics, 21.06.2019 15:30
What is the domain and range of each function 1. x (3, 5, 7, 8, 11) y ( 6, 7, 7, 9, 14) 2. x (-3, -1, 2, 5, 7) y (9, 5, 4, -5, -7)
Answers: 2
question
Mathematics, 21.06.2019 17:00
If you apply the changes below to the absolute value parent function, f(x)=\x\, which of these is the equation of the new function? shift 2 units to the left shift 3 units down a. g(x)=\x-3\-2 b. g(x)= \x-2\-3 c. g(x)= \x+3\-2 d. g(x)= \x+2\-3
Answers: 1
question
Mathematics, 21.06.2019 17:30
What is the base of 1/9 to the power of 2
Answers: 1
You know the right answer?
Let XX[1: nn] be a real array. A prefix of X is a subarray XX[1: kk] where 1 ≤ kk ≤ nn, and a suffix...
Questions
question
Mathematics, 26.09.2019 22:50
question
History, 26.09.2019 22:50
question
Mathematics, 26.09.2019 22:50
Questions on the website: 13722367