Giter VIP home page Giter VIP logo

cycle_hunt's Introduction

Cycle hunt

Collection of utilities and scripts for neutralizing cycles while performing the least amount of changes to the original edge structure:

  • Greedy most-cyclic edge deletion (greedy_remove_cycles inside cycle_removal.cpp)

Currently, the best strategy is as follows:

  1. Convert DCG to DAG. Keep track of ancestry when merging two nodes (~10mn to convert full English Wikipedia graph to DAG)

  2. Recover ancestry for nodes that received most merges (most nodes with merges has 1-5 merges, but 3-4 have over a 1000, and contain an eclectic mix of nodes)

  3. Form subgraph from recovered nodes in (2)

  4. On each subgraph of (3) perform a greedy deletion of the edges that participate in the most cycles within those subgraphs. Only remove edges that do not disconnect nodes from the root.

  5. Reconnect subgraph to merged graph from (1)

Installation

cd build
cmake ..
make -j9

Usage

To run greedy most-cyclic edge deletion do the following: Select some number of cycles you want to search for at each step of the algorithms (say 10000), and whether you want to update the most-cyclic edge count after deleting an edge (when cycles are broken the edges that participate in are no longer cyclic, however they were at some point) - for now let's not update (0). We run this algorithm on a graph that can be loaded from a binary file by storing edges in a binary file as a sequence of from-to pairs made of int32s (graph_out.bin contains such a graph):

./cycle_removal graph_out.bin 10000 0

To export, specify an output path as the optional 4th argument:

./cycle_removal graph_out.bin 10000 0 graph_out_cycleless.bin

cycle_hunt's People

Contributors

jonathanraiman avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.