Medians in median graphs and their cube complexes in linear time - Archive ouverte HAL Accéder directement au contenu
Pré-Publication, Document De Travail Année : 2022

Medians in median graphs and their cube complexes in linear time

Résumé

The median of a set of vertices P of a graph G is the set of all vertices x of G minimizing the sum of distances from $x$ to all vertices of P. In this paper, we present a linear time algorithm to compute medians in median graphs, improving over the existing quadratic time algorithm. We also present a linear time algorithm to compute medians in the l_1-cube complexes associated with median graphs. Median graphs constitute the principal class of graphs investigated in metric graph theory and have a rich geometric and combinatorial structure, due to their bijections with CAT(0) cube complexes and domains of event structures. Our algorithm is based on the majority rule characterization of medians in median graphs and on a fast computation of parallelism classes of edges (Theta-classes or hyperplanes) via Lexicographic Breadth First Search (LexBFS). To prove the correctness of our algorithm, we show that any LexBFS ordering of the vertices of G satisfies the following \emph{fellow traveler property} of independent interest: the parents of any two adjacent vertices of G are also adjacent. Using the fast computation of the Theta-classes, we also compute the Wiener index (total distance) of G in linear time and the distance matrix in optimal quadratic time.
Fichier principal
Vignette du fichier
1907.10398.pdf (971.01 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-03547953 , version 1 (24-03-2024)

Identifiants

Citer

Laurine Bénéteau, Jérémie Chalopin, Victor Chepoi, Yann Vaxès. Medians in median graphs and their cube complexes in linear time. 2024. ⟨hal-03547953⟩
58 Consultations
0 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More