Grading-Locating Sorting and Its Development Towards Grading-Locating Searching
-
-
Abstract
Based on the analysis of the deficiencies of "Wang Xiang yang’ twice grading sorting", an algorithm of equal probability grading function is proposed. Assuming any data of n in a distribution function is known, they only need to be calculated all in one time, and there would be m grades, realizing an order on the grades (in the grade it is still non orderly). Let m≥n , in each grade an expected data volume are made not to be bigger than 1. The grades going to be sorted now nearly become orderly. It needs only very few time consumption to fulfil sorting in the grade. Thus an orderly and an equal probability gradational searching table can be set up. On this basis an algorithm of grading locating searching is put forward It has the advantages as follows: ① For a certain number to be searched, there is no need to make a "comparison" on it, but only to "calculate" on it, directly ensuring a data "grade" in the table as a searching target; ② high efficient searches such as binary search in the scope of this "grade" could be used; ③ it is suitable for any datum, especially the searching table of prodigious data; and ④ it avoids searching in all the scope of this table, and at the same time, it avoids the phenomenon of "collision" as well.
-
-