IJCSNS International Journal of Computer Science and Network Security, VOL.8 No.6, June 2008 314 Predictive Sort Dr. Anupam Shukla and Rahul Kala, Ind ia n Institute o f Info rma tio n Te c hno lo g y a nd Ma na g e me nt G wa lio r, G wa lio r, Ma d hya Pra d e sh, INDIA Summary We know the various sorting algorithms available today. Sorting has become one of the most essential parts of the artificial intelligence algorithms these days. We have so many algorithms like Quick Sort, Hash Sort, Bucket Sort, Radix Sort, Insertion Sort, etc. All these are applied to various problems in their own way. In this paper we present a new sorting algorithm. This algorithm works on the principle of calculating the position of each and every node and then placing it onto that position. The algorithm does not start sorting on an extreme end and march towards the other end, as the other algorithms. Also it does not use a divide and conquer approach. Because in both these approaches, after half time of sorting, one half is completely sorted, but the other half is completely unsorted. Here we consider the case where a huge data is to be sorted. Our algorithm sorts this data evenly with respect to time. Hence after half of the time of algorithmic run, we can predict the appropriate position of any of the node. The basic applicability of such an algorithm lies in situations where there is no time to sort the entire data, but we need approximate positions of node in the final answer. Such an algorithm can be used for weather forecasts where usually the data is very big, or for sorting the raw data generated by GPS for fast data processing. The algorithm was implemented and tested in a random set of data. The results clearly proved the working of the algorithm. The accuracy of the algorithm improved very rapidly at each iteration. This further emphasized on the efficiency of the algorithm. This means that with a small increase in number of iterations, we may be able to get a high gain in performance. Key Words: Sorting, algorithms, partial sorting. 1. Introduction Sorting is definitely the most basic operations which is widely used for data processing and data analysis in various ways. We have numerous sorting algorithms that have been developed over the period. All of these have their own philosophy of design, working, time and space complexities. All of these algorithms solve the problem of sorting data in their own way. Various algorithms exist like Selection Sort, Hashing, Quick Sort, Heap Sort, Bucket Sort etc. As a result the user has to choose between these algorithms, depending on input specifications. Quick sort with an average time complexity of θ(n lg n) happens to be quite efficient. Radix sort is another algorithm useful in its own way. These algorithms work well on limited data where the result comes in finite time, but if the total sorting time is infinite, any algorithm will fail. Hence it is not possible to fully sort the data. But the problem may only require us to know the approximate places where given input elements may be located in the whole sequence. Even though the total sorting time might be infinite, it is possible to find these in finite amount of time. This is with the help of partial sorting. The purpose of this algorithm is to introduce a new approach that would sort the given huge amount of data. The algorithm can be stopped any moment to get the partially sorted data. This partially sorted data is uniformly distributed throughout the array. Hence we can get a fair idea about the position of any element any given point of time. The algorithm is named as predictive sort, as using this algorithm, we may be able to predict the position of an element in sequence, without even fully sorting the sequence. The more time we give for sorting algorithm, the better or closer would the result be. If left uninterrupted, the input sequence would be sorted. In section 2 we have a look at the present algorithms and their strengths and weaknesses. In Section 3 we would discuss the general properties, the algorithm and the various factors affecting the algorithm. Section 4 gives the results. Section 5 gives the conclusion. 2. Present Algorithms Presently we have many algorithms being used for sorting. All these algorithms take the input sequence as the input and sort the data to generate the output. In the subsequent sections we take a brief look over few of these algorithms. 2.1 Insertion Sort This algorithm selects elements, one by one. It inserts the selected element into the sorted sequence, so that at the end of all the elements being selected, the final list is sorted[8][10][13]. Strengths: Easy to implement. Good if the sequence is already sorted or almost sorted Weakness: Large time complexity θ(n 2 ) Manuscript received June 5, 2008. Manuscript revised June 20, 2008.