Compute the expected running time for a successful search

Assignment Help Mathematics
Reference no: EM131165958

Suppose you hash n items into a hash table of size k. It is natural to ask about the time it takes to find an item in the hash table. We can divide this into two cases, one when the item is not in the hash table (an unsuccessful search), and one when the item is in the hash table (a successful search). Consider first the unsuccessful search. Assume the keys hashing to the same location are stored in a list with the most recent arrival at the beginning of the list. Use our expected list length to bound the expected time for an unsuccessful search. Next consider the successful search. Recall that when we insert items into a hash table, we typically insert them at the beginning of a list, and so the time for a successful search for item i should depend on how many entries were inserted after item

i. Carefully compute the expected running time for a successful search. Assume that the item you are searching for is randomly chosen from among the items already in the table. (Hint: The unsuccessful search should take roughly twice as long as the successful one. Be sure to explain why this is the case.)

Reference no: EM131165958

Questions Cloud

Explain what a deadweight loss is and what causes it : Explain what consumer surplus and producer surplus is and how it can be found. Explain what a deadweight loss is and what causes it. Explain the difference between private goods and public goods
What rule of law applies to the abovementioned issue : What is the basic issue? Include some facts in this section. What rule of law applies to the abovementioned issue? Apply the rule of law to the specific facts of the case.
What do you suggest that brian tell joe : Because Brian has a little inside knowledge about Joe's agenda for this meeting, he has been considering how to handle Joe. What do you suggest that Brian tell Joe?
What is principle-agent problem and how can it be avoided : What is the principle-agent problem and how can it be avoided? What is the difference between explicit and implicit costs? What is the law of diminishing returns
Compute the expected running time for a successful search : Carefully compute the expected running time for a successful search. Assume that the item you are searching for is randomly chosen from among the items already in the table. (Hint: The unsuccessful search should take roughly twice as long as the s..
Evaluate barrys conduct of the observation assignment : I'd better contact Chuck (the director of store management) and let him know what went on here today." Evaluate Barry's conduct of the observation assignment.
What is the expected number of empty slots in hash table : What is the expected number of empty slots when we hash 2k items into a hash table with k slots? What is the expected fraction of empty slots close to when k is reasonably large?
What is the total cost of production : Complete the chart. What is the total cost of production when 2000 toys are produced? What is the variable cost of production when 5000 toys are produced
What suggestions do you have that could have improved : At this point, Anne has just a 14% response rate, which she is sure will not please her team leader. What suggestions do you have that could have improved Anne's response rate to the questionnaire?

Reviews

Write a Review

Mathematics Questions & Answers

  Find the linear function that gives the value of machine

A company is using linear depreciation and a machine that when new was worth $250,000 is valued at 60,000 after 5 years. Find the linear function that gives the value of the machine as a function of time. What is the value of the machine after 2 year..

  What is the financial charge and amount financed

the morrison family bought a car at $24000 which was financed at $600 per month for 40 months. The down payment was $5000. (a)? what was the installment price,... (b)? what is the financial charge and amount financed.

  The company has collected data concerning weekly fuel

the company has collected data concerning weekly fuel consumptiony average hourly temperaturex1 and the chill indexx2.

  Find the distance closest to the detection tower horizontal

find the distance closest to the detection tower horizontal to directly below the aeroplane to the nearest kilometre, if you could explain How to find the equation for the detection tower.

  Salary plan

Ron the realtor is offered a job directly out of real-estate school. he has a selection as to which way he will receive his salary the first year.

  What is the probability of a type i error

What if the RDA of cobalamine is actually not well established in the medical community? In fact, it may span a range of values in µg, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6. What is the corresponding Type II error and power for each of the given assum..

  A binomial distribution with parameters

We have seen that if Y has a binomial distribution with parameters n and p, then Y/n is an unbiased estimatorofp.To estimate the variance of Y,we generally usen(Y/n)(1-Y/n).

  Identify the sampling distribution of the sample mean.

This select group has been asked to consider the Colorado City Convention and Visitors Bureau survey of 25 hotels in the local area. The survey is concerned with the current availability of rooms.

  What acute angle does the pier form with the shoreline

What acute angle (correct to the nearest 0.1 degree) does the pier form with the shoreline? Is there more than one possibility? if so how can we know which is the correct one

  Parliamentary and presidential democracy

What is the difference between parliamentary and presidential democracy?

  What is the maximum number of samples she can take from the

A researcher is comparing samples from 3 populations. She has 10 samples from the first population and 10 samples from the second population. What is the maximum number of samples she can take from the third population?

  Calculate the angular speed of the engine in radians

The engine of a sports car rotates at 5,000 revolutions per minute (rpm). Calculate the angular speed of the engine in radians per second. Use 2pi radians = 1 revolution

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd