Next Article in Journal
Remote Sensing Image Enhancement Based on Non-Local Means Filter in NSCT Domain
Previous Article in Journal
Variable Selection in Time Series Forecasting Using Random Forests
Article Menu

Export Article

Open AccessArticle
Algorithms 2017, 10(4), 115; https://doi.org/10.3390/a10040115

A Multi-Threading Algorithm to Detect and Remove Cycles in Vertex- and Arc-Weighted Digraph

1
College of Computer Science and Engineering, Shandong University of Science and Technology, Qingdao 266510, China
2
Shandong Provincial Key Laboratory of Computer Networks, Shandong Computer Science Center (National Supercomputer Center in Jinan), Jinan 250101, China
3
Shandong Province Key Laboratory of Wisdom Mine Information Technology, Shandong University of Science and Technology, Qingdao 266510, China
4
Business School, Qingdao Binhai College, Qingdao 266555, China
*
Author to whom correspondence should be addressed.
Received: 28 August 2017 / Revised: 26 September 2017 / Accepted: 9 October 2017 / Published: 10 October 2017
View Full-Text   |   Download PDF [3032 KB, uploaded 10 October 2017]   |  

Abstract

A graph is a very important structure to describe many applications in the real world. In many applications, such as dependency graphs and debt graphs, it is an important problem to find and remove cycles to make these graphs be cycle-free. The common algorithm often leads to an out-of-memory exception in commodity personal computer, and it cannot leverage the advantage of multicore computers. This paper introduces a new problem, cycle detection and removal with vertex priority. It proposes a multithreading iterative algorithm to solve this problem for large-scale graphs on personal computers. The algorithm includes three main steps: simplification to decrease the scale of graph, calculation of strongly connected components, and cycle detection and removal according to a pre-defined priority in parallel. This algorithm avoids the out-of-memory exception by simplification and iteration, and it leverages the advantage of multicore computers by multithreading parallelism. Five different versions of the proposed algorithm are compared by experiments, and the results show that the parallel iterative algorithm outperforms the others, and simplification can effectively improve the algorithm's performance. View Full-Text
Keywords: digraph; cycle detection and removal; vertex- and arc-weighted; multi-threading; iteration digraph; cycle detection and removal; vertex- and arc-weighted; multi-threading; iteration
Figures

Figure 1

This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. (CC BY 4.0).

Share & Cite This Article

MDPI and ACS Style

Cui, H.; Niu, J.; Zhou, C.; Shu, M. A Multi-Threading Algorithm to Detect and Remove Cycles in Vertex- and Arc-Weighted Digraph. Algorithms 2017, 10, 115.

Show more citation formats Show less citations formats

Note that from the first issue of 2016, MDPI journals use article numbers instead of page numbers. See further details here.

Related Articles

Article Metrics

Article Access Statistics

1

Comments

[Return to top]
Algorithms EISSN 1999-4893 Published by MDPI AG, Basel, Switzerland RSS E-Mail Table of Contents Alert
Back to Top