Chapter 7 Learning Summary

In the seventh chapter we learned search algorithm:

Find includes three structures: ① linear form ② ③ hash table tree table

A linear table:

  Sequential search Binary search Block search
Find time complexity O (n) O (log2N) The check block ASL = L + L block look
Feature Featureless High efficiency a little bit slightly Even as binary search
General situation Any structure will do Orderly sequence table Interblock ordered, unordered order table in the block

Second, the tree table:

  1. binary sort tree: the best balanced binary tree

  2.B- tree: the external memory is a dynamic file system indexing techniques commonly used;

  3.B + tree: more suitable for document indexing system. Strictly speaking, it does not belong to the definition of Chapter V of the tree (in fact, I feel a bit like ordering a block within a block search)

Third, the hash table (hash table):

  1. Introduction The term:

    1) and hash function Hash Address: p = H (key) the correspondence relationship (H); p (hash address); key (key)

    2) conflict and synonyms: Conflict phenomenon; synonym for the keyword

  2. hash function construction method:

    1) the application of digital analysis method: know exactly the distribution of all keywords on each of the various figures.

    2) middle-square method: You can not know in advance the case for all keywords, or difficult to find the values ​​of a few more scattered directly from a keyword.

    3) Folding Method: shift into superimposition and superimposing the boundary. Apply to fewer hash address bits, while the median more keywords, and difficult to find the values ​​for a few more scattered cases directly from a keyword.

  3. The method of dealing with conflict:

    1) Open address method: linear detection method, detection method, and a pseudo-random secondary detection method. Disadvantages: will have a "secondary aggregates" phenomenon.

    2) Chain Address Method: The basic idea is the same as a configuration storage structure adjacent table, the keyword with the same hash address in the same single linked list (synonym list), then the header of each single linked list into an array in.

  4. The average length (ASL): ASL hash table is a function of [alpha] (filling factor), rather than n (number of records) function.

    Under the premise of equal probability to find, look for direct calculation of the average length success:

 

    Find the failure of the average length:

 

 ##---------------------------Dividing line------------------- ------- ##

The last goal, I reached the standard, two weeks to complete the presentation of papers to read an article on NLP and on paper under the tree frogs DDL pressure.

The next goal is to learn the basics of python. In addition, this semester to build a complete framework of knowledge about the DS in two weeks.

Guess you like

Origin www.cnblogs.com/Winston-wmj/p/10960655.html