This article introduces a new optimization method to improve mergesort's runtime complexity, when sorting sequences that have equal keys to $O(n log_2 k)$, where $k$ is the number of distinct keys in the sequence. When $k$ is constant, it is evident that mergesort is capable of achieving linear time by utilizing linked lists as its underlying data structure. Mergesort linked list implementations can be optimized by introducing a new mechanism to group elements with equal keys together, thus allowing merge algorithm to achieve linear time.

0
下载
关闭预览

相关内容

最优化是应用数学的一个分支,主要指在一定条件限制下,选取某种研究方案使目标达到最优的一种方法。最优化问题在当今的军事、工程、管理等领域有着极其广泛的应用。

Planning in hybrid systems with both discrete and continuous control variables is important for dealing with real-world applications such as extra-planetary exploration and multi-vehicle transportation systems. Meanwhile, generating high-quality solutions given certain hybrid planning specifications is crucial to building high-performance hybrid systems. However, since hybrid planning is challenging in general, most methods use greedy search that is guided by various heuristics, which is neither complete nor optimal and often falls into blind search towards an infinite-action plan. In this paper, we present a hybrid automaton planning formalism and propose an optimal approach that encodes this planning problem as a Mixed Integer Linear Program (MILP) by fixing the action number of automaton runs. We also show an extension of our approach for reasoning over temporally concurrent goals. By leveraging an efficient MILP optimizer, our method is able to generate provably optimal solutions for complex mixed discrete-continuous planning problems within a reasonable time. We use several case studies to demonstrate the extraordinary performance of our hybrid planning method and show that it outperforms a state-of-the-art hybrid planner, Scotty, in both efficiency and solution qualities.

0
0
下载
预览

First, for the for the submodular $k$-secretary problem with shortlists [1], we provide a near optimal $1-1/e-\epsilon$ approximation using shortlist of size $O(k poly(1/\epsilon))$. In particular, we improve the size of shortlist used in \cite{us} from $O(k 2^{poly(1/\epsilon)})$ to $O(k poly(1/\epsilon))$. As a result, we provide a near optimal approximation algorithm for random-order streaming of monotone submodular functions under cardinality constraints, using memory $O(k poly(1/\epsilon))$. It exponentially improves the running time and memory of \cite{us} in terms of $1/\epsilon$. Next we generalize the problem to matroid constraints, which we refer to as submodular matroid secretary problem with shortlists. It is a variant of the \textit{matroid secretary problem} \cite{feldman2014simple}, in which the algorithm is allowed to have a shortlist. We design an algorithm that achieves a $\frac{1}{2}(1-1/e^2 -\epsilon)$ competitive ratio for any constant $\epsilon>0$, using a shortlist of size $O(k poly(\frac{1}{\epsilon}))$. Moreover, we generalize our results to the case of $p$-matchoid constraints and give a $\frac{1}{p+1}(1-1/e^{p+1}-\epsilon )$ approximation using shortlist of size $O(k poly(\frac{1}{\epsilon}))$. It asymptotically approaches the best known offline guarantee $\frac{1}{p+1}$ [22]. Furthermore, we show that our algorithms can be implemented in the streaming setting using $O(k poly(\frac{1}{\epsilon}))$ memory.

0
0
下载
预览

Dendric subshifts are defined by combinatorial restrictions of the extensions of the words in its language. This family generalizes well-known families of subshifts such as Sturmian subshifts, Arnoux-Rauzy subshifts and codings of interval exchange transformations. It is known that any minimal dendric subshifts has a primitive $S$-adic representation where the morphisms in $S$ are positive tame automorphisms of the free group generated by the alphabet. In this paper we investigate those $S$-adic representations, heading towards an $S$-adic characterization ot this family. We obtain such a characterization in the ternary case, involving a directed graph with 9 vertices.

0
0
下载
预览

Solving a singular linear system for an individual vector solution is an ill-posed problem with a condition number infinity. From an alternative perspective, however, the general solution of a singular system is of a bounded sensitivity as a unique element in an affine Grassmannian. If a singular linear system is given through empirical data that are sufficiently accurate with a tight error bound, a properly formulated general numerical solution uniquely exists in the same affine Grassmannian, enjoys Lipschitz continuity and approximates the underlying exact solution with an accuracy in the same order as the data. Furthermore, any backward accurate numerical solution vector is an accurate approximation to one of the solutions of the underlying singular system.

0
0
下载
预览

This note investigates functions from $\mathbb{R}^d$ to $\mathbb{R} \cup \{\pm \infty\}$ that satisfy axioms of linearity wherever allowed by extended-value arithmetic. They have a nontrivial structure defined inductively on $d$, and unlike finite linear functions, they require $\Omega(d^2)$ parameters to uniquely identify. In particular they can capture vertical tangent planes to epigraphs: a function (never $-\infty$) is convex if and only if it has an extended-valued subgradient at every point in its effective domain, if and only if it is the supremum of a family of "affine extended" functions. These results are applied to the well-known characterization of proper scoring rules, for the finite-dimensional case: it is carefully and rigorously extended here to a more constructive form. In particular it is investigated when proper scoring rules can be constructed from a given convex function.

0
0
下载
预览

We consider the problem of computing a sequence of range minimum queries. We assume a sequence of commands that contains values and queries. Our goal is to quickly determine the minimum value that exists between the current position and a previous position $i$. Range minimum queries are used as a sub-routine of several algorithms, namely related to string processing. We propose a data structure that can process these commands sequences. We obtain efficient results for several variations of the problem, in particular we obtain $O(1)$ time per command for the offline version and $O(\alpha(n))$ amortized time for the online version, where $\alpha(n)$ is the inverse Ackermann function and $n$ the number of values in the sequence. This data structure also has very small space requirements, namely $O(\ell)$ where $\ell$ is the maximum number active $i$ positions. We implemented our data structure and show that it is competitive against existing alternatives. We obtain comparable command processing time, in the nano second range, and much smaller space requirements.

0
0
下载
预览

Many important real-world settings contain multiple players interacting over an unknown duration with probabilistic state transitions, and are naturally modeled as stochastic games. Prior research on algorithms for stochastic games has focused on two-player zero-sum games, games with perfect information, and games with imperfect-information that is local and does not extend between game states. We present an algorithm for approximating Nash equilibrium in multiplayer general-sum stochastic games with persistent imperfect information that extends throughout game play. We experiment on a 4-player imperfect-information naval strategic planning scenario. Using a new procedure, we are able to demonstrate that our algorithm computes a strategy that closely approximates Nash equilibrium in this game.

0
0
下载
预览

The problem of Approximate Nearest Neighbor (ANN) search is fundamental in computer science and has benefited from significant progress in the past couple of decades. However, most work has been devoted to pointsets whereas complex shapes have not been sufficiently treated. Here, we focus on distance functions between discretized curves in Euclidean space: they appear in a wide range of applications, from road segments to time-series in general dimension. For $\ell_p$-products of Euclidean metrics, for any $p$, we design simple and efficient data structures for ANN, based on randomized projections, which are of independent interest. They serve to solve proximity problems under a notion of distance between discretized curves, which generalizes both discrete Fr\'echet and Dynamic Time Warping distances. These are the most popular and practical approaches to comparing such curves. We offer the first data structures and query algorithms for ANN with arbitrarily good approximation factor, at the expense of increasing space usage and preprocessing time over existing methods. Query time complexity is comparable or significantly improved by our algorithms, our algorithm is especially efficient when the length of the curves is bounded.

0
3
下载
预览

Quantum hardware and quantum-inspired algorithms are becoming increasingly popular for combinatorial optimization. However, these algorithms may require careful hyperparameter tuning for each problem instance. We use a reinforcement learning agent in conjunction with a quantum-inspired algorithm to solve the Ising energy minimization problem, which is equivalent to the Maximum Cut problem. The agent controls the algorithm by tuning one of its parameters with the goal of improving recently seen solutions. We propose a new Rescaled Ranked Reward (R3) method that enables stable single-player version of self-play training that helps the agent to escape local optima. The training on any problem instance can be accelerated by applying transfer learning from an agent trained on randomly generated problems. Our approach allows sampling high-quality solutions to the Ising problem with high probability and outperforms both baseline heuristics and a black-box hyperparameter optimization approach.

0
4
下载
预览

We consider the task of learning the parameters of a {\em single} component of a mixture model, for the case when we are given {\em side information} about that component, we call this the "search problem" in mixture models. We would like to solve this with computational and sample complexity lower than solving the overall original problem, where one learns parameters of all components. Our main contributions are the development of a simple but general model for the notion of side information, and a corresponding simple matrix-based algorithm for solving the search problem in this general setting. We then specialize this model and algorithm to four common scenarios: Gaussian mixture models, LDA topic models, subspace clustering, and mixed linear regression. For each one of these we show that if (and only if) the side information is informative, we obtain parameter estimates with greater accuracy, and also improved computation complexity than existing moment based mixture model algorithms (e.g. tensor methods). We also illustrate several natural ways one can obtain such side information, for specific problem instances. Our experiments on real data sets (NY Times, Yelp, BSDS500) further demonstrate the practicality of our algorithms showing significant improvement in runtime and accuracy.

0
3
下载
预览
小贴士
相关论文
Jingkai Chen,Brian Williams,Chuchu Fan
0+阅读 · 2021年2月20日
Mohammad Shadravan
0+阅读 · 2021年2月19日
France Gheeraert,Marie Lejeune,Julien Leroy
0+阅读 · 2021年2月19日
Zhonggang Zeng
0+阅读 · 2021年2月19日
Bo Waggoner
0+阅读 · 2021年2月18日
Luís M. S. Russo
0+阅读 · 2021年2月18日
Ioannis Z. Emiris,Ioannis Psarros
3+阅读 · 2020年4月13日
Dmitrii Beloborodov,A. E. Ulanov,Jakob N. Foerster,Shimon Whiteson,A. I. Lvovsky
4+阅读 · 2020年2月14日
Avik Ray,Joe Neeman,Sujay Sanghavi,Sanjay Shakkottai
3+阅读 · 2018年2月24日
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
13+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
8+阅读 · 2019年5月18日
Unsupervised Learning via Meta-Learning
CreateAMind
32+阅读 · 2019年1月3日
RL 真经
CreateAMind
4+阅读 · 2018年12月28日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
10+阅读 · 2018年12月24日
Hierarchical Imitation - Reinforcement Learning
CreateAMind
16+阅读 · 2018年5月25日
Hierarchical Disentangled Representations
CreateAMind
3+阅读 · 2018年4月15日
【学习】Hierarchical Softmax
机器学习研究会
3+阅读 · 2017年8月6日
Auto-Encoding GAN
CreateAMind
5+阅读 · 2017年8月4日
Top
微信扫码咨询专知VIP会员