Analysis of Bubble Sort and Insertion Sort Algorithm on Memory Efficiency Using Data Mining Approach (original) (raw)
Related papers
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.
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 & 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.
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...
An Evaluation of the Critical Factors Affecting the Efficiency of Some Sorting Techniques
International Journal of Modern Education and Computer Science, 2013
Sorting allows information or data to be put into a meaningful order. As efficiency is a major concern of computing, data are sorted in order to gain the efficiency in retrieving or searching tasks. The factors affecting the efficiency of shell, Heap, Bubble, Quick and Merge sorting techniques in terms of running time, memory usage and the number of exchanges were investigated. Experiment was conducted for the decision variables generated from algorithms implemented in Java programming and factor analysis by principal components of the obtained experimental data was carried out in order to estimate the contribution of each factor to the success of the sorting algorithms. Further statistical analysis was carried out to generate eigenvalue of the extracted factor and hence, a system of linear equations which was used to estimate the assessment of each factor of the sorting techniques was proposed. The study revealed that the main factor affecting these sorting techniques was time taken to sort. It contributed 97.842%, 97.693%, 89.351%, 98.336% and 90.480% for Bubble sort, Heap sort, Merge sort, Quick sort and Shell sort respectively. The number of swap came second contributing 1.587% for Bubble sort, 2.305% for Heap sort, 10.63% for Merge sort, 1.643% for Quick sort and 9.514% for Shell sort. The memory used was the least of the factors contributing negligible percentage for the five sorting techniques. It contributed 0.571% for Bubble sort, 0.002% for Heap sort, 0.011% for Merge sort, 0.021% for Quick sort and 0.006% for Shell sort.
Enhancement of Selection, Bubble and Insertion Sorting Algorithm
Research Journal of Applied Sciences, Engineering and Technology, 2014
In everyday life there is a large amount of data to arrange because sorting removes any ambiguities and make the data analysis and data processing very easy, efficient and provides with cost less effort. In this study a set of improved sorting algorithms are proposed which gives better performance and design idea. In this study five new sorting algorithms (Bi-directional Selection Sort, Bi-directional bubble sort, MIDBiDirectional Selection Sort, MIDBidirectional bubble sort and linear insertion sort are presented. Bi-directional Selection Sort and MIDBiDirectional Selection Sort are the enhancement on basic selection sort while Bidirectional bubble sort and MIDBidirectional bubble sort are the enhancement on basic bubble sort by changing the selection and swapping mechanism of data for sorting. Enhanced sorting algorithms reduced the iteration by half and quarter times respectively. Asymptotically complexities of these algorithms are reduced to O (n 2 /2) and O (n 2 /4) from O (n 2). Linear insertion sort is the enhancement of insertion sort by changing the design of algorithm (convert two loops to one loop). So asymptotically this algorithm is converted to linear time complexity from quadratic complexity. These sorting algorithms are described using C. The proposed algorithms are analyzed using asymptotic analysis and also using machine-running time and compared with their basic sorting algorithms. In this study we also discuss how the performance and complexity can be improved by optimizing the code and design.
2022
The role of algorithms in software or programming is so important that you need to understand the basic concepts behind them. In most of our daily life, we often face problems that need to be solved by entering the data sorting process. A lot of programming logic has been created, both in the general case and in the special case. In this study, the authors carried out the sorting process with two methods, namely bubble sort and tim sort. Sorting application is built using C++ program. Algorithms are needed in order to be able to solve a problem more effectively and efficiently in a shorter time using only a few resources. The preparation of this research uses data collection methods that aim to obtain the necessary data so that it can be extracted to be used as information. It is hoped that from this information it can be seen that the comparison of the bubble sort algorithm with the tim sort is getting better in the data sorting process, if the number of inputted data is greater than n.
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.
Comparison Study of Sorting Techniques in Static Data Structure
International Journal of Integrated Engineering, 2018
To manage and organize large data is imperative in order to formulate the data analysis and data processing efficiency. Therefore, this paper investigates the set of sorting techniques to observe which technique to provide better efficiency. Five types of sorting techniques of static data structure, Bubble, Insertion, Selection with O(n 2) complexity and Merge, Quick with O(n log n) complexity have been used and tested on four groups between (100-30000) of dataset. To validate the performance of sorting techniques, three performance metrics which are time complexity, execution time and size of dataset were used. All experimental setups were accomplished using simple linear regression. The experimental results illustrate that Quick sort is more efficiency than other sorting and Selection sort is more efficient than Bubble and Insertion in large data size using array. In addition, Bubble, Insertion and Selection have good performance for small data size using array thus, sorting technique with behaviour O(n log n) is more efficient than sorting technique with behaviour O(n 2) using array.