356 research outputs found
QuickHeapsort: Modifications and improved analysis
We present a new analysis for QuickHeapsort splitting it into the analysis of
the partition-phases and the analysis of the heap-phases. This enables us to
consider samples of non-constant size for the pivot selection and leads to
better theoretical bounds for the algorithm. Furthermore we introduce some
modifications of QuickHeapsort, both in-place and using n extra bits. We show
that on every input the expected number of comparisons is n lg n - 0.03n + o(n)
(in-place) respectively n lg n -0.997 n+ o (n). Both estimates improve the
previously known best results. (It is conjectured in Wegener93 that the
in-place algorithm Bottom-Up-Heapsort uses at most n lg n + 0.4 n on average
and for Weak-Heapsort which uses n extra-bits the average number of comparisons
is at most n lg n -0.42n in EdelkampS02.) Moreover, our non-in-place variant
can even compete with index based Heapsort variants (e.g. Rank-Heapsort in
WangW07) and Relaxed-Weak-Heapsort (n lg n -0.9 n+ o (n) comparisons in the
worst case) for which no O(n)-bound on the number of extra bits is known
An efficient sorting algorithm - Ultimate Heapsort(UHS)
Motivated by the development of computer theory, the sorting algorithm is
emerging in an endless stream. Inspired by decrease and conquer method, we
propose a brand new sorting algorithmUltimately Heapsort. The algorithm
consists of two parts: building a heap and adjusting a heap. Through the
asymptotic analysis and experimental analysis of the algorithm, the time
complexity of our algorithm can reach O(nlogn) under any condition. Moreover,
its space complexity is only O(1). It can be seen that our algorithm is
superior to all previous algorithms
QuickXsort - A Fast Sorting Scheme in Theory and Practice
QuickXsort is a highly efficient in-place sequential sorting scheme that
mixes Hoare's Quicksort algorithm with X, where X can be chosen from a wider
range of other known sorting algorithms, like Heapsort, Insertionsort and
Mergesort. Its major advantage is that QuickXsort can be in-place even if X is
not. In this work we provide general transfer theorems expressing the number of
comparisons of QuickXsort in terms of the number of comparisons of X. More
specifically, if pivots are chosen as medians of (not too fast) growing size
samples, the average number of comparisons of QuickXsort and X differ only by
-terms. For median-of- pivot selection for some constant , the
difference is a linear term whose coefficient we compute precisely. For
instance, median-of-three QuickMergesort uses at most comparisons.
Furthermore, we examine the possibility of sorting base cases with some other
algorithm using even less comparisons. By doing so the average-case number of
comparisons can be reduced down to for a remaining
gap of only comparisons to the known lower bound (while using only
additional space and time overall).
Implementations of these sorting strategies show that the algorithms
challenge well-established library implementations like Musser's Introsort
Optimum Partition Parameter of Divide-and-Conquer Algorithm for Solving Closest-Pair Problem
Divide and Conquer is a well known algorithmic procedure for solving many
kinds of problem. In this procedure, the problem is partitioned into two parts
until the problem is trivially solvable. Finding the distance of the closest
pair is an interesting topic in computer science. With divide and conquer
algorithm we can solve closest pair problem. Here also the problem is
partitioned into two parts until the problem is trivially solvable. But it is
theoretically and practically observed that sometimes partitioning the problem
space into more than two parts can give better performances. In this paper, a
new proposal is given that dividing the problem space into (n) number of parts
can give better result while divide and conquer algorithm is used for solving
the closest pair of point's problem.Comment: arXiv admin note: substantial text overlap with arXiv:1010.590
A Complete Worst-Case Analysis of Heapsort with Experimental Verification of Its Results, A manuscript (MS)
A rigorous proof is presented that the number of comparisons of keys
performed in the worst case by on any array of size
is equal to: where ,
given by: is a function of with
the minimum value 0 and and the supremum value , is the sum of all digits of the binary
representation of , is the exponent of in the prime
factorization of , and is a binary function on the set of integers
defined by: , if , and ,
otherwise. An algorithm that generates worst-case input arrays of any size for is offered. The algorithm has been implemented in
Java, runs in time, and allows for precise experimental
verification of the above formula.Comment: 115 pages 41 figure
Dualheap Sort Algorithm: An Inherently Parallel Generalization of Heapsort
A generalization of the heapsort algorithm is proposed. At the expense of
about 50% more comparison and move operations for typical cases, the dualheap
sort algorithm offers several advantages over heapsort: improved cache
performance, better performance if the input happens to be already sorted, and
easier parallel implementations.Comment: 4 pages, 4 figure
A new hardware prefetching scheme based on dynamic interpretation of the instruction stream
It is well known that memory latency is a major deterrent to achieving the maximum possible performance of a today\u27s high speed RISC processors. Techniques to reduce or tolerate large memory latencies become essential for achieving high processor utilization;Many methods, ranging from software to hardware solutions, have been studied with varying amounts of success. Most techniques have concentrated on data prefetching. However, our simulations show that the CPU is stalled up to 50% of the time waiting for instructions. The instruction memory latency reduction technique typically used in CPU designs today is the one block look-ahead (OBL) method;In this thesis, I present a new hardware prefetching scheme based on dynamic interpretation of the instruction stream. This is done by adding a small pipeline to the cache that scans forward in the instruction stream interpreting each instruction and predicting the future execution path. It then prefetches what it predicts the CPU will be executing in the near future;The pipelined prefetching engine has been shown to be a very effective technique for decreasing the instruction stall cycles in typical on-chip cache memories used today. It performs well, yielding reductions in stall cycles up to 30% or more for both scientific and general purpose programs, and has been shown to reduce the number of instruction stall cycles as compared to the OBL technique as well;The idea of sub-line prefetching was also studied and presented. It was thought that prefetching full cache lines might present too much overhead in terms of bus bandwidth, so prefetches should only fill partial cache lines instead. However it was determined that prefetching partial cache lines does not show any benefit when dealing with cache lines smaller than 128 bytes
Multiresolution Priority Queues
Priority queues are container data structures essential to many high
performance computing (HPC) applications. In this paper, we introduce
multiresolution priority queues, a data structure that improves the performance
of the standard heap based implementations by trading off a controllable amount
of resolution in the space of priorities. The new data structure can reduce the
worst case performance of inserting an element from O(log(n)) to O(log(r)),
where n is the number of elements in the queue and r is the number of
resolution groups in the priority space. The worst case cost of removing the
top element is O(1). When the number of elements in the table is high, the
amortized cost to insert an element becomes O(1)
Performance Evaluation of Sorting Algorithms in Raspberry Pi and Personal Computer
Nowadays, more and more data is going to be collected. Most of the collected data must be sorted to be analysed. Thus it is important to use efficient algorithms to save time and energy. This is especially important for battery-operated devices that collect and sort data directly. The lifetime of the battery can be remarkably extended by choosing effective sorting algorithms. Furthermore, processors with lower clock frequencies can be used, leading to lower battery consumption.
This thesis focuses on the time complexity of algorithms (bubble sort, insertion sort, quick sort and heap sort) executed on raspberry Pi and personal computer. In this thesis, a client and a server have been implemented. The client is a Graphical User Interface (GUI) that generates random numbers, which are sent to the server. On the server the random numbers are sorted and the sorting time is measured. After sorting, the random numbers will be sent back to the client where they are displayed on the GUI. The sorting time is also send to the GUI in order to display it.
It is to mention that the time consumption is measured with timing functions of the C library. An oscilloscope has been used to check if the timing function works properly. At the end, the performances of four sorting algorithms on Raspberry Pi and on the Personal Computer (PC) are compared.fi=Opinnäytetyö kokotekstinä PDF-muodossa.|en=Thesis fulltext in PDF format.|sv=Lärdomsprov tillgängligt som fulltext i PDF-format
Elementary Yet Precise Worst-case Analysis of MergeSort, A short version (SV)
This paper offers two elementary yet precise derivations of an exact formula
for the maximum number of comparisons
of keys performed by on an -element array. The first
of the two, due to its structural regularity, is well worth carefully studying
in its own right.
Close smooth bounds on are derived. It seems interesting that is linear between the points and it
linearly interpolates its own lower bound between these
points.Comment: 25 pages, 12 figures, three of which contain working Java method
- …