Two Kadane Algorithms for the Maximum Sum Subarray Problem

IF 1.8 Q3 COMPUTER SCIENCE, ARTIFICIAL INTELLIGENCE Algorithms Pub Date : 2023-11-14 DOI:10.3390/a16110519
Joseph B. Kadane
{"title":"Two Kadane Algorithms for the Maximum Sum Subarray Problem","authors":"Joseph B. Kadane","doi":"10.3390/a16110519","DOIUrl":null,"url":null,"abstract":"The maximum sum subarray problem is to find a contiguous subarray with the largest sum. The history of algorithms to address this problem is recounted, culminating in what is known as Kadane’s algorithm. However, that algorithm is not the algorithm Kadane intended. Nonetheless, the algorithm known as Kadane’s has found many uses, some of which are recounted here. The algorithm Kadane intended is reported here, and compared to the algorithm attributed to Kadane. They are both linear in time, employ just a few words of memory, and use a dynamic programming structure. The results proved here show that these two algorithms differ only in the case of an input consisting of only negative numbers. In that case, the algorithm Kadane intended is more informative than the algorithm attributed to him.","PeriodicalId":7636,"journal":{"name":"Algorithms","volume":"21 11","pages":"0"},"PeriodicalIF":1.8000,"publicationDate":"2023-11-14","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Algorithms","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.3390/a16110519","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, ARTIFICIAL INTELLIGENCE","Score":null,"Total":0}
引用次数: 0

Abstract

The maximum sum subarray problem is to find a contiguous subarray with the largest sum. The history of algorithms to address this problem is recounted, culminating in what is known as Kadane’s algorithm. However, that algorithm is not the algorithm Kadane intended. Nonetheless, the algorithm known as Kadane’s has found many uses, some of which are recounted here. The algorithm Kadane intended is reported here, and compared to the algorithm attributed to Kadane. They are both linear in time, employ just a few words of memory, and use a dynamic programming structure. The results proved here show that these two algorithms differ only in the case of an input consisting of only negative numbers. In that case, the algorithm Kadane intended is more informative than the algorithm attributed to him.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
最大和子阵列问题的两种Kadane算法
最大和子数组问题是寻找一个和最大的连续子数组。本文叙述了解决这一问题的算法的历史,最终以Kadane算法告终。然而,这个算法并不是Kadane想要的算法。尽管如此,这个被称为Kadane的算法已经找到了许多用途,其中一些在这里详述。这里报告了Kadane的算法,并将其与Kadane的算法进行了比较。它们在时间上都是线性的,只占用少量的内存,并使用动态规划结构。这里证明的结果表明,这两种算法仅在输入仅由负数组成的情况下不同。在这种情况下,Kadane想要的算法比他的算法更有信息量。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
Algorithms
Algorithms Mathematics-Numerical Analysis
CiteScore
4.10
自引率
4.30%
发文量
394
审稿时长
11 weeks
期刊最新文献
Specification Mining Based on the Ordering Points to Identify the Clustering Structure Clustering Algorithm and Model Checking Personalized Advertising in E-Commerce: Using Clickstream Data to Target High-Value Customers Navigating the Maps: Euclidean vs. Road Network Distances in Spatial Queries Hybrid Sparrow Search-Exponential Distribution Optimization with Differential Evolution for Parameter Prediction of Solar Photovoltaic Models Particle Swarm Optimization-Based Unconstrained Polygonal Fitting of 2D Shapes
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1