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

Other questions on the subject: Mathematics

image
Mathematics, 21.06.2019 17:30, bandithcarroyuqhi
Arecipe uses 2 cups of sugar to make 32 brownies. how many cups of sugar are needed to make 72 brownies?
Answers: 1
image
Mathematics, 21.06.2019 19:40, shikiaanthony
An alternative to car buying is to make monthly payments for a period of time, and then return the vehicle to the dealer, or purchase it. this is called
Answers: 3
image
Mathematics, 21.06.2019 21:30, kameronstebbins
High school seniors with strong academic records apply to the nation’s most selective colleges in greater numbers each year. because the number of slots remains relatively stable, some colleges reject more early applicants. suppose that for a recent admissions class, an ivy league college received 2851 applications for early admission. of this group, it admitted 1033 students early, rejected 854 outright, and deferred 964 to the regular admission pool for further consideration. in the past, this school has admitted 18% of the deferred early admission applicants during the regular admission process. counting the students admitted early and the students admitted during the regular admission process, the total class size was 2375. let e, r, and d represent the events that a student who applies for early admission is admitted early, rejected outright, or deferred to the regular admissions pool. suppose a student applies for early admission. what is the probability that the student will be admitted for early admission or be deferred and later admitted during the regular admission process?
Answers: 3
image
Mathematics, 22.06.2019 00:30, babycakesmani
Jo divides a candy bar into eight equal pieces for her children to share she gives three pieces to sam three pieces to leslie and two pieces to margie rose the two month old baby does it doesn't get any what fraction shows how muchw candy each of the four children got. what's the answer to my question
Answers: 2
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 in other subjects:

Konu
Chemistry, 15.04.2020 20:30
Konu
History, 15.04.2020 20:31