Maximum number of shortest-paths - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-23T11:09:16Z http://mathoverflow.net/feeds/question/25829 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/25829/maximum-number-of-shortest-paths Maximum number of shortest-paths Eduardo 2010-05-25T00:40:17Z 2010-05-25T13:49:05Z <p>I would like to know if there is a equation for the maximum number of shortest paths that pass through <em>r</em> where <em>r</em> is a node contained in any path from node <em>s</em> (a fixed node, i mean, <em>s</em> is the only source of paths) to any node <em>t</em> in an unweighted undirected acyclic graph. I've searched and found <a href="http://www.cse.fau.edu/~jie/research/publications/Publication_files/msp.pdf" rel="nofollow">this work</a> that show this number for grid graphs, but I'm interested in this number for general topology graph.</p> <p>I would be grateful for any reference for a work in this subject, or a suggestion how to start to solve this problem. Thanks in advance.</p> <p><strong>Edit:</strong> Sorry, the graph I'm interested is loop-free as Hans Stricker pointed, but it is cyclic.</p> http://mathoverflow.net/questions/25829/maximum-number-of-shortest-paths/25838#25838 Answer by Douglas S. Stones for Maximum number of shortest-paths Douglas S. Stones 2010-05-25T02:38:34Z 2010-05-25T05:53:39Z <p>Judging from the link you provide, you have three distinct vertices s,t,d and want to compute the number of shortest walks P(s,d,t) from s to d that contain t. The reason I use "walks" instead of "paths" is because of graphs like:</p> <pre><code>s----d----t </code></pre> <p>where we must reuse edges.</p> <p>If you really mean acyclic graph, then P(s,d,t)=1 if there is a path containing vertices s,t and d and P(s,d,t)=0 otherwise.</p> <p>Let P(s,t) be the number of shortest walks between s and t and P(s,s)=1. If s, d and t are all distinct then P(s,d,t)=P(s,t)P(d,t).</p> <p>In Section 2.4 of the paper you link to, they describe the algorithm for finding P(s,t). That is $P(s,t)=\sum_{v \in V} P(s,v)$ where V is the set of neighbours of t for which P(s,v) is minimal. The difficulty is identifying which neighbours of t minimise P(s,v).</p> <p>One way is to construct a set Sn of paths of length n=1,2,... (this can be done recursively), from t until you find some neighbour of s. Then count 1 for each path that ends in a neighbour of s and 0 otherwise. Another way would be to compute P(s,t) and then use a backtracking algorithm.</p> <p>There's not going to be an exciting formula for P(s,d,t) in general, since it depends on the graphs' structure. This is much like how there's not going to be an exciting formula for the number of edges in a graph (unless you restrict to some specific class of graphs).</p> http://mathoverflow.net/questions/25829/maximum-number-of-shortest-paths/25851#25851 Answer by Roland Bacher for Maximum number of shortest-paths Roland Bacher 2010-05-25T07:21:58Z 2010-05-25T07:21:58Z <p>I do not see the interest of introducing $r$. The number of shortest paths from $s$ to $t$ passing through $r$ is the product of the number of shortest paths from $s$ to $r$ times the number of shortest paths from $r$ to $t$ if $d(s,t)=d(s,r)+d(r,t)$ and is zero otherwise.</p> <p>It is thus enough to have formulae for the number of shortest paths between two given vertices $x,y$. This number is of course the coefficient with indices $x,y$ in $A^d$ where $d$ is the distance between $x$ and $y$ and where $A$ is the adjacency matrix (and $d$ is also defined as smallest natural integer such that the coefficient with indices $x,y$ in $A^d$ is non-zero).</p>