Probabilistic analysis of hash functions

Assignment Help Data Structure & Algorithms
Reference no: EM13933865

Probabilistic Analysis of Hash Functions

In this assignment, you will write and evaluate 5 different hash functions with whose input keys are names. Your evaluation should be based on popular American first names. You can create a person's name from any two "first names" in the 2000 census link supplied below.

https://www.ssa.gov/OACT/babynames/decades/names2000s.html

To evaluate each hash function, you should determine the value each input key maps to. A counter representing this value should be incremented. For a good hash function, a histogram representing the count for each value should be uniformly distributed. Also your program should run a χ2 test on the resulting output to determine the randomness of the distribution of the hash function.

Assignment submission should include your hash functions, a histogram representing the distribution of each function's output, and an analysis of the χ2 test results for each function. Determine which one of your custom hash functions should be used to hash American first names.

Your submission should include 4 different hashing functions, using techniques such as we demonstrated in class (folding, adding, squaring, etc...). You will have a hash table array of a prime number of slots (101, for example) If you run a couple five hundred names through a hash function, you should get a fairly uniform distribution in the table, no too many with 0 or 1, and not too many with 10 or more keys hashing to a location.

You will run each hash function 10 times, and perform the χ2 test which measures if it is uniform. 8 to 9 "yes" results will verify the hashing function is good. 6-7 or fewer indicates the function is probably not uniform.

A successful program may have 2 or 3 good functions and 1 or 2 poor functions. χ2is computed by the following formula

χ2  = [Σ0≤i<r(fi - N/r)2]/[ N/r]

If χ2 is in the range of r ± 2√r, we conclude that distribution is indeed random. Otherwise it may not be. If you will generate 500 numbers in the 0-100 range. Then N=500 and r=101.

Reference no: EM13933865

Questions Cloud

Relevant models and theoretical perspectives : Consider using relevant models and theoretical perspectives to make your analysis. For example, you might find that one successful organisation has executed its marketing strategy by applying Ansoff's Matrix in a disciplined manner, whereas anothe..
Case study sunset grill at blue : Case Study Sunset Grill at Blue Read the attached case and answer the below questions; 1. What is Sunset Grille's service concept? Evaluate their sustainability.
Increasing fees elastic or inelastic : Is demand for courses at the universities that did not increase their fees elastic or inelastic with respect to universities that did increase their fees? What is the importance of this degree of elasticity?
Record the payment of the merchandise in requirement c : Record the payment of the merchandise in Requirement c in a horizontal statements model like the one shown above.
Probabilistic analysis of hash functions : Probabilistic Analysis of Hash Functions - In this assignment, you will write and evaluate 5 different hash functions with whose input keys are names. Your evaluation should be based on popular American first names
Historical significance of the source : This is the key part of assignment. Explain the historical significance of the source. How does the source aid in the understanding of the time period. How does it compliment the textbooks coverage of the event, person, or place? Do not report ver..
How natural environment has affected or influenced health : Describe your own restorative environment(s). Based on what you have learned what factors contribute to the environment being restorative to you?"
Policies government can implement to achieve economic growth : Discuss the policies which a government can implement to achieve economic growth. To what extent do you agree that economic growth is always beneficial to a country?
Largest indoor amusement park in the world : On average for the Northern Gate 60% of customers arrives batched as follow 2 at a time, 20% 3 at a time and 20% arrives individually. Analysis shown that 70% of arrivals from both gates will play with FormulaRossagame Which is the fastest Roller..

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Creating visual studio asp .net web site

Make a Visual Studio 2008 ASP .NET Web Site with 2-Web Forms. Add a DropDownList server control and a Label server control to 1st Web Form.

  Creating sql statements

Create three SQL statements: the 1st statement should add pending amounts to appropriate accounts, the second statement should subtract the pending amounts from appropriate accounts,

  Graph algorithm.

Graph algorithm. a. Draw a depth-first search tree based on a given graph. Assume that adjacent vertices are visited in alphabetical order. Then compute the Num and Low values for each vertex, and find out the articulation points i

  Write algorithm to reverse elemens in queue

Using basic queue and stack operationns, write algorithm to reverse elemens in the queue. Suppose that 'Stack' is class described in section with 'StackType' set to int and STACK_CAPACITY

  Plot six training points in a two-dimensional space

how many examples do we need to exhaustively enumerate every possible combination of inputs -  what is the conditional probability that An item classified as Reject is actually good?

  Design algorithms to implement stack operations

How to design algorithms to implement stack operations. Write down the program to multiply any two matrices. (Using Basic).

  Describe properties of bfs and dfs for acyclic tree

Analyze the given properties of BFS and DFS for Acyclic Tree without making any assumptions. Optimality, Completeness.

  Effective address-addressing mode of instruction is direct

Evaluate the effective address if the addressing mode of the instruction is (a) direct; (b) immediate; (c) relative; (d) register indirect.

  Part 11 how many cells can be in a computers main memory if

part 11. how many cells can be in a computers main memory if each cells address can be represented by two hexadecimal

  Write a program to implement quicksort algotithm

Write a program to implement quicksort algotithm

  Question about multi dimensional arrays

Multi-dimensional arrays could cost a lot of memory. Determine how much memory does it take to create an integer array of 3 dimensions,

  Program to prompt the user to enter a postfix expression

Write a program to prompt the user to enter a postfix expression. When the user presses enter, the stack based method for constructing expression trees will be executed.

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