
Given a budget and an undirected graph with a cost and a profit function on the edges, the Edge Orienteering Problem asks for a closed walk in the graph that collects the most profit while the sum of costs does not exceed the budget. While the profit is collected only once per edge, the cost is incurred each time the edge is traversed by the walk. In this paper, we present a (4+ε)-approximation algorithm for the Edge Orienteering Problem.
Inspired by the FLIP stream cipher introduced by Méaux et al. at Eurocrypt 2016, Boolean functions with good cryptographic properties when their inputs are limited to specific subsets of F2n are well studied. Weightwise perfectly balanced (WPB) functions are a class of Boolean functions that remain balanced across all subsets of F2n with a fixed Hamming weight ranging from 1 to n−1. This paper introduces a class of novel iterative constructions of WPB functions based on a family of 2m-variable Boolean functions with degree 2d−1, which is also a WPB function for d=m. The obtained WPB functions have high algebraic degree, weightwise nonlinearity and algebraic immunity.
A k-tuple common substring (abbr. k-CSS) is a common subsequence of two or more strings including at most k common substrings. In this paper, we present an algorithm for finding a longest k-CSS of two strings of lengths m and n in O(kmn) time and O(m + kn) space. Using this algorithm as a subroutine, a longest k-CSS of two circular strings is retrieved in O(kmn2) time and O(m + kn) space. Extending the idea in this algorithm, a longest common subsequence with the minimum number of common substrings of two strings is retrieved in O(mn) time and O(m + n) space.
In this article we establish that imposing a minimum length for the runs of TimSort’s decomposition, as is always done in practice, makes its average-case complexity almost optimal, that is, asymptotically nlog2n+O(n) comparisons. Theoretically, we need the minimum length to depends on n, specifically it must be Ω(log n/log log n). In practice, however, the fixed threshold adopted in programming languages is sufficient for all realistic input sizes.
Efficient data structures for computing the cutset of a set of nodes in a graph undergoing dynamic edge insertions/deletions are well-studied in undirected graphs. We study this problem in directed graphs and show a reduction from the Online Boolean Matrix-Vector Multiplication Conjecture (OMv) introduced by Henzinger et al. [STOC’15]. We prove conditional on OMv that a dynamic data structure computing the directed cutset of a set of nodes cannot have an amortized time of both O(n2−ε) for a query operation and O(n1−ε) for an update operation, for any constant ε > 0, even when an adversary’s operations are restricted to the incremental or decremental settings. We further give algorithms to match these lower bounds.
In this paper, we prove that the odd-even transposition sort is size-optimal and depth-optimal among stable standard sorting networks. While the best known lower bound on the size of stable sorting networks with n inputs is 52(n log n), the odd-even transposition sort uses Theta(n2) comparators, leaving an asymptotic gap. Our result provides a partial resolution of this gap by establishing optimality within stable standard sorting networks, a restricted class of stable sorting networks in which all comparators have a consistent orientation. This result follows from a structural characterization of this class, showing that such networks can be reduced to primitive sorting networks up to the removal of redundant comparisons. The proof is elementary and relies on the 0-1 principle.
Since its introduction, Cocks’ identity-based encryption (IBE) scheme has long been believed to lack homomorphic properties because it relies on quadratic residues modulo a composite integer. Later such properties were highlighted but with the price of ciphertext expansion or re-randomization. In this paper, we show that Cocks’ IBE scheme has homomorphic properties that require neither ciphertext expansion nor re-randomization.
Lutz (1987) introduced resource-bounded category and showed the circuit size class SIZE(2n/n) is meager within ESPACE. Li (2024) established that the symmetric alternation class SE2 contains problems requiring circuits of size 2n/n. In this note, we extend resource-bounded category to SE2 by defining meagerness relative to single-valued FSP2 strategies in the Banach-Mazur game. We show that Li’s FSP2 algorithm for the Range Avoidance problem yields a winning strategy, proving that SIZE2n/n is meager in SE2. Consequently, languages requiring exponential-size circuits are comeager in SE2 : they are typical with respect to resource-bounded category.
Arboreal networks are multi-rooted phylogenetic networks whose underlying graph is a tree. We give an encoding of stack-free arboreal networks in terms of triplets and the novel concept of a duet. This yields a polynomial time algorithm to construct these networks from complete triplet and duet systems. The classification results show correctness and lead to a natural metric on these multi-rooted networks.
We study the common intersection of arrangements of double-wedges. We consider arrangements where double-wedges may be both bowties (which do not contain a vertical line) or hourglasses (which contain a vertical line), in contrast to earlier studies that focused on arrangements of only bowties. This generalization changes the setting drastically, in particular, with respect to all arguments involving the point-line duality. Namely, a point in the intersection of all double-wedges is equivalent to a line that stabs a set of segments A (corresponding to the bowties) while it avoids a different set of segments A (corresponding to the complement of the hourglasses). We show that in this general setting, the intersection of n double-wedges may consist of Omega(n(2)) interior-disjoint regions. Further, we discuss Gallai-type results for arrangements of segments and anti-segments, and we provide algorithms for computing the intersection of such arrangements with worst-case optimal running time. Finally, we also prove that we can find a single intersection point in almost optimal running time, assuming that 3SUM admits no truly subquadratic-time algorithm.
The k-regular sequences form a large class studied in number theory, combinatorics, and other parts of discrete mathematics. This class is known to be closed under many natural operations, such as term-by-term sum, product, running sum, and so forth, but it is not closed under running maximum. Proving the previously-known counterexample, involving the Stern sequence, required intricate arguments. In this note, we construct a significantly simpler example of a k-regular sequence whose running maximum is not k-regular.
We consider the problem of identifying an unknown number in the set [n] = {1, ... , n}, by asking queries of the form: "Is the unknown number greater than j E [n]?" If the answer to the query is YES, the algorithm incurs an integer cost a >= 0, if the answer to the query is No, the algorithm incurs an integer cost /i >= 0. The search algorithm must satisfy the hard constraint that it never incurs a cost greater than an input parameter D, for any possible sequence of queries. We present several scenarios in which this problem naturally arises. Assuming that the search space [n] is endowed with a probability distribution p = (p1, ..., pn), where pi is the probability that the unknown element is i E [n], we design an O(n2D)-time Dynamic Programming algorithm to construct an optimal search procedure, that is, a search algorithm that requires a minimum expected number of queries and satisfies the aforementioned hard constraint.
Conjunctive regular queries (CRQs) extend conjunctive regular path queries (CRPQs) by allowing path patterns defined through regular queries, a language that strictly generalizes regular path queries and underpins the recently published GQL standard. Despite their importance, little is known about how to derive tight output bounds for CRQs, which are crucial in the design of worst-case optimal algorithms. In this paper we extend the classical Atserias-Grohe-Marx (AGM) bound and the recent techniques for CRPQs to CRQs. We show that while the AGM approach provides general bounds, obtaining tight results requires refined information on the sets of nodes that can participate in the answers of regular queries. We introduce the use of derivation trees and marked nodes to capture this information, and show how they can be integrated into linear programs that yield tight bounds. We also provide lower bounds showing the optimality of our techniques. Our results strictly extend previous bounds for CRPQs, and offer new insights into the evaluation of richer query languages over graph databases.
This paper studies a parsing method for strings containing placeholders, each of which may be later replaced by a string derived from the corresponding nonterminal symbol. Such a method potentially applies to parallel/distributed parsing, parsing for templates, modular syntax definitions, and so on. This paper investigates whether the introduction of the placeholder preserves the class of the grammar and proves the following two facts. First, the class of LR(k)grammars is preserved if k >= 1 and every nonterminal derives at least one nonempty string; hence, we can apply the standard LR parsing algorithm for parsing strings with placeholders. Second, the class of LR(0) is not. These results extend the preceding study for the LL(1) grammars.
Semi-bent functions play an important role in coding theory, symmetric ciphers, and sequence designs. In this paper, by decomposing cubic Boolean functions and describing the two-to-one property of polynomials, we characterize a class of cubic polynomial semi-bent functions over C2 .
The problem of determining whether a given board of the puzzle Buttons & Scissors is solvable is known to be NP-complete. On the other hand, when the board is restricted to one dimension, it is known to be solvable in O(n3)-time for a board of size (length) n. This also holds when the button colors are limited to two colors. We provide a simple linear-time algorithm to determine whether an input of the Two-Color One-Dimensional Buttons & Scissors problem is solvable. The algorithm uses a necessary and sufficient condition after applying a linear-time preprocessing.
As the class T-4 of graphs of twin-width at most 4 contains every finite subgraph of the infinite grid and every graph obtained by subdividing each edge of an n-vertex graph at least 2 log n times, most NP-hard graph problems, like MAX INDEPENDENT SET, DOMINATING SET, HAMILTONIAN CYCLE, remain so on T-4. However, MIN COLORING and k-COLORING are easy on both families because they are 2-colorable and 3-colorable, respectively. We show that MIN COLORING is NP-hard on the class T-3 of graphs of twin-width at most 3. This is the first hardness result on T-3 for a problem that is easy on cographs (twin-width 0), on trees (whose twin-width is at most 2), and on unit circular-arc graphs (whose twin-width is at most 3). We also show that for every k> 3, k-COLORING is NP-hard on T-4. We finally make two observations: (1) there are currently very few problems known to be in P on T-d (graphs of twin-width at most d and NP-hard on Td+1 for some nonnegative integer d, and (2) unlike T-4, which contains every graph as an induced minor, the class T-3 excludes a fixed planar graph as an induced minor; thus it may be viewed as a special case (or potential counterexample) for conjectures about classes excluding a (planar) induced minor. These observations are accompanied by several open questions.
Given a directed graph G and two of its vertices s and t, the EvenPath problem is to find an even-length path from s to t. The decision version of EvenPath problem for general directed graphs was shown to be NP-complete by LaPaugh and Papadimitriou [1]. Thus, it makes sense to discover the classes of graphs for which the EvenPath problem can be solved efficiently. The EvenPath problem for directed planar graphs and directed single-crossing-minor-free graphs is known to be solvable in polynomial-time [2, 3]. In our work, we extend the classes of graphs for which the EvenPath problem can be solved in polynomial-time to directed single-crossing graphs. Our polynomial-time algorithm essentially reduces the EvenPath problem for a directed single-crossing graph to several instances of the EvenPath problem and 3-DisjointPaths problem for directed planar graphs.
We present generalized approach to the proof of the lower bound for unburnt pancake sorting problem, where we search for the number f (n) of prefix reversals required to sort a stack (permutation) of n pancakes. For this purpose we introduce a new concept of guarded pancake blocks. Gates and Papadimitriou proved that f (n) >= 17n/16 for n a multiple of 16. Heydari and Sudborough improved this bound to f (n) >= 15n/14 for n a multiple of 14. We extend that result to f (n) >= & LeftFloor;(15n + 9)/14 & RightFloor; for every n >= 6.