Professional Documents
Culture Documents
&
Quicksort
Introduction:
In this paper, we’re going to define and briefly explain the Bubblesort and
Quicksort and explores the different uses in real life for each one of these
algorithms.
2
Bubble Sort:
Definition: The simplest sorting algorithm. It involves repetitively sorting the
list. It compares two adjacent elements in the list and swaps them if they are
not in the designated order. It continues until there are no swaps needed.
This is the signal for the list that is sorted. It is also called as comparison sort
as it uses comparisons.[1]
Since the Bubble sort has been one of the first algorithms Due to its
simplicity, the Bubble sort is often used to introduce the concept of an
algorithm, or a sorting algorithm, to introductory computer science students.
Bubble sort is asymptotically equivalent in running time to insertion sort in
the worst case
Because of that, there are no real-life examples for hardly anything still use
the Bubblesort algorithm
3
● Computer Graphics
In computer graphics, Bubble sorting is quite popular when it comes to
detecting a very small error (like swap of just two elements) in almost-sorted
arrays, like using it in a polygon filling algorithm, where bounding lines are
sorted by their x coordinate at a specific scan line (a line parallel to the x-axis),
and with incrementing y their order changes (two elements are swapped)
only at intersections of two lines.[2]
Figure 1
4
Quicksort:
Quicksort belongs to the divide and conquer category of algorithms. It
depends on the operation of the partition. To partition an array of an element
called a pivot is selected. All elements smaller than the pivots are moved
before it and all greater elements are moved after it. The lesser and greater
sub-lists are then recursively sorted. Efficient implementations of Quicksort
(with in-place partitioning) are typically unstable sorts and somewhat
complex but are among the fastest sorting algorithms in practice.[1]
● Commercial Computing:
Commercial Computing is used in various government and private
organizations for the purpose of sorting various data like sorting files by
name/date/price, sorting of students by their roll no., sorting of account profile
by given id, etc.
6
● Numerical computations:
● In Medical Field:
Example for the Quicksort using in the medical field this paper used the
Quicksort algorithm as a test to evaluate the state group of patients.
MEASURES: The QuickSort uses nine cards, which are sorted according to
three categories (color, shape, and number) over a maximum of six trials. The
QuickSort Manual, Stimuli, and Record Form are provided in Supplementary
Appendix S2 (Online Supplementary Materials). An early discontinuation rule
reduces administration time when cognition is intact. Three scores are
calculated: (1) a “Sorting” score (named the Category score in other
tests),which aggregates the number of successful sorts, errors (repetition, set
loss, grouping, and completion errors) and prompts during a maximum of six
trials (range = 0–12); (2) an “Explanation” score, which assesses an examineeʼs
ability to explain the basis for their correct sorts (range = 0–6);and (3) a “Total”
score, which sums the Sorting and Explanation scores (range = 0–18). Sorting
scores are used when a person has problems with verbal expression, and both
Sorting and Total scores can be calculated when someone fails to complete
the QuickSort (incomplete trials scored zero). Repetition errors (repeated
sorts using the same rule) and concrete explanations are also recorded for
clinical purposes but are not examined here.
8
● GPU(graphics card):
For example on using the Quicksort in GPU we have this paper that used
Quicksort algorithm to computations on graphical processors.
Results:
In this paper, we discussed uses for each algorithm but in the end, these two
algorithms are old algorithms and have a lot of limitation and drawbacks
when comparing them to other new algorithms like Bubblesort lately its only
been used to introduce the algorithm concept for students and the
Quicksort been active in a certain era but with these new algorithms, it's not
effective even with improvements still.
10
References:
Tables:
Table 1 & Table 2: Aung, H. (2019, August). Analysis and Comparative of Sorting
Algorithms. https://www.ijtsrd.com/papers/ijtsrd26575.pdf.
Figures:
Figure 1:
https://cs.wmich.edu/~yang/teach/cs5270/oldnotes/vanDam/04_4_Scan_Polygon.pdf
[2] Das, S. (2021, May 11). Top 10 Sorting Algorithms - Explained with Simple Examples.
Crio Blog. https://www.crio.do/blog/top-10-sorting-algorithms/.
[3] Dickson, C. (2007). A few aspects of aircraft noise (Licentiate dissertation, Farkost
och flyg). Retrieved from http://urn.kb.se/resolve?urn=urn:nbn:se:kth:diva-4510
[4] Foran AM, Mathias JL, Bowden SC. Development of a Brief Screen to Detect
Cognitive Impairment in Older Adults: The QuickSort. J Am Geriatr Soc. 2021
Feb;69(2):441-449. doi: 10.1111/jgs.16898. Epub 2020 Nov 9. PMID: 33165931.
[5] Cederman, D., & Tsigas, P. (2010). GPU-Quicksort: A practical Quicksort algorithm
for graphics processors. ACM J. Exp. Algorithmics, 14.