subject

Suppose that a sequence of items passes by one at a time. We want to maintain a sample of one item with the property that it is uniformly distributed over all the items that we have seen so far. Moreover we do not know the total number of items in advance and we cannot store more than one item at any time. (a) Consider the following algorithm. When the first item appears, we store it. When the k-th item appears, we replace the stored item with probability 1/k. Show that this algorithm solves the problem. (b) Now suppose that when the k-th item appears, we replace the stored item with probability 1/2. What is the distribution of the stored item in this case?

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 12:30
Harry needs to make a presentation on endangered species of animals. which presentation software elements can he use to display animals along with their reason of extinction? a. image and flowchart b. image and table c. text and table d. shapes and image e. graph and shapes
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
What are the possible consequences of computer hacking? what is computer piracy? describe some examples. what are the effects of computer piracy? what are the possible consequences of computer piracy? what is intentional virus setting? describe some examples. what are the effects of intentional virus setting? what are the possible consequences of intentional virus setting? what is invasion of privacy? describe some examples. what are the effects of invasion of privacy? what are the possible consequences of invasion of privacy? what is an acceptable use policy and what is the purpose of the acceptable use policy what is intellectual property and how can you use it?
Answers: 1
question
Computers and Technology, 24.06.2019 03:30
Auniform resource locator (url) is a formatted string of text that web browsers, email applications, and other software programs use to identify a particular resource on the internet. true false
Answers: 2
question
Computers and Technology, 24.06.2019 05:30
Cómo pongo un tomo de llamada sin pagar?
Answers: 1
You know the right answer?
Suppose that a sequence of items passes by one at a time. We want to maintain a sample of one item w...
Questions
Questions on the website: 13722361