subject

Suppose I am going to choose an integer between 1 and n, inclusive, according to some probability distribution. For each integer i, I have written pi, the probability that I select i as the chosen integer. You may assume that ni=1 pi = 1. (a) Give an O(n3) time algorithm to compute a 2D-array X, where X[i, j] is the probability that some integer in the range [i, j] (inclusive) is chosen. You may assume that arith- metic operations take O(1) time each.
(b) Give an O(n2) time algorithm to solve the problem in part (a). If you are confident that your answer to this question is O(n2), you may elect to skip the previous part and count this as your answer to both.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:00
2.)how does a graphical user interface (gui) on a touchscreen interface differ from a gui on a desktop or laptop? a.)a finger or stylus is used instead of a pointer. b.) a magic wand is used instead of a pointer. c.)users speak commands instead of using a pointer. d.)users visualize commands instead of using a pointer.
Answers: 1
question
Computers and Technology, 22.06.2019 19:10
What a backup plan that you have created in a event you encounter a situation
Answers: 2
question
Computers and Technology, 23.06.2019 05:30
Sally is editing her science report about living things. she needs to copy a paragraph from her original report. order the steps sally needs to do to copy the text to her new document.
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
In which job role will you be creating e-papers, newsletters and preiodicals
Answers: 1
You know the right answer?
Suppose I am going to choose an integer between 1 and n, inclusive, according to some probability di...
Questions
question
Mathematics, 06.12.2020 23:00
question
Mathematics, 06.12.2020 23:00
question
Mathematics, 06.12.2020 23:00