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

    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

    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
  • 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
  • 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

    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
  • 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
  • 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

    Programming Homework

    • 366 Words
    • 2 Pages

    Provide your analysis for the following problem statement: You need to write a program that would calculate the results for the multiplication table up from 1 to 100. (For example, 1X1, 1X2, 1X3 … 1X10, 2X1, 2X2 …. 10X2 … 10x10). Your program should print the output for each step and output a new line after 10 items.…

    • 366 Words
    • 2 Pages
    Good 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
  • 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
  • Good Essays

    Learn Excel

    • 753 Words
    • 4 Pages

    Let's say you want to look up an employee's phone extension by using their badge number or the correct rate of a commission for a sales amount. You look up data to quickly and efficiently find specific data in a list and to automatically verify that you are using correct data. After you look up the data, you can perform calculations or display results with the values returned. There are several ways to look up values in a list of data and to display the results. There are two Lookup functions: VLOOKUP and HLOOKUP.…

    • 753 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Relational Databases

    • 750 Words
    • 3 Pages

    Data for our programs are stored in various formats. The most commonly used format is in the form of a database since databases are not dependent on a single program or hardware platform. These databases are stored in five structures of hierarchical, network, relational, multidimensional, and object-oriented. Hierarchical structure organizes data in a one to many relationship. The network goes of the hierarchical structure by organizing data in a many to many relationship. The relational structure organizes the data in tables and allows the end user to determine the relationship at run time. Multidimensional takes the relational structures concept and uses multi dimensions to organize the data. Object-oriented structure has not only the attributes of the entity, but also contain the operations that can be performed on it.…

    • 750 Words
    • 3 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