Question: PYTHON Consider the following two hash functions. Let U be the universe of strings composed of the characters from the alphabet , and let then

PYTHON

Consider the following two hash functions. Let U be the universe of strings composed of the characters from the alphabet PYTHON Consider the following two hash functions. Let U be the universe , and let then function of strings composed of the characters from the alphabet , and let return the index of a letter then function return the index of a letter , e.g., f(a) =, e.g., f(a) = 1 and f(Z) = 26. Finally, for an m-character string 1 and f(Z) = 26. Finally, for an m-character string ^ m, ^ m, define define , where is the number of buckets in the hash table. For the other hash function, let the function return , where is , where a uniform random integer, , and define . That is, the first is the number of buckets in the hash table. For the other hash function, let the function hash function sumps up the index values of the characters of a return string x and maps that value onto one of the bucket, and, where the second hash function is a universal hash function. (a) Using the is a uniform random integer, txt file (below) that contains US Census derived last names (or just , and define any list of names) as input strings, first choose a uniformly random 50% of these name strings and then hash them using h1(x) and. That is, the first hash function sumps up the index values of the characters of a string x and maps that value onto one of the h2(x). SMITH JOHNSON WILLIAMS JONES BROWN DAVIS MILLER WILSON MOORE TAYLOR ANDERSON bucket, and the second hash function is a universal hash function.

(a) Using the txt file (below) that contains US Census derived last names (or just any list of names) as input strings, first choose a uniformly random 50% of these name strings and then hash them using h1(x) and h2(x).

SMITH

JOHNSON

WILLIAMS

JONES

BROWN

DAVIS

MILLER

WILSON

MOORE

TAYLOR

ANDERSON

THOMAS

JACKSON

WHITE

HARRIS

MARTIN

THOMPSON

GARCIA

MARTINEZ

ROBINSON

CLARK

RODRIGUEZ

LEWIS

LEE

WALKER

HALL

ALLEN

YOUNG

HERNANDEZ

KING

WRIGHT

LOPEZ

HILL

SCOTT

GREEN

ADAMS

BAKER

GONZALEZ

NELSON

CARTER

MITCHELL

PEREZ

ROBERTS

TURNER

PHILLIPS

CAMPBELL

PARKER

EVANS

EDWARDS

COLLINS

STEWART

SANCHEZ

MORRIS

ROGERS

REED

COOK

MORGAN

BELL

MURPHY

BAILEY

RIVERA

COOPER

RICHARDSON

= [A, ....., Z]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!