• <tr id="yyy80"></tr>
  • <sup id="yyy80"></sup>
  • <tfoot id="yyy80"><noscript id="yyy80"></noscript></tfoot>
  • 99热精品在线国产_美女午夜性视频免费_国产精品国产高清国产av_av欧美777_自拍偷自拍亚洲精品老妇_亚洲熟女精品中文字幕_www日本黄色视频网_国产精品野战在线观看 ?

    Smart Bubble Sort:A Novel and Dynamic Variant of Bubble Sort Algorithm

    2022-08-23 02:17:38MohammadKhalidImamRahmani
    Computers Materials&Continua 2022年6期

    Mohammad Khalid Imam Rahmani

    College of Computing and Informatics,Saudi Electronic University,Riyadh,Saudi Arabia

    Abstract: In the present era, a very huge volume of data is being stored in online and offline databases.Enterprise houses, research, medical as well as healthcare organizations, and academic institutions store data in databases and their subsequent retrievals are performed for further processing.Finding the required data from a given database within the minimum possible time is one of the key factors in achieving the best possible performance of any computer-based application.If the data is already sorted,finding or searching is comparatively faster.In real-life scenarios,the data collected from different sources may not be in sorted order.Sorting algorithms are required to arrange the data in some order in the least possible time.In this paper, I propose an intelligent approach towards designing a smart variant of the bubble sort algorithm.I call it Smart Bubble sort that exhibits dynamic footprint: The capability of adapting itself from the average-case to the best-case scenario.It is an in-place sorting algorithm and its best-case time complexity is Ω(n).It is linear and better than bubble sort,selection sort,and merge sort.In averagecase and worst-case analyses,the complexity estimates are based on its static footprint analyses.Its complexity in worst-case is O(n2)and in average-case is Θ(n2).Smart Bubble sort is capable of adapting itself to the best-case scenario from the average-case scenario at any subsequent stages due to its dynamic and intelligent nature.The Smart Bubble sort outperforms bubble sort,selection sort,and merge sort in the best-case scenario whereas it outperforms bubble sort in the average-case scenario.

    Keywords: Sorting algorithms; smart bubble sort; footprint; dynamic footprint;time complexity;asymptotic analysis

    1 Introduction

    The digital world is producing a huge amount of data from almost every field of life and databases are storing those data in computer-based information systems.As said by Knuth in his book [1],“virtually every important aspect of programming arises somewhere in the context of sorting or searching”, many improvements have been conducted in sorting and searching algorithms since the advent of programming[2,3].Sorting various records in different application domains consumes 25%to 50% of the computational resources worldwide as mentioned in [2,4].It is argued that a single sorting algorithm cannot perform well in every situation that is why for a given scenario,an appropriate sorting algorithm must be applied[5].For example,bubble sort,insertion sort,and selection sort are best suited to small input data whereas quick sort and merge sort perform better when applied to a large volume of data [2,5–9].Researchers have been working to design more efficient algorithms for decades.Currently, new sorting and searching algorithms, as well as efficient modifications,have been proposed by the computer science community.In this connection, Mohammed et al.[10]developed a Bidirectional Conditional Insertion Sort algorithm, which demonstrated O(n1.5) time complexity in average case scenarios for normal and uniform distributed data.Appiah et al.[11]have designed a new algorithm:Magnetic Bubble sort with enhancements of bubble sort in the case where redundancies occur in the list.Alotaibi et al.[12] have proposed a new in-place sorting algorithm,which performs better than bubble sort and selection sort but similar to Insertion sort.Ranaa et al.[13]have developed a new approach called MinFinder to overcome some of the weaknesses of some conventional algorithms in terms of stability,computational time,and complexity analysis.Cheema et al.[14] have employed a hybrid approach that takes a minimum number of comparisons with less time and space complexity to sort example data with merge sort and bi-directional bubble sort approaches.Faujdar et al.[15] have evaluated the existing sorting algorithms using repeated data considering the average-case, worst-case, and best-case scenarios.Sodhi et al.[16] have designed Enhanced Insertion sort that achieved O(n) worst-case time complexity and O(n1.585) average time complexity showing better performance compared to insertion sort.

    In this article,a novel and dynamic variant of bubble sort is being proposed,which I call Smart Bubble sort.In the best-case scenario,our proposed algorithm will iterate only once and will terminate when it detects that the data is already in the sorted order.It has the capability of transforming itself from an average-case scenario to the best-case scenario when it detects that the remaining elements are now sorted after bubbling up some of the elements to their sorted positions during the sorting procedure.I have devised the term dynamic footprint to refer to this concept.The remaining of the paper is structured as follows.In Section 2,preliminary concepts have been discussed.In Section 3,the proposed algorithm is introduced and elaborated along with an example illustration of the working procedure followed by a detailed asymptotic analysis.In Section 4,a description of the new dataset is provided,the experimental setup is explained,and empirical results have been highlighted.In Section 5,conclusions are drawn at the end of the article.

    2 Preliminaries

    Searching and sorting of database entries are the two direct applications of sorting algorithms.Broader applications of sorting techniques are for the solution of many complex problems in the fields of information retrieval [5,17–19], image retrieval [20–25], image processing [26,27], database systems, networking [28], management information systems, decision support systems, operations research and optimization problems [29–31].Similarly, sorting algorithms play an important role in educational subjects like design&analysis of algorithms and data structures&programming where the problems require the use of syntax/semantics of every important programming construct related to any programming language.Bubble sort,selection sort,and exchange sort are best suited to data samples of small to medium sizes.These algorithms are comparison-based sorting algorithms;therefore,their lower bound performance is proven to be O(nlogn).A small number of algorithms exist,which claim to have linear bound,however,they are designed for some special cases of input data.Sorting algorithms with O(n)time complexity are considered best performing algorithms.On the other hand,algorithms with O(n2)time complexity are thought to be bad performers whereas algorithms with O(nlogn)time complexity are identified as good algorithms.

    2.1 Performance Measurement and Analysis of Sorting Algorithms

    The performance of an algorithm is estimated in terms of computational complexity that is measured as its time complexity and space complexity.The time complexity of an algorithm is more important because the availability of sufficiently large memory space in the current era of technology is not a big deal.The efficiency of an algorithm is always expressed as a function of its input size as T(n)or S(n);where n is the input size,T(n)and S(n)are time and space complexities,respectively.

    The relative efficacy of sorting algorithms can be characterized by the order of growth of their running times.While calculating the exact running times of a very large volume of input data, the input itself dominates the coefficients and other lower-order terms.For measuring the efficiency of algorithms and comparing the performance of two or more sorting algorithms,the order of growth of their running times is significantly used.However,this technique is not useful when the order of growth of two or more algorithms is the same.On such occasions,the determination of the exact running time of the algorithms is essential which I have done in this article.Asymptotic efficiency of an algorithm refers to the estimation of the order of growth of the running time for very large inputs[7].That is,I am concerned with how the running time of an algorithm increases with the size of the input in the limit, as the size of the input increases without bound.Usually, an algorithm that is asymptotically more efficient will be the best choice for all but very small inputs.To compare different algorithms for the problem of sorting,I break the analysis of algorithms into three different cases so that I can formulate a way that can provide a better estimate of the resources required.In the first case known as the best-case,the minimum number of computational steps are taken by the algorithm because the input data is sorted in the same order which would be the expected outcome of the algorithm.In the second case known as the average case,the average number of computational steps are taken for the algorithm.This is the most complex kind of analysis that is often based on the probability theory because the input data is randomly collected without any explicit ordering.In the third case known as the worst-case,the maximum number of computational steps are taken by the algorithm.This case is analyzed most often because the maximum time complexity of the algorithm matters the most where the input data is sorted in reverse order.

    2.2 Internal Sorting Algorithms

    Internal sorting algorithms maintain the entire sequence of data into the main memory of the computer.These algorithms are based on a comparison of items and are further grouped into simple or complex categories.The simple ones are mainly iterative,simple to understand,and easy to implement but their time complexity is more i.e., O(n2).Bubble sort, Selection sort, and Insertion sort are in this category.The complex ones are mainly divide-and-conquer based and difficult to implement but their time complexity is less i.e.,O(nlogn).Quicksort,Merge sort,and Heapsort algorithms are in this category.

    3 The Proposed Algorithm

    In this section, I have first identified the problem of the bubble sort algorithm with its detailed asymptotic analysis.Next,I described our idea about the Smart Bubble sort algorithm and provided its detailed asymptotic analysis with a proper derivation of best case, worst case, and average case notations.A sorting algorithm consists of instructions arranged in a sequence that puts the input data elements in an ordered sequence.Designing an efficient sorting algorithm is necessary for the optimal performance of different computer applications that require sorted data elements to smoothly perform their operations.Sorting algorithms are usually selected based on their computational requirements and ease of implementation.The efficiency of a comparison-based sorting algorithm can be enhanced by reducing either the number of comparison operations or swapping operations or both.

    3.1 Problem with Bubble Sort

    I start with the formal description of the Bubble sort algorithm in terms of its steps as below:

    BUBBLE-SORT(A,n)

    A is an array of size n;each element of the array will be sorted after the algorithm gets terminated.

    Step 1.for i=1 to n-1 do

    Step 2.for j=1 to n–i-1 do

    Step 3.if A[j]>A[j+1]then

    Step 4.val=A[j]

    Step 5.A[j]=A[j+1]

    Step 6.A[j+1]=val

    It is well known that bubble sort is considered the slowest sorting algorithm because it performs the maximum number of comparisons without looking at the instance of input data.It fails to exploit the instance of input data in the best case and the average case.I have highlighted these phenomena in Figs.1 and 2 through simple and effective illustrations where the steps of bubble sort are shown on the left side and that of Smart Bubble sort are shown on the right side of the figures.

    Figure 1:Illustration of the footprint of smart-bubble-sort in case of sorted data

    In Fig.1, I can see that the data is already sorted.However, bubble sort will go through all the required passes and steps even if the data is already sorted.On the other hand, Smart Bubble sort will perform only one iteration(Please see Iteration 1 of Pass 1 in Fig.1)and will not continue once it detects that the data is already sorted.Similarly,the data instance in Fig.2 is nearly sorted.Again,bubble sort will go through all the passes and steps to complete its operation blindly.After bubbling up the element 20 to the highest position of the array,the remaining elements,1,4,6,8,and 14 are now in their proper positions of the sorted array at the end of Iteration 2 of Pass 2.Bubble sort is not able to exploit this advantage.It will complete all the remaining iterations and steps blindly doing no further swap operation.However, Smart Bubble sort will exploit this situation to its advantage through its dynamic footprint detection capability and will terminate without performing the remaining iterations and passes.

    Figure 2:Illustration of the dynamic footprint of smart-bubble-sort in case of nearly sorted data

    3.2 Analysis of Bubble Sort

    Analysis of the algorithms is shown as the general expression of the cost function in terms of the input data size in the form of asymptotic notationsΩ(best case),Θ(average case), and O(worst case).The computational complexity for individual steps is provided in Tab.1 that corresponds to the algorithm provided in BUBBLE-SORT(A,n).

    Table 1: Analysis of bubble sort algorithm

    3.2.1 Best Case Analysis

    The best case of input instance for the sorting algorithms occurs when the elements are sorted in the same order that the algorithm will produce.Therefore,T(n)for the best case can be derived as below:

    Since Eq.(1)is a quadratic equation,the time complexity of Bubble sort in best-case is O(n2).

    3.2.2 Worst Case Analysis

    The worst case of input instance for the sorting algorithms occurs when the elements are sorted in the opposite order that the algorithm will produce.Therefore,T(n)for the worst case can be derived as below:

    3.2.3 Average Case Analysis

    The average case of input instance for the sorting algorithms occurs when the elements are arranged in random order.This is the most expected case.Therefore, T(n) for the average case can be derived as below:

    Since Eq.(3)is a quadratic equation,the algorithm’s time complexity in the average case is O(n2).

    3.3 The Concept of Smart Bubble Sort

    In this section,I have materialized the idea of our proposed Smart Bubble sort algorithm.I begin with the description of the algorithm followed by its asymptotic analysis.

    The bubble sort algorithm usesn-1 passes for sortingnnumbers.In each pass, the number of iterations to compare the key values are(n-pass number).For controlling the passes of the algorithm,the outerforloop is used.The innerforloop is used for making the actual comparisons for swapping the adjacent key values whenever they are found out of order as shown in BUBBLE-SORT(A, n).Bubble sort is considered the slowest algorithm in average-case and best-case scenarios.But its bestcase, as well as average-case running times, can be improved by doing some smart enhancements in the classical bubble sort algorithm.The bubble sort does unnecessary work even if the input data is already sorted as demonstrated in Figs.1 and 2.It keeps on comparing the items blindly even if the remaining items are already sorted thereby losing the opportunity of exploiting the scenario for terminating it quickly whereas there is no need of running the remaining passes.The Smart Bubble sort algorithm exploits the scenarios and terminates quickly giving much rise in its performance against not only bubble sort but other sorting algorithms as well.In case,the algorithm completes a pass for the remaining elements of the array without detecting any swapping of adjacent elements,it is concluded that the array is sorted and so the algorithm should stop immediately.Similarly,the Smart Bubble sort can transform the average-case into best-case whenever it detects that no swap has been performed at any stage of the algorithm execution as shown in Figs.1 and 2.

    To implement the Smart Bubble sort procedure,I have used a boolean variableflagto detect the swapping of elements.The variable will be set totrueat the beginning of every pass and if a swap is detected in that pass,it would be reset tofalse.If at the end of a pass,the variable is foundtrue,then it would be concluded that no swapping of elements has occurred and hence the algorithm is terminated immediately.

    A formal description of the Smart Bubble sort algorithm is given as follows where the order of sorting is considered as ascending order.

    Step 1.Forn-1number of passes,carry out each pass.

    Step 2.Bubble up the largest element to the top position.

    Step 3.If during the bubbling up no swap is encountered,Exit.

    Step 4.Else,carry out the next pass.

    The formal algorithm for Smart Bubble sort is provided in SMART-BUBBLE-SORT(A,n).

    SMART-BUBBLE-SORT(A,n)

    Ais an array of sizen;elements of the array will be sorted in increasing order after the algorithm gets terminated.

    Step 1.fori=1 ton–1 do

    Step 2.flag=true

    Step 3.forj=1 ton–i–1 do

    Step 4.ifA[j]>A[j+1]then

    Step 5.flag=false

    Step 6.val=A[j]

    Step 7.A[j]=A[j+1]

    Step 8.A[j+1]=val

    Step 9.ifflagthen

    Step 10.break

    The time complexity of Smart Bubble sort isΩ(n) in the best case, O(n2) in the worst case, andΘ(n2)in the average case.It is worth noting that the Smart Bubble sort is capable of converting itself from an average-case scenario to the best-case scenario as discussed earlier.This is because the Smart Bubble sort detects the dynamic footprint in its data instance during the execution of the algorithm well before the end of the execution.

    3.4 Analysis of Smart Bubble Sort

    Analysis of the algorithms is shown as the general expression of the cost function in terms of the input data size in the form of asymptotic notationsΩ(best case),Θ(average case), and O(worst case).The computational complexity for individual steps is provided in Tab.2 that corresponds to the algorithm provided in SMART-BUBBLE-SORT(A,n).

    Table 2: Analysis of smart bubble sort algorithm

    3.4.1 Best Case Analysis

    The best-case scenario for the algorithm arises when the input array is sorted in the same order in which the output is desired.The algorithm checks this scenario by using a boolean variableflag,which is initialized totrueat the beginning of the external for loop(for Passes).Inside the internal for loop(for comparison and swapping)at step 3 when any two adjacent elements are found out-of-order by the if-then structure(i.e.,ifA[j]>A[j+1])of step 4 then these elements are swapped and theflagvariable assumes afalsevalue.In case, the value of the variableflagis foundtrueby the if-then structure of step 9,it is concluded that the remaining elements of the array are already sorted.Therefore,the Smart Bubble sort algorithm should stop immediately.This is ensured through the break statement of step 10.As a result, the algorithm does the minimum possible work due to the ability to detect dynamic footprint smartly.

    Since the if-then structure of step 4 will never be satisfied in this case,steps 5 through 8 will not be contributing anything to the overall time complexity of the algorithm.Therefore,the total time taken by the algorithm is computed by taking the sum of the products of the corresponding time(cost)and repetition for the contributing steps only.Mathematically,the expression for the time complexity can be derived as follows:

    where,A=C3+C4,B=C1+C2+C3+C9+C10

    Since Eq.(4) is a linear equation, therefore, the coefficient of the highest order term and the constant term are neglected to get the asymptotic notation of the algorithm,which isΩ(n).Therefore,the time complexity of Smart Bubble sort in the best-case isΩ(n).

    3.4.2 Worst Case Analysis

    The worst case of an input instance for sorting algorithms occurs when the input array is sorted in descending order and the output is desired in ascending order or vice-versa.The algorithm will have to do the maximum work in this case.The for loop of step 1 is testedntimes withn-1 time for executing its body and one more time when the loop condition becomes false.Steps 2 and 9 will be executedn-1 time.Since each pair of adjacent elements will be out-of-order,the number of swapping will be equal to the number of comparisons.So,the if-then structure of step 9 will never be satisfied and as a result,the break statement of step 10 will never be executed.Steps 3 through 8 will be executed for the maximum possible number of times,which arefor the step 3 andfor the rest of the steps.Mathematically,the expression for the time complexity can be derived as follows:

    Since Eq.(5) is a quadratic equation, therefore, the coefficient of the highest order term and the lower order terms are neglected to get the asymptotic notation of the algorithm,which is O(n2).Therefore,the time complexity of Smart Bubble sort in the worst case is O(n2).

    3.4.3 Average Case Analysis

    The average case of input instance for the sorting algorithms occurs when the elements are arranged in random order.This is the most expected case.The algorithm might have to do as much work as in the worst case[7].However,I have safely assumed that only half of the adjacent elements are out-of-order.Therefore, the number of swapping will become almost half of the number of comparisons.Similar to the worst-case analysis, the for loop in step 1 is testedntimes and steps 2 and 9 will be executedn–1 time.Step 3 will be executed fortimes and steps 4 through 8 will be executed fortimes.Unlike the worst-case scenario, the if-then structure of step 9 may be satisfied at any successive pass after the first pass.When this happens,the footprint of the algorithm changes to the best-case scenario,and the break statement of step 10 is executed and as a result,the algorithm successfully terminates.This is the situation,which I call thedynamic footprintof the Smart Bubble sort.Thedynamic footprintis defined as the ability to convert the footprint from one case of input instance to another case of input instance.Therefore,the total time taken by the algorithm is computed by taking the sum of the products of the corresponding time(cost)and repetition for the contributing steps only.Mathematically,the expression for the time complexity can be derived as given below:

    Since Eq.(6) is a quadratic equation, therefore, the coefficient of the highest order term and the lower order terms are neglected to get the asymptotic notation of the algorithm,which isΘ(n2).Therefore,the time complexity of Smart Bubble sort in the average case isΘ(n2).

    4 Results and Discussion

    In this section, I have constructed a new dataset containing random, sorted, and reverse sorted data as input data to the algorithms.Then I have provided details about the experimental setup.Lastly,I have discussed the results.

    4.1 Dataset

    Using a perfect dataset is one of the important considerations for establishing an experimental setup for measuring the performance analysis of computer algorithms.In this paper, I have used datasets of randomly created positive integer values generated by a dedicated Java program, which are stored intextformat.The datasets are of 3 categories of sizes 500, 2500, 5000, 50000, 100000,625000,1250000,and 2500000.

    a.Random sets:Sets of the specified sizes were created in random order to analyze the average case scenario.

    b.Sorted sets:The Random sets were first sorted and then used for the analysis of the best-case scenario.

    c.Reverse Sorted sets:The Sorted sets were reversed and then used for the analysis of the worstcase scenario.

    I have designed a Java program that used the Random class along with its nextInt() method.This class was instantiated for calling the nextInt() method.The value of the argumentrangein the nextInt()method was given as 2147483647 to maintain as much uniqueness of elements in the data set as possible.

    Besides, I have created another similar dataset with approximately 50% sorted data items to provide evidence ofdynamic footprintdetection capability for which the results are provided in Section 4.2.4.

    4.2 Experimental Setup

    The proposed algorithm’s steps are written in a formal way suitable to be implemented in any programming language but its Java implementation is the most efficient one in terms of CPU time(measured in nanoseconds)and memory requirement[32,33].I have used IntelliJ IDEA version 11.0.9 with JDK 1.8.0_231 for implementing the algorithms and testing & validating the results.In our implementation, the variable,flagof type boolean is used to check if any swapping is made inside the inner for loop or not.A boolean variable may assume only two values;trueorfalse.So, its implementation requires just 1 bit of memory[34]whereas C/C++implementation[35]will use either short or int,which requires 2 to 4 bytes of memory.

    The experiments are performed on a 3.6 GHz Intel Core i9(9thgeneration)processor with 64 GB RAM,and Windows 10(64-bit OS)platform.

    4.2.1 Performance Analysis of Smart Bubble Sort on Sorted Data

    The experimental results for best-case analysis on sorted data are presented in Supplementary Tab.1 where the names of the sorting algorithms are given along the top row and the data sizes are arranged along the first column.The best-performing values are highlighted in blue.As evident from the obtained results,Smart Bubble sort is outperforming all the listed algorithms by a huge margin in terms of the number of comparisons,swapping,and CPU clock time.It can be noted down that from this point onward swapping will refer to merging operation in case of merge sort analysis.The growth of the Smart Bubble sort algorithm is linear to the size of the input data in the best-case scenario.Therefore,CPU clock time is the least.This is the edge of the Smart Bubble sort over bubble sort and the rest of the algorithms under consideration.This is because the number of swapping in Bubble sort is zero but the number of comparisons is higher than the Smart Bubble sort.In the case of merge sort and selection sort,both the number of comparisons and swapping are higher than those of the Smart Bubble sort.For a comprehensive understanding of better performing results and achievements of the Smart Bubble sort, I illustrated the number of comparisons, swapping, and CPU clock time for all data sizes including 500,2500,5000,50000,100000,625000,1250000,and 2500000 in Fig.3.

    Figure 3:Results for applying sorting algorithms on the sorted dataset:(a)data size 500,(b)data size 2500,(c)data size 5000,(d)data size 50000,(e)data size 1000000,(f)data size 625000,(g)data size 150000 and(h)2500000

    4.2.2 Performance Analysis of Smart Bubble Sort on Reverse Sorted Data

    The experimental results for worst-case analysis on reverse sorted data are presented in Supplementary Tab.2 where the names of the sorting algorithms are given along the top row and the data sizes are arranged along the first column.The best-performing values are highlighted in blue.It is evident from the results that in the worst-case scenario,the performance of Smart Bubble sort is much better than bubble sort and selection sort in terms of CPU clock time however, it is much slower than the merge sort algorithm.For data size 500,the CPU clock time is higher for Smart Bubble sort because the number of steps of SMART-BUBBLE-SORT(A, n) is more than those of BUBBLE-SORT(A,n).Therefore,the cost of the coefficient is higher for Smart Bubble sort as evident from Eqs.(2)and(5).However,for the data sizes greater than 500,this overhead is overtaken by the performance of the algorithm as evident from Supplementary Tab.2.The best values of CPU clock time for Smart Bubble sort are given in blue whereas the value where the CPU clock time is more for Smart Bubble sort while processing data size 500 is given in red.For a comprehensive understanding of the achieved results,I highlighted the number of comparisons,swapping,and CPU clock time for all sizes of reverse sorted data including 500,2500,5000,50000,100000,625000,1250000,and 2500000 in Fig.4.

    Figure 4: Continued

    Figure 4:Results for applying sorting algorithms on the reverse sorted dataset:(a)data size 500,(b)data size 2500,(c)data size 5000,(d)data size 50000,(e)data size 1000000,(f)data size 625000,(g)data size 150000 and(h)2500000

    4.2.3 Performance Analysis of Smart Bubble Sort on Random Data

    The experimental results for average-case analysis on random data are demonstrated in Supplementary Tab.3 where the names of the sorting algorithms are mentioned along the top row whereas the data sizes are presented along the first column.The best-performing values are highlighted in blue.The results show the superior performance of Smart Bubble sort in terms of the number of comparisons and CPU clock time over bubble sort.It can be observed from Supplementary Tab.3 that the Smart Bubble sort is performing a lesser number of comparisons than the Bubble sort as well as Selection sort for all data sizes.However,CPU clock time is lesser for data sizes 50000 and above as compared to the Bubble sort algorithm.In the case of Selection sort and Merge sort,both the number of comparisons and swapping(merging in case of merge sort)are less than those of the Smart Bubble sort.For data size 500,2500,and 5000,the CPU clock time is higher for Smart Bubble sort despite a lesser number of comparisons.This is because the number of steps of SMART-BUBBLE-SORT(A,n) is more than those of BUBBLE-SORT(A, n).Therefore, the cost of the coefficient is higher for Smart Bubble sort as evident from Eqs.(3) and (6).However, for the data sizes greater than 50000,this overhead is overtaken by the performance of the algorithm as evident from Supplementary Tab.3.The best values of comparisons and CPU clock time for Smart Bubble sort are given in blue whereas the values where the CPU clock time is more for Smart Bubble sort while processing data size of 500,2500,and 5000 are given in red.I highlighted the number of comparisons,swapping,and CPU clock time for all sizes of random data including 500, 2500, 5000, 50000, 100000, 625000, 1250000, and 2500000 in Fig.5.

    Figure 5: Results for applying sorting algorithms on the random dataset: (a) data size 500, (b) data size 2500,(c)data size 5000,(d)data size 50000,(e)data size 1000000,(f)data size 625000,(g)data size 150000 and(h)2500000

    4.2.4 Performance Analysis of Smart Bubble Sort for Validation of Dynamic Footprint

    The experimental results for dynamic footprint analysis on partially sorted data are presented in Supplementary Tab.4 where names of the sorting algorithms are mentioned along the top row and the data sizes are given along the first column.The best-performing values are highlighted in blue.The number of swapping performed by Smart Bubble sort have now become half of the total number of comparisons for a given data as claimed in the columnAverage Caseof Tab.2 and supported by the results in Supplementary Tab.4.It is because the input data is now partially sorted to establish a basis for detecting the dynamic footprint by Smart Bubble sort for transforming itself from the average case scenario to the best-case scenario.The number of comparisons performed by Smart Bubble sort is less than those of bubble sort and selection sort algorithms.I can observe that the number of swapping performed by Smart Bubble sort is equal to those of bubble sort.As I discussed previously the Smart Bubble sort can detect the dynamic footprint of the data instance and as a result, it can transform itself from an average case to the best-case scenario.The number of comparisons is less than Bubble sort is because Smart Bubble sort detected that the remaining data items are already sorted so it terminated earlier whereas bubble sort kept on comparing the already sorted elements blindly,which caused more number of comparisons.On the other hand, for data size 500, the CPU clock time is higher for Smart Bubble sort despite a lesser number of comparisons.This is because the number of steps of SMART-BUBBLE-SORT(A,n)is more than those of BUBBLE-SORT(A,n).Therefore,the cost of the coefficient is higher for the Smart Bubble sort.However,for the data sizes greater than 500,this overhead is overtaken by the performance of the algorithm as evident from Supplementary Tab.4.The best values of comparisons for Smart Bubble sort are given in blue whereas the value where the CPU clock time is more for Smart Bubble sort while processing data size 500 is given in red.It is now evident that the lesser number of comparisons by Smart Bubble sort is due to its dynamic footprint detection capability(Please,refer to Fig.6).

    Figure 6: Continued

    Figure 6:Results for applying sorting algorithms on the random dataset with 50%sorted data:(a)data size 500,(b)data size 2500,(c)data size 5000,(d)data size 50000,(e)data size 1000000,(f)data size 625000,(g)data size 150000 and(h)2500000

    5 Conclusion

    In this article, I have designed and verified a novel and dynamic variant of the bubble sort algorithm with performance improvements in the best case and average case scenarios while keeping the worst-case performance well within the upper bound.The proposed Smart Bubble sort algorithm demonstrated better performance compared to bubble sort,selection sort,and merge sort in the best case scenario with a time complexity ofΩ(n).

    To achieve the improvements for the average-case scenario,the concept of dynamic footprint has been elaborated and empirically verified.It is observed that the performance of an algorithm can be enhanced by identifying useful patterns present in the data and consequently exploiting the scenarios for improving the performance and efficiency of the algorithm.Smart Bubble sort can detect the useful patterns in average case data favoring its transformation to the best-case scenario and finally,it can adapt from average case to the best-case scenario.This enables it to terminate early in the sorting process while giving about a 25%performance raise over bubble sort.

    Data Availability Statement:The constructed datasets are available at https://drive.google.com/file/d/112pWWW_cDWgM7O3oa80Tn6O1ASR38mEh/view?usp=sharing.

    Funding Statement:The author received no specific funding for this study.

    Conflicts of Interest:The author declares that he has no conflicts of interest to report regarding the present study.

    电影成人av| 国产男女超爽视频在线观看| 欧美亚洲日本最大视频资源| 日日爽夜夜爽网站| 欧美日韩一级在线毛片| 人妻一区二区av| 久久久久久久国产电影| 国产在视频线精品| 熟女少妇亚洲综合色aaa.| 亚洲精品久久久久久婷婷小说| 日韩欧美一区视频在线观看| 久久久精品区二区三区| 日本av手机在线免费观看| 少妇人妻久久综合中文| 精品国产一区二区三区久久久樱花| 久久久久久人人人人人| 精品高清国产在线一区| 亚洲av男天堂| 亚洲精品美女久久久久99蜜臀| 性色av一级| 热re99久久国产66热| 国产97色在线日韩免费| 高清黄色对白视频在线免费看| 他把我摸到了高潮在线观看 | 欧美日韩一级在线毛片| 欧美午夜高清在线| 手机成人av网站| 伦理电影免费视频| 交换朋友夫妻互换小说| 丝袜喷水一区| 色老头精品视频在线观看| 夜夜夜夜夜久久久久| 亚洲一码二码三码区别大吗| 91字幕亚洲| 亚洲午夜精品一区,二区,三区| 久久久精品94久久精品| 叶爱在线成人免费视频播放| 999精品在线视频| 亚洲成人手机| av又黄又爽大尺度在线免费看| 最近中文字幕2019免费版| 极品少妇高潮喷水抽搐| 午夜福利影视在线免费观看| 2018国产大陆天天弄谢| 大香蕉久久成人网| 亚洲男人天堂网一区| 纯流量卡能插随身wifi吗| 亚洲欧美一区二区三区久久| 一级毛片电影观看| 久久九九热精品免费| 亚洲av成人不卡在线观看播放网 | 精品亚洲乱码少妇综合久久| 91九色精品人成在线观看| 日本猛色少妇xxxxx猛交久久| 后天国语完整版免费观看| 久久久水蜜桃国产精品网| tube8黄色片| 久久久久网色| 窝窝影院91人妻| 亚洲avbb在线观看| 亚洲五月婷婷丁香| 我要看黄色一级片免费的| 黄色怎么调成土黄色| 男女国产视频网站| 色94色欧美一区二区| 纯流量卡能插随身wifi吗| 国产亚洲欧美精品永久| 久久人妻熟女aⅴ| 国产91精品成人一区二区三区 | 可以免费在线观看a视频的电影网站| 精品国产乱码久久久久久男人| 久久狼人影院| 国产一级毛片在线| 啦啦啦视频在线资源免费观看| 桃花免费在线播放| 欧美日韩成人在线一区二区| 在线天堂中文资源库| 精品一区二区三卡| 亚洲精品成人av观看孕妇| 中文字幕高清在线视频| 多毛熟女@视频| 欧美日韩一级在线毛片| 永久免费av网站大全| 精品少妇黑人巨大在线播放| 91成人精品电影| 99国产精品一区二区三区| 国产成人精品久久二区二区免费| 亚洲精品乱久久久久久| 母亲3免费完整高清在线观看| 欧美日韩中文字幕国产精品一区二区三区 | 国产成人啪精品午夜网站| 亚洲av国产av综合av卡| 国产精品二区激情视频| 亚洲精品国产av蜜桃| 色婷婷久久久亚洲欧美| 一级毛片女人18水好多| 男人操女人黄网站| 国产成人精品在线电影| 日韩精品免费视频一区二区三区| 悠悠久久av| 咕卡用的链子| 亚洲国产中文字幕在线视频| 亚洲色图 男人天堂 中文字幕| 黄色视频,在线免费观看| 欧美激情 高清一区二区三区| 国产野战对白在线观看| 久久国产精品影院| 亚洲五月色婷婷综合| 脱女人内裤的视频| av网站在线播放免费| 操美女的视频在线观看| 国产欧美日韩一区二区精品| 欧美xxⅹ黑人| 久久国产精品大桥未久av| 99精品欧美一区二区三区四区| 久久国产精品男人的天堂亚洲| 狠狠精品人妻久久久久久综合| 久久久久久免费高清国产稀缺| 老司机影院成人| 中文字幕av电影在线播放| 黑人猛操日本美女一级片| av片东京热男人的天堂| av福利片在线| 亚洲五月婷婷丁香| 交换朋友夫妻互换小说| 中文字幕人妻丝袜制服| 国产三级黄色录像| 日本黄色日本黄色录像| 亚洲精品久久成人aⅴ小说| 午夜精品国产一区二区电影| 国产精品99久久99久久久不卡| av电影中文网址| 99国产精品99久久久久| 男男h啪啪无遮挡| 久久热在线av| 成人18禁高潮啪啪吃奶动态图| 婷婷丁香在线五月| 国产97色在线日韩免费| 夜夜夜夜夜久久久久| 99久久精品国产亚洲精品| 麻豆国产av国片精品| 亚洲熟女精品中文字幕| 免费看十八禁软件| 狠狠狠狠99中文字幕| 99国产综合亚洲精品| 国产精品.久久久| 国产不卡av网站在线观看| 成年动漫av网址| 欧美97在线视频| 巨乳人妻的诱惑在线观看| 在线精品无人区一区二区三| 午夜福利一区二区在线看| 日韩精品免费视频一区二区三区| av在线老鸭窝| 女人高潮潮喷娇喘18禁视频| 亚洲av成人不卡在线观看播放网 | 欧美另类一区| 黄网站色视频无遮挡免费观看| 91精品三级在线观看| 精品熟女少妇八av免费久了| 丰满少妇做爰视频| 久久亚洲精品不卡| 久久九九热精品免费| 99国产精品99久久久久| 国产精品麻豆人妻色哟哟久久| 欧美精品一区二区大全| 高清在线国产一区| 蜜桃国产av成人99| 亚洲九九香蕉| 欧美国产精品一级二级三级| 久久久久久免费高清国产稀缺| 午夜福利免费观看在线| 777米奇影视久久| 欧美成人午夜精品| 美女高潮到喷水免费观看| 免费不卡黄色视频| 男人爽女人下面视频在线观看| 美女高潮喷水抽搐中文字幕| 亚洲欧美成人综合另类久久久| 欧美性长视频在线观看| 亚洲精品一二三| 国产成人av教育| 老司机影院成人| 精品乱码久久久久久99久播| 黄色片一级片一级黄色片| 久久精品亚洲熟妇少妇任你| 亚洲国产精品999| 三级毛片av免费| 久久久久网色| 高清视频免费观看一区二区| 性少妇av在线| 曰老女人黄片| 99国产精品免费福利视频| 色婷婷av一区二区三区视频| 午夜激情av网站| 欧美激情极品国产一区二区三区| 久久久久视频综合| 国产精品国产三级国产专区5o| www.av在线官网国产| 亚洲第一欧美日韩一区二区三区 | 成人av一区二区三区在线看 | 亚洲中文字幕日韩| 久久久国产精品麻豆| 高清av免费在线| 欧美亚洲日本最大视频资源| 少妇裸体淫交视频免费看高清 | 搡老岳熟女国产| 欧美日韩成人在线一区二区| 午夜日韩欧美国产| 久久精品熟女亚洲av麻豆精品| tocl精华| 一本综合久久免费| 深夜精品福利| 欧美黄色淫秽网站| 丰满饥渴人妻一区二区三| 精品久久久久久久毛片微露脸 | 在线观看人妻少妇| a在线观看视频网站| 99久久综合免费| av欧美777| 欧美日韩一级在线毛片| 欧美日韩精品网址| www.av在线官网国产| 色综合欧美亚洲国产小说| 飞空精品影院首页| 高清黄色对白视频在线免费看| 看免费av毛片| 免费少妇av软件| 香蕉国产在线看| 久久久久网色| 国产欧美亚洲国产| 美女扒开内裤让男人捅视频| 纯流量卡能插随身wifi吗| 男女下面插进去视频免费观看| 精品少妇久久久久久888优播| 国产日韩欧美在线精品| 两性夫妻黄色片| 亚洲自偷自拍图片 自拍| 高清视频免费观看一区二区| 少妇的丰满在线观看| 国产精品久久久久久精品古装| 黄频高清免费视频| 色视频在线一区二区三区| 亚洲国产毛片av蜜桃av| 免费观看a级毛片全部| 老熟妇乱子伦视频在线观看 | 国产精品一区二区免费欧美 | 黑人欧美特级aaaaaa片| 欧美av亚洲av综合av国产av| 亚洲熟女精品中文字幕| 欧美激情久久久久久爽电影 | 日韩一卡2卡3卡4卡2021年| av免费在线观看网站| 人人妻人人澡人人爽人人夜夜| 一级毛片电影观看| 女人高潮潮喷娇喘18禁视频| 久久精品亚洲av国产电影网| www日本在线高清视频| 亚洲精品粉嫩美女一区| svipshipincom国产片| av天堂在线播放| 欧美日韩成人在线一区二区| 老司机亚洲免费影院| 日韩三级视频一区二区三区| √禁漫天堂资源中文www| 精品亚洲乱码少妇综合久久| 91国产中文字幕| 欧美精品啪啪一区二区三区 | 淫妇啪啪啪对白视频 | 免费不卡黄色视频| 啦啦啦啦在线视频资源| 满18在线观看网站| 亚洲中文日韩欧美视频| 久久中文看片网| 欧美日韩福利视频一区二区| 真人做人爱边吃奶动态| 一区二区日韩欧美中文字幕| 久久精品亚洲av国产电影网| 午夜免费鲁丝| 日韩欧美一区视频在线观看| 国产成人欧美在线观看 | 亚洲五月色婷婷综合| 国产有黄有色有爽视频| 免费一级毛片在线播放高清视频 | 国产色视频综合| 国产在视频线精品| 亚洲第一青青草原| 色综合欧美亚洲国产小说| 好男人电影高清在线观看| 国产成人影院久久av| 久久精品亚洲熟妇少妇任你| 久久久国产精品麻豆| 两个人看的免费小视频| 午夜福利乱码中文字幕| 日韩一卡2卡3卡4卡2021年| 另类精品久久| 日韩人妻精品一区2区三区| 热99re8久久精品国产| 动漫黄色视频在线观看| 最近最新免费中文字幕在线| 国产在视频线精品| av有码第一页| 日本猛色少妇xxxxx猛交久久| 极品少妇高潮喷水抽搐| 日本一区二区免费在线视频| 国产亚洲一区二区精品| 电影成人av| 无限看片的www在线观看| 大香蕉久久网| 久久国产精品人妻蜜桃| 精品人妻在线不人妻| 精品一区二区三区四区五区乱码| 久久久久久免费高清国产稀缺| 久久久久久久久久久久大奶| 高清欧美精品videossex| 成人免费观看视频高清| 色视频在线一区二区三区| 亚洲视频免费观看视频| av网站在线播放免费| 亚洲少妇的诱惑av| 中文字幕人妻熟女乱码| 建设人人有责人人尽责人人享有的| cao死你这个sao货| av不卡在线播放| 视频区欧美日本亚洲| 黄片播放在线免费| 考比视频在线观看| 人妻久久中文字幕网| 极品少妇高潮喷水抽搐| 久久这里只有精品19| 亚洲国产欧美日韩在线播放| 18在线观看网站| 女性被躁到高潮视频| 午夜福利在线免费观看网站| 日日夜夜操网爽| 午夜福利,免费看| 欧美精品av麻豆av| 欧美黑人精品巨大| 人妻久久中文字幕网| 91成人精品电影| 久久这里只有精品19| 悠悠久久av| 亚洲色图 男人天堂 中文字幕| 秋霞在线观看毛片| 电影成人av| 岛国在线观看网站| 少妇裸体淫交视频免费看高清 | 亚洲精品国产精品久久久不卡| 成人18禁高潮啪啪吃奶动态图| 午夜免费观看性视频| 婷婷丁香在线五月| 午夜福利视频在线观看免费| 国产一区二区在线观看av| 国产欧美日韩一区二区三区在线| 美女主播在线视频| 999精品在线视频| 桃红色精品国产亚洲av| 一边摸一边抽搐一进一出视频| 久久精品国产亚洲av高清一级| 丰满少妇做爰视频| 老司机影院毛片| 少妇猛男粗大的猛烈进出视频| 十八禁网站免费在线| 久久热在线av| h视频一区二区三区| av网站在线播放免费| 国产精品久久久av美女十八| 99久久精品国产亚洲精品| 成人国产一区最新在线观看| 国产成人一区二区三区免费视频网站| 纯流量卡能插随身wifi吗| 欧美日韩视频精品一区| 妹子高潮喷水视频| 青草久久国产| 国产日韩欧美视频二区| 视频在线观看一区二区三区| 一边摸一边做爽爽视频免费| 一级片免费观看大全| 下体分泌物呈黄色| 精品福利永久在线观看| 一边摸一边抽搐一进一出视频| 国产免费福利视频在线观看| 岛国在线观看网站| 永久免费av网站大全| 在线 av 中文字幕| 性高湖久久久久久久久免费观看| 日本猛色少妇xxxxx猛交久久| 在线观看www视频免费| cao死你这个sao货| 99九九在线精品视频| 免费在线观看完整版高清| 亚洲国产欧美在线一区| 老司机午夜福利在线观看视频 | 色综合欧美亚洲国产小说| 久久人人97超碰香蕉20202| 亚洲视频免费观看视频| 亚洲人成电影免费在线| 国产视频一区二区在线看| 男女免费视频国产| 欧美久久黑人一区二区| 欧美97在线视频| 亚洲伊人久久精品综合| 亚洲中文字幕日韩| 免费观看av网站的网址| 窝窝影院91人妻| 两个人免费观看高清视频| 久久久久久久国产电影| 亚洲一区二区三区欧美精品| 色视频在线一区二区三区| av天堂在线播放| 欧美亚洲 丝袜 人妻 在线| 亚洲欧美清纯卡通| 亚洲av美国av| 91麻豆av在线| 婷婷成人精品国产| 亚洲一码二码三码区别大吗| 久久99热这里只频精品6学生| 少妇被粗大的猛进出69影院| 亚洲精品乱久久久久久| 12—13女人毛片做爰片一| 亚洲七黄色美女视频| 啦啦啦中文免费视频观看日本| 国产真人三级小视频在线观看| 99香蕉大伊视频| 久久国产精品影院| 日韩视频一区二区在线观看| 青春草亚洲视频在线观看| 成人av一区二区三区在线看 | 国产精品熟女久久久久浪| 欧美激情极品国产一区二区三区| 国产精品 欧美亚洲| 女人高潮潮喷娇喘18禁视频| 国产精品成人在线| 老司机影院成人| 国产精品.久久久| 久久综合国产亚洲精品| 美女午夜性视频免费| 亚洲国产av新网站| 丝袜喷水一区| 美女扒开内裤让男人捅视频| 久久久欧美国产精品| 国产精品一区二区免费欧美 | 欧美性长视频在线观看| 99国产精品一区二区蜜桃av | 我要看黄色一级片免费的| 亚洲av日韩在线播放| av免费在线观看网站| 嫁个100分男人电影在线观看| 婷婷色av中文字幕| 日韩有码中文字幕| 国产亚洲精品第一综合不卡| 久久久国产一区二区| 另类亚洲欧美激情| 亚洲色图综合在线观看| 久久国产精品大桥未久av| 我要看黄色一级片免费的| 欧美精品一区二区大全| 黄网站色视频无遮挡免费观看| 麻豆国产av国片精品| 日韩欧美一区二区三区在线观看 | 香蕉丝袜av| 色老头精品视频在线观看| 日韩大码丰满熟妇| 欧美日韩亚洲高清精品| 免费观看a级毛片全部| 999久久久国产精品视频| 亚洲成国产人片在线观看| 日韩欧美一区视频在线观看| 国产99久久九九免费精品| 黄色视频,在线免费观看| 亚洲午夜精品一区,二区,三区| 欧美日韩成人在线一区二区| 日韩欧美国产一区二区入口| 高清av免费在线| 99精品欧美一区二区三区四区| 丝袜美足系列| 久久久久久久久久久久大奶| 12—13女人毛片做爰片一| 欧美黄色淫秽网站| 国产91精品成人一区二区三区 | 老司机靠b影院| e午夜精品久久久久久久| avwww免费| 高潮久久久久久久久久久不卡| 国产男女超爽视频在线观看| 九色亚洲精品在线播放| 99热国产这里只有精品6| 国产在线观看jvid| 人人澡人人妻人| 黄色视频,在线免费观看| 国产精品一区二区精品视频观看| 欧美日韩福利视频一区二区| 日本欧美视频一区| 高潮久久久久久久久久久不卡| 叶爱在线成人免费视频播放| 国产亚洲av高清不卡| 亚洲欧美成人综合另类久久久| 精品一区二区三卡| 久久青草综合色| 国产有黄有色有爽视频| 亚洲熟女毛片儿| 国产一区二区在线观看av| 久久精品aⅴ一区二区三区四区| 国产成人av激情在线播放| 欧美日韩亚洲综合一区二区三区_| 欧美日韩精品网址| 99热国产这里只有精品6| 国产真人三级小视频在线观看| 淫妇啪啪啪对白视频 | 男男h啪啪无遮挡| 亚洲黑人精品在线| 狠狠精品人妻久久久久久综合| 成人三级做爰电影| 成年人免费黄色播放视频| 99国产精品一区二区三区| 免费人妻精品一区二区三区视频| 国产在线一区二区三区精| 法律面前人人平等表现在哪些方面 | 最新在线观看一区二区三区| 亚洲成人国产一区在线观看| 女人爽到高潮嗷嗷叫在线视频| 又大又爽又粗| 日本五十路高清| 中文字幕最新亚洲高清| 久久精品人人爽人人爽视色| 亚洲欧美精品综合一区二区三区| 热99re8久久精品国产| 人妻 亚洲 视频| 在线观看免费高清a一片| 精品国产乱码久久久久久男人| 建设人人有责人人尽责人人享有的| 日本vs欧美在线观看视频| 蜜桃在线观看..| 亚洲欧美一区二区三区久久| 黄片大片在线免费观看| 波多野结衣av一区二区av| 9色porny在线观看| 51午夜福利影视在线观看| 美女视频免费永久观看网站| 人妻久久中文字幕网| 在线天堂中文资源库| a级毛片黄视频| 国产欧美日韩综合在线一区二区| 久热这里只有精品99| 中文字幕av电影在线播放| 人成视频在线观看免费观看| 欧美 日韩 精品 国产| 国产男女内射视频| 亚洲中文av在线| 国产精品免费视频内射| 日本vs欧美在线观看视频| 久久亚洲国产成人精品v| 国产在视频线精品| 亚洲熟女精品中文字幕| 国产精品香港三级国产av潘金莲| 黄色毛片三级朝国网站| 母亲3免费完整高清在线观看| 自线自在国产av| 国产人伦9x9x在线观看| 黑丝袜美女国产一区| 秋霞在线观看毛片| 首页视频小说图片口味搜索| 亚洲精品美女久久久久99蜜臀| 欧美 亚洲 国产 日韩一| 别揉我奶头~嗯~啊~动态视频 | 亚洲欧洲日产国产| 国产一区二区三区综合在线观看| 精品福利观看| 国产黄频视频在线观看| 成年av动漫网址| 母亲3免费完整高清在线观看| 亚洲精品中文字幕在线视频| 成人手机av| 纯流量卡能插随身wifi吗| 国产精品免费大片| 视频区欧美日本亚洲| 麻豆乱淫一区二区| 天堂中文最新版在线下载| av免费在线观看网站| 日本vs欧美在线观看视频| 一本一本久久a久久精品综合妖精| 成人18禁高潮啪啪吃奶动态图| 性色av乱码一区二区三区2| 久久久久久久大尺度免费视频| 免费久久久久久久精品成人欧美视频| 久久久欧美国产精品| 我要看黄色一级片免费的| 别揉我奶头~嗯~啊~动态视频 | 99精品久久久久人妻精品| 久久久精品免费免费高清| 国产亚洲精品一区二区www | 日韩中文字幕视频在线看片| 一二三四社区在线视频社区8| 午夜激情av网站| 亚洲av男天堂| 亚洲精品一区蜜桃| 我的亚洲天堂| a级毛片在线看网站| 国产亚洲av片在线观看秒播厂| 熟女少妇亚洲综合色aaa.| 免费高清在线观看日韩| 国产亚洲一区二区精品| 亚洲avbb在线观看| 久久精品aⅴ一区二区三区四区| 搡老熟女国产l中国老女人| 两性夫妻黄色片| 亚洲国产看品久久| 91老司机精品| a级毛片在线看网站| 一个人免费看片子| 国产av国产精品国产| 国产av精品麻豆| 国产高清视频在线播放一区 | 啦啦啦在线免费观看视频4| 久久免费观看电影|