Contents of the hash table that results

Assignment Help Basic Computer Science
Reference no: EM131427305

In this problem, assume that letter A is equivalent to 0. The subscripts do not affect the value of the keys (which are letters).

(a) Give the contents of the hash table that results when keys E1 A S1 Y Q U E2 S2 T I O N are inserted in that order into an initially empty 13-item hash table using linear probing (use h(k) = k mod 13 for the hash function for the k-th letter of the alphabet).

(b) Give the contents of the hash table that results when keys E1 A S1 YQUE2 S2 TION are inserted in that order into an initially empty 13-item hash table using double hashing (use h(k) = k mod 13 for the hash function for the k-th letter of the alphabet, and h′(k) = 1 + (k mod 11) for secondary hashing function).

(c) How many probes are involved when double hashing is used to build a table consisting of n equal keys? Consider each successful or unsuccessful attempt to place an element in a hash to be a single probe.

Reference no: EM131427305

Questions Cloud

Discuss the current practices for end of life : SOC313 :Grandmother Ella has had cancer for years now and has followed alternative remedies from the time she was first diagnosed. Ella had a period of remission; however, the cancer returned and has metastasized to her bones, liver, and lungs. ..
What effect would option 3 have on the financial statements : Prepare the journal entries for Options 1 and 2, and comment on why these alternatives may not be attractive. Why do companies issue stock dividends?
Virtual reality platform : The video about VR and Facebook includes a discussion that virtual reality platform will be a future human computer interface. In terms of user experience, how would you envision the future of Faceboook based on this argument?
Create confidence interval for mean annual rainfall in la : Create a 90% confidence interval for the mean annual rainfall in LA.- If you wanted to estimate the mean annual rainfall with a margin of error of only 2 inches, how many years data would you need?
Contents of the hash table that results : Give the contents of the hash table that results when keys E1 A S1 YQUE2 S2 TION are inserted in that order into an initially empty 13-item hash table using double hashing (use h(k) = k mod 13 for the hash function for the k-th letter of the alpha..
Compute the ratio of contributed capital to earned capital : Comment on the difference between a stock dividend and a stock split.
Time algorithm for determining : Let A and B be two sequences of n integers each. Given an integer m, describe an O(nlogn) time algorithm for determining if there is an integer a in A and an integer b in B such that m = a + b.
Algorithm for ordering : Assuming S is represented by an array, give a linear-time in-place algorithm for ordering S so that all the blue elements are listed before all the red elements. What is the running time of your method?
Javascript that creates a custom object : Write an HTML5 page with JavaScript that creates a custom object to store information about a vehicle. Create the object in an external JavaScript file.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Current checking account of the corporation

The current checking account of the corporation has an EAR of 0.1 percent. The corporation is in the 33 percent federal marginal tax bracket and in a 6 percent state marginal tax bracket. You expect inflation to be .5 percent this year. There are ..

  What is the temperature distribution inside the sphere

Find the potential field between two concentric spheres if the potential of the outer sphere is maintained at V = 100 and the potential of the inner sphere is maintained at zero. The radii are 2 m and 1 m, respectively.

  Determine the horizontal force p the man

The uniform 20-lb ladder rests on the rough floor for which the coefficient of static friction is µS = is and against the smooth wall at B. Determine the horizontal force P the man must exert on the ladder in order to cause it to move.

  Does the time required for an insertion increase

Implement the symbol table described in Exercise 5 by reusing the class Tree Dictionary , as described in Section 18.2.2 of this chapter.

  Find the lcs and scs of two given sequences

Let d(T,P) be the minimum edit distance between T and P when no substitutions are allowed (i.e., the only changes are character insertion and deletion). Prove that d(T,P) = |SCS(T,P)|-|LCS(T,P)| where |SCS(T,P)| (|LCS(T,P)|) is the size of the sho..

  Rational for the decisions that you have made

You must describe the shipping charges and payment procedures that you will use. Your presentation must describe your rational for the decisions that you have made.

  How many liters are in a gallon

How many liters are in a gallon? How many pounds are in a gallon?

  What''s the irradiance at a point p of the surface

A planar surface S sits in a room that's bathed in light so that the radiance along every ray arriving at S is the same constant, 10 watts per steradian per square meter. What's the irradiance at a point P of the surface?

  Why we need to pay attention to numerical issues

Give five reasons why we need to pay attention to numerical issues in our engineering activities, which include design, analysis, and optimization.

  Government imposes tax cuts

Suppose the government imposes tax cuts for 95% of all households. How does this affect your firm?

  Write a program that reads a value

Write a program that reads a value (say n) from the user and ouputs "Hello world" n times. Verify that the user has entered an integer. If the input is 3, the output will be "hello world" 3 times.

  How many leaves does the tree have

Label and find the number of edges, degrees and vertex in the above digraph and find the corresponding matrix of the digraph above - How many leaves does the tree have?

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