Search arXiv⌕ Search

arXiv subjects

Alexandru Popa

Publications and source records attributed to Alexandru Popa.

At least 19 recordsLinked to original sources

Structural Complexity of Matching-Match: Dense and Sparse Graphs

The Matching-Match puzzle asks whether the vertices of a fixed graph can be colored so that the multiset of color pairs induced by its edges is exactly a prescribed multiset. We study how the complexity of this realization problem depends on the host graph. On the dense side, we give a polynomial-time algorithm for complete $k$-partite graphs for every fixed number $k$ of parts, with arbitrary precoloring and an arbitrary number of colors. We prove a sharp complement-degree threshold: the problem is polynomial-time solvable when $Δ(\overline G)\le1$, but NP-complete on completely uncolored graphs already when $Δ(\overline G)=2$. This yields a dichotomy for uniform complete multipartite graphs, and connected diameter two already suffices for NP-completeness. We also prove W[1]-hardness on cographs parameterized by the number of colors. On the sparse side, completely uncolored paths and cycles admit a linear-time characterization by Euler trails and circuits, while counting feasible colorings is $\#P$-complete on both classes. Counting is nevertheless polynomial-time solvable on stars and complete graphs, even with arbitrary precoloring. A decomposition-transfer theorem yields NP-completeness already at tree-depth two. A separate path-decomposition reduction gives a maximum-degree threshold between one and two for completely uncolored disconnected host graphs with unrestrictedly many colors. Components with at most two edges are tractable, while a disjoint union of $P_4$'s is NP-complete. Finally, precoloring restores tractability in several cases: star forests are polynomial when every center is precolored, and two broad precoloring regimes on length-two spiders are polynomial even when the number of colors is unbounded.

cs.DS↗

Strong NP-Completeness of Unrestricted Balanced Mobiles

A mobile is a rooted full binary tree whose leaves carry positive integer weights. The imbalance of an internal node is the absolute difference between the total weights of its two child subtrees, and the cost of the mobile is the sum of these imbalances. In the unrestricted \emph{Balanced Mobiles} problem, only the multiset of leaf weights is given: both the tree topology and the placement of the weights must be chosen so as to minimize the cost. The computational complexity of this unrestricted variant has remained open, although the variant with a prescribed topology is strongly NP-hard. We close this gap by proving that the decision version of unrestricted Balanced Mobiles is strongly NP-complete. Our reduction from Numerical 3-Dimensional Matching with Distinct Integers uses three widely separated numerical scales. Tight telescoping bounds force every threshold-achieving mobile into a canonical hierarchy, after which pairwise distinctness of the source integers collapses the hierarchy to single triples from which a valid numerical matching can be recovered.

cs.CC↗

An Approximation Algorithm for Non-uniform Non-contiguous Translocation Distance

Translocations are genome rearrangement operations that exchange prefixes of two chromosomes. We study the non-uniform non-contiguous translocation distance problem, where every string produced during the computation remains available for reuse. Given an initial set of strings $A$ and a target set $B$, the objective is to produce all strings in $B$ using as few translocations as possible. We present the first polynomial-time approximation algorithm for this problem. For a single target string of length $n$, we obtain an $O(\log n)$-approximation, and we extend the result to arbitrary finite target sets with an $O(\log N)$-approximation, where $N$ is the total length of the targets not already present in the initial set. This resolves the approximability question for the non-uniform non-contiguous case left open by Constantin and Popa (TCS 2025).

cs.DS↗

NP-Hardness and a Fixed-Parameter Algorithm for Translocation Distance

In this paper we study the genome rearrangements done by translocation events. Genome rearrangements were used to measure evolutionary distance between organisms since 1936 (Dobzhansky and Sturtevant). The chromosomes are represented as strings of DNA and the \emph{translocation operation} is defined as the exchange of prefixes between two strings. This operation results in the creation of two new strings (chromosomes) that can then be utilized in subsequent translocations. A translocation is referred to as \emph{contiguous} if the new strings are produced in a single copy, so each of them can be used in only one subsequent operation. When the words produced by a translocation operation are considered to have an infinite number of copies, the translocation is referred to as \emph{non-contiguous}. If the exchanged prefixes are of equal length, the translocation is called \emph{uniform}. Otherwise, the translocation is termed \emph{non-uniform}. The \emph{translocation distance} between two sets of strings, termed the input set and the target set, represents the minimum number of translocations necessary to obtain all the strings in the target set via translocation operations. We prove that both the non-uniform contiguous and the non-uniform non-contiguous translocation distance problems are NP-hard over arbitrary finite alphabets, where the alphabet is part of the input. For the case in which the target set consists of a single string, we give a fixed-parameter tractable algorithm parameterized by the length of the target string.

cs.DS↗

Towards Optimal Prefix-Free Graph Construction: NP-Hardness and Structural Insights

Prefix-free parsing provides an efficient way to construct compressed representations of large and repetitive pangenomes and naturally induces a graph representation known as a prefix-free graph. In this work, we initiate a theoretical study of the problem of constructing prefix-free graphs of minimum size, where the size accounts for both the total length of distinct segment labels and the paths representing the input sequences. We show that selecting an optimal set of trigger words is NP-hard, already when triggers consist of single characters. Using a synchronized-code reduction, we extend this hardness result to every fixed trigger length and further show that the problem remains NP-hard over an alphabet of size three. We then establish a structural connection between prefix-free graphs and de Bruijn graphs. In particular, we show that every compacted de Bruijn graph can be realized as a prefix-free graph and derive a hierarchy relating the sizes of minimum pangenomic graphs, minimum prefix-free graphs, compacted de Bruijn graphs, and de Bruijn graphs. Finally, we give an exact fixed-parameter algorithm running in $O(2^q n)$ time, where $q$ is the number of distinct candidate trigger words and $n$ is the total pangenome length. Our results characterize both the computational limitations and the structural properties of optimizing prefix-free graph representations and provide a theoretical foundation for the design of compact graph representations of repetitive pangenomic data.

cs.CC↗

Colored Interaction-Profile Realization: Complexity of Matching-Match on Spiders

Network motifs and colored local interaction patterns provide a useful way to describe the structure of complex networks. Motivated by an inverse realization perspective, we study the problem of assigning colors to the vertices of a fixed graph so that its edges realize a prescribed multiset of colored pairwise interactions. This problem is formalized by the Matching-Match Puzzle, introduced by Iburi and Uehara. We investigate how its computational complexity depends on the number of colors and on the structure of the host graph. We first prove that Matching-Match is NP-complete with only two colors, even when no vertex is precolored and the graph has maximum degree three. We then focus on spiders. We show that the problem is W[1]-hard parameterized by the number of colors even on spiders with only the body precolored. In contrast, for spiders whose legs have length at most two, we give a fixed-parameter tractable algorithm parameterized by the number of colors, allowing arbitrary precoloring. Finally, we prove NP-completeness for spiders whose legs all have length exactly three when precoloring is allowed.

cs.DS↗

Maximum Matching-Match: Hardness and Approximation

In this paper, we study \textsc{MaxMMP}, an optimization variant of the Matching-Match Puzzle introduced by Iburi and Uehara (FUN 2024). Given a graph, a partial vertex coloring, and a multiset of colored sticks, the goal is to complete the coloring and assign the sticks to graph edges so as to maximize the number of satisfied edges. We first prove that \textsc{MaxMMP} is APX-hard by an reduction from \textsc{Max-Cut}. The hardness already holds with two colors, no precolored vertices, and only bichromatic sticks. We then give a simple deterministic $\frac{2}{c(c+1)}$-approximation for completely uncolored instances, improving to $\frac{2}{c(c-1)}$ when all sticks are bichromatic. Next, we obtain a randomized $\frac{1-\frac{1}{e}}{2c}$-approximation for arbitrary instances with $c$ colors by reducing the remaining coloring choices to monotone submodular maximization under a partition matroid. On bipartite graphs, the approximation ratio improves to $\frac{1-\frac{1}{e}}{c}$. For every fixed $c$, we further obtain deterministic $\frac{1}{2c}$ and $\frac{1}{c}$-approximations on general and bipartite graphs, respectively, in time $n^{O(c^2)}$. Finally, for every fixed number of colors, we show that \textsc{MaxMMP} can be solved exactly in time $n^{O(c^2)}$ on trees and on cographs.

cs.DS↗

Complexity and Algorithms for Unary Translocation Distance

Given a finite set of integers $A$, a \emph{unary translocation} produces a new set $A' = A \cup \{u,v\}$, where $u$ and $v$ are nonnegative integers satisfying $x+y=u+v$ for some $x,y\in A$. For an input set $A$ and a target set $B$, the \emph{unary translocation distance} is the minimum number of unary translocations required to obtain a superset containing $B$. In this paper, we study this problem from both theoretical and computational perspectives. We prove that computing the unary translocation distance is strongly NP-hard, thereby answering an open question raised by \citet{ConstantinMiclausPopa2026UnaryTranslocation}. On the positive side, we give an exact pseudo-polynomial algorithm for every fixed constant value of $|B|$, extending our previous results for $|B|\leq 2$. For arbitrary target sets, we present a $2$-approximation algorithm, an additive $(|B|-1)$-approximation algorithm, and show that the additive algorithm also yields a $3$-approximation. We also propose parameterized algorithms, including algorithms parameterized by the maximum value in the input set together with the optimum distance, and by the maximum value in the target set together with $|B|$. In addition, we propose an integer linear programming formulation that gives an exact mathematical model for the problem, analyze its size, and show that the LP relaxation has integrality gap at least $\frac{4}{3}$. Finally, we report computational experiments comparing the $2$-approximation algorithm, beam search, and simulated annealing. The results show that the approximation algorithm is highly effective in practice and often outperforms the heuristic baselines.

cs.DS↗

Optimal Portfolio Compression for Priority-Proportional Clearing with Defaulting Costs

We study financial networks where banks are connected through bilateral liabilities and may default when resources are insufficient to meet obligations. We consider both the standard proportional clearing model and a priority-proportional clearing model in which banks repay creditors according to exogenously given priority classes. In such markets, portfolio compression is a process where several banks come to a netting arrangement which reduces liabilities without changing any bank's net exposure, essentially removing cycles of debt. Our goal is to understand whether portfolio compression schemes can be designed to improve clearing outcomes for a large fraction of banks. We provide a computational characterization of the benefits and limitations of compression. On the positive side, we give a polynomial-time algorithm to compute a maximal clearing outcome under priority-proportional clearing, and we show that it is possible to decide in polynomial time whether there exists a compression that limits defaults to at most one bank. On the negative side, we show that several natural optimization and decision problems are computationally intractable: deciding whether some compression can reduce the number of defaulting banks below a given threshold, or whether a specific bank can be saved from defaulting, is $\NP$-hard even in restricted settings and under proportional clearing. We further present a mixed integer linear programming (MILP) formulation that computes a compression maximizing the number of non-defaulting banks, providing a practical approach to this hard problem. Using our MILP formulation, we perform simulations on both synthetic and real-world datasets to analyze the effects of portfolio compression.

cs.GT↗

Approximating Maximum Edge 2-Coloring by Normalizing Graphs

In a simple, undirected graph G, an edge 2-coloring is a coloring of the edges such that no vertex is incident to edges with more than 2 distinct colors. The problem maximum edge 2-coloring (ME2C) is to find an edge 2-coloring in a graph G with the goal to maximize the number of colors. For a relevant graph class, ME2C models anti-Ramsey numbers and it was considered in network applications. For the problem a 2-approximation algorithm is known, and if the input graph has a perfect matching, the same algorithm has been shown to have a performance guarantee of 5/3. It is known that ME2C is APX-hard and that it is UG-hard to obtain an approximation ratio better than 1.5. We show that if the input graph has a perfect matching, there is a polynomial time 1.625-approximation and if the graph is claw-free or if the maximum degree of the input graph is at most three (i.e., the graph is subcubic), there is a polynomial time 1.5-approximation algorithm for ME2C

cs.DM↗

Approximate and exact results for the harmonious chromatic number

Graph colorings is a fundamental topic in graph theory that require an assignment of labels (or colors) to vertices or edges subject to various constraints. We focus on the harmonious coloring of a graph, which is a proper vertex coloring such that for every two distinct colors i, j at most one pair of adjacent vertices are colored with i and j. This type of coloring is edge-distinguishing and has potential applications in transportation network, computer network, airway network system. The results presented in this paper fall into two categories: in the first part of the paper we are concerned with the computational aspects of finding a minimum harmonious coloring and in the second part we determine the exact value of the harmonious chromatic number for some particular graphs and classes of graphs. More precisely, in the first part we show that finding a minimum harmonious coloring for arbitrary graphs is APX-hard, the natural greedy algorithm is a $Ω(\sqrt{n})$-approximation, and, moreover, we show a relationship between the vertex cover and the harmonious chromatic number. In the second part we determine the exact value of the harmonious chromatic number for all 3-regular planar graphs of diameter 3, some non-planar regular graphs and cycle-related graphs.

cs.DM↗

A novel algorithm for clearing financial obligations between companies -- an application within the Romanian Ministry of Economy

The concept of clearing or netting, as defined in the glossaries of European Central Bank, has a great impact on the economy of a country influencing the exchanges and the interactions between companies. On short, netting refers to an alternative to the usual way in which the companies make the payments to each other: it is an agreement in which each party sets off amounts it owes against amounts owed to it. Based on the amounts two or more parties owe between them, the payment is substituted by a direct settlement. In this paper we introduce a set of graph algorithms which provide optimal netting solutions for the scale of a country economy. The set of algorithms computes results in an efficient time and is tested on invoice data provided by the Romanian Ministry of Economy. Our results show that classical graph algorithms are still capable of solving very important modern problems.

cs.DS↗

Complexity of Computing the Anti-Ramsey Numbers for Paths

The anti-Ramsey numbers are a fundamental notion in graph theory, introduced in 1978, by Erd\" os, Simonovits and S\' os. For given graphs $G$ and $H$ the \emph{anti-Ramsey number} $\textrm{ar}(G,H)$ is defined to be the maximum number $k$ such that there exists an assignment of $k$ colors to the edges of $G$ in which every copy of $H$ in $G$ has at least two edges with the same color. There are works on the computational complexity of the problem when $H$ is a star. Along this line of research, we study the complexity of computing the anti-Ramsey number $\textrm{ar}(G,P_k)$, where $P_k$ is a path of length $k$. First, we observe that when $k = Ω(n)$, the problem is hard; hence, the challenging part is the computational complexity of the problem when $k$ is a fixed constant. We provide a characterization of the problem for paths of constant length. Our first main contribution is to prove that computing $\textrm{ar}(G,P_k)$ for every integer $k>2$ is NP-hard. We obtain this by providing several structural properties of such coloring in graphs. We investigate further and show that approximating $\textrm{ar}(G,P_3)$ to a factor of $n^{-1/2 - ε}$ is hard already in $3$-partite graphs, unless P=NP. We also study the exact complexity of the precolored version and show that there is no subexponential algorithm for the problem unless ETH fails for any fixed constant $k$. Given the hardness of approximation and parametrization of the problem, it is natural to study the problem on restricted graph families. We introduce the notion of color connected coloring and employing this structural property. We obtain a linear time algorithm to compute $\textrm{ar}(G,P_k)$, for every integer $k$, when the host graph, $G$, is a tree.

cs.CC↗

A decision support system for optimizing the cost of social distancing in order to stop the spread of COVID-19

Currently there are many attempts around the world to use computers, smartphones, tablets and other electronic devices in order to stop the spread of COVID-19. Most of these attempts focus on collecting information about infected people, in order to help healthy people avoid contact with them. However, social distancing decisions are still taken by the governments empirically. That is, the authorities do not have an automated tool to recommend which decisions to make in order to maximize social distancing and to minimize the impact for the economy. In this paper we address the aforementioned problem and we design an algorithm that provides social distancing methods (i.e., what schools, shops, factories, etc. to close) that are efficient (i.e., that help reduce the spread of the virus) and have low impact on the economy. On short: a) we propose several models (i.e., combinatorial optimization problems); b) we show some theoretical results regarding the computational complexity of the formulated problems; c) we give an algorithm for the most complex of the previously formulated problems; d) we implement and test our algorithm; and e) we show an integer linear program formulation for our problem.

cs.SI↗

An output-sensitive algorithm for the minimization of 2-dimensional String Covers

String covers are a powerful tool for analyzing the quasi-periodicity of 1-dimensional data and find applications in automata theory, computational biology, coding and the analysis of transactional data. A \emph{cover} of a string $T$ is a string $C$ for which every letter of $T$ lies within some occurrence of $C$. String covers have been generalized in many ways, leading to \emph{k-covers}, \emph{$λ$-covers}, \emph{approximate covers} and were studied in different contexts such as \emph{indeterminate strings}. In this paper we generalize string covers to the context of 2-dimensional data, such as images. We show how they can be used for the extraction of textures from images and identification of primitive cells in lattice data. This has interesting applications in image compression, procedural terrain generation and crystallography.

cs.DS↗

IP Solutions for International Kidney Exchange Programmes

In kidney exchange programmes patients with end-stage renal failure may exchange their willing, but incompatible living donors among each other. National kidney exchange programmes are in operation in ten European countries, and some of them have already conducted international exchanges through regulated collaborations. The exchanges are selected by conducting regular matching runs (typically every three months) according to well-defined constraints and optimisation criteria, which may differ across countries. In this work we give integer programming formulations for solving international kidney exchange problems, where the optimisation goals and constraints may be different in the participating countries and various feasibility criteria may apply for the international cycles and chains. We also conduct simulations showing the long-run effects of international collaborations for different pools and under various national restrictions and objectives.

math.OC↗

Heuristic algorithms for the Longest Filled Common Subsequence Problem

At CPM 2017, Castelli et al. define and study a new variant of the Longest Common Subsequence Problem, termed the Longest Filled Common Subsequence Problem (LFCS). For the LFCS problem, the input consists of two strings $A$ and $B$ and a multiset of characters $\mathcal{M}$. The goal is to insert the characters from $\mathcal{M}$ into the string $B$, thus obtaining a new string $B^*$, such that the Longest Common Subsequence (LCS) between $A$ and $B^*$ is maximized. Casteli et al. show that the problem is NP-hard and provide a 3/5-approximation algorithm for the problem. In this paper we study the problem from the experimental point of view. We introduce, implement and test new heuristic algorithms and compare them with the approximation algorithm of Casteli et al. Moreover, we introduce an Integer Linear Program (ILP) model for the problem and we use the state of the art ILP solver, Gurobi, to obtain exact solution for moderate sized instances.

cs.DS↗

NewsCompare - a novel application for detecting news influence in a country

The concept of `fake news' has been referenced and thrown around in news reports so much in recent years that it has become a news topic in its own right. At its core, it poses a chilling question -- what do we do if our worldview is fundamentally wrong? Even if internally consistent, what if it does not match the real world? Are our beliefs justified, or could we become indoctrinated from living in a `bubble'? If the latter is true, how could we even test the limits of said bubble from within its confines? We propose a new method to augment the process of identifying fake news, by speeding up and automating the more cumbersome and time-consuming tasks involved. Our application, NewsCompare takes any list of target websites as input (news-related in our use case, but otherwise not restricted), visits them in parallel and retrieves any text content found within. Web pages are subsequently compared to each other, and similarities are tentatively pointed out. These results can be manually verified in order to determine which websites tend to draw inspiration from one another. The data gathered on every intermediate step can be queried and analyzed separately, and most notably we already use the set of hyperlinks to and from the various websites we encounter to paint a sort of `map' of that particular slice of the web. This map can then be cross-referenced and further strengthen the conclusion that a particular grouping of sites with strong links to each other, and posting similar content, are likely to share the same allegiance. We run our application on the Romanian news websites and we draw several interesting observations.

cs.SI↗