Preview

Hash Tables

Good Essays
Open Document
Open Document
565 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Hash Tables
Mark Radice
SD290
Hash Tables

The term Hash Search refers to a search, in which they key, through an algorithmic function, determines the location of the data. In essence, the goal is to find the data with only one search. The hash search runs very quickly because of this. It's Big O, or orders of power, approaches O(1) and will never exceed O(n). To accomplish this search, a program is written in which the key is passed into the hash function, which in turn, finds the address of the data needed. To start with, the function will take in a string of characters. It will then convert those characters to an ASCII value and add them together giving it a yield or position.

The first step is simply inputting a string of characters. The program then is designed to convert those characters to an ASCII value. Those values are then added together to give it an initial index value inside your set table. The function will continue to run as long as data needs to be stored. It will continue to cycle through placing data into the proper locations based upon your math formula. This sounds like it would be a perfect table of data that is easily searchable except there is a bit of a problem.

The problem comes in when two pieces of data produce the same yield. The table will try to store this into the same place as the other data with that index number. These data that share the same index are referred to as synonyms. When the function attempts to place multiple pieces of data into the same index position, the computer encounters what is called a collision. The address, or index, produced by the hashing algorithm is known as the home address. The memory that contains all of the home addresses is known as the prime area. When two keys collide at a home address, we must resolve the collision by placing one of the keys and its data into a new location.

Another algorithm is commonly used to solve the collision problem. Often times simply dividing the

You May Also Find These Documents Helpful

  • Good Essays

    Nt1420 Unit 6

    • 1145 Words
    • 5 Pages

    Question 6 A hash table is a data structure that uses an array as its internal storage container. Items are added to the array based on the integer generated by a hash function. A hash function produces an integer based on some properties of the object. In Java hash functions are encapsulated via the hashcode method in the Object class and that many classes override.…

    • 1145 Words
    • 5 Pages
    Good Essays
  • Good Essays

    Unit 2 Assignment 2

    • 676 Words
    • 3 Pages

    3. A secure cryptographic hash algorithm is one that generates a unique identifier of a fixed size (known as a "digest" or simply "hash") for a block of data of…

    • 676 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    C 1D Collisions PhET Lab

    • 662 Words
    • 4 Pages

    Take some time to familiarize yourself with the simulation and perfect collisions. Play. Investigate. Learn.…

    • 662 Words
    • 4 Pages
    Powerful Essays
  • Good Essays

    Arrays store items that have the same type of data type like a group of employees’ names and social security numbers for a team of 2000 personal. Pointer is a variable that greatly extends the power and flexibility of a program, each memory location that is used to store data value has an address. The address provides the means for a PC hardware to reference a particular data item.…

    • 485 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    1. It keeps a count of the number of times you want to use the program to input data…

    • 351 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Science Flash Cards

    • 832 Words
    • 4 Pages

    If two objects with different masses and traveling with different velocities collide, what law allows you to predict the motion of the objects after the collision?…

    • 832 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    4. Use the Subtotal function to count the total number of records within each letter.…

    • 432 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    In the Value_if_false field, describe the output for the function if the data in column A does not match the criteria. In this case, if the data in column A ≠ 1, the word “two” is entered in the cell.…

    • 571 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    Dynamics of a Bouncing Ball

    • 2746 Words
    • 11 Pages

    This shows that the coefficient of restitution of a collision is the ratio of the square root of the rebound height (h) by the drop height (H).…

    • 2746 Words
    • 11 Pages
    Powerful Essays
  • Good Essays

    Output will consist of a series of lines, one for each line of the input. Each line will consist of the position of the string in its…

    • 525 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Medical Coding

    • 450 Words
    • 2 Pages

    I. The first step in coding is to locate the main term in the Alphabetic Index.…

    • 450 Words
    • 2 Pages
    Good Essays
  • Better Essays

    Is3230 Lab 1 PKI Analysis

    • 851 Words
    • 4 Pages

    A PKI (public key infrastructure) enables users of a basically unsecure public network such as the Internet to securely and privately exchange data and money through the use of a public and a private cryptographic key pair that is obtained and shared through a trusted authority. The private key system is sometimes known as symmetric cryptography and the public key system as asymmetric cryptography. The Hash algorithm (or hash function) is an algorithm that computes a value based on a data object such as a message or file. The object is usually of variable length, possibly very large, thereby mapping the data object to a smaller data object. This is the “hash result” which is usually a fixed-size value.…

    • 851 Words
    • 4 Pages
    Better Essays
  • Good Essays

    Physics Quiz

    • 4354 Words
    • 18 Pages

    | The collision must involve a sufficient amount of energy, provided from the motion of the particles, to overcome the activation energy.…

    • 4354 Words
    • 18 Pages
    Good Essays
  • Satisfactory Essays

    In this experiment, two object collided both elastically and in inelastically, the purpose of this experiment is to study the principle of conservation of momentum in collisions using two bodies. We also calculated the amount of kinetic energy in elastic and inelastic collisions before and after the collision.…

    • 472 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Database

    • 317 Words
    • 2 Pages

    Describe the ways in which database technologies could be used by an office stationery supply company to achieve low-cost leadership.…

    • 317 Words
    • 2 Pages
    Satisfactory Essays