Consider the following problem SUB (k,n). Given an array A=(a sub 1, ..., a sub n) of real elements a, and a natural number k, find (at most) k disjoint subarrays A sub 1, ..., A sub k in A such that the sum of the elements contained in the subarrays is maximum. In this paper, we present a simple algorithm, based on Dynamic Programming, solving SUB (k, n) in time O(kn). Extracting the main idea of the dynamic programming scheme, we are able to extend the algorithm such that it is applicable for a wider class of related optimization problems. We show efficient applications of this algorithm in the area of agnostic learning by means of minimum disagreement, such as learning k intervals or identyfying objects in a pixel matrix. In particular, the algorithm enables us to generate optimal functions inside a special class of piece-wise constant functions. In restricted settings, our algorithm is better by a factor of sample-size-order compared to solutions induced by the dynamic scheme presented in [5]. Furthermore, we develop a generalization of a tree data structure introduced in [1]. Using this tree structure, we can solve corresponding online learning tasks efficiently.
展开▼
机译:考虑以下问题SUB(k,n)。给定实数元素a的数组A =(a sub 1,...,sub n)和自然数k,在A中最多找到k个不相交的子数组A sub 1,...,A sub k这样子数组中包含的元素之和最大。在本文中,我们提出了一种基于动态规划的简单算法,可以在时间O(kn)内求解SUB(k,n)。提取动态规划方案的主要思想,我们能够扩展算法,使其适用于更广泛的相关优化问题。我们通过最小的分歧展示了该算法在不可知学习领域的有效应用,例如学习k个间隔或识别像素矩阵中的对象。特别是,该算法使我们能够在特殊类别的分段常数函数内部生成最佳函数。在受限的环境下,相比于文献[5]中提出的动态方案,我们的算法在样本大小顺序上要好一些。此外,我们对[1]中介绍的树数据结构进行了概括。使用这种树形结构,我们可以有效地解决相应的在线学习任务。
展开▼