Papers by Péter Madarasi
13 paper(s) by this author
· All BibTeX
Proper $\{a,b\}$-edge-weightings of trees
Let $a$ and $b$ be distinct real weights. An $\{a,b\}$-edge-weighting of a tree assigns one of these weights to each edge and is proper if adjacent vertices have different sums of incident edge weights. For every such pair, we give an explicit structural characterization of the trees that do not admit a proper $\{a,b\}$-edge-weighting. If $ab(a+b)\neq0$, then $K_2$ is the only tree without such a weighting. If $a+b=0$, then a tree has no proper $\{a,b\}$-edge-weighting exactly when every vertex has degree $1$ or $3$ and the subgraph induced by the degree-$3$ vertices has a perfect matching. For the remaining case $ab=0$, form the spanning forest consisting of the edges whose deletion leaves two odd-order components. A tree $T$ has no proper $\{a,b\}$-edge-weighting exactly when both bipartition classes have odd order and every component of this forest satisfies two conditions. First, every component satisfies the preceding degree-and-matching condition. Second, within each component, the degree of a vertex $v$ in the forest plus twice the number of incident edges $e$ outside the forest for which the component of $T-e$ not containing $v$ has an odd number of vertices from each bipartition class is independent of $v$. For every fixed pair of distinct real weights, the proofs yield a linear-time algorithm that decides whether a proper $\{a,b\}$-edge-weighting exists and constructs one when it does.
The Complexity of Kemeny Aggregation with Three Rankings
The Kemeny rule aggregates rankings by minimizing their total Kendall-tau distance from an aggregate order. We prove that Kemeny Score is NP-complete for exactly three unweighted rankings, even when every candidate pair is split $2$-to-$1$. On the same profiles, the winner, unique-winner, and possible- and necessary-precedence problems are $Θ_2^p$-complete, while recognizing a Kemeny-optimal or uniquely Kemeny-optimal aggregate is coNP-complete. The hard instances induce tournaments of majority dimension exactly $3$. The reduction also determines the exact maximum-cut value from the optimal Kemeny score and recovers a maximum cut from any Kemeny-optimal aggregate. For every fixed $q\geq3$ and $\lceil q/2\rceil\leq s\leq q$, minimum pairwise support $s$ yields a sharp dichotomy: the score problem is NP-complete, the winner and precedence problems are $Θ_2^p$-complete, and the recognition problems are coNP-complete when $3s\leq2q$; for $3s>2q$, the majority tournament is transitive and its unique topological order is the unique Kemeny-optimal aggregate. Exact support $s$ suffices in the hard case when $s>q/2$, and supports in ${s,s+1}$ suffice when $s=q/2$. These results give complete fixed-profile-size classifications and transfer to Slater orders, permutation medians, and maximum-likelihood central rankings in the Mallows model. Finally, a six-copy construction proves NP-completeness of both Kemeny Score and Kendall--Tau Center for three pairwise-equidistant rankings that still split every pair $2$-to-$1$. For $N$ output candidates, their common distance is $\frac23\binom N2$, the largest possible for an equidistant triple. The construction gives affine formulas for both optimal values, characterizes all Kemeny-optimal output orders, and shows that the output has a unique Kemeny-optimal order and a unique center exactly when the input has a unique Kemeny-optimal order.
Temporal matching in trees
We study maximum matching problems in temporal graphs whose underlying graph is a tree. We consider two temporal models. In a $Δ$-matching, selected time edges sharing an endpoint must have time ticks differing by at least $Δ$. In a $γ$-matching, the selected objects are blocks of $γ$ consecutive appearances of the same underlying edge. We also consider the related ordered static problem of $d$-distance matchings.
We show that maximum $Δ$-matching remains NP-hard on temporal trees for every $Δ\geq 2$, even in the sparse case where each edge appears at most twice. Using a reduction between the temporal models, we obtain the analogous result for maximum $γ$-matching on temporal trees, even when each edge admits at most two $γ$-edges. We also show, via a reduction from $d$-distance matching, that maximum $γ$-matching is APX-hard even when the underlying graph is bipartite.
Complementing these hardness results, we identify several tractable cases. We prove that maximum $Δ$-matching is polynomial-time solvable on temporal trees in which every edge appears exactly once, and that maximum $γ$-matching is polynomial-time solvable when each edge admits at most one $γ$-edge. We also give dynamic-programming algorithms under bounded local-use and local-sparsity assumptions, and derive polynomial-time solvability of maximum $d$-distance matching when the input bipartite graph is a tree. Finally, we prove that both maximum $Δ$-matching and maximum $γ$-matching admit polynomial-time approximation schemes on temporal trees.
Asymptotically faster algorithms for recognizing $(k,\ell)$-sparse graphs
The family of $(k,\ell)$-sparse graphs, introduced by Lorea, plays a central role in combinatorial optimization and has a wide range of applications, particularly in rigidity theory. A key algorithmic problem is to decide whether a given graph is $(k,\ell)$-sparse and, if not, to produce a vertex set certifying the failure of sparsity. While pebble game algorithms have long yielded $O(n^2)$-time recognition throughout the classical range $0 \leq \ell < 2k$, and $O(n^3)$-time algorithms in the extended range $2k \leq \ell < 3k$, substantially faster bounds were previously known only in a few special cases.
We present new recognition algorithms for the parameter ranges $0 \le \ell \le k$, $k < \ell < 2k$, and $2k \leq \ell < 3k$. Our approach combines bounded-indegree orientations, reductions to rooted arc-connectivity, augmenting-path techniques, and a divide-and-conquer method based on centroid decomposition. This yields the first subquadratic, and in fact near-linear-time, recognition algorithms throughout the classical range when instantiated with the fastest currently available subroutines. Under purely combinatorial implementations, the running times become $O(n\sqrt n)$ for $0 \leq \ell \leq k$ and $O(n\sqrt{n\log n})$ for $k< \ell <2k$. For $2k \leq \ell < 3k$, we obtain an $O(n^2)$-time algorithm when $\ell \leq 2k+1$ and an $O(n^2\log n)$-time algorithm otherwise. In each case, the algorithm can also return an explicit violating set certifying that the input graph is not $(k,\ell)$-sparse.
Polytopes of alternating sign matrices with dihedral-subgroup symmetry
We investigate the convex hulls of the eight dihedral symmetry classes of $n \times n$ alternating sign matrices, i.e., ASMs invariant under a subgroup of the symmetry group of the square. Extending the prefix-sum description of the ASM polytope, we develop a uniform core--assembly framework: each symmetry class is encoded by a set of core positions and an affine assembly map that reconstructs the full matrix from its core. This reduction transfers polyhedral questions to lower-dimensional core polytopes, which are better suited to the tool set of polyhedral combinatorics, while retaining complete information about the original symmetry class. For the vertical, vertical--horizontal, half-turn, diagonal, diagonal--antidiagonal, and total symmetry classes, we give explicit polynomial-size linear inequality descriptions of the associated polytopes. In these cases, we also determine the dimension and provide facet descriptions. The quarter-turn symmetry class behaves differently: the natural relaxation admits fractional vertices, and we need to extend the system with a structured family of parity-type Chvátal--Gomory inequalities to obtain the quarter-turn symmetric ASM polytope. Our framework leads to efficient algorithms for computing minimum-cost ASMs in each symmetry class and provides a direct link between the combinatorics of symmetric ASMs and tools from polyhedral combinatorics and combinatorial optimization.
Quadratic-Time Algorithm for the Maximum-Weight $(k, \ell)$-Sparse Subgraph Problem
The family of $(k, \ell)$-sparse graphs, introduced by Lorea, plays a central role in combinatorial optimization and has a wide range of applications, particularly in rigidity theory. A key algorithmic challenge is to compute a maximum-weight $(k, \ell)$-sparse subgraph of a given edge-weighted graph. Although prior approaches have long provided an $O(nm)$-time solution, a previously proposed $O(n^2 + m)$ method was based on an incorrect analysis, leaving open whether this bound is achievable.
We answer this question affirmatively by presenting the first $O(n^2 + m)$-time algorithm for computing a maximum-weight $(k, \ell)$-sparse subgraph, which combines an efficient data structure with a refined analysis. This quadratic-time algorithm enables faster solutions to key problems in rigidity theory, including computing minimum-weight redundantly rigid and globally rigid subgraphs. Further applications include enumerating non-crossing minimally rigid frameworks and recognizing kinematic joints. Our implementation of the proposed algorithm is publicly available online.
Efficient Algorithms and Implementations for Extracting Maximum-Size $(k,\ell)$-Sparse Subgraphs
A multigraph $G = (V, E)$ is $(k, \ell)$-sparse if every subset $X \subseteq V$ induces at most $\max\{k|X| - \ell, 0\}$ edges. Finding a maximum-size $(k, \ell)$-sparse subgraph is a classical problem in rigidity theory and combinatorial optimization, with known polynomial-time algorithms. This paper presents a highly efficient and flexible implementation of an augmenting path method, enhanced with a range of powerful practical heuristics that significantly reduce running time while preserving optimality. These heuristics $\unicode{x2013}$ including edge-ordering, node-ordering, two-phase strategies, and pseudoforest-based initialization $\unicode{x2013}$ steer the algorithm toward accepting more edges early in the execution and avoiding costly augmentations. A comprehensive experimental evaluation on both synthetic and real-world graphs demonstrates that our implementation outperforms existing tools by several orders of magnitude. We also propose an asymptotically faster algorithm for extracting an inclusion-wise maximal $(k,2k)$-sparse subgraph with the sparsity condition required only for node sets of size at least three, which is particularly relevant to 3D rigidity when $k = 3$. We provide a carefully engineered implementation, which is publicly available online and is proposed for inclusion in the LEMON graph library.
Separable convex optimization over indegree polytopes
We study egalitarian (acyclic) orientations of undirected graphs under indegree-based objectives, such as minimizing the $\varphi$-sum of indegrees for a strictly convex function $\varphi$, decreasing minimization (dec-min), and increasing maximization (inc-max). In the non-acyclic setting of Frank and Murota (2022), a single orientation simultaneously optimizes these three objectives, however, restricting to acyclic orientations confines us to the corners of the indegree polytope, where these fairness objectives do diverge. We establish strong hardness results across a broad range of settings: minimizing the $\varphi$-sum of indegrees is NP-hard for every discrete strictly convex function $\varphi$; dec-min and inc-max are NP-hard for every indegree bound $k \geq 2$, as well as without a bound; and the complementary inc-min and dec-max problems are NP-hard even on $3$-regular graphs. On the algorithmic side, we give a polynomial-time algorithm for minimizing the maximum weighted indegree via a weighted smallest-last ordering. We also provide an exact exponential-time algorithm for minimizing general separable discrete convex objectives over indegrees, and a polynomial-time algorithm for the non-acyclic case. Finally, for maximizing the sum of the products of indegrees and outdegrees, we prove NP-hardness on graphs of maximum degree $4$, give an algorithm for maximum degree $3$, and provide a $3$-approximation algorithm. Our results delineate the algorithmic frontier of convex integral optimization over indegree (base-)polytopes, and highlight both theoretical consequences and practical implications, notably for scheduling and deadlock-free routing.
Vertex-ordering and arc-partitioning problems
We study vertex-ordering problems in loop-free digraphs subject to constraints on the left-going arcs, focusing on existence conditions and computational complexity. As an intriguing special case, we explore vertex-specific lower and upper bounds on the left-outdegrees and right-indegrees. We show, for example, that deciding whether the left-going arcs can form an in-branching is solvable in polynomial time and provide a necessary and sufficient condition, while the analogous problem for an in-arborescence turns out to be NP-complete. We also consider a weighted variant that enforces vertex-specific lower and upper bounds on the weighted left-outdegrees, which is particularly relevant in applications. Furthermore, we investigate the connection between ordering problems and their arc-partitioning counterparts, where one seeks to partition the arcs into a subgraph from a specific digraph family and an acyclic subgraph -- equivalently, one seeks to cover all directed cycles with a subgraph belonging to a specific family. For the family of in-branchings, unions of disjoint dipaths, and matchings, the two formulations coincide, whereas for in-arborescences, dipaths, Hamiltonian dipaths, and perfect matchings the formulations diverge. Our results yield a comprehensive complexity landscape, unify diverse special cases and variants, clarify the algorithmic boundaries of ordered digraphs, and relate them to broader topics including graph degeneracy, acyclic orientations, influence propagation, and rank aggregation.
Prefix-bounded matrices
By unifying various earlier extensions of alternating sign matrices (ASMs), we introduce the notion of prefix-bounded matrices (PBMs). It is shown that the convex hull of these matrices forms the intersection of two special generalized polymatroids. This implies $\unicode{x2013}$ in a more general form $\unicode{x2013}$ that the linear inequality system given by Behrend and Knight (2007) and by Striker (2007, 2009) for describing the polytope of alternating sign matrices is totally dual integral (TDI), confirming a recent conjecture of Edmonds (2024, 2025). By relying on the polymatroidal approach, we derive a characterization for the existence of prefix-bounded matrices meeting lower and upper bounds on their entries. Furthermore, we point out that the constraint matrix of the linear system describing the convex hull of PBMs, in particular ASMs, is a network matrix. This implies that (a) standard network-flow techniques can be used to manage algorithmically optimization and structural results on PBMs obtained via g-polymatroids, (b) the linear system is actually box-TDI, and (c) the convex hull of PBMs admits a sharpened form of the integer Carathéodory property, in particular, the integer decomposition property. This latter feature makes it possible to confirm an extended form of an elegant conjecture of Brualdi and Dahl (2023) on the decomposability of a so-called $k$-regular alternating sign matrix as the sum of $k$ pattern-disjoint ASMs.
A graph isomorphism invariant based on neighborhood aggregation
This paper presents a new graph isomorphism invariant, called $\mathfrak{w}$-labeling, that can be used to design a polynomial-time algorithm for solving the graph isomorphism problem for various graph classes. For example, all non-cospectral graph pairs are distinguished by the proposed combinatorial method, furthermore, even non-isomorphic cospectral graphs can be distinguished assuming certain properties of their eigenspaces.
We also investigate a refinement of the aforementioned labeling, called $\mathfrak{s}^k$-labeling, which has both theoretical and practical applications. Among others, it can be used to generate graph fingerprints, which uniquely identify all graphs in the considered databases, including all strongly regular graphs on at most 64 nodes and all graphs on at most 12 nodes. It provably identifies all trees and 3-connected planar graphs up to isomorphism, which -- as a byproduct -- gives a new isomorphism algorithm for both graph classes. The practical importance of this fingerprint lies in significantly speeding up searching in graph databases, which is a commonly required task in biological and chemical applications.
The Ramsey number of a long cycle and complete graphs
In this paper, we prove that the multicolored Ramsey number $R(G_1,\dots,G_n,K_{n_1},\dots,K_{n_r})$ is at least $(γ-1)(κ-1)+1$ for arbitrary connected graphs $G_1,\dots,G_n$ and $n_1,\dots,n_r\in\mathbb{N}$, where $γ=R(G_1,\dots,G_n)$ and $κ=R(K_{n_1},\dots,K_{n_r})$. Erd\H os at al. conjectured that $R(C_n,K_l)=(n-1)(l-1)+1$ for every $n\geq l\geq 3$ except for $n=l=3$. Nikiforov proved this conjecture for $n\geq 4l+2$. Using the above bound, we derive the following generalization of this result. $R(C_n,K_{n_1},\dots,K_{n_r})=(n-1)(κ-1)+1$, where $κ=R(K_{n_1},\dots,K_{n_r})$ and $n\geq 4κ+2$.
Matchings under distance constraints I
Published
• View Publication
• BIB
This paper introduces the \emph{$d$-distance matching problem}, in which we are given a bipartite graph $G=(S,T;E)$ with $S=\{s_1,\dots,s_n\}$, a weight function on the edges and an integer $d\in\mathbb Z_+$. The goal is to find a maximum weight subset $M\subseteq E$ of the edges satisfying the following two conditions: i) the degree of every node of $S$ is at most one in $M$, ii) if $s_it,s_jt\in M$, then $|j-i|\geq d$. The question arises naturally, for example, in various scheduling problems.
We show that the problem is NP-complete in general and admits a simple $3$-approxi\-mation. We give an FPT algorithm parameterized by $d$ and also settle the case when the size of $T$ is constant. From an approximability point of view, we show that the integrality gap of the natural integer programming model is at most $2-\frac{1}{2d-1}$, and give an LP-based approximation algorithm for the weighted case with the same guarantee. A combinatorial $(2-\frac{1}{d})$-approximation algorithm is also presented. Several greedy approaches are considered, in particular, a local search algorithm that achieves an approximation ratio of $3/2+ε$ for any constant $ε>0$ in the unweighted case. The novel approaches used in the analysis of the integrality gap and the approximation ratio of locally optimal solutions might be of independent combinatorial interest.