In this programming assignment you will implement an open

Assignment Help Data Structure & Algorithms
Reference no: EM13346524

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

You will use the table to compare two Shakespeare plays: Hamlet and As You Like It. You will report the number of words that Shakespeare used in both plays.  Have your program read the file hamlet.txt and insert each word into the table. For this assignment, a word will be delimited by a white space, so simple input with >> can be used.  Some of the words will, of course, be nonsense, but we will ignore this.  After inserting all the words from Hamlet, do a lookup for words from the file asyoulikeit.txt.  Store and count the words that are duplicated in the two plays (i.e. words for which the search is successful).  Your count may be slightly less than accurate in reality, since we will not strictly parse the words.  However, each student should come up with the same list of words and the same count.  For each word you insert, compute the number of elements in the bucket that are searched.  Likewise, compute the number of unsuccessful searches.  Report the average number of elements inspected during a search (average number per bucket).   Determine if this is close to the expected size based on the load factor after all words have been inserted.

Repeat your experiment with table sizes of 27691, 55381 and 83,077 using each of the four hash functions.

Data Structures:

  • The hash table must be a template class which uses a linked list to store collisions
  • The underlying physical structure can be a simple, dynamically allocated array or a vector.  
  • The hash table will use an abstract hashing class and four subclasses

Reference no: EM13346524

Questions Cloud

Wind turbines are becoming more and more common as a method : wind turbines are becoming more and more common as a method of energy production wind turbines by their very nature are
1briefly trace the development and growth of amazoncom from : 1.briefly trace the development and growth of amazon.com from 1995 to the present through the application of corporate
Jane stevens is 30 years old and she is reviewing her : jane stevens is 30 years old and she is reviewing her retirement plans.nbsp she currently has 20000 in a retirement
Schubert mahler and tull are resident australian seamen : schubert mahler and tull are resident australian seamen employed on the fishing trawler mv st cecilia. whilst on a
In this programming assignment you will implement an open : in this programming assignment you will implement an open hash table and compare the performance of four hash functions
The case for global accounting standards arguments and : the case for global accounting standards arguments and evidencethis paper outlines the arguments for a basic set of
Write the structures of the major product saytzeff : write the structures of the major product saytzeff elimination when the following alcohols are dehydrated with
1 is your nbspportfolio balancednbsp justify your answer2 : 1. is your nbspportfolio balanced?nbsp justify your answer.2. what changes would you make if any?a high portfolio beta
1 if a swot analysis reveals that an objective is : 1. if a swot analysis reveals that an objective is unattainable apart from changing the objective what other changes

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Analyzing certain software properties affects

Describe how the lack of metrics for analyzing certain software properties affects the software engineering discipline.

  Running time analyses of all the methods

You need to give the running time analyses of all the methods in terms of the Big O notation. Include your running time analyses in the source file of the CompressedSuffixTrie class and comment out them.

  Use big-o notation to categorize algorithms

Use big-O notation to categorize traditional grade school algorithms for addition and multiplication. That is, if asked to add two numbers each having N digits, determine individual additions should be performed?

  Simplify rsa cryptosystem using prime number

Assume we tried to simplify RSA cryptosystem using just prime p instead of composite modulus N = pq. As in RSA, we would have encryption exponent.

  Design a model using a flow diagram

Design a model using a flow diagram or pseudo code, hardware, and a software driver that can display the BCD digits 0-9 on a single-digit LED display. Build the BCD to seven-segment decoder in the software.

  Time n-processor common crcw pram algorithm

present an O(1) time n-processor common CRCW PRAM algorithm for computing the boolean AND of n bits.

  Graph in which every node is pivotal for at least two nodes

Give an example of a graph in which every node is pivotal for at least two di fferent pairs of nodes. Explain your answer.

  Write an algorithm that converts linear measurement in feet

Write an algorithm that converts a linear measurement in feet and inches into meters. One inch is equivalent to 2.54 centimeters.

  Explain benefits of isdn

Sometimes ISDNs are used in locations that do not support DSL or cable modem connections. Your selections may be analog modems or an ISDN connection in those remote locations.

  Question about passing parameters

Provide an example of when passing parameters through value as opposed to passing them by reference is a better method. Provide an example of when passing parameters through reference

  The time delay of a long-distance

The time delay of a long-distance call can be determined by multiplying a small fixed constant by the number of communication links on the telephone network between the caller and callee.

  How to calculate signature using mod

How does he calculate the signature on each of m1j mod n (for positive integer j), m1-1 mod n, m1*m2 mod n, and in general m1j*m2k mod n (for arbitrary integers j and k)?

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