English
Related papers

Related papers: Weighted graph algorithms with Python

200 papers

Let ${\cal G}=(G,w)$ be a weighted simple finite connected graph, that is, let $G$ be a simple finite connected graph endowed with a function $w$ from the set of the edges of $G$ to the set of real numbers. For any subgraph $G'$ of $G$, we…

Combinatorics · Mathematics 2014-12-18 Elena Rubei

Given an undirected, weighted graph, with $n$ vertices and $m$ edges, and two special vertices $s$ and $t$, the problem is to find the shortest path between them. We give two bounded-error quantum algorithms with improved runtime in the…

Quantum Physics · Physics 2026-03-20 Adam Wesołowski , Stephen Piddock

Interactions in many real-world phenomena can be explained by a strong hierarchical structure. Typically, this structure or ranking is not known; instead we only have observed outcomes of the interactions, and the goal is to infer the…

Data Structures and Algorithms · Computer Science 2019-04-24 Nikolaj Tatti

In undirected graphs with real non-negative weights, we give a new randomized algorithm for the single-source shortest path (SSSP) problem with running time $O(m\sqrt{\log n \cdot \log\log n})$ in the comparison-addition model. This is the…

Data Structures and Algorithms · Computer Science 2023-10-05 Ran Duan , Jiayi Mao , Xinkai Shu , Longhui Yin

In the dynamic Single-Source Shortest Paths (SSSP) problem, we are given a graph $G=(V,E)$ subject to edge insertions and deletions and a source vertex $s\in V$, and the goal is to maintain the distance $d(s,t)$ for all $t\in V$.…

Data Structures and Algorithms · Computer Science 2020-01-30 Maximilian Probst Gutenberg , Virginia Vassilevska Williams , Nicole Wein

Although Dijkstra's algorithm has near-optimal time complexity for the problem of finding a shortest path from a given vertex $s$ to a given vertex $t$, in practice other algorithms are often superior on huge graphs. A prominent example is…

Data Structures and Algorithms · Computer Science 2025-06-16 Bernhard Haeupler , Richard Hladík , Vaclav Rozhon , Robert E. Tarjan , Jakub Tětek

For $t,g>0$, a vertex-weighted graph of total weight $W$ is $(t,g)$-trimmable if it contains a vertex-induced subgraph of total weight at least $(1-1/t)W$ and with no simple path of more than $g$ edges. A family of graphs is trimmable if…

Discrete Mathematics · Computer Science 2008-02-21 Thomas Erlebach , Torben Hagerup , Klaus Jansen , Moritz Minzlaff , Alexander Wolff

Finding optimal paths in connected graphs requires determining the smallest total cost for traveling along the graph's edges. This problem can be solved by several classical algorithms where, usually, costs are predefined for all edges.…

Machine Learning · Computer Science 2023-11-03 Tomas Kulvicius , Minija Tamosiunaite , Florentin Wörgötter

In this paper we introduce the concept of generalized d-graph (admitting cycles) as special dependency-graphs for modelling dynamic programming (DP) problems. We describe the d-graph versions of three famous single-source shortest…

Data Structures and Algorithms · Computer Science 2010-12-07 Zoltán Kátai

The degree centrality of a node, defined as the number of nodes adjacent to it, is often used as a measure of importance of a node to the structure of a network. This metric can be extended to paths in a network, where the degree centrality…

Data Structures and Algorithms · Computer Science 2025-12-19 Johnson Phosavanh , Dmytro Matsypura

We describe algorithms to efficiently compute minimum $(s,t)$-cuts and global minimum cuts of undirected surface-embedded graphs. Given an edge-weighted undirected graph $G$ with $n$ vertices embedded on an orientable surface of genus $g$,…

Data Structures and Algorithms · Computer Science 2019-10-11 Erin W. Chambers , Jeff Erickson , Kyle Fox , Amir Nayyeri

We study the electrical distribution network reconfiguration problem, defined as follows. We are given an undirected graph with a root vertex, demand at each non-root vertex, and resistance on each edge. Then, we want to find a spanning…

Data Structures and Algorithms · Computer Science 2024-12-20 Takehiro Ito , Naonori Kakimura , Naoyuki Kamiyama , Yusuke Kobayashi , Yoshio Okamoto

A geometric graph $G$ is $xy-$monotone if each pair of vertices of $G$ is connected by a $xy-$monotone path. We study the problem of producing the $xy-$monotone spanning geometric graph of a point set $P$ that (i) has the minimum cost,…

Computational Geometry · Computer Science 2018-09-27 Konstantinos Mastakas

In this paper, I present an algorithm called Raffica algorithm for Single-Source Shortest Path(SSSP). On random graph, this algorithm has linear time complexity(in expect). More precisely, the random graph uses configuration model, and the…

Data Structures and Algorithms · Computer Science 2018-09-19 Dexin Li

Connectivity (or equivalently, unweighted maximum flow) is an important measure in graph theory and combinatorial optimization. Given a graph $G$ with vertices $s$ and $t$, the connectivity $\lambda(s,t)$ from $s$ to $t$ is defined to be…

Data Structures and Algorithms · Computer Science 2024-12-25 Shyan Akmal

Constructing a spanning tree of a graph is one of the most basic tasks in graph theory. We consider a relaxed version of this problem in the setting of local algorithms. The relaxation is that the constructed subgraph is a sparse spanning…

Data Structures and Algorithms · Computer Science 2021-04-28 Reut Levi , Dana Ron , Ronitt Rubinfeld

The paper considers the NP-hard graph vertex coloring problem, which differs from traditional problems in which it is required to color vertices with a given (or minimal) number of colors so that adjacent vertices have different colors. In…

Discrete Mathematics · Computer Science 2025-02-24 Adil Erzin , Roman Plotnikov , Georgii Zhukov

Given a graph and a pair of terminals $s$, $t$, the next-to-shortest path problem asks for an $s\!\to \!t$ (simple) path that is shortest among all not shortest $s\!\to \!t$ paths (if one exists). This problem was introduced in 1996, and…

Data Structures and Algorithms · Computer Science 2025-11-07 Kuowen Chen , Nicole Wein , Yiran Zhang

Designing well-connected graphs is a fundamental problem that frequently arises in various contexts across science and engineering. The weighted number of spanning trees, as a connectivity measure, emerges in numerous problems and plays a…

Data Structures and Algorithms · Computer Science 2016-04-13 Kasra Khosoussi , Gaurav S. Sukhatme , Shoudong Huang , Gamini Dissanayake

In this paper, we study a set of combinatorial optimization problems on weighted graphs: the shortest path problem with negative weights, the weighted perfect bipartite matching problem, the unit-capacity minimum-cost maximum flow problem…

Data Structures and Algorithms · Computer Science 2016-07-15 Michael B. Cohen , Aleksander Madry , Piotr Sankowski , Adrian Vladu