首页> 外文会议>Special event on analysis of experimental algorithms >k-Maximum Subarrays for Small k: Divide-and-Conquer Made Simpler
【24h】

k-Maximum Subarrays for Small k: Divide-and-Conquer Made Simpler

机译:小k的k个最大子数组:分而治之变得更简单

获取原文

摘要

Given an array A of n real numbers, the maximum subarray problem is to find a contiguous subarray which has the largest sum. The k-maximum subarrays problem is to find k such subarrays with the largest sums. For the 1—maximum subarray the well known divide-and-conquer algorithm, presented in most textbooks, although suboptimal, is easy to implement and can be made optimal with a simple change that speeds up the combine phase. On the other hand, the only known divide-and-conquer algorithm for k > 1, that is efficient for small values of k, is difficult to implement, due to the intricacies of the combine phase. In this paper, we show how to simplify the combine phase considerably while preserving the overall running time. In the process of designing the combine phase of the algorithm we provide a simple, sublinear, O((k~(1/2))log~3 k) time algorithm, for finding the k largest sums of X + Y, where X and Y are sorted arrays of size n and k < n~2. The k largest sums are implicitly represented and can be enumerated with an additional O(k) time. Our solution relies on simple operations such as merging sorted arrays, binary search and selecting the kth smallest number in an array. We have implemented our algorithm and report excellent performance as compared to previous results.
机译:给定一个n个实数的数组A,最大子数组问题是找到一个具有最大和的连续子数组。 k个最大子数组的问题是找到k个具有最大和的子数组。对于1个最大子数组,大多数教科书中介绍的众所周知的分而治之算法虽然次优,但易于实现,并且可以通过简单的更改使其达到最佳状态,从而加快合并阶段。另一方面,由于合并阶段的复杂性,对于k的较小值有效的唯一已知的k> 1分治算法很难实现。在本文中,我们展示了如何在保留总体运行时间的同时,显着简化合并阶段。在设计算法的组合阶段的过程中,我们提供了一种简单的亚线性O((k〜(1/2)log〜3 k)时间算法,用于找到X + Y的k个最大和。和Y是大小为n且k

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号