Fast and Simple Modular Subset Sum

08/24/2020
by   Kyriakos Axiotis, et al.
0

We revisit the Subset Sum problem over the finite cyclic group ℤ_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 Õ(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 ℤ_m. The first one is a randomized algorithm running in time O(mlog^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 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 Õ(n^2) provided in the recent work of Duan et al. (ICALP'19).

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/11/2020

Faster Deterministic Modular Subset Sum

We consider the Modular Subset Sum problem: given a multiset X of intege...
research
07/12/2018

Fast Modular Subset Sum using Linear Sketching

Given n positive integers, the Modular Subset Sum problem asks if a subs...
research
04/30/2018

A Subquadratic Algorithm for 3XOR

Given a set X of n binary words of equal length w, the 3XOR problem asks...
research
07/15/2021

Deterministic and Las Vegas Algorithms for Sparse Nonnegative Convolution

Computing the convolution A⋆ B of two length-n integer vectors A,B is a ...
research
07/30/2018

A Simple Near-Linear Pseudopolynomial Time Randomized Algorithm for Subset Sum

Given a multiset of n positive integers and a target integer t, the Subs...
research
05/09/2021

Fast n-fold Boolean Convolution via Additive Combinatorics

We consider the problem of computing the Boolean convolution (with wrapa...
research
10/28/2021

Improved Strongly Polynomial Algorithms for Deterministic MDPs, 2VPI Feasibility, and Discounted All-Pairs Shortest Paths

We revisit the problem of finding optimal strategies for deterministic M...

Please sign up or login with your details

Forgot password? Click here to reset