Kyriakos Axiotis, A. Backurs, K. Bringmann, Ce Jin, Vasileios Nakos, Christos Tzamos, Hongxun Wu
{"title":"快速简单模子集和","authors":"Kyriakos Axiotis, A. Backurs, K. Bringmann, Ce Jin, Vasileios Nakos, Christos Tzamos, Hongxun Wu","doi":"10.1137/1.9781611976496.6","DOIUrl":null,"url":null,"abstract":"We revisit the Subset Sum problem over the finite cyclic group $\\mathbb{Z}_m$ for some given integer $m$. A series of recent works has provided asymptotically optimal algorithms for this problem under the Strong Exponential Time Hypothesis. Koiliaris and Xu (SODA'17, TALG'19) gave a deterministic algorithm running in time $\\tilde{O}(m^{5/4})$, which was later improved to $O(m \\log^7 m)$ randomized time by Axiotis et al. (SODA'19). In this work, we present two simple algorithms for the Modular Subset Sum problem running in near-linear time in $m$, both efficiently implementing Bellman's iteration over $\\mathbb{Z}_m$. The first one is a randomized algorithm running in time $O(m\\log^2 m)$, that is based solely on rolling hash and an elementary data-structure for prefix sums; to illustrate its simplicity we provide a short and efficient implementation of the algorithm in Python. Our second solution is a deterministic algorithm running in time $O(m\\ \\mathrm{polylog}\\ m)$, that uses dynamic data structures for string manipulation. We further show that the techniques developed in this work can also lead to simple algorithms for the All Pairs Non-Decreasing Paths Problem (APNP) on undirected graphs, matching the asymptotically optimal running time of $\\tilde{O}(n^2)$ provided in the recent work of Duan et al. (ICALP'19).","PeriodicalId":93491,"journal":{"name":"Proceedings of the SIAM Symposium on Simplicity in Algorithms (SOSA)","volume":"43 1","pages":"57-67"},"PeriodicalIF":0.0000,"publicationDate":"2020-08-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"10","resultStr":"{\"title\":\"Fast and Simple Modular Subset Sum\",\"authors\":\"Kyriakos Axiotis, A. Backurs, K. Bringmann, Ce Jin, Vasileios Nakos, Christos Tzamos, Hongxun Wu\",\"doi\":\"10.1137/1.9781611976496.6\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"We revisit the Subset Sum problem over the finite cyclic group $\\\\mathbb{Z}_m$ for some given integer $m$. A series of recent works has provided asymptotically optimal algorithms for this problem under the Strong Exponential Time Hypothesis. Koiliaris and Xu (SODA'17, TALG'19) gave a deterministic algorithm running in time $\\\\tilde{O}(m^{5/4})$, which was later improved to $O(m \\\\log^7 m)$ randomized time by Axiotis et al. (SODA'19). In this work, we present two simple algorithms for the Modular Subset Sum problem running in near-linear time in $m$, both efficiently implementing Bellman's iteration over $\\\\mathbb{Z}_m$. The first one is a randomized algorithm running in time $O(m\\\\log^2 m)$, that is based solely on rolling hash and an elementary data-structure for prefix sums; to illustrate its simplicity we provide a short and efficient implementation of the algorithm in Python. Our second solution is a deterministic algorithm running in time $O(m\\\\ \\\\mathrm{polylog}\\\\ m)$, that uses dynamic data structures for string manipulation. We further show that the techniques developed in this work can also lead to simple algorithms for the All Pairs Non-Decreasing Paths Problem (APNP) on undirected graphs, matching the asymptotically optimal running time of $\\\\tilde{O}(n^2)$ provided in the recent work of Duan et al. (ICALP'19).\",\"PeriodicalId\":93491,\"journal\":{\"name\":\"Proceedings of the SIAM Symposium on Simplicity in Algorithms (SOSA)\",\"volume\":\"43 1\",\"pages\":\"57-67\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2020-08-24\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"10\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the SIAM Symposium on Simplicity in Algorithms (SOSA)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1137/1.9781611976496.6\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the SIAM Symposium on Simplicity in Algorithms (SOSA)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1137/1.9781611976496.6","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
We revisit the Subset Sum problem over the finite cyclic group $\mathbb{Z}_m$ for some given integer $m$. A series of recent works has provided asymptotically optimal algorithms for this problem under the Strong Exponential Time Hypothesis. Koiliaris and Xu (SODA'17, TALG'19) gave a deterministic algorithm running in time $\tilde{O}(m^{5/4})$, which was later improved to $O(m \log^7 m)$ randomized time by Axiotis et al. (SODA'19). In this work, we present two simple algorithms for the Modular Subset Sum problem running in near-linear time in $m$, both efficiently implementing Bellman's iteration over $\mathbb{Z}_m$. The first one is a randomized algorithm running in time $O(m\log^2 m)$, that is based solely on rolling hash and an elementary data-structure for prefix sums; to illustrate its simplicity we provide a short and efficient implementation of the algorithm in Python. Our second solution is a deterministic algorithm running in time $O(m\ \mathrm{polylog}\ m)$, that uses dynamic data structures for string manipulation. We further show that the techniques developed in this work can also lead to simple algorithms for the All Pairs Non-Decreasing Paths Problem (APNP) on undirected graphs, matching the asymptotically optimal running time of $\tilde{O}(n^2)$ provided in the recent work of Duan et al. (ICALP'19).