Presentation

PRESENTATION
Liang Zhuo
Nondecreasing Paths
β–  given an edge weighted graph 𝐺 = (𝑉, 𝐸, 𝑀) and a source 𝑠 ∈
𝑉 , report for every 𝑑 ∈ 𝑉 , the minimum last edge weight on a
nondecreasing path from 𝑠 to 𝑑.
β–  single source minimum nondecreasing paths problem (SSNP)
β–  planning a train
β–  tripall pairs nondecreasing paths problem (APNP)
β–  Related Problems: Shortest Paths, Bottleneck Paths
Previous Results
SSNP
𝑂(π‘š loglog 𝑛)
Vassilevska, 08
APBP
𝑂(𝑛(3+πœ”)/2 )
Duan & Pettie, 09
APNP
𝑂(𝑛(15+πœ”)/6 )
Vassilevska, 08
could be improved
SSNP
β–  Easy 𝑂(𝑛 + π‘š log 𝑛) by Dijikstra’s
β–  To achieve 𝑂(π‘š loglog 𝑛), combine 2 algorithms:
– Alg. 1: remember d[.]; state (v, last); DFS with initial state
(s, -inf); for one node, from small to large edges. <- need
order for each node.
– Alg. 2: Dijkstra’s. <- need to decrease heap size
β–  Divide nodes to 2 classes: low deg. & high deg. (>O(log 𝑛))
– Low: use alg. 1. 𝑂 π‘š β‹… 𝑂(log log 𝑛) (if using Q-Heaps:
𝑂 π‘š β‹… 𝑂(1))
– High: use alg. 2. 𝑂
π‘š
log 𝑛
β‹… 𝑂(log 𝑛)
APNP
β–  Use matrix.
β–  Define (min, ≀) product C = 𝐴 ∘ 𝐡 where 𝐢 𝑖, 𝑗 =
min{𝐡 π‘˜, 𝑗 : 𝐴 𝑖, π‘˜ ≀ 𝐡[π‘˜, 𝑗]}
π‘˜
β–  We just need to do (min, ≀) product.
β–  Borrow dominance and max-min product in APBP
– Dominance product C = 𝐴 βŠ™ 𝐡 where 𝐢 𝑖, 𝑗 =
| π‘˜: 𝐴 𝑖, π‘˜ ≀ 𝐡 π‘˜, 𝑗 |
– Max-min product C = 𝐴 β‹„ 𝐡 where 𝐢 𝑖, 𝑗 =
max min{𝐴 𝑖, π‘˜ , 𝐡[π‘˜, 𝑗]}
π‘˜
Dominance Product
β–  The dominance product of two 𝑛 × π‘› matrices 𝐴 and 𝐡 with
entries from a totally ordered set is computable in
𝑂(𝑛(3+πœ”)/2 ) time. (Matousek)
β–  Let 𝐴 and 𝐡 be two 𝑛 × π‘› matrices where the number of non(∞) values in 𝐴 is π‘š1 and the number of non-(βˆ’βˆž) values in 𝐡
π‘š π‘š
is π‘š2 . Then 𝐴 βŠ™ 𝐡 can be computed in time 𝑂( 1 2 + π‘›πœ” ) .
𝑛
(Duan & Pettie)
β–  Let 𝐴 and 𝐡 be two 𝑛 × π‘› matrices where the number of non(∞) values in 𝐴 is π‘š1 and the number of non-(βˆ’βˆž) values in 𝐡
is π‘š2 . π‘š1 π‘š2 β‰₯ 𝑛1+πœ” . Then 𝐴 βŠ™ 𝐡 can be computed in time
𝑂( π‘š1 π‘š2 𝑛(πœ”βˆ’1)/2 ) . (Duan & Pettie)
Max-min Product
β–  Given two real 𝑛 × π‘› matrices 𝐴 and 𝐡, 𝐴 β‹„ 𝐡 can be computed in
𝑂(𝑛(3+πœ”)/2 ). (Duan & Pettie)
β–  How it is proved?
β–  It computes 𝐢 𝑖, 𝑗 = max{𝐴 𝑖, π‘˜ : 𝐴 𝑖, π‘˜ ≀ 𝐡[π‘˜, 𝑗]} and 𝐢 β€² 𝑖,𝑗 =
π‘˜
max 𝐡 π‘˜, 𝑗 : 𝐴 𝑖, π‘˜ β‰₯ 𝐡[π‘˜, 𝑗]}
π‘˜
β–  It let 𝐴 β‹„ 𝐡 𝑖, 𝑗 = max 𝐢 𝑖, 𝑗 , 𝐢 β€² 𝑖, 𝑗
β–  𝐢 𝑖, 𝑗 = max{𝐴 𝑖, π‘˜ : 𝐴 𝑖, π‘˜ ≀ 𝐡[π‘˜, 𝑗]} could also be computed in
π‘˜
𝑂(𝑛(3+πœ”)/2 ).
β–  𝐢 𝑖, 𝑗 = min{βˆ’π΄ 𝑖, π‘˜ : βˆ’π΅[π‘˜, 𝑗] ≀ βˆ’π΄ 𝑖, π‘˜ }. Thus (min, ≀)
π‘˜
product in 𝑂(𝑛(3+πœ”)/2 ).
Sampling
β–  Given a collection of 𝑁 subsets of {1, . . . , 𝑛}, each of size 𝑙,
one can find in 𝑂(𝑁𝑙) time a set of 𝑛 log 𝑛/𝑙 elements of
{1, . . . , 𝑛} hitting every one of the subsets. (Galil & Margalit)
Algorithm
β–  Short Paths, Long Paths
β–  Alg 1: length ≀ 𝑙. (min, ≀) product for 𝑙 times: 𝐴𝑙
β–  Alg 2: length > 𝑙. Get a set of size 𝑛 log 𝑛/𝑙 hitting all paths of
length 𝑙. Use the alg. for SSNP for each node 𝑣 in the set, and
run it reversely to get the APSP through 𝑣.
β–  Running time:
– 𝑂(𝑛(3+πœ”)/2 𝑙)
𝑛 log 𝑛
𝑛2 log 𝑛)
𝑙
𝑂(𝑛(3βˆ’πœ”)/4 ), running time:
– 𝑂(𝑛2 𝑙 +
β–  Let 𝑙 =
𝑂(𝑛(9+πœ”)/4 ).
Discussion
β–  Multiple edge? Increase #node => complexity increases.
β–  Short Paths, Long Paths technique makes the complexity
greater than APBP. 𝑂(𝑛1.5 𝑀(𝑛)),where 𝑀(𝑛) is the
complexity of matrix multiplication.
β–  Dense Dominance Product could be done better?
( π‘š1 π‘š2 𝑛(πœ”βˆ’1)/2 ) is worse when, say, π‘š1 , π‘š2 = 𝑂(𝑛1.5 ).
β–  Other way to solve this problem?
Discussion
β–  Sort all edges, and divide into 𝑃 parts, each contains
π‘š
𝑃
edges
β–  For each part generate a bool matrix, then multiply them:
𝑂(π‘›πœ” 𝑃)
β–  Inside each part, select 𝑑 key edges. Paths between key
π‘š
edges/point and other edges: 𝑂(𝑑 ). APNP through key
𝑃
2
edges/point: 𝑂(𝑛 𝑑).
β–  We need to compute APNP that do not pass through our key
edges: ?.
Reference
β– 
Vassilevska, Virginia, Ryan Williams, and Raphael Yuster. "All-pairs
bottleneck paths for general graphs in truly sub-cubic time." Proceedings
of the thirty-ninth annual ACM symposium on Theory of computing. ACM,
2007.
β– 
Vassilevska, Virginia. "Nondecreasing paths in a weighted graph or: How
to optimally read a train schedule." Proceedings of the nineteenth
annual ACM-SIAM symposium on Discrete algorithms. Society for
Industrial and Applied Mathematics, 2008.
β– 
Duan, Ran, and Seth Pettie. "Fast algorithms for (max, min)-matrix
multiplication and bottleneck shortest paths." Proceedings of the
twentieth Annual ACM-SIAM Symposium on Discrete Algorithms. Society
for Industrial and Applied Mathematics, 2009.
β– 
Kowaluk, Miroslaw, and Andrzej Lingas. "LCA queries in directed acyclic
graphs." Automata, Languages and Programming. Springer Berlin
Heidelberg, 2005. 241-248.
Thank you!