igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] Calculating total number of paths between two specific nodes


From: Xu, Yanjie
Subject: [igraph] Calculating total number of paths between two specific nodes
Date: Wed, 16 May 2018 20:08:32 +0000

Dear developers of igraph,

 

I am currently using igraph in r to analyse directed acyclic graphs. One of my task is calculating number of all possible paths between the “start” and “end” nodes. With igraph, I can get a list of all possible paths (e.g., from node 1 to node 81) with the code below:

 

>>all_simple_paths(net, 1, 81)

 

Then I summarize how many paths (n) we have:

 

>>n<-length(all_simple_paths(net, 1, 81))

 

This works we my network has around 15 nodes, but we the number of nodes increase, it takes days to calculate “n” for a single network. I have hundreds of networks waiting for calculation. Do you have an idea whether there is a quicker way to get the number of possible paths between two specific nodes? Many many thanks!

 

Best regards,

Yanjie

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]