An Efficient Bi-Ordering sort: A new sorting technique

0 downloads 0 Views 431KB Size Report
Sort, Insertion Sort, Complexity, Performance of algorithm. I. Introduction. One of the most common and fundamental problem in computer science, is ordering a ...
Canadian Journal on Electrical and Electronics Engineering Vol. 2, No. 12, December 2011

An Efficient Bi-Ordering sort: A new sorting technique Md. Badrul Alam Miah, Rashed Mazumder, S.M. Anamul Haque, and Md. Nazrul Ishlam Patoary Department of Information and Communication Technology (ICT) Mawlana Bhashani Science and Technology University Santosh, Tangail-1902, Bangladesh. e-mail: [email protected]

Abstract - Today there are several efficient algorithms that cope with the popular task of sorting. In this paper we are proposed a new sorting algorithm for sorting data in an efficient way. Our proposed algorithm support to sort both increasing and decreasing order unsorted data in efficient way. The number of comparisons of the proposed algorithm is less than the existing algorithm and it does not require extra memory space. Our proposed algorithm can provide optimize performance when the data elements are distributed in an order that there exists considerable low amount of sorted (increasing or decreasing order) subsets and exists increasing and decreasing order from first element of data. This algorithm has two or more situation for occurring best case complexity and it also has some new feature to optimize the performance of sorting data. So this algorithm is very suitable for sorting large number of data item. The time complexity of proposed algorithm in best case is O (n), in average case is 0.5n log n and in worse case is n log n.

II. Proposed Algorithm A. Concept Say given a data array named data [1: n] where n indicates the number of elements to be sorted. The first element of data is considered middle element of sorted list, and this element also considered as upper bound. The first element of unsorted data will be considered as lower bound which less than middle element of sorted list. An element of unsorted data to be sorted, the upper and lower bound will be replaced by this element only when this element is greater than or equal to upper bound, or less than or equal to lower bound, this element will be inserted into one of two boundary of sorted list. So, the all elements increasing or decreasing order from first element (middle element) in unsorted data will be inserted into sorted list in efficiently. Suppose ith (1

Suggest Documents