Performance Comparison of Sorting Algorithms On The Basis Of Complexity (original) (raw)

A Comprehensive Note on Complexity Issues in Sorting Algorithms

2009

Since the dawn of computing, the sorting problem has attracted a great deal of research. In past, many researchers have attempted to optimize it properly using empirical analysis. We have investigated the complexity values researchers have obtained and observed that there is scope for fine tuning in present context. Strong evidence to that effect is also presented. We aim to provide a useful and comprehensive note to researcher about how complexity aspects of sorting algorithms can be best analyzed. It is also intended current researchers to think about whether their own work might be improved by a suggestive fine tuning. Our work is based on the knowledge learned after literature review of experimentation, survey paper analysis being carried out for the performance improvements of sorting algorithms. Although written from the perspective of a theoretical computer scientist, it is intended to be of use to researchers from all fields who want to study sorting algorithms rigorously.

Comparison of Efficiency Data Sorting Algorithms Based on Execution Time

International Journal of Scientific Research in Computer Science, Engineering and Information Technology, 2023

In today's era, the development of information technology is increasingly rapid. This is because human life is currently very dependent on the needs of information technology. This can be proven by the number of human interactions with various gadgets, such as laptops, cellphones, computers, and so on. The development of information technology has made IT activists such as companies and programmers compete in making good applications. One of the most basic things that are mastered in making an application is making algorithms. Currently, there are many types of algorithms. One of them is the data sorting algorithm. In this study, we will try to examine 3 data sorting algorithms, namely Insertion Sort, Quick Sort, and Merge Sort. These three algorithms will be used to sort random data ranging from 1000 to 20,000 data. The three algorithms will be compared in terms of execution time. The results show that the Insertion Sort algorithm is a data sorting algorithm that has the fastest execution time compared to other algorithms, while the Merge Sort algorithm is the most time consuming algorithm compared to other algorithms.

Analysis and Performance Measurement of Sorting Algorithms

Proceedings of National Conference on Convergent Innovative Technologies & Management (CITAM-2011) on 2 nd & 3 rd December 2011 at Cambridge Institute of Technology,Bangalore India, 2011

Any number of practical applications in computing requires things to be in order. The performance of any computation depends upon the performance of sorting algorithms. Like all complicated problems, there are many solutions that can achieve the same results. One sort algorithm can do sorting of data faster than another. A lot of sorting algorithms has been developed to enhance the performance in terms of computational complexity, memory and other factors. This paper chooses three of the sorting algorithms: the heap sort, merge sort, quick sort and measures their performance for the realization of time complexity with respect to the theories which are represented normally using asymptotic notation.

IJCCIT-Empirical Study of Complexity Graphs for Sorting Algorithms.pdf

This study investigates the characteristic of the sorting algorithms with reference to number of comparisons made for the specific number of elements. Sorting algorithms are used by many applications to arrange the elements in increasing/decreasing order or any other permutation. Sorting algorithms, like Quick Sort, Merge Sort, Heap Sort, Insertion Sort, Bubble Sort etc. have different complexities depending on the number of elements to sort. The purpose of this investigation is to determine the number of comparisons, number of swap operations and after that plotting line graph for the same to extract values for polynomial equation. The values a, b and c got is then used for drawing parabola graph. The study concludes what algorithm to use for a large number of elements. For larger arrays, the best choice is Quick sort, which uses recursion method to sort the elements and leads to faster results. Least square method and Matrix inversion method is used to get the value of constants a, b and c for each polynomial equation of sorting algorithms. After calculating the values, Graph is drawn for each sorting algorithm for the polynomial equation i.e. Y=AX 2 + BX + C or Y=AX lgX + BX + C.

Towards a Realistic Analysis of Some Popular Sorting Algorithms

Combinatorics, Probability and Computing, 2014

We describe a general framework for realistic analysis of sorting algorithms, and we apply it to the average-case analysis of three basic sorting algorithms (QuickSort, InsertionSort, BubbleSort). Usually the analysis deals with the mean number of key comparisons, but here we view keys as words produced by the same source, which are compared via their symbols in lexicographic order. The ‘realistic’ cost of the algorithm is now the total number of symbol comparisons performed by the algorithm, and, in this context, the average-case analysis aims to provide estimates for the mean number of symbol comparisons used by the algorithm. For sorting algorithms, and with respect to key comparisons, the average-case complexity of QuickSort is asymptotic to 2n log n, InsertionSort to n2/4 and BubbleSort to n2/2. With respect to symbol comparisons, we prove that their average-case complexity becomes Θ (n log2n), Θ(n2), Θ (n2 log n). In these three cases, we describe the dominant constants which ...

An Analytical Comparison of Different Sorting Algorithms in Data Structure

2015

Sorting is considered as a very basic operation in computer science. Sorting is used as an intermediate step in many operations. Sorting refers to the process of arranging list of elements in a particular order either ascending or descending using a key value. There are a lot of sorting algorithms have been developed so far. This research paper presents the different types of sorting algorithms of data structure like Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, Heap Sort and Quick Sort and also gives their performance analysis with respect to time complexity. These six algorithms are important and have been an area of focus for a long time but still the question remains the same of "which to use when?" which is the main reason to perform this research. Each algorithm solves the sorting problem in a different way. This research provides a detailed study of how all the six algorithms work and then compares them on the basis of various parameters apart from time c...

A Comparative Study of Sorting Algorithm Based on Their Time Complexity

The quest to develop the most memory efficient and the fastest sorting algorithm has become one of the crucial mathematical challenges of the last half century, resulting in many tried and tested algorithm available to the individual, who needs to sort the list of data. Today, the amount of data is very large, we require some sorting techniques that can arrange these data as fast as possible and also provide the best efficiency in terms of time and space. In this paper, we will discuss some of the sorting algorithms and compare their time complexities for the set of data

Sorting Algorithms – A Comparative Study

Sorting is nothing but alphabetizing, categorizing, arranging or putting items in an ordered sequence. It is a key fundamental operation in the field of computer science. It is of extreme importance because it adds usefulness to data. In this papers, we have compared five important sorting algorithms (Bubble, Quick, Selection, Insertion and Merge). We have developed a program in C# and experimented with the input values 1-150, 1-300 and 1-950. The performance and efficiency of these algorithms in terms of CPU time consumption has been recorded and presented in tabular and graphical form.

Comparative Analysis of Comparison and Non Comparison based Sorting Algorithms

International Journal of Computer Applications, 2020

Sorting is one of the most important task in many computer applications. Efficiency becomes a big problem when the sorting involves a large amounts of data. There are a lot of sorting algorithms with different implementations. Some of them sort data by comparison while others don't. The main aim of this thesis is to evaluate the comparison and noncomparison based algorithms in terms of execution time and memory consumption. Five main algorithms were selected for evaluation. Out of these five, three were comparison based algorithms (quick, bubble and merge) while the remaining two were non-comparison based (radix and counting). After conducting an experiment using array of different data sizes (ranging from 1000 to 35000), it was realized that the comparison based algorithms were less efficient than the noncomparison ones. Among the comparison algorithms, bubble sort had the highest time complexity due to the swapping nature of the algorithm. It never stops execution until the largest element is bubbled to the right of the array in every iteration. Despite this disadvantage, it was realized that it is memory efficient since it does not create new memory in every iteration. It relies on a single memory for the swapping array operation. The quick sort algorithm uses a reasonable amount of time to execute, but has a poor memory utilization due to the creation of numerous sub arrays to complete the sorting process. Among the comparison based algorithms, merge sort was far better than both quick and bubble. On the average, merge sort utilized 32.261 seconds to sort all the arrays used in the experiment while quick and bubble utilized 41.05 and 165.11 seconds respectively. The merge algorithm recorded an average memory consumption of 5.5MB for all the experiment while quick and bubble recorded 650.792MB and 4.54MB respectively. Even though the merge sort is better than both quick and bubble, it cannot be compared to the non-comparison based algorithms since they perform far better than the comparison based ones. When the two groups were evaluated against execution time, the comparison based algorithms recorded an average score of 476.757 seconds while the non-comparison obtained 17.849 seconds. With respect to the memory utilization, the non-comparison based algorithms obtained 27.12MB while the comparison ones obtained 1321.681MB. This clearly reveals the efficiency of the non-comparison based algorithms over the comparison ones in terms of execution time and memory utilization.

Comparative Analysis & Performance of Different Sorting Algorithm in Data Structure

— An algorithm is precise specification of a sequence of instruction to be carried out in order to solve a given problem. Sorting is considered as a fundamental operation in computer science as it is used as an intermediate step in many operations. Sorting refers to the process of arranging list of elements in a particular order. The elements are arranged in increasing or decreasing order of their key values. This research paper presents the different types of sorting algorithms of data structure like Bubble Sort, Selection Sort, Insertion Sort, Merge Sort and Quick Sort and also gives their performance analysis with respect to time complexity. These five algorithms are important and have been an area of focus for a long time but still the question remains the same of " which to use when? " which is the main reason to perform this research. Each algorithm solves the sorting problem in a different way. This research provides a detailed study of how all the five algorithms work and then compares them on the basis of various parameters apart from time complexity to reach our conclusion. I. INTRODUCTION Algorithm is an unambiguous, step-by-step procedure for solving a problem, which is guaranteed to terminate after a finite number of steps. In other words algorithm is logical representation of the instructions which should be executed to perform meaningful task. For a given problem, there are generally many different algorithms for solving it. Some algorithms are more efficient than others, in that less time or memory is required to execute them. The analysis of algorithms studies time and memory requirements of algorithms and the way those requirements depend on the number of items being processed. Sorting is generally understood to be the process of rearranging a given set of objects in a specific order and therefore, the analysis and design of useful sorting algorithms has remained one of the most important research areas in the field. Despite the fact that, several new sorting algorithms being introduced, the large number of programmers in the field depends on one of the comparison-based sorting algorithms: Bubble, Insertion, Selection sort etc. Hence sorting is an almost universally performed and hence, considered as a fundamental activity. The usefulness and significance of sorting is depicted from the day to day application of sorting in real-life objects. For instance, objects are sorted in: Telephone directories, income tax files, tables of contents, libraries, dictionaries. The methods of sorting can be divided into two categories: INTERNAL SORTING: If all the data that is to be sorted can be adjusted at a time in main memory, then internal sorting methods are used. EXTERNAL SORTING: When the data to be sorted can " t be accommodated in the memory at the time and some has to be kept in auxiliary memory (hard disk, floppy, tape etc) , then external sorting method are used. The complexity of a sorting algorithm measures the running time of function in which " n " numbers of items are sorted. The choice of which sorting method is suitable for a problem depends on various efficiency considerations for different problem. Three most important of these considerations are:  The length of time spent by programmer in coding a particular sorting program.  Amount of machine time necessary for running the program.  The amount of memory necessary for running program.  Stability-does the sort preserve the order of keys with equal values.