space complexity
31 papers tagged with this keyword
Exact Computation of the Catalan Number $C(2,050,572,903)$
This paper presents a two-phase algorithm for computing exact Catalan numbers at an unprecedented scale. The method is demonstrated by computing $C(n)$ for $n = 2,050,572,903$ yielding a result with a targeted $1,234,567,890$ decimal digits. To circumvent the memory limitations associated with evaluating large factorials, the algorithm operates exclusively in the prime-exponent domain. Phase 1 employs a parallel segmented sieve to enumerate primes up to $2n$ and applies Legendre's formula to determine the precise prime factorization of $C(n)$. The primes are grouped by exponent and serialized to disk. Phase 2 reconstructs the final integer using a memory-efficient balanced product tree with chunking. The algorithm runs on a time complexity of $Θ(n(\log n)^2)$ bit-operations and a space complexity of $Θ(n \log n)$ bits. This result represents the largest exact Catalan number computed to date. Performance statistics for a single-machine execution are reported, and verification strategies -- including modular checks and SHA-256 hash validation -- are discussed. The source code and factorization data are provided to ensure reproducibility.
Efficient k-mer Dataset Compression Using Eulerian Covers of de Bruijn Graphs and BWT
Transforming an input sequence into its constituent k-mers is a fundamental operation in computational genomics. To reduce storage costs associated with k-mer datasets, we introduce and formally analyze MCTR, a novel two-stage algorithm for lossless compression of the k-mer multiset. Our core method achieves a minimal text representation (W) by computing an optimal Eulerian cover (minimum string count) of the dataset's de Bruijn graph, enabled by an efficient local Eulerization technique. The resulting strings are then further compressed losslessly using the Burrows-Wheeler Transform (BWT).
Leveraging de Bruijn graph properties, MCTR is proven to achieve linear time and space complexity and guarantees complete reconstruction of the original k-mer multiset, including frequencies.
Using simulated and real genomic data, we evaluated MCTR's performance (list and frequency representations) against the state-of-the-art lossy unitigging tool greedytigs (from matchtigs). We measured core execution time and the raw compression ratio cmpr = weight(M)/weight(W), where M is the input sequence data). Benchmarks confirmed MCTR's data fidelity but revealed performance trade-offs inherent to lossless representation. GreedyTigs was significantly faster. Regarding raw compression, GreedyTigs achieved high ratios (cmpr approx 14) on noisy real data for its lossy sequence output. On real data, MCTR (frequency) showed moderate raw compression (cmpr approx 1.5-2.7), while MCTR (list) showed none (cmpr approx 1). Importantly, the full MCTR+BWT pipeline significantly outperforms BWT alone for enhanced lossless compression. Our results establish MCTR as a valuable, theoretically grounded tool for applications demanding efficient, lossless storage and analysis of k-mer multisets, complementing lossy methods optimized for sequence summarization.
Capturing an Invisible Robber using Separators
We study the zero-visibility cops and robbers game, where the robber is invisible to the cops until they are caught. This differs from the classic game where full information about the robber's location is known at any time. A previously known solution for capturing a robber in the zero-visibility case is based on the pathwidth decomposition. We provide an alternative solution based on a separation hierarchy, improving capture time and space complexity without asymptotically increasing the zero-visibility cop number in most cases. In addition, we provide a better bound on the approximate zero-visibility cop number for various classes of graphs, where approximate refers to the restriction to polynomial time computable strategies.
Extending Robinson Spaces: Complexity and Algorithmic Solutions for Non-Symmetric Dissimilarity Spaces
In this work, we extend the concept of Robinson spaces to asymmetric dissimilarities, enhancing their applicability in representing and analyzing complex data. Within this generalized framework, we introduce two different problems that extend the classical seriation problem: an optimization problem and a decision problem. We establish that these problems are NP-hard and NP-complete, respectively. Despite this complexity results, we identify several non-trivial instances where these problems can be solved in polynomial time, providing valuable insights into their tractability.
Domination Polynomials of the Grid, the Cylinder, the Torus, and the King Graph
We present an algorithm to compute the domination polynomial of the $m \times n$ grid, cylinder, and torus graphs and the king graph. The time complexity of the algorithm is $O(m^2n^2 λ^{2m})$ for the torus and $O(m^3n^2λ^m)$ for the other graphs, where $λ= 1+\sqrt{2}$. The space complexity is $O(mnλ^m)$ for all of these graphs. We use this algorithm to compute domination polynomials for graphs up to size $24\times 24$ and the total number of dominating sets for even larger graphs. This allows us to give precise estimates of the asymptotic growth rates of the number of dominating sets. We also extend several sequences in the Online Encyclopedia of Integer Sequences.
The complexity of computing the period and the exponent of a digraph
Published
• View Publication
• BIB
The period of a strongly connected digraph is the greatest common divisor of the lengths of all its cycles. The period of a digraph is the least common multiple of the periods of its strongly connected components. These notions play an important role in the theory of Markov chains and the analysis of powers of nonnegative matrices. While the time complexity of computing the period is well-understood, little is known about its space complexity. We show that the problem of computing the period of a digraph is NL-complete, even if all its cycles are contained in the same strongly connected component. However, if the digraph is strongly connected, we show that this problem becomes L-complete. For primitive digraphs (that is, strongly connected digraphs of period one), there always exists a number $m$ such that there is a path of length exactly $m$ between every two vertices. We show that computing the smallest such $m$, called the exponent of a digraph, is NL-complete. The exponent of a primitive digraph is a particular case of the index of convergence of a nonnegative matrix, which we also show to be computable in NL, and thus NL-complete.
Weighted degrees and truncated derived bibliographic networks
Large bibliographic networks are sparse -- the average node degree is small. This is not necessarily true for their product -- in some cases, it can ``explode'' (it is not sparse, increases in time and space complexity). An approach in such cases is to reduce the complexity of the problem by limiting our attention to a selected subset of important nodes and computing with corresponding truncated networks. The nodes can be selected by different criteria. An option is to consider the most important nodes in the derived network -- nodes with the largest weighted degree. It turns out that the weighted degrees in the derived network can be computed efficiently without computing the derived network itself.
Lightning graph matching
Graph matching aims to find correspondences between two graphs. It is a fundamental task in pattern recognition. The classical spectral matching algorithm has time complexity $\mathcal{O}(n^4)$ and space complexity $\mathcal{O}(n^4)$, where $n$ is the number of nodes. Such a complexity limits the applicability to large-scale graph matching tasks. This paper proposes an efficient redesign of spectral matching by transforming the graph matching problem into a 1D linear assignment problem, which can be solved efficiently by sorting two $n \times 1$ vectors. The resulting algorithm is named the lightning spectral assignment method (LiSA), which enjoys a complexity of $\mathcal{O}(n^2)$. Numerical experiments demonstrate the efficiency and the theoretical analysis of the strategy.
Concatenation trees: A framework for efficient universal cycle and de Bruijn sequence constructions
Classic cycle-joining techniques have found widespread application in creating universal cycles for a diverse range of combinatorial objects, such as shorthand permutations, weak orders, orientable sequences, and various subsets of $k$-ary strings, including de Bruijn sequences. In the most favorable scenarios, these algorithms operate with a space complexity of $O(n)$ and require $O(n)$ time to generate each symbol in the sequences. In contrast, concatenation-based methods have been developed for a limited selection of universal cycles. In each of these instances, the universal cycles can be generated far more efficiently, with an amortized time complexity of $O(1)$ per symbol, while still using $O(n)$ space.
This paper introduces $\mathit{concatenation~trees}$, which serve as the fundamental structures needed to bridge the gap between cycle-joining constructions based on the pure cycle register and corresponding concatenation-based approaches. They immediately demystify the relationship between the classic Lyndon word concatenation construction of de Bruijn sequences and a corresponding cycle-joining based construction. To underscore their significance, concatenation trees are applied to construct universal cycles for shorthand permutations and weak orders in $O(1)$-amortized time per symbol. Moreover, we provide insights as to how similar results can be obtained for other universal cycles including cut-down de Bruijn sequences and orientable sequences.
Patrolling Grids with a Bit of Memory
This work addresses the challenge of patrolling regular grid graphs of any dimension using a single mobile agent with minimal memory and limited sensing range. We show that it is impossible to patrol some grid graphs with $0$ bits of memory, regardless of sensing range, and give an exact characterization of those grid graphs that can be patrolled with $0$ bits of memory and sensing range $V$. On the other hand, we show that an algorithm exists using $1$ bit of memory and $V=1$ that patrols any $d$-dimensional grid graph. This result is surprising given that the agent must be able to move in $2d$ distinct directions to patrol, while $1$ bit of memory allows specifying only two directions per sensory input. Our $1$-bit patrolling algorithm handles this by carefully exploiting a small state-space to access all the needed directions while avoiding getting stuck. Overall, our results give concrete evidence that extremely little memory is needed for patrolling highly regular environments like grid graphs compared to arbitrary graphs. The techniques we use, such as partitioning the environment into sensing regions and exploiting distinct coordinates resulting from higher-dimensionality, may be applicable to analyzing the space complexity of patrolling in other types of regular environments as well.
Stackelberg Vertex Cover on a Path
Published in In: Deligkas, A., Filos-Ratsikas, A. (eds.) Algorithmic Game Theory. pp. 22-39. Springer Nature Switzerland, Cham (2023)
• View Publication
• BIB
A Stackelberg Vertex Cover game is played on an undirected graph $\mathcal{G}$ where some of the vertices are under the control of a \emph{leader}. The remaining vertices are assigned a fixed weight. The game is played in two stages. First, the leader chooses prices for the vertices under her control. Afterward, the second player, called \emph{follower}, selects a min weight vertex cover in the resulting weighted graph. That is, the follower selects a subset of vertices $C^*$ such that every edge has at least one endpoint in $C^*$ of minimum weight w.r.t.\ to the fixed weights, and the prices set by the leader. Stackelberg Vertex Cover (StackVC) describes the leader's optimization problem to select prices in the first stage of the game so as to maximize her revenue, which is the cumulative price of all her (priceable) vertices that are contained in the follower's solution. Previous research showed that StackVC is \textsf{NP}-hard on bipartite graphs, but solvable in polynomial time in the special case of bipartite graphs, where all priceable vertices belong to the same side of the bipartition. In this paper, we investigate StackVC on paths and present a dynamic program with linear time and space complexity.
Expander Graph Propagation
Deploying graph neural networks (GNNs) on whole-graph classification or regression tasks is known to be challenging: it often requires computing node features that are mindful of both local interactions in their neighbourhood and the global context of the graph structure. GNN architectures that navigate this space need to avoid pathological behaviours, such as bottlenecks and oversquashing, while ideally having linear time and space complexity requirements. In this work, we propose an elegant approach based on propagating information over expander graphs. We leverage an efficient method for constructing expander graphs of a given size, and use this insight to propose the EGP model. We show that EGP is able to address all of the above concerns, while requiring minimal effort to set up, and provide evidence of its empirical utility on relevant graph classification datasets and baselines in the Open Graph Benchmark. Importantly, using expander graphs as a template for message passing necessarily gives rise to negative curvature. While this appears to be counterintuitive in light of recent related work on oversquashing, we theoretically demonstrate that negatively curved edges are likely to be required to obtain scalable message passing without bottlenecks. To the best of our knowledge, this is a previously unstudied result in the context of graph representation learning, and we believe our analysis paves the way to a novel class of scalable methods to counter oversquashing in GNNs.
A novel public key cryptography based on generalized Lucas matrices
Published in Communications in Combinatorics and Optimization 2024
• View Publication
• BIB
In this article, we have proposed a generalized Lucas matrix (recursive matrix of higher order) having relation with generalized Fibonacci sequences and established many special properties in addition to that usual matrix algebra. Further, we have proposed a modified public key cryptography using these matrices as keys in Affine cipher and key agreement for encryption-decryption with the combination of terms of generalized Lucas sequences under residue operations. In this scheme, instead of exchanging the whole key matrix, only a pair of numbers(parameters) need to be exchanged, which reduces the time complexity as well as space complexity of the key transmission and has a large key-space.
Space Complexity of Vertex Connectivity Oracles
Published
• View Publication
• BIB
A $k$-vertex connectivity oracle for undirected $G$ is a data structure that, given $u,v\in V(G)$, reports $\min\{k,κ(u,v)\}$, where $κ(u,v)$ is the pairwise vertex connectivity between $u,v$. There are three main measures of efficiency: construction time, query time, and space. Prior work of Izsak and Nutov shows that a data structure of total size $\tilde{O}(kn)$ can even be encoded as a $\tilde{O}(k)$-bit labeling scheme so that vertex-connectivity queries can be answered in $\tilde{O}(k)$ time. The construction time is polynomial, but unspecified.
In this paper we address the top three complexity measures: Space, Query Time, and Construction Time. We give an $Ω(kn)$-bit lower bound on any vertex connectivity oracle. We construct an optimal-space connectivity oracle in max-flow time that answers queries in $O(\log n)$ time, independent of $k$.
On the role of the Fibonacci matrix as key in modified ECC
Published
• View Publication
• BIB
In this paper, we have proposed a modified cryptographic scheme based on the application of recursive matrices as key in ECC and ElGamal. For encryption, we consider mapping analogous to affine Hill cipher in which a plaintext matrix has been constructed by points corresponding to letters on elliptic curves. In the formation of key-space, the generalized Fibonacci matrices have been taken into account, which is the sequence of matrices. The beauty of considering Fibonacci matrices is their construction where we need only two parameters(integers) in place of $n^2$ elements. The use of a recursive matrix makes a large keyspace for our proposed scheme and increases its efficiency. Thus, it reduces time as well space complexity, and its security \& strength is based on EC-DLP which is a hard problem in number theory.
Cryptography using generalized Fibonacci matrices with Affine-Hill cipher
Published
• View Publication
• BIB
In this article, we have proposed a public key cryptography using Affine-Hill cipher with a generalized Fibonacci matrix(called multinacci matrix). Also proposed a key establishment(exchange of key matrix $K=Q_λ^{k}$ of order $λ\timesλ$ for encryption-decryption) scheme with the help of multinacci sequences under prime modulo. In this scheme, instead of exchanging key matrix, we need to exchange the only pair of numbers $(λ, k)$, which reduces the time complexity as well as space complexity and comes with a large key-space.
Counting Integral Points in Polytopes via Numerical Analysis of Contour Integration
Published
• View Publication
• BIB
In this paper, we address the problem of counting integer points in a rational polytope described by $P(y) = \{ x \in \mathbb{R}^m \colon Ax = y, x \geq 0\}$, where $A$ is an $n \times m$ integer matrix and $y$ is an $n$-dimensional integer vector. We study the Z-transformation approach initiated by Brion-Vergne, Beck, and Lasserre-Zeron from the numerical analysis point of view, and obtain a new algorithm on this problem: If $A$ is nonnegative, then the number of integer points in $P(y)$ can be computed in $O(\mathrm{poly} (n,m, \|y\|_\infty) (\|y\|_\infty + 1)^n)$ time and $O(\mathrm{poly} (n,m, \|y\|_\infty))$ space.This improves, in terms of space complexity, a naive DP algorithm with $O((\|y\|_\infty + 1)^n)$-size DP table. Our result is based on the standard error analysis to the numerical contour integration for the inverse Z-transform, and establish a new type of an inclusion-exclusion formula for integer points in $P(y)$. We apply our result to hypergraph $b$-matching, and obtain a $O(\mathrm{poly}( n,m,\|b\|_\infty) (\|b\|_\infty +1)^{(1-1/k)n})$ time algorithm for counting $b$-matchings in a $k$-partite hypergraph with $n$ vertices and $m$ hyperedges. This result is viewed as a $b$-matching generalization of the classical result by Ryser for $k=2$ and its multipartite extension by Bj{ö}rklund-Husfeldt.
On the Parallel Parameterized Complexity of the Graph Isomorphism Problem
Published
• View Publication
• BIB
In this paper, we study the parallel and the space complexity of the graph isomorphism problem (\GI{}) for several parameterizations. Let $\mathcal{H}=\{H_1,H_2,\cdots,H_l\}$ be a finite set of graphs where $|V(H_i)|\leq d$ for all $i$ and for some constant $d$. Let $\mathcal{G}$ be an $\mathcal{H}$-free graph class i.e., none of the graphs $G\in \mathcal{G}$ contain any $H \in \mathcal{H}$ as an induced subgraph. We show that \GI{} parameterized by vertex deletion distance to $\mathcal{G}$ is in a parameterized version of $\AC^1$, denoted $\PL$-$\AC^1$, provided the colored graph isomorphism problem for graphs in $\mathcal{G}$ is in $\AC^1$. From this, we deduce that \GI{} parameterized by the vertex deletion distance to cographs is in $\PL$-$\AC^1$.
The parallel parameterized complexity of \GI{} parameterized by the size of a feedback vertex set remains an open problem. Towards this direction we show that the graph isomorphism problem is in $\PL$-$\TC^0$ when parameterized by vertex cover or by twin-cover.
Let $\mathcal{G}'$ be a graph class such that recognizing graphs from $\mathcal{G}'$ and the colored version of \GI{} for $\mathcal{G}'$ is in logspace ($Ł$). We show that \GI{} for bounded vertex deletion distance to $\mathcal{G}'$ is in $Ł$. From this, we obtain logspace algorithms for \GI{} for graphs with bounded vertex deletion distance to interval graphs and graphs with bounded vertex deletion distance to cographs.
Efficient computation of minimum-area rectilinear convex hull under rotation and generalizations
Published in Journal of Global Optimization (2021) 79:687-714
• View Publication
• BIB
Let $P$ be a set of $n$ points in the plane. We compute the value of $θ\in [0,2π)$ for which the rectilinear convex hull of $P$, denoted by $\mathcal{RH}_θ(P)$, has minimum (or maximum) area in optimal $O(n\log n)$ time and $O(n)$ space, improving the previous $O(n^2)$ bound. Let $\mathcal{O}$ be a set of $k$ lines through the origin sorted by slope and let $α_i$ be the sizes of the $2k$ angles defined by pairs of two consecutive lines, $i=1, \ldots , 2k$. Let $Θ_{i}=π-α_i$ and $Θ=\min\{Θ_i \colon i=1,\ldots,2k\}$. We obtain: (1) Given a set $\mathcal{O}$ such that $Θ\ge\fracπ{2}$, we provide an algorithm to compute the $\mathcal{O}$-convex hull of $P$ in optimal $O(n\log n)$ time and $O(n)$ space; If $Θ< \fracπ{2}$, the time and space complexities are $O(\frac{n}Θ\log n)$ and $O(\frac{n}Θ)$ respectively. (2) Given a set $\mathcal{O}$ such that $Θ\ge\fracπ{2}$, we compute and maintain the boundary of the ${\mathcal{O}}_θ$-convex hull of $P$ for $θ\in [0,2π)$ in $O(kn\log n)$ time and $O(kn)$ space, or if $Θ< \fracπ{2}$, in $O(k\frac{n}Θ\log n)$ time and $O(k\frac{n}Θ)$ space. (3) Finally, given a set $\mathcal{O}$ such that $Θ\ge\fracπ{2}$, we compute, in $O(kn\log n)$ time and $O(kn)$ space, the angle $θ\in [0,2π)$ such that the $\mathcal{O}_θ$-convex hull of $P$ has minimum (or maximum) area over all $θ\in [0,2π)$.
An Estimation of the Size of Non-Compact Suffix Trees
A suffix tree is a data structure used mainly for pattern matching. It is known that the space complexity of simple suffix trees is quadratic in the length of the string. By a slight modification of the simple suffix trees one gets the compact suffix trees, which have linear space complexity. The motivation of this paper is the question whether the space complexity of simple suffix trees is quadratic not only in the worst case, but also in expectation.