Applied Soft Computing Journal 76 (2019) 105–120
Contents lists available at ScienceDirect
Applied Soft Computing Journal
journal homepage: www.elsevier.com/locate/asoc
GPU implementation of Borůvka’s algorithm to Euclidean minimum
spanning tree based on Elias method
Wen-bao Qiao
∗
, Jean-charles Créput
Le2i FRE2005, CNRS, Arts et Métiers, Univ. Bourgogne Franche-Comté, France
highlights
• An improvement of Bentley spiral search adapted to EMST/EMSF and its GPU parallelism.
• GPU two-direction parallel Breadth-first search to collect the shortest outgoing edge.
• GPU parallel EMST/EMSF for applications that only have Euclidean points as input.
article info
Article history:
Received 12 December 2017
Received in revised form 1 June 2018
Accepted 24 October 2018
Available online 12 December 2018
Keywords:
Euclidean minimum spanning tree
EMST
GPU parallel EMST
Breadth first search
GPU parallel BFS
Decentralized control
Data parallel
abstract
We present both sequential and data parallel approaches to build hierarchical minimum spanning forest
(MSF) or tree (MST) in Euclidean space (EMSF/EMST) for applications whose input N points are uniformly
or boundedly distributed in Euclidean space. Each iteration of the sequential approach takes O(N) time
complexity through combining Borůvka’s algorithm with an improved component-based neighborhood
search algorithm, namely sliced spiral search, which is a newly proposed improvement to Bentley’s
spiral search for finding a component graph’s closest outgoing point on the plane. It works based on the
uniqueness property in Euclidean space, and allows O(1) time complexity for one search from a query
point to find the component’s closest outgoing point at different iterations of Borůka’s algorithm. The data
parallel approach includes a newly proposed two-direction breadth-first search (BFS) implementation on
graphics processing unit (GPU) platform, which is specialized for selecting a spanning tree’s minimum
outgoing weight. This GPU two-direction parallel BFS enables a tree traversal operation to start from
any one of its vertex acting as root. These GPU parallel implementations work by assigning N threads
with one thread associated to one input point, one thread occupies O(1) local memory and the whole
algorithm occupies O(N) global memory. Experiments are conducted on both uniformly distributed data
sets and TSPLIB database. We evaluate computation time of the proposed approaches on more than 80
benchmarks with size N growing up to 10
6
points on personal laptop.
© 2018 Elsevier B.V. All rights reserved.
1. Introduction
Given a general weighted un-directed graph G = (V , E ) with
N vertexes and explicit edge list E , a minimum spanning tree
(MST) means a subset of E that connects all vertexes without
any circles and with minimum total edges’ weight. A minimum
spanning forest (MSF) consists of disjoint MSTs on each of the
local connected components of that graph G. In graph theory, a
connected component (or just component) of an un-directed graph
G is a sub-graph of G in which any two vertexes are connected
by a finite or infinite sequence of edges. MST/MSF is widely used
in machine learning and data mining applications, for example,
MSF consisting various small MSTs naturally forms data clusters
of an input [1–3], like image segmentation [4,5]; an exact MST
∗
Corresponding author.
E-mail address: rapidbao@outlook.com (W.-b. Qiao).
also provides upper bound for tour length estimation of traveling
salesman problems [6].
Three classical MST algorithms like Borůvka’s [7] (see [8] for
translation), Kruskal’s (1956) [9] and Prim’s (1957) [10] algorithms
establish the basis of MST implementations. They all work sequen-
tially on standard general graph with predefined distance matrix
(or edge list). Kruskal’s algorithm works by firstly sorting all
edges of the graph in non-decreasing order, and then beginning
with each vertex being a component, inserting edges one by one
until all points in V have been connected without circles. Prim’s
algorithm is a greedy algorithm. It firstly selects a random vertex
as a tree, and then repeatedly adds the shortest edge that connects
a new vertex to the tree until all the vertexes are included [11].
Borůvka’s algorithm begins with each vertex of the graph G being
a component, iteratively finds minimum weighted outgoing edge
for each component and adds all such edges to the MSF in one
iteration. Borůvka’s algorithm has nature attribute to perform
https://doi.org/10.1016/j.asoc.2018.10.046
1568-4946/© 2018 Elsevier B.V. All rights reserved.