中文
相关论文

相关论文: Insertion Sort is O(n log n)

200 篇论文

The apportionment problem deals with the fair distribution of a discrete set of $k$ indivisible resources (such as legislative seats) to $n$ entities (such as parties or geographic subdivisions). Highest averages methods are a frequently…

数据结构与算法 · 计算机科学 2014-09-10 Zhanpeng Cheng , David Eppstein

We revisit the well-known problem of sorting under partial information: sort a finite set given the outcomes of comparisons between some pairs of elements. The input is a partially ordered set P, and solving the problem amounts to…

数据结构与算法 · 计算机科学 2013-01-22 Jean Cardinal , Samuel Fiorini , Gwenaël Joret , Raphaël Jungers , J. Ian Munro

A sequence of reversals that takes a signed permutation to the identity is perfect if at no step a common interval is broken. Determining a parsimonious perfect sequence of reversals that sorts a signed permutation is NP-hard. Here we show…

组合数学 · 数学 2009-05-18 Mathilde Bouvel , Cedric Chauve , Marni Mishna , Dominique Rossin

The expected number of pairwise comparisons needed to learn a partial order on n elements is shown to be at least n*n/4-o(n*n), and an algorithm is given that needs only n*n/4+o(n*n) comparisons on average. In addition, the optimal strategy…

组合数学 · 数学 2007-05-23 Jobst Heitzig

Graded posets frequently arise throughout combinatorics, where it is natural to try to count the number of elements of a fixed rank. These counting problems are often $\#\textbf{P}$-complete, so we consider approximation algorithms for…

数据结构与算法 · 计算机科学 2023-04-11 Prateek Bhakta , Ben Cousins , Matthew Fahrbach , Dana Randall

Much of the copious literature on the subject of sorting has concentrated on minimizing the number of comparisons and/or exchanges/copies. However, a more appropriate yardstick for the performance of sorting algorithms is based on the total…

数据结构与算法 · 计算机科学 2020-12-03 R. C. Hillyard , Yunlu Liaozheng , Sai Vineeth K. R

Permutation patterns and pattern avoidance have been intensively studied in combinatorics and computer science, going back at least to the seminal work of Knuth on stack-sorting (1968). Perhaps the most natural algorithmic question in this…

数据结构与算法 · 计算机科学 2019-04-17 László Kozma

In this paper, we proposed a new efficient sorting algorithm based on insertion sort concept. The proposed algorithm called Bidirectional Conditional Insertion Sort (BCIS). It is in-place sorting algorithm and it has remarkably efficient…

数据结构与算法 · 计算机科学 2017-08-08 Adnan Saher Mohammed , Şahin Emrah Amrahov , Fatih V. Çelebi

In the classical interval scheduling type of problems, a set of $n$ jobs, characterized by their start and end time, need to be executed by a set of machines, under various constraints. In this paper we study a new variant in which the jobs…

数据结构与算法 · 计算机科学 2015-11-02 Veli Mäkinen , Valeria Staneva , Alexandru Tomescu , Daniel Valenzuela

Enclosing depth is a recently introduced depth measure which gives a lower bound to many depth measures studied in the literature. So far, enclosing depth has only been studied from a combinatorial perspective. In this work, we give the…

计算几何 · 计算机科学 2024-02-20 Bernd Gärtner , Fatime Rasiti , Patrick Schnider

We propose a conceptually simple oblivious sort and oblivious random permutation algorithms called bucket oblivious sort and bucket oblivious random permutation. Bucket oblivious sort uses $6n\log n$ time (measured by the number of memory…

数据结构与算法 · 计算机科学 2021-04-30 Gilad Asharov , T-H. Hubert Chan , Kartik Nayak , Rafael Pass , Ling Ren , Elaine Shi

We analyze algorithms for computing the $n$th prime $p_n$ and establish asymptotic bounds for several approaches. Using existing results on the complexity of evaluating the prime-counting function $\pi(x)$, we show that the binary search…

数论 · 数学 2025-10-21 Ansh Aggarwal

In this paper we examine sorting on the assumption that we do not know in advance which way to sort a sequence of numbers and we set at work simple local comparison and swap operators whose repeating application ends up in sorted sequences.…

人工智能 · 计算机科学 2009-03-11 Dimitris Kalles , Alexis Kaporis

The Erd\H{o}s-Ginzburg-Ziv theorem states that for any sequence of $2n-1$ integers, there exists a subsequence of $n$ elements whose sum is divisible by $n$. In this article, we provide a simple, practical $O(n\log\log n)$ algorithm and a…

组合数学 · 数学 2025-07-14 Yui Hin Arvin Leung

Ordered set (and map) is one of the most used data type. In addition to standard set operations, like insert, delete and contains, it can provide set-set operations such as union, intersection, and difference. Each of these set-set…

分布式、并行与集群计算 · 计算机科学 2021-10-13 Vitaly Aksenov , Ilya Kokorin , Alena Martsenyuk

A key requirement in sequence to sequence processing is the modeling of long range dependencies. To this end, a vast majority of the state-of-the-art models use attention mechanism which is of O($n^2$) complexity that leads to slow…

机器学习 · 计算机科学 2019-10-29 Kārlis Freivalds , Emīls Ozoliņš , Agris Šostaks

Many fundamental problems in computational geometry admit no algorithm running in $o(n \log n)$ time for $n$ planar input points, via classical reductions from sorting. Prominent examples include the computation of convex hulls, quadtrees,…

计算几何 · 计算机科学 2026-05-18 Ivor van der Hoog , Eva Rotenberg , Jack Spalding-Jamieson , Lasse Wulf

We consider the following problem: given an unsorted array of $n$ elements, and a sequence of intervals in the array, compute the median in each of the subarrays defined by the intervals. We describe a simple algorithm which uses O(n) space…

数据结构与算法 · 计算机科学 2009-01-14 Beat Gfeller , Peter Sanders

We show that there is a dense set $\ourset\subseteq \mathbb{N}$ of group orders and a constant $c$ such that for every $n\in \ourset$ we can decide in time $O(n^2(\log n)^c)$ whether two $n\times n$ multiplication tables describe isomorphic…

计算复杂性 · 计算机科学 2021-04-13 Heiko Dietrich , James B. Wilson

For many data-processing applications, a comprehensive set of efficient operations for the management of priority values is required. Indexed priority queues are particularly promising to satisfy this requirement by design. In this work, we…

数据结构与算法 · 计算机科学 2023-12-07 Christian Loeffeld