
A closed string u is either of length one or contains a non-empty border that occurs only as a prefix and as a suffix in u and nowhere else within u. In this paper, we present fast 𝒪(nlog n) time algorithms to compute all 𝒪(n^2) closed substrings by introducing a compact representation for all closed substrings of a string w[1..n], using only 𝒪(n log n) space. These simple and space-efficient algorithms also compute maximal closed strings. Furthermore, we compare the performance of these algorithms and identify classes of strings where each performs best. Finally, we show that the exact number of maximal closed substrings in a Fibonacci word f_n , for n ≥ 5 , is ≈( 1 + 1/ϕ ^2) F_n ≈ 1.382 F_n , where ϕ is the golden ratio and F_n = |f_n| .
Motivated by the strict latency constraints in high-throughput cloud storage, this article addresses the fundamental theoretical challenge of designing high-efficiency bin packing algorithms with near-linear-time complexity. While traditional approximation algorithms achieve high packing density, their super-linear runtime overheads often prohibit their use in real-time systems. To bridge this gap between time and space efficiency, we apply a novel grouping-based framework that discretizes the item space into K types. We present an online algorithm OnGP and an offline algorithm OffGP, both utilizing an equidistant grouping strategy. Theoretical analysis establishes that OnGP suppresses stochastic fluctuations via a resource pooling parameter, while OffGP reaches a matching fixed point with high probability for fixed K when m≥ K_c and admits complementary instance-dependent residual certificates. Extensive experiments further demonstrate that OffGP substantially reduces the stochastic component of waste on the tested instances. Results show that OnGP provides a robust online solution with efficiencies close to the Best Fit algorithm, while OffGP matches the near-optimal performance of Best Fit Decreasing within a 1.036% margin and is approximately 6.5× faster, confirming their value for time-critical applications.
An automaton is synchronizable if there exists an input that drives it into a definite state from any other state. This notion has been studied for various types of automata. In this work, we investigate notions of synchronizability for Parikh automata (PAs). A Parikh automaton is an automaton with counters that are checked against a semilinear set at the end of the computation. We consider several notions of synchronizability (or directability) for PAs and show that they lead to decidable and PSPACE-complete problems, even for deterministic and complete Parikh automata (DCPAs) on letters. Then, we demonstrate that for DCPAs on letters, the synchronization problems are NP-complete over a unary alphabet, and NP-complete and solvable in polynomial time over a binary and a unary alphabet, respectively, if the dimension is fixed and numbers are encoded in unary. For a unary alphabet, we also provide other restrictions that ensure polynomial-time solvability. We then show that for partially ordered Parikh automata whose semilinear constraint sets have a regular Parikh-inverse image, deciding ∃∀ - D_3 -directability is NP-complete. Additionally, we prove that deciding D_3 -directability for partially ordered nondeterministic complete word automata is in AC ^0 .
The Elliptic Curve Method (ECM) is an efficient integer factorization algorithm for identifying medium-sized prime factors of large integers. Elliptic Divisibility Sequences (EDSs) are a class of non-linear divisibility sequences associated with elliptic curves, which can be efficiently computed when evaluated successively. This paper introduces a new implementation of stage 2 in ECM using EDSs. The main idea is to use the recursive formulas of EDSs to replace the group operations on elliptic curve points. We demonstrate that for parameter e=1 (e.g. degree-e Dickson polynomial), our variant achieves a 10.09% speedup factor in Stage 2 compared to the ECM using Edwards curves.
This paper proposes a method for the proof of correctness of a distributed algorithm for crash-tolerant Causal Broadcast (CB), which is a fundamental building block of numerous distributed applications (e.g., key-value storage). Since the CB algorithm can be instantiated for an unbounded number of processes, proving its correctness regardless of the number of processes is a significant problem. Moreover, moving beyond manual proofs will provide higher correctness assurances. To this end, we identify cutoff values for the model checking of five important properties of CB, namely validity, integrity, causal delivery, termination and strong termination. A cutoff value C>0 enables us to show that, an instance of CB with C processes is correct for some property P if and only if any instance of CB with any number of processes greater than or equal to C is correct for P . We show that the cutoff for validity, integrity, termination and strong termination is three, and the cutoff for causal delivery is four, where there is at most one faulty process. To provide higher assurances in the correctness of CB, we utilize model checking to verify the CB properties in instances of CB with three and four processes, called the cutoff models. To enable such verification, we specify the properties of CB in Linear Temporal Logic, and develop a Promela specification of the cutoff models for verification in the Spin model checker. To the best of our knowledge, this is the first work that presents cutoffs for the CB algorithm.
Secure computation with penalties aims to achieve fairness in secure computation protocols by imposing monetary penalties on adversarial parties. A fundamental problem in constructing protocols that involves monetary entities is how to formalize them in a computational model. Bentov and Kumaresan (CRYPTO 2014) introduced a new computational model with special atomic entities called coins that capture currency and showed a protocol for secure computation with penalties in the model. Their model, secure computation with coins, assumes coins have several properties that are natural in the sense of expressing currency. However, on the other hand, it also requires the unnatural assumption “all coins are indistinguishable from each other" for a technical reason to accomplish the security proof. The motivation of this work is to remove this assumption to make the model a more general. We propose a new model, secure computation with color coins, such that coins have identifiable colors and do not hold the indistinguishability property. Furthermore, our model allows us to set different prices for each color. We show that secure computation with penalties can be realized in our model. To do this, we make some modifications to the ideal functionality of secure computation with penalties to adapt it to our model without losing the essence, i.e., fairness with penalties.
In this paper, we investigate the approximation and parameterized complexities of MAXNAESAT variants. We begin by presenting a simple yet rigorous proof establishing the APX-completeness of the MAXNAE2SAT problem. Notably, APX-completeness holds even when the repetition factor of each variable is bounded by 3, i.e., each variable appears in at most three clauses in the MAXNAE2SAT instance. Our APX-completeness proof is a strict reduction that directly establishes a new inapproximability bound for the MAXNAE2SAT problem. The decision version of MAXNAE2SAT remains NP-complete when the repetition factor of each variable is bounded by 3, mirroring the NP-completeness of MAXCUT in cubic graphs. We further establish a tight computational dichotomy by proving that the MAXNAE2SAT problem is solvable in linear time when the repetition factor of each variable is bounded by 2. One of our principal contributions is the design and analysis of a fixed-parameter tractable algorithm for MAXNAE2SAT instances with repetition factor three, complemented by an exact exponential-time algorithm for the same setting. Finally, we describe a collection of complexity-preserving reductions among MAXSAT variants, thereby clarifying the structural relationships that unify these problems.
With the rapid growth of image-based communication and storage, ensuring secure image transmission has become a critical challenge. This paper presents a secure image encryption scheme based on an algebraically enhanced 3D chaotic map with hash-based initialization, addressing the growing need for robust image security in modern communication systems. The proposed method employs SHA-256 hashing to generate secure initial conditions, feeding into an algebraically deformed 3D chaotic map with improved non-linear dynamics for enhanced chaotic behavior. The encryption process implements a three-stage approach: first, chaotic x-value sequences permute pixel positions; second, Gray code transformations combined with chaotic XOR operations achieve bit-level diffusion; and finally, multi-channel diffusion establishes inter-pixel dependencies across color channels. The scheme demonstrates strong cryptographic properties, with theoretical analysis confirming its chaotic characteristics and experimental results showing superior performance (NPCR 99.6120
We introduce Individual Preference Facility Location (IPFL), a variant of uncapacitated facility location that captures heterogeneous service requirements via local density. Fix a threshold τ≥ 1 . Each client j is assigned a personalized fair radius r_j,τ , defined as the distance from j to its (τ -1) -th nearest client, and IPFL requires assigning every client to an opened facility within its own radius r_j,τ . Assuming feasibility, we develop a 2-approximation algorithm for IPFL based on a two-stage framework: we first construct a restricted edge set, and then run a dual-fitting algorithm on the restricted instance, while preserving the approximation guarantee for the original problem. We further leverage the Lagrangian-relaxation connection between facility location and k-median, and use our IPFL algorithm as a subroutine to obtain a (4, 2)-bicriteria approximation for the individually fair k-median problem with respect to (cost, fairness violation) . We also study two natural relaxations: IPFL with outliers (IPFLO), where up to m clients may be excluded, and IPFL with penalties (IPFLP), where client j may be dropped by paying a penalty π _j . For both variants, we obtain polynomial-time 2-approximation algorithms.
Cartesian tree matching is a form of generalized pattern matching where a substring of the text matches with the pattern if they share the same Cartesian tree. This form of matching finds application for time series of stock prices and can be of interest for melody matching between musical scores. For the indexing problem, the state-of-the-art data structure is a Burrows–Wheeler transform based solution due to [Kim and Cho, CPM’21], which uses nearly succinct space and can count the number of substrings that Cartesian tree match with a pattern in time linear in the pattern length. The authors address the construction of their data structure with a straightforward solution that, however, requires pointer-based data structures, resulting in O(n lg n) bits of space, where n is the text length [Kim and Cho, CPM’21, Section A.4]. We address this bottleneck by a construction that requires O(n lg σ ) bits of space and has a time complexity of O(nlg σ lg n/lg lg n) , where σ is alphabet size. Additionally, we can extend Kim and Cho’s index for indexing multiple circular texts in the spirit of the extended Burrows–Wheeler transform. We show that the extended index maintains the same complexities and present a dynamic variant, where we pay a logarithmic slowdown and need space linear in the input texts in bits for the extra functionality that we can incrementally add and remove texts. As an application, we give the computation of circular matching statistics. Our extended setting is of interest for finding repetitive motifs common in the aforementioned applications, independent of offsets and scaling.
We study the Euclidean minimum weight perfect matching problem for n points in the plane. It is known that any deterministic approximation algorithm whose approximation ratio depends only on n requires at least Ω (n log n) time. We propose such an algorithm for the Euclidean minimum weight perfect matching problem with runtime O(nlog n) and show that it has approximation ratio O(n^0.206) . This improves the so far best known approximation ratio of n/2. We also develop an O(n log n) algorithm for the Euclidean minimum weight perfect matching problem in higher dimensions and show it has approximation ratio O(n^0.412) in all fixed dimensions.
The double-array is an implementation of a trie, which is a data structure that has been well conceived in practice for indexing a set of strings for prefix search or membership queries — a fundamental task with many applications such as information retrieval or database systems. Due to the fundamental nature of this problem, it has sparked much interest, leading to a variety of trie implementations with different characteristics. While a traversal takes constant time per node visit, the needed space consumption in computer words can be as large as the product of the number of nodes and the alphabet size. Despite that several heuristics have been proposed on lowering the space requirements, we are unaware of any theoretical guarantees. In this article, we study the decision problem whether there exists a double-array of a given size. To this end, we first draw a connection to the sparse matrix compression problem, which makes our problem NP-complete for alphabet sizes linear to the number of nodes. The sparse matrix compression problem is to linearize all matrix columns to a single string and use offsets to identify the placement of the columns. Introduced by Ziegler in an unpublished note in 1977, this problem has been discovered in many applications. While it is well-known that the problem is NP-hard even for offsets of lengths at most two, much is left unknown about which parameters make this problem hard. Here, we show that the sparse matrix compression problem is NP-hard even for matrices with at least logarithmic widths by a reduction from the restricted directed Hamiltonian path problem. This translates to NP-completeness of the addressed space problem of the double-array even for alphabets with at least logarithmic sizes. Our final contribution is a MAX-SAT encoding of the problem to find the smallest layout of a double-array, for which we practically could observe a gain of up to 10
Automata operating on representations of ultimately periodic words were introduced as an alternative way of capturing acceptance of regular ω -languages. Families of DFAs and lasso automata (which use pairs of words to represent ultimately periodic words) followed, and gave rise to minimisation algorithms, a Myhill-Nerode theorem and language learning algorithms. Yet Kleene theorems for such a well-established class are still missing, and lasso languages have not been studied algebraically. We are filling this gap by introducing rational lasso languages, expressions and a theory of lasso languages. We show a Kleene theorem for lasso languages and explore the connection between rational lasso and ω -expressions, which yields a Kleene theorem for ω -languages with respect to saturated lasso automata. For one direction of the Kleene theorems, we also provide a Brzozowski construction for lasso automata from rational lasso expressions. Our results offer a method to construct saturated lasso automata from rational ω -expressions.
This paper studies the online power cover problem on a line. Let L be a line and S be a set of sensors located on L , where each sensor can be assigned a power to generate a coverage area for serving users. The objective is to assign minimum powers to cover a sequence of users that arrive online on L . We first show a lower bound of 2 for this problem. Then, an online algorithm based on a greedy strategy is proposed, whose competitive ratio is at most |S| . Notably, this algorithm is the best possible online algorithm for the case |S|=2 . Finally, we consider the special case with S={s_0,s_1,s_2} and design an online algorithm whose competitive ratio depends on the distances between the sensors.
In this paper, we develop a framework for analyzing the complexity of mathematical problems across various fields by constructing highly efficient many-one reductions. For example, we show that the equivalence-to-identically-zero-function problem is reducible to determining whether the Jacobian determinant of a set of functions is identically zero, whether a Fredholm integral equation of the first kind has no eigenvalue, whether a Fredholm integral equation of the second kind has a trivial solution, whether the gradient of a function is identically zero, whether all finite orbits are closed in a given potential, and whether the Poisson bracket of two functions vanishes. Building on prior undecidability and productiveness (a stronger form of non-recursive enumerability) results for the equivalence-to-identically-zero-function problem, we establish that these problems are productive for specific classes of elementary functions. Future work includes exploring how classical complexity classes, such as NP, PSPACE, and EXPTIME, can be applied to computable analysis by leveraging the efficiency of our reductions. Our results provide a unified proof technique for analyzing complexity across different scientific domains, offering a practical extension of computational complexity theory to continuous mathematical structures.
Two strings of the same length are said to Cartesian-tree match (CT-match) if their Cartesian-trees are isomorphic [Park et al., TCS 2020]. Cartesian-tree matching is a natural model that allows for capturing similarities of numerical sequences. Oizumi et al. [CPM 2022] showed that subsequence pattern matching under CT-matching model (CT-MSeq) can be solved in O(nm loglog n) time, where n and m are text and pattern lengths, respectively. This current article follows this line of research, and gives the following new results: (1) An O(nm)-time CT-MSeq algorithm for binary alphabets. (2) An O((nm)^1-ϵ) -time conditional lower bound for the CT-MSeq problem on alphabets of size 4, for any constant ϵ > 0 , under the Orthogonal Vector Hypothesis (OVH). Further, we introduce the new problem of longest common subsequence under CT-matching (CT-LCS) for two given strings S and T of length n, and present the following results: (3) An O(n^6) -time CT-LCS algorithm for general ordered alphabets. (4) An O(n^2 / log n) -time CT-LCS algorithm for binary alphabets. (5) An O(n^2-ϵ) -time conditional lower bound for the CT-LCS problem on alphabets of size 5, for any constant ϵ > 0 , under OVH.
Entities moving with bounded speed, but otherwise unpredictably, encroach upon one another at a fixed time if their separation is less than some specified threshold. Encroachment, of concern in many settings such as collision avoidance, may be unavoidable. However, uncertainty about the true location of entities may cause extra work due to potential, unrealized, encroachment. In our model, entities can be queried for their current location and the region possibly occupied by an entity grows in proportion to the time since its last query. The goal is to maintain low potential congestion, measured in terms of the (dynamic) intersection graph of these uncertainty regions, using limited queries. Previous work, in the same uncertainty model, described query schemes that minimize several measures of congestion potential at all times for point entities, using queries of fixed frequency. These schemes were shown to be O(1) -competitive, in terms of congestion potential, even with clairvoyant query schemes (that know the entities’ trajectories), subject to the same bound on query frequency. Here we describe query schemes that are competitive, even with clairvoyant query schemes, in terms of their query granularity (minimum time between queries), over all sufficiently large time intervals, while guaranteeing a fixed bound on congestion potential of entities with positive extent at all times. This complementary optimization objective necessitates surprisingly different algorithms and analyses from that in previous work. Nevertheless, we also show that the competitive factor of our scheme is best possible, up to a constant factor, in the worst case.
We present FullSynesth, a tree reconciliation algorithm predicting the evolution of a set of homologous genomic regions or syntenies, inside a species tree. The considered evolutionary model involves segmental events (i.e. acting on multiple genes) including duplications (D), losses (L), synteny fissions and transfers possibly going through unsampled or extinct species. Formally, given a set of syntenies in a set of genomes and a set G of consistent gene trees for the gene families composing the syntenies, the problem is to infer a most parsimonious evolutionary history explaining the observed gene trees and syntenies given a species tree. The problem is known to be NP-hard for the DL distance. FullSynesth is based on Synesth explicating the evolution of a set of syntenies given a single synteny tree, which can be obtained from G by selecting a given supertree. Rather than trying each supertree in turn, FullSynesth is based on a two-in-one approach simultaneously building and reconciling a synteny supertree. This algorithm runs in polynomial time for a fixed number of gene trees. We show on simulated datasets that FullSynesth significantly improves the running time of Synesth applied to each possible supertree. An implementation of the algorithm is available at: https://github.com/UdeM-LBIT/FullSynesth.
This paper introduces the target-constrained mixed graph cover (TMGC) problem. Given a graph with n vertices and m edges, where each element (vertex or edge) is assigned a cost and a weight, the goal is to select a minimum-cost subset of elements subject to the covering-target constraint that its covered weight – the total weight of the selected vertices, selected edges, and edges incident to the selected vertices – meets or exceeds a given threshold. The TMGC problem models real-world scenarios, such as optimizing the removal of facilities (represented by vertices) and roads (represented by edges) in a network, while ensuring the value of the remaining network (including the value of remaining facilities and their connecting roads) stays below a set limit. From a theoretical perspective, the TMGC model extends the weighted partial vertex cover problem in two significant ways: it incorporates covering weights for both edges and vertices, and it allows a direct selection of edges alongside vertices to satisfy the covering target. Despite this increased complexity and generality compared to (the partial version of) the classic vertex cover problem, we develop a 2-approximation primal-dual algorithm for TMGC that runs in O((n+m)log (n+m)) time. Notably, the ratio 2 aligns with the known lower bound for the simpler vertex cover problem. Moreover, when the algorithm is applied exclusively to vertex selections (i.e., assuming infinite edge costs), the runtime is reduced to O(nlog n+m) , matching the efficiency of the current fastest 2-approximation for vertex cover. Our technique extends to a variant of TMGC in which selected edges cover their end-vertices in addition to themselves. The primal-dual approach yields an approximation ratio equal to the graph’s maximum degree (or 2, if the maximum degree is smaller).