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 19:30
Write an equation for the function that includes the points (2,100)and (3,100)
Answers: 2
question
Mathematics, 21.06.2019 20:00
Mario has $14.35 left in his wallet. he spent $148.43 for tablecloths. then, he spent $92.05 for napkins. how much money did mario have in his wallet to start with?
Answers: 2
question
Mathematics, 21.06.2019 22:00
What is the equation of the line that is parallel to the line with the equation y= -3/4x +1 and passes through the point (12,-12)
Answers: 1
question
Mathematics, 21.06.2019 23:30
Line u passes through points (-52, -18) and (-29, 53). line v passes through points (90, 33) and (19, 56). are line u and line v parallel or perpendicular?
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, 19.05.2020 21:00
question
Geography, 19.05.2020 21:00
question
Mathematics, 19.05.2020 21:00
Questions on the website: 13722361