Beruflich Dokumente
Kultur Dokumente
ISSN- 2455-5703
Abstract
Professionals of computer sciences have to confront with different complexities and problems. The pivot point of the problem
which requires the focus is sorting algorithm. Sorting is the rearrangement of items or integers in an ordered way. In this research
platform a modified cycle sort algorithm was devised and then comparative study of different sorting algorithms like Selection
sort, Merge sort, Cycle sort and Bubble sort is being done. We also used other variety of other sorting algorithms with it. An
entirely modified concept which is being sorted out. A program instigated in python has been used for gauging of CPU time taken
by each algorithm. Results were obtained after cataloguing and graphically represented. For core precision program was casted a
number of times and it’s concluded that modified cycle sort was the best option among all linear sorting algorithms where we have
duplicate data and for large inputs efficiency has also ascended.
Keywords- Sorting Algorithms, Cycle Sort, Merge Sort, Bubble Sort, Selection Sort, Time Complexity
I. INTRODUCTION
An algorithm is an explicit, precise, unambiguous, mechanically executable sequence of elementary instructions, usually intended
to accomplish a specific purpose. Sorting is the rejigging of deets in an ordered sequence. Computer technology is incessantly
maturing, and new frameworks are being instigated to the market. The plot of different mechanisms with multiple cores involves
programming for many analytical processors working separately. The application is aligned on dedicated assortment of concerns
for effective information managing. These facets make it viable to manage even more details in various databases. Algorithms that
are most useful are different sorting methods. The data constituents which needs to be sorted are normally stored in array data
structure to amass it in accordance to data elements. Most software applications sort data in ascending or descending order that is
why sorting algorithms have a paramount importance in these tasks. There are many fundamental and evolved sorting methods
which are used for specific purpose. It is of key importance because it enhances the usefulness of data. It has risen in parallel with
human mind burgeoning. Flourishment of information leads to increase in sort algorithms establishment. Their progress plummeted
the complexity and allured a great deal of research. From finding a word from dictionary to finding a number or address from a
directory is not so vapid now. Several sorting algorithms are present today like merge sort, bubble sort, insertion sort, quick sort,
selection sort and each one of them has separate mechanism to organize various elements so that performance and efficiency get
rocketed. While doing comparison there are many factors which must be taken into account like time complexity i.e. the proportion
of time taken by the sorting algorithm to trot. This factor is quiet vary in every sorting algorithm because of the bulk of data and
may be inefficient or too slow. The time complexity can be depicted as O (n) notation. Here O represents complexity and n
represents the number of elementary operations done. Second factor which is focused is stability i.e. algorithms keep the
constituents with same values in the same sequence in modified array. Some sorting algorithms are stable by nature like insertion
sort, merge sort, bubble sort while others are not stable and need to be modified to stable. The third factor is memory space which
depicts that most sorting algorithms which use recursive techniques cover more memory.
In this article, we have used our analytical approach to compare different sorting algorithms with newly devised counting
(cycle) sort algorithm by modifying a previous one and tried to elaborate it in a simple way. Also presented some previous
comparative studies of different people who have done it exceptionally. It’s a stark reality that critical research is the base of
knowledge.
The correctness of algorithm, detailed time complexity analysis and applications of algorithm was proved by using
methodology of indexing in insertion sort efficiently to give much better performance [19].Several models of a computer the
random access machine, the Turing machine and the random access stored program machine. These models were compared and
several specialized models were derived from them. Namely straight-line arithmetic sequences, bitwise computations and decision
trees and introduced a language called “Pidgin ALGOL” for describing algorithms [7, 20].
III. METHODOLOGY
Applied collations are always machine contingent. For expediting investigators, who contemplate to vigor the outcomes, it’s crucial
to bluntly elucidate the machine used for practical work. For gauging of CPU time taken by each algorithm, a program is instigated
in python. The proposition for data file used in it embodies 1-100, 1-1000, and 1-1000 in primed, subjugated, average and two
folds of number cases. On Windows 10 (64bit, Computer used for this aim was CPU 6200U @2.40 GHz, Intel(R) Core (TM) i5
this program was enacted. 8.00 GB of memory was lodged. After streaming the program on all inputs exhaustion of CPU time was
taken into account using python library named time. Cataloguing and graphical designation was generated in MS Excel and then
conclusion was made out of it.
We fabricated 23-30 bit integer randomly after entering data. And in four ways we have contrived our input data. In the
most suitable cases in levitating pattern we organized our numerical data and scheduled information in slant order on worst case.
We copied input finally after randomly devising inputs, where 20% inputs are idiosyncratic and all of the other input data are
duplicates.
An in-situ sorting algorithm is Cycle sort. For elaboration of this sort suggestion, a log with discrete items is being taken
into account. We can demonstrate the index at which it will take place in the sorted list by straight forwardly, given the items in
log, counting the sundry of elements in the whole log that are lesser. There is no need to do anything if the element is hitherto at
scrupulous position, if not, we have to place it to its required position. That orientation is occupied by a different element b, which
we then have to displace to its right position. Positioning of items is being kept on going to their right places until an element is
moved to the prototypical position of a. This finishes a cycle. Echoing this process for every element organize the log, with a single
writing performance if and only if an element is not already at its right place. O (n) time has been taken for calculating the correct
place for single element, thus concluding in a quadratic time algorithm, the amount of writing operations is decreased.
We summate few additional logic on the code. We simply counted the amount of itemized products in the whole log of
cycle sort that are lesser than opted element. But in our case we have summated an additional logic. It will store that index value
if the opted elements are being duplicated into another array for that element. It’s not compulsory to count the index when we get
duplicate value next time. We can simply check the index from the duplicate array and then place the value on right index. So it
conserves plenty of time
IV. RESULT
For the effectiveness and precision we casted the program 10 times for each algorithm with same input and we took the mean value
of time. And our time measurement unit is second. For accuracy stopwatch can be used for efficiency measurement. Thomas
Mayrhofer stopwatch may provide result 25%-30% different for the same code executed repeatedly.
V. CONCLUSION
For large number of inputs, performance has increased and we can say that modified cycle sort where we have duplicate data can
be used more effectively. But for smaller inputs and decreased efficiency we can use cycle sort. Its performance decreases for
larger inputs that is why modified cycle sort is considered the best. It has given exceptional performance among all five sorting
algorithms for duplicate data and graded the exceptional.
REFERENCES
[1] Aho A., H. J. (1974). The Design and Analysis of Computer Algorithms.
[2] ali, K. (2017). A Comparative Study of Well Known Sorting Algorithms. International Journal of Advanced Research in Computer Science.
[3] Bharadwaj, A. &. (2013). Comparison of Sorting Algorithms based in Input Sequences. International Journal of Computer Applications.
[4] Chhajed, N. &. (2013). A Comparison Based Analysis of Different Types of Sorting Algorithms with their Performances. Indian Journal of Research Paripex.
[5] Elmenreich, W. I. (2009). Robustness versus performance in sorting and tournament algorithms. Acta Polytechnica Hungarica.
[6] Joshi, R. P. (2013). Analysis of Non-Comparison Based Sorting Algorithms: A Review. International Journal of Emerging Research in Management &
Technology.
[7] K., Q. (2018). A Practical Performance Comparison of Parallel Sorting Algorithms on Homogeneous Network of Workstations.
[8] Kapur, E. K. (2012). Proposal of a two way sorting algorithm and performance comparison with existing algorithms. International Journal of Computer
Science.
[9] Khalid Suleiman Al-Kharabsheh, I. M. (2013). Review on Sorting Algorithms A Comparative Study. International Journal of Computer Science and Security
(IJCSS.
[10] Kumar, G. &. (2013). Empirical Study of Complexity Graphs for Sorting Algorithms. International Journal of Computer and Communication and Information
Technology (IJCCIT).
[11] M, Q. (2019). Merge Sort Algorithm”, Department of Computer Sciences, Florida Institute of.
[12] Marszałek, Z. (2017). Parallelization of Modified Merge Sort Algorithm. MDPI.
[13] Naeem Akhter, M. I.-u.-R. (2016). Sorting Algorithms – A Comparative Study. International Journal of Computer Science and Information Security (IJCSIS).
[14] Pandey, K. K. (2014). A Comparative Study of Different Types of comparison Based Sorting Algorithms in Data Structure. ijarcsse.
[15] Pasetto D, A. A. (2019). “A comparative study of parallel sort algorithms”.
[16] Pena, J. O. (2008). An empirical comparison of the runtime of five sorting algorithms. International Baccalaureate Extended Essay.
[17] Sareen, P. (2013). Comparison of Sorting Algorithms (On the Basis of Average Time). International Journal of Advanced Research in Computer Science &
Software Engineering.
[18] Thomas H. Cormen, C. E. (2009). Introduction to Algorithms. MIT Press.
[19] V.Aho Alfred, E. J. (1974). The Design and Analysis of Computer Algorithms. Addison Wesley.
[20] Varinder Kumar Bansal, R. S. (2009). Indexed Array Algorithm for Sorting. International Conference on Advances in Computing, Control, and
Telecommunication Technologies.