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

  Computing available storage space

There are twenty gigabyte of space on a computer's hard disk. I transfer information via a telephone line (connection) at the rate of 14,400 bits per second.

  Doubly linked list

Write a class that maintains the top 10 scores for a game application, implementing the add and remove methods but using a doubly linked list instead of an array. Program has to be written in java

  What is the machine run time in second for sorting array

Write computer program to implement this algorithm and demonstrate the results and what is the machine run time in second for sorting array A

  Describe sorting algorithm to be parsimonious

Describe a sorting algorithm to be parsimonious if it never compares same pair of input values twice. (Supose that all the values being sorted are distinct.).

  Sketch portion of decision tree via quicksort to sort array

Suppose you are using quicksort to sort array A with 6 distinct elements a1, a2, ..., a6. Sketch portion of the decision tree which corresponds to th ordering a3

  What are the icmp type and code numbers

Examine the corresponding ping reply packet. What are the ICMP type and code numbers? What other fields does this ICMP packet have? How many bytes are the checksum, sequence number and identifier fields?

  Explain method for combining two trees-heap-order property

Assume two binary trees, T 1 and T 2 , hold entries satisfying heap-order property. Explain method for combining T 1 and T 2 into a tree T whose internal nodes hold union of entries

  Sharing a large computer file

Assume you are sitting at desk at office and using your laptop computer. The boss calls an emergency meeting for you and many colleagues, and asks everyone to bring his or her laptop computer.

  Design a divide-and-conquer algorithm

Design a divide-and-conquer algorithm for the Motif Finding problem and estimate its running time. Have you improved the running time of the exhaustive search algorithm?

  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.

  Computing total number of keys needed in symmetric cipher

Determine the total number of keys that are needed for organization if symmetric cipher is used.

  Write algorithm for graph minimum number of semesters

You are given a DAG called G which is the prerequisite graph for a set of courses required for a degree. Each vertex corresponds to course. Provide a high-level description of algorithm which labels each vertex in G with minimum number of semesters..

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