项目作者: Sun-Jc

项目描述 :
Incremental Cycle Detection on Directed Graph
高级语言: Python
项目地址: git://github.com/Sun-Jc/CycleDetectionOnDirectedGraph.git
创建时间: 2018-03-30T14:19:27Z
项目社区:https://github.com/Sun-Jc/CycleDetectionOnDirectedGraph

开源协议:The Unlicense

下载


Fast Incremental Cycle Detection On Directed Graph

  • cycle_detect.py:
    • cycle_detection(edges): yields networkx.DiGraph each time when encounter cycle
      • edges: [(source, target),]
      • time complexity: Õ(m√n)
  • test.py:
    • command arg: #nodes #edges

This is an implementation based on the following published paper:

@inproceedings{Bernstein:2018:ITS:3174304.3175268,

author = {Bernstein, Aaron and Chechik, Shiri},

title = {Incremental Topological Sort and Cycle Detection in [Equation] Expected Total Time},

booktitle = {Proceedings of the Twenty-Ninth Annual ACM-SIAM Symposium on Discrete Algorithms},

series = {SODA ‘18},

year = {2018},

isbn = {978-1-6119-7503-1},

location = {New Orleans, Louisiana},

pages = {21—34},

numpages = {14},

url = {http://dl.acm.org/citation.cfm?id=3174304.3175268},

acmid = {3175268},

publisher = {Society for Industrial and Applied Mathematics},

address = {Philadelphia, PA, USA},
}