scholarly journals On the Average Case of MergeInsertion

2020 ◽  
Vol 64 (7) ◽  
pp. 1197-1224
Author(s):  
Florian Stober ◽  
Armin Weiß

AbstractMergeInsertion, also known as the Ford-Johnson algorithm, is a sorting algorithm which, up to today, for many input sizes achieves the best known upper bound on the number of comparisons. Indeed, it gets extremely close to the information-theoretic lower bound. While the worst-case behavior is well understood, only little is known about the average case. This work takes a closer look at the average case behavior. In particular, we establish an upper bound of $n \log n - 1.4005n + o(n)$ n log n − 1.4005 n + o ( n ) comparisons. We also give an exact description of the probability distribution of the length of the chain a given element is inserted into and use it to approximate the average number of comparisons numerically. Moreover, we compute the exact average number of comparisons for n up to 148. Furthermore, we experimentally explore the impact of different decision trees for binary insertion. To conclude, we conduct experiments showing that a slightly different insertion order leads to a better average case and we compare the algorithm to Manacher’s combination of merging and MergeInsertion as well as to the recent combined algorithm with (1,2)-Insertionsort by Iwama and Teruyama.

2008 ◽  
Vol Vol. 10 no. 3 ◽  
Author(s):  
Cyril Gavoille ◽  
Nicolas Hanusse

International audience In this paper we show an information-theoretic lower bound of kn - o(kn) on the minimum number of bits to represent an unlabeled simple connected n-node graph of pagenumber k. This has to be compared with the efficient encoding scheme of Munro and Raman of 2kn + 2m + o(kn+m) bits (m the number of edges), that is 4kn + 2n + o(kn) bits in the worst-case. For m-edge graphs of pagenumber k (with multi-edges and loops), we propose a 2mlog2k + O(m) bits encoding improving the best previous upper bound of Munro and Raman whenever m ≤ 1 / 2kn/log2 k. Actually our scheme applies to k-page embedding containing multi-edge and loops. Moreover, with an auxiliary table of o(m log k) bits, our coding supports (1) the computation of the degree of a node in constant time, (2) adjacency queries with O(logk) queries of type rank, select and match, that is in O(logk *minlogk / loglogm, loglogk) time and (3) the access to δ neighbors in O(δ) runs of select, rank or match;.


Algorithmica ◽  
2021 ◽  
Author(s):  
Seungbum Jo ◽  
Rahul Lingala ◽  
Srinivasa Rao Satti

AbstractWe consider the problem of encoding two-dimensional arrays, whose elements come from a total order, for answering $${\text{Top-}}{k}$$ Top- k queries. The aim is to obtain encodings that use space close to the information-theoretic lower bound, which can be constructed efficiently. For an $$m \times n$$ m × n array, with $$m \le n$$ m ≤ n , we first propose an encoding for answering 1-sided $${\textsf {Top}}{\text {-}}k{}$$ Top - k queries, whose query range is restricted to $$[1 \dots m][1 \dots a]$$ [ 1 ⋯ m ] [ 1 ⋯ a ] , for $$1 \le a \le n$$ 1 ≤ a ≤ n . Next, we propose an encoding for answering for the general (4-sided) $${\textsf {Top}}{\text {-}}k{}$$ Top - k queries that takes $$(m\lg {{(k+1)n \atopwithdelims ()n}}+2nm(m-1)+o(n))$$ ( m lg ( k + 1 ) n n + 2 n m ( m - 1 ) + o ( n ) ) bits, which generalizes the joint Cartesian tree of Golin et al. [TCS 2016]. Compared with trivial $$O(nm\lg {n})$$ O ( n m lg n ) -bit encoding, our encoding takes less space when $$m = o(\lg {n})$$ m = o ( lg n ) . In addition to the upper bound results for the encodings, we also give lower bounds on encodings for answering 1 and 4-sided $${\textsf {Top}}{\text {-}}k{}$$ Top - k queries, which show that our upper bound results are almost optimal.


2010 ◽  
Vol DMTCS Proceedings vol. AM,... (Proceedings) ◽  
Author(s):  
Thomas Fernique ◽  
Damien Regnault

International audience This paper introduces a Markov process inspired by the problem of quasicrystal growth. It acts over dimer tilings of the triangular grid by randomly performing local transformations, called $\textit{flips}$, which do not increase the number of identical adjacent tiles (this number can be thought as the tiling energy). Fixed-points of such a process play the role of quasicrystals. We are here interested in the worst-case expected number of flips to converge towards a fixed-point. Numerical experiments suggest a $\Theta (n^2)$ bound, where $n$ is the number of tiles of the tiling. We prove a $O(n^{2.5})$ upper bound and discuss the gap between this bound and the previous one. We also briefly discuss the average-case.


2006 ◽  
Vol 6 (6) ◽  
pp. 483-494
Author(s):  
T. Tulsi ◽  
L.K. Grover ◽  
A. Patel

The standard quantum search lacks a feature, enjoyed by many classical algorithms, of having a fixed point, i.e. monotonic convergence towards the solution. Recently a fixed point quantum search algorithm has been discovered, referred to as the Phase-\pi/3 search algorithm, which gets around this limitation. While searching a database for a target state, this algorithm reduces the error probability from \epsilon to \epsilon^{2q+1} using q oracle queries, which has since been proved to be asymptotically optimal. A different algorithm is presented here, which has the same worst-case behavior as the Phase-\pi/3 search algorithm but much better average-case behavior. Furthermore the new algorithm gives \epsilon^{2q+1} convergence for all integral q, whereas the Phase-\pi/3 search algorithm requires q to be (3^{n}-1)/2 with n a positive integer. In the new algorithm, the operations are controlled by two ancilla qubits, and fixed point behavior is achieved by irreversible measurement operations applied to these ancillas. It is an example of how measurement can allow us to bypass some restrictions imposed by unitarity on quantum computing.


1998 ◽  
Vol 5 (10) ◽  
Author(s):  
Jakob Pagter ◽  
Theis Rauhe

We study the fundamental problem of sorting in a sequential model of computation and in particular consider the time-space trade-off (product of time and space) for this problem.<br />Beame has shown a lower bound of  Omega(n^2) for this product leaving a gap of a logarithmic factor up to the previously best known upper bound of O(n^2 log n) due to Frederickson. Since then, no progress has been made towards tightening this gap.<br />The main contribution of this paper is a comparison based sorting algorithm which closes this gap by meeting the lower bound of Beame. The time-space product O(n^2) upper bound holds for the full range of space bounds between log n and n/log n. Hence in this range our algorithm is optimal for comparison based models as well as for the very powerful general models considered by Beame.


2018 ◽  
Vol 29 (08) ◽  
pp. 1257-1278 ◽  
Author(s):  
Andreas Poyias ◽  
Simon J. Puglisi ◽  
Rajeev Raman

We consider the problem of implementing a space-efficient dynamic trie, with an emphasis on good practical performance. For a trie with [Formula: see text] nodes with an alphabet of size [Formula: see text], the information-theoretic space lower bound is [Formula: see text] bits. The Bonsai data structure is a compact trie proposed by Darragh et al. (Softw. Pract. Exper. 23(3) (1993) 277–291). Its disadvantages include the user having to specify an upper bound [Formula: see text] on the trie size in advance (which cannot be changed easily after initalization), a space usage of [Formula: see text] (which is asymptotically non-optimal for smaller [Formula: see text] or if [Formula: see text]) and a lack of support for deletions. It supports traversal and update operations in [Formula: see text] expected time (based on assumptions about the behaviour of hash functions), where [Formula: see text] and has excellent speed performance in practice. We propose an alternative, m-Bonsai, that addresses the above problems, obtaining a trie that uses [Formula: see text] bits in expectation, and supports traversal and update operations in [Formula: see text] expected time and [Formula: see text] amortized expected time, for any user-specified parameter [Formula: see text] (again based on assumptions about the behaviour of hash functions). We give an implementation of m-Bonsai which uses considerably less memory and is slightly faster than the original Bonsai.


Author(s):  
Mikhail V. Berlinkov ◽  
Cyril Nicaud

In this paper we address the question of synchronizing random automata in the critical settings of almost-group automata. Group automata are automata where all letters act as permutations on the set of states, and they are not synchronizing (unless they have one state). In almost-group automata, one of the letters acts as a permutation on [Formula: see text] states, and the others as permutations. We prove that this small change is enough for automata to become synchronizing with high probability. More precisely, we establish that the probability that a strongly-connected almost-group automaton is not synchronizing is [Formula: see text], for a [Formula: see text]-letter alphabet. We also present an efficient algorithm that decides whether a strongly-connected almost-group automaton is synchronizing. For a natural model of computation, we establish a [Formula: see text] worst-case lower bound for this problem ([Formula: see text] for the average case), which is almost matched by our algorithm.


Author(s):  
A. Kalaivani ◽  
K. Swetha

Sorting is a technique which is used to arrange the data in specific order. A sorting technique is applied to rearrange the elements in numerical order as ascending order or descending order or for words in alphabetical order. In this paper, we propose an efficient sorting algorithm known as Enhanced Bidirectional Insertion Sorting algorithm which is developed from insertion sort concept. A comparative analysis is done for the proposed Enhanced Bidirectional Insertion Sort algorithm with the selection sort and insertion sort algorithms. When compared to insertion sort algorithm the proposed algorithm outperforms with less number of comparisons in worst case and average case computing time. The proposed algorithm works efficiently for duplicated elements which is the advanced improvement and the results are proved.


1991 ◽  
Vol 20 (364) ◽  
Author(s):  
O. Gerstel ◽  
Shmuel Zaks

A new characterization of tree medians is presented: we show that a vertex <em>m</em> is a median of a tree <em>T</em> with <em>n</em> vertices iff there exists a partition of the vertex set into [<em>n</em>/2] disjoint pairs (excluding m when <em>n</em> is odd), such that all the paths connecting the two vertices in any of the pairs pass through <em>m</em>. We show that in this case this sum is the largest possible among all such partitions, and we use this fact to discuss lower bounds on the message complexity of the distributed sorting problem. This lower bound implies that, given a network of a tree topology, choosing a median and then route all the information through it is the best possible strategy, in terms of worst-case number of messages sent during any execution of any distributed sorting algorithm. We also discuss the implications for networks of a general topology and for the distributed ranking problem.


Sign in / Sign up

Export Citation Format

Share Document