• Like
Top-k shortest path
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Top-k shortest path

  • 3,617 views
Published

cikm 2009: top k shortest paths

cikm 2009: top k shortest paths

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
3,617
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
65
Comments
0
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Fast Top-k Simple Shortest Paths Discovery in Graphs Database Research Group Department of Computer Science Peking University Jun Gao, Huida Qiu, Xiao Jiang, Dongqing Yang, Tenjiao Wang
  • 2.
    • Motivation
    • Related Work
    • Our Method
    • Experiments
    • Conclusion
    Outline
  • 3. Motivation
    • From “Finding the k Shortest Paths ” by David Eppstein
      • Additional constraints
      • Model evaluation
      • Sensitivity analysis
      • Generation of alternatives
    • When the shortest path is not sufficient for application, top-k shortest paths are desired.
  • 4. Top k shortest paths query
    • Top 2 general shortest path
    • (allowing loops) :
      • 1 st : 1  2  3  4, length: 3
      • 2 nd : 1  2  3  6  2  3  4, length: 6
    1 1 1 1 1 3 3 1 2 3 4 5 6
    • Top 2 simple shortest path
    • (without loops) :
      • 1 st : 1  2  3  4, length: 3
      • 2 nd : 1  2  5  3  4, length: 8
    1
  • 5.
    • Motivation
    • Related work
    • Our method
    • Experiments
    • Conclusion
    Outline
  • 6. Top K genenal shortest path problem
    • Related work
      • David Eppstein. Finding the k shortest paths. SIAM J. Comput. (SIAMCOMP), 28(2):652–673, 1998
    • Basic Idea
    • Time Complexity
      • O(m+nlogn+k)
    Original Graph Shortest Path Tree Side Cost on Edges
  • 7. Top K loopless Shortest Path Problem
    • Related work
      • J. Y. YEN. Finding the k shortest loopless paths in a network. Manage. Sci, 17(712-716), 1971.
      • Basic Idea
      • Find the shortest path first
      • 2-th shortest path should be
        • different from the shortest path
        • loopless
        • shortest in the remaining paths
      • Find the next shortest paths iteratively
    • Time Complexity
      • O(kn(m+nlogn))
    Candidate Paths
  • 8. Top K loopless Shortest Path Problem
    • Related work
      • J. Hershberger, S. Suri, and A. Bhosle. On the difficulty of some shortest path problems. ACM Transactions on Algorithms, 3(1), 2007
    • Basic Idea
      • Remove edge to find next shortest path
      • Use the intermediate result to lower the cost
    • Time Complexity
      • O(k(m+nlogn))
      • Loop in some cases
    Candidate Paths
  • 9.
    • Motivation
    • Related work
    • Our method
    • Experiments
    • Conclusion
    Outline
  • 10. Basic Idea
    • The key operation is to reduce the redundant computation cost for the same target node.
    • We pre-compute the shortest path tree rooted at the target node
    • We expect the candidate path searching can be terminated early with the shortest path tree
    • The final path is the concatenation of 3 sub-paths, the first sub-path is in the current shortest path, the second one is discovered online, the third on is in the shortest path tree.
      • The existing method need discover the second and third sub-path online.
  • 11. Graph Pre-processing Precompute the shortest path tree rooted at t Make side cost of each edge Assign (pre, post, parent) encoding on each node to accelarate the loop detection
  • 12. Searching for the candidate paths
    • On the transformed graph, we start searching with the side cost
    • The path with the minimal side cost equals the path with the cost in the original graph
    • In the seaching, the loop needs be detected.
    • When no loop can be found, the path can be discovered directly
    Starting Node
  • 13. Path Searching Example
    • The edge e to g cannot be considered
    • d is then considered. But e is the ancestor of d
    • c is then considered, but e is the ancestor of c
    • f is then considered, f to t is not via node s b e
  • 14. Optimization-1
    • k-reduction strategy : stop when
      • k 1 shortest paths discovered;
      • k 2 paths in candidate pool have the same length as the k 1 -th shortest path;
      • k 1 + k 2 ≥ k
  • 15. Optimization-2
    • Suppose we know the length of the shortest path is l 1 , the length of the k-th shortest path is l 2 ;
    • Let th = l 2 – l 1 ;
    • When looking for paths from deviation nodes, we can stop searching when the current accumulated side cost already exceeds th ;
  • 16. Optimization-2
    • Approximate threshold: the shortest path is needed; any other k-1 paths will do.
      • Eager policy: search for k-1 candidate paths instead of one from the first deviation node;
      • Lazy policy: determine after there are k-1 paths in the candidate pool.
      • As more paths are discovered, the threshold can be adaptively updated and slowly becomes tighter.
  • 17.
    • Motivation
    • Related work
    • Our method
    • Experiments
    • Conclusion
    Outline
  • 18. Experimental Evaluation
    • Comparison algorithms:
      • YEN : Yen’s classic algorithm;
      • JH : the edge-replacement based method by John Hershberger et al.
      • Implementation: C++, by Hershberger et al.
    • Our method: all implemented in Java
      • KR: the base method with k-reduction;
      • KRE: k-reduction plus Eager policy;
      • KRL: k-reduction plus Lazy policy;
  • 19. Datasets
    • Real datasets: (Density = # of Edges / # of nodes)
    • Synthetic datasets:
      • Random graphs generated by Barabasi Graph Generator (by Derek Dreier, available from Internet)
    Dataset # of Nodes # of Edges Density Add32 4,960 9,462 1.91 Crack 10,240 30,380 2.97 Gupta3 16,783 4,670,105 278.26 FLA 1,070,376 2,712,798 2.53
  • 20. Impact of Graph Size
    • Density = 3, # of nodes from 10k to 100k;
  • 21. Impact of k
    • Performed on real graphs.
  • 22. Impact of Density
    • k=1000
  • 23.
    • Motivation
    • Related Work
    • Our Method
    • Experiments
    • Conclusion
    Outline
  • 24. Conclusion
    • We speed up top-k shortest path discovery.
      • Combine Yen’s and Eppstein’s idea
      • Transform the candidate path discovery to the side cost graph
        • Terminate Earlier
      • Use structural labels to detect the loop effectively.
      • Introduce two other optimizations
        • Reduce number of k
        • Avoid the worst case of path searching.
  • 25. Future work
    • Extend the top k shortest path between two node to two node sets
    • Find top-k shortest path core
    • Find approximate top-k shortest path
  • 26. Thanks for your attention!
    • [email_address]