Finding the common subsequences of $L$ multiple strings has many applications in the area of bioinformatics, computational linguistics, and information retrieval. A well-known result states that finding a Longest Common Subsequence (LCS) for $L$ strings is NP-hard, e.g., the computational complexity is exponential in $L$. In this paper, we develop a randomized algorithm, referred to as {\em Random-MCS}, for finding a random instance of Maximal Common Subsequence ($MCS$) of multiple strings. A common subsequence is {\em maximal} if inserting any character into the subsequence no longer yields a common subsequence. A special case of MCS is LCS where the length is the longest. We show the complexity of our algorithm is linear in $L$, and therefore is suitable for large $L$. Furthermore, we study the occurrence probability for a single instance of MCS and demonstrate via both theoretical and experimental studies that the longest subsequence from multiple runs of {\em Random-MCS} often yields a solution to $LCS$.
Let $A$ be a sequence of $n \geq 0$ real numbers. A subsequence of $A$ is a sequence of contiguous elements of $A$. A \emph{maximum scoring subsequence} of $A$ is a subsequence with largest sum of its elements, which can be found in O(n) time by Kadane's dynamic programming algorithm. We consider in this paper two problems involving maximal scoring subsequences of a sequence. Both of these problems arise in the context of buffer memory minimization in computer networks. The first one, which is called {\sc Insertion in a Sequence with Scores (ISS)}, consists in inserting a given real number $x$…
We study dynamic algorithms for the longest increasing subsequence (\textsf{LIS}) problem. A dynamic \textsf{LIS} algorithm maintains a sequence subject to operations of the following form arriving one by one: (i) insert an element, (ii) delete an element, or (iii) substitute an element for another. After performing each operation, the algorithm must report the length of the longest increasing subsequence of the current sequence. Our main contribution is the first exact dynamic \textsf{LIS} algorithm with sublinear update time. More precisely, we present a randomized algorithm that performs ea…
In this paper we define a new problem, motivated by computational biology, $LCSk$ aiming at finding the maximal number of $k$ length $substrings$, matching in both input strings while preserving their order of appearance. The traditional LCS definition is a special case of our problem, where $k = 1$. We provide an algorithm, solving the general case in $O(n^2)$ time, where $n$ is the length of the input strings, equaling the time required for the special case of $k=1$. The space requirement of the algorithm is $O(kn)$. %, however, in order to enable %backtracking of the solution, $O(n^2)$ spac…
In this paper, we consider a generalized longest common subsequence problem, in which a constraining sequence of length $s$ must be included as a substring and the other constraining sequence of length $t$ must be excluded as a subsequence of two main sequences and the length of the result must be maximal. For the two input sequences $X$ and $Y$ of lengths $n$ and $m$, and the given two constraining sequences of length $s$ and $t$, we present an $O(nmst)$ time dynamic programming algorithm for solving the new generalized longest common subsequence problem. The time complexity can be reduced fu…
The maximal sum of a sequence "A" of "n" real numbers is the greatest sum of all elements of any strictly contiguous and possibly empty subsequence of "A", and it can be computed in "O(n)" time by means of Kadane's algorithm. Letting "A^(x -> p)" denote the sequence which results from inserting a real number "x" between elements "A[p-1]" and "A[p]", we show how the maximal sum of "A^(x -> p)" can be computed in "O(1)" worst-case time for any given "x" and "p", provided that an "O(n)" time preprocessing step has already been executed on "A". In particular, this implies that, given "m" pairs "(x…
Longest Increasing Subsequence (LIS) is a fundamental statistic of a sequence, and has been studied for decades. While the LIS of a sequence of length $n$ can be computed exactly in time $O(n\log n)$, the complexity of estimating the (length of the) LIS in sublinear time, especially when LIS $\ll n$, is still open. We show that for any integer $n$ and any $λ= o(1)$, there exists a (randomized) non-adaptive algorithm that, given a sequence of length $n$ with LIS $\ge λn$, approximates the LIS up to a factor of $1/λ^{o(1)}$ in $n^{o(1)} / λ$ time. Our algorithm improves upon prior work substanti…
In the fully dynamic maximal independent set (MIS) problem our goal is to maintain an MIS in a given graph $G$ while edges are inserted and deleted from the graph. The first non-trivial algorithm for this problem was presented by Assadi, Onak, Schieber, and Solomon [STOC 2018] who obtained a deterministic fully dynamic MIS with $O(m^{3/4})$ update time. Later, this was independently improved by Du and Zhang and by Gupta and Khan [arXiv 2018] to $\tilde{O}(m^{2/3})$ update time. Du and Zhang [arXiv 2018] also presented a randomized algorithm against an oblivious adversary with $\tilde{O}(\sqrt{…
We present a simple randomized reduction from fully-dynamic integral matching algorithms to fully-dynamic "approximately-maximal" fractional matching algorithms. Applying this reduction to the recent fractional matching algorithm of Bhattacharya, Henzinger, and Nanongkai (SODA 2017), we obtain a novel result for the integral problem. Specifically, our main result is a randomized fully-dynamic $(2+ε)$-approximate integral matching algorithm with small polylog worst-case update time. For the $(2+ε)$-approximation regime only a \emph{fractional} fully-dynamic $(2+ε)$-matching algorithm with worst…
The first fully dynamic algorithm for maintaining a maximal independent set (MIS) with update time that is sublinear in the number of edges was presented recently by the authors of this paper [Assadi et.al. STOC'18]. The algorithm is deterministic and its update time is $O(m^{3/4})$, where $m$ is the (dynamically changing) number of edges. Subsequently, Gupta and Khan and independently Du and Zhang [arXiv, April 2018] presented deterministic algorithms for dynamic MIS with update times of $O(m^{2/3})$ and $O(m^{2/3} \sqrt{\log m})$, respectively. Du and Zhang also gave a randomized algorithm w…
Maintaining maximal independent set in dynamic graph is a fundamental open problem in graph theory and the first sublinear time deterministic algorithm was came up by Assadi, Onak, Schieber and Solomon(STOC'18), which achieves $O(m^{3/4})$ amortized update time. We have two main contributions in this paper. We present a new simple deterministic algorithm with $O(m^{2/3}\sqrt{\log m})$ amortized update time, which improves the previous best result. And we also present the first randomized algorithm with expected $O(\sqrt{m}\log^{1.5}m)$ amortized time against an oblivious adversary.
We present a randomized Local Computation Algorithm (LCA) with query complexity $poly(Δ) \cdot \log n$ for the Maximal Independent Set (MIS) problem. That is, the algorithm determines whether each node is in the computed MIS or not using $poly(Δ) \cdot \log n$ queries to the adjacency lists of the graph, with high probability, and this can be done for different nodes simultaneously and independently. Here $Δ$ and $n$ denote the maximum degree and the number of nodes. This algorithm resolves a key open problem in the study of local computations and sublinear algorithms (attributed to Rubinfeld)…
Cadences are structurally maximal arithmetic progressions of indices corresponding to equal characters in an underlying string. This paper provides a polynomial time detection algorithm for 3-cadences in grammar-compressed binary strings. This algorithm also translates to a linear time detection algorithm for 3-cadences in uncompressed binary strings. Furthermore, this paper proves that several variants of the cadence detection problem are NP-complete for grammar-compressed strings. As a consequence, the equidistant subsequence matching problem with patterns of length three is NP-complete for …
Baswana, Gupta and Sen [FOCS'11] showed that fully dynamic maximal matching can be maintained in general graphs with logarithmic amortized update time. More specifically, starting from an empty graph on $n$ fixed vertices, they devised a randomized algorithm for maintaining maximal matching over any sequence of $t$ edge insertions and deletions with a total runtime of $O(t \log n)$ in expectation and $O(t \log n + n \log^2 n)$ with high probability. Whether or not this runtime bound can be improved towards $O(t)$ has remained an important open problem. Despite significant research efforts, thi…
Over the past 30 years numerous algorithms have been designed for symmetry breaking problems in the LOCAL model, such as maximal matching, MIS, vertex coloring, and edge-coloring. For most problems the best randomized algorithm is at least exponentially faster than the best deterministic algorithm. In this paper we prove that these exponential gaps are necessary and establish connections between the deterministic and randomized complexities in the LOCAL model. Each result has a very compelling take-away message: 1. Fast $Δ$-coloring of trees requires random bits: Building on the recent lower b…
New algorithms are devised for finding the maxima of multidimensional point samples, one of the very first problems studied in computational geometry. The algorithms are very simple and easily coded and modified for practical needs. The expected complexity of some measures related to the performance of the algorithms is analyzed. We also compare the efficiency of the algorithms with a few major ones used in practice, and apply our algorithms to find the maximal layers and the longest common subsequences of multiple sequences.
We provide a tight analysis which settles the round complexity of the well-studied parallel randomized greedy MIS algorithm, thus answering the main open question of Blelloch, Fineman, and Shun [SPAA'12]. The parallel/distributed randomized greedy Maximal Independent Set (MIS) algorithm works as follows. An order of the vertices is chosen uniformly at random. Then, in each round, all vertices that appear before their neighbors in the order are added to the independent set and removed from the graph along with their neighbors. The main question of interest is the number of rounds it takes until…
A Faster Deterministic Algorithm for Fully Dynamic Maximal Matching
Toyota Technological Institute at Chicago(芝加哥丰田技术研究所);Courant Institute School of Mathematics, Computing, and Data Science, New York University(纽约大学库朗数学科学与技术学院)
本文提出了一种新的确定性框架,用于完全动态最大匹配的验证与维护,实现了 amortized update time 为 n^{1/2+o(1)} 的高效算法。
The Maximal Independent Set (MIS) problem is one of the basics in the study of locality in distributed graph algorithms. This paper presents an extremely simple randomized algorithm providing a near-optimal local complexity for this problem, which incidentally, when combined with some recent techniques, also leads to a near-optimal global complexity. Classical algorithms of Luby [STOC'85] and Alon, Babai and Itai [JALG'86] provide the global complexity guarantee that, with high probability, all nodes terminate after $O(\log n)$ rounds. In contrast, our initial focus is on the local complexity,…
We study the smoothness of paging algorithms. How much can the number of page faults increase due to a perturbation of the request sequence? We call a paging algorithm smooth if the maximal increase in page faults is proportional to the number of changes in the request sequence. We also introduce quantitative smoothness notions that measure the smoothness of an algorithm. We derive lower and upper bounds on the smoothness of deterministic and randomized demand-paging and competitive algorithms. Among strongly-competitive deterministic algorithms LRU matches the lower bound, while FIFO matches …
Pop-Stack Sorting is an algorithm that takes a permutation as an input and sorts its elements. It consists of several steps. At one step, the algorithm reads the permutation it has to process from left to right and reverses each of its maximal decreasing subsequences of consecutive elements. It terminates at the first step that outputs the identity permutation. In this note, we answer a question of Defant on the running time of Pop-Stack Sorting on the uniform random permutation $σ_n$. More precisely, we show that there is a constant $c > 0.5$ such that asymptotically almost surely, the algori…
We present $O(\log^2 \log n)$ time 3-coloring, maximal independent set and maximal matching algorithms for trees in the Massively Parallel Computation (MPC) model. Our algorithms are deterministic, apply to arbitrary-degree trees and work in the low-space MPC model, where local memory is $O(n^δ)$ for $δ\in (0,1)$ and global memory is $O(m)$. Our main result is the 3-coloring algorithm, which contrasts the randomized, state-of-the-art 4-coloring algorithm of Ghaffari, Grunau and Jin [DISC'20]. The maximal independent set and maximal matching algorithms follow in $O(1)$ time after obtaining the …
In this paper we present a randomized algorithm for computing the collection of maximal layers for a point set in $E^{k}$ ($k = f(n)$). The input to our algorithm is a point set $P = \{p_1,...,p_n\}$ with $p_i \in E^{k}$. The proposed algorithm achieves a runtime of $O\left(kn^{2 - {1 \over \log{k}} + \log_k{\left(1 + {2 \over {k+1}}\right)}}\log{n}\right)$ when $P$ is a random order and a runtime of $O(k^2 n^{3/2 + (\log_{k}{(k-1)})/2}\log{n})$ for an arbitrary $P$. Both bounds hold in expectation. Additionally, the run time is bounded by $O(kn^2)$ in the worst case. This is the first non-tri…
Finding the length of the longest increasing subsequence (LIS) is a classic algorithmic problem. Let $n$ denote the size of the array. Simple $O(n\log n)$ algorithms are known for this problem. We develop a polylogarithmic time randomized algorithm that for any constant $δ> 0$, estimates the length of the LIS of an array to within an additive error of $δn$. More precisely, the running time of the algorithm is $(\log n)^c (1/δ)^{O(1/δ)}$ where the exponent $c$ is independent of $δ$. Previously, the best known polylogarithmic time algorithms could only achieve an additive $n/2$ approximation. Wi…
The Massively Parallel Computation (MPC) model is an emerging model which distills core aspects of distributed and parallel computation. It has been developed as a tool to solve (typically graph) problems in systems where the input is distributed over many machines with limited space. Recent work has focused on the regime in which machines have sublinear (in $n$, the number of nodes in the input graph) memory, with randomized algorithms presented for fundamental graph problems of Maximal Matching and Maximal Independent Set. However, there have been no prior corresponding \emph{deterministic} …