57 research outputs found

    All-Pairs Shortest Paths for Real-Weighted Undirected Graphs with Small Additive Error

    Get PDF

    An algorithm to compute the transitive closure, a transitive approximation and a transitive opening of a fuzzy proximity

    Get PDF
    A method to compute the transitive closure, a transitive opening and a transitive approximation of a reflexive and symmetric fuzzy relation is given. Other previous methods in literature compute just the transitive closure, some transitive approximations or some transitive openings. The proposed algorithm computes the three different similarities that approximate a proximity for the computational cost of computing just one. The shape of the binary partition tree for the three output similarities are the same.Peer ReviewedPostprint (published version

    A fast algorithm for All-Pairs-Shortest-Paths suitable for neural networks

    Full text link
    Given a directed graph of nodes and edges connecting them, a common problem is to find the shortest path between any two nodes. Here I show that the shortest path distances can be found by a simple matrix inversion: If the edges are given by the adjacency matrix AijA_{ij} then with a suitably small value of γ\gamma the shortest path distances are Dij=ceil(log[(1γA)1]ijlogγ) D_{ij} = \operatorname{ceil} \left( {\frac{\log {\left[ {\left({\mathbf{1}}-\gamma {\mathbf{A}}\right)^{-1}} \right]}_{ij}}{\log \gamma}} \right) I derive some bounds on γ\gamma useful for a practical application. Even when the distance function is not globally accurate across the entire graph, it still works locally to instruct pursuit of the shortest path. In this mode, it also extends to weighted graphs with positive edge weights. For a wide range of dense graphs this distance function is computationally faster than the best available alternative. Finally I show that this method leads naturally to a neural network solution of the all-pairs-shortest-path problem.Comment: 11 pages, 4 figures, see also https://github.com/markusmeister/APS

    Shortest Distances as Enumeration Problem

    Full text link
    We investigate the single source shortest distance (SSSD) and all pairs shortest distance (APSD) problems as enumeration problems (on unweighted and integer weighted graphs), meaning that the elements (u,v,d(u,v))(u, v, d(u, v)) -- where uu and vv are vertices with shortest distance d(u,v)d(u, v) -- are produced and listed one by one without repetition. The performance is measured in the RAM model of computation with respect to preprocessing time and delay, i.e., the maximum time that elapses between two consecutive outputs. This point of view reveals that specific types of output (e.g., excluding the non-reachable pairs (u,v,)(u, v, \infty), or excluding the self-distances (u,u,0)(u, u, 0)) and the order of enumeration (e.g., sorted by distance, sorted row-wise with respect to the distance matrix) have a huge impact on the complexity of APSD while they appear to have no effect on SSSD. In particular, we show for APSD that enumeration without output restrictions is possible with delay in the order of the average degree. Excluding non-reachable pairs, or requesting the output to be sorted by distance, increases this delay to the order of the maximum degree. Further, for weighted graphs, a delay in the order of the average degree is also not possible without preprocessing or considering self-distances as output. In contrast, for SSSD we find that a delay in the order of the maximum degree without preprocessing is attainable and unavoidable for any of these requirements.Comment: Updated version adds the study of space complexit
    corecore