algebraic path finding
play

Algebraic Path Finding Timothy G. Griffin Computer Laboratory - PowerPoint PPT Presentation

Algebraic Path Finding Timothy G. Griffin Computer Laboratory University of Cambridge, UK timothy.griffin@cl.cam.ac.uk DIMACS Working Group on Abstractions for Network Services, Architecture, and Implementation 23 May, 2012 tgg22 ( Computer


  1. Algebraic Path Finding Timothy G. Griffin Computer Laboratory University of Cambridge, UK timothy.griffin@cl.cam.ac.uk DIMACS Working Group on Abstractions for Network Services, Architecture, and Implementation 23 May, 2012 tgg22 ( Computer Laboratory University of Cambridge, UK timothy.griffin@cl.cam.ac.uk ) Algebraic Path Finding 23-05-2012 1 / 37

  2. Outline Q: Can we separte the WHAT from the HOW in (current) network routing protocols? A : “Algebraic path problems” from operations research may help... ... but the notion of “global optimality” is too limited. ◮ “Local optimality” for algebraic path problems is a new concept, and it may have widespread applicability beyond routing — operations research, combinatorics, ... ◮ Thank you BGP . Using these abstractions to build tools. Routing vs. forwarding still needs work.... tgg22 ( Computer Laboratory University of Cambridge, UK timothy.griffin@cl.cam.ac.uk ) Algebraic Path Finding 23-05-2012 2 / 37

  3. Shortest paths example, sp = ( N ∞ , min , +) The adjacency matrix 2 1 2 3 4 5 2 1 6  ∞ ∞  1 5 2 4 2 5 4 ∞ ∞ 2    1 5 4 3  A = 3 ∞ 1 1 3 3 5    6 4  ∞ ∞ ∞ 4   4 3 ∞ ∞ ∞ 5 6 4 4 tgg22 ( Computer Laboratory University of Cambridge, UK timothy.griffin@cl.cam.ac.uk ) Algebraic Path Finding 23-05-2012 3 / 37

  4. Shortest paths example, continued The routing matrix 2 1 2 3 4 5 0 2 1 5 4   1 2 5 4 2 0 3 7 4 2   A ∗ =  1 3 0 4 3  3 5 1 1 3 3    5 7 4 0 7  4   4 4 3 7 0 5 6 4 Matrix A ∗ solves this global optimality problem: 4 A ∗ ( i , j ) = min p ∈ P ( i , j ) w ( p ) , Bold arrows indicate the shortest-path tree rooted at 1. where P ( i , j ) is the set of all paths from i to j . tgg22 ( Computer Laboratory University of Cambridge, UK timothy.griffin@cl.cam.ac.uk ) Algebraic Path Finding 23-05-2012 4 / 37

  5. Widest paths example, ( N ∞ , max , min ) The routing matrix 2 1 2 3 4 5 4 4 6 4  ∞  1 2 5 4 4 5 4 4 ∞ 2   A ∗ =  4 5 4 4  ∞ 3 5 1 1 3 3    6 4 4 4  ∞ 4   4 4 4 4 ∞ 5 6 4 Matrix A ∗ solves this global optimality problem: 4 A ∗ ( i , j ) = max p ∈ P ( i , j ) w ( p ) , Bold arrows indicate the widest-path tree rooted at 1. where w ( p ) is now the minimal edge weight in p . tgg22 ( Computer Laboratory University of Cambridge, UK timothy.griffin@cl.cam.ac.uk ) Algebraic Path Finding 23-05-2012 5 / 37

  6. Fun example, ( 2 { a , b , c } , ∪ , ∩ ) We want a Matrix A ∗ to solve this 2 global optimality problem: { a } { a b c } { c } � A ∗ ( i , j ) = w ( p ) , p ∈ P ( i , j ) 1 { b c } 3 { b } 5 where w ( p ) is now the intersection of all edge weights in p . { a b } { b } 4 For x ∈ { a , b , c } , interpret x ∈ A ∗ ( i , j ) to mean that there is at least one path from i to j with x in every arc weight along the path. tgg22 ( Computer Laboratory University of Cambridge, UK timothy.griffin@cl.cam.ac.uk ) Algebraic Path Finding 23-05-2012 6 / 37

  7. Fun example, ( 2 { a , b , c } , ∪ , ∩ ) The matrix A ∗ 1 2 3 4 5  { a b c } { a b c } { a b c } { a b } { b c }  1 { a b c } { a b c } { a b c } { a b } { b c } 2     { a b c } { a b c } { a b c } { a b } { b c } 3     { a b } { a b } { a b } { a b c } { b } 4   { b c } { b c } { b c } { b } { a b c } 5 tgg22 ( Computer Laboratory University of Cambridge, UK timothy.griffin@cl.cam.ac.uk ) Algebraic Path Finding 23-05-2012 7 / 37

  8. A few Semirings ( S , ⊕ , ⊗ , 0 , 1 ) A few examples 0 1 possible applications S ⊕ ⊗ min 0 minimum-weight routing sp N ∪ {∞} + ∞ max min 0 greatest-capacity routing N ∪ {∞} ∞ bw [ 0 , 1 ] max 0 1 most-reliable routing rel × { 0 , 1 } max min 0 1 usable-paths use 2 W shared link attributes ∪ ∩ {} W links 2 W shared path attributes paths ∩ ∪ W {} Historically, a focus on global optimality � A ∗ ( i , j ) = w ( p ) p : i ❀ j where w ( p ) is an ⊗ -product of arc weights. tgg22 ( Computer Laboratory University of Cambridge, UK timothy.griffin@cl.cam.ac.uk ) Algebraic Path Finding 23-05-2012 8 / 37

  9. Recommended Reading tgg22 ( Computer Laboratory University of Cambridge, UK timothy.griffin@cl.cam.ac.uk ) Algebraic Path Finding 23-05-2012 9 / 37

  10. Assumptions Semiring Axioms ADD . ASSOCIATIVE : a ⊕ ( b ⊕ c ) = ( a ⊕ b ) ⊕ c ADD . COMMUTATIVE : a ⊕ b = b ⊕ a ADD . LEFT . ID 0 ⊕ a : = a MULT . ASSOCIATIVE : a ⊗ ( b ⊗ c ) = ( a ⊗ b ) ⊗ c MULT . LEFT . ID 1 ⊗ a : = a MULT . RIGHT . ID a ⊗ 1 : = a MULT . LEFT . ANN 0 ⊗ a 0 : = MULT . RIGHT . ANN a ⊗ 0 0 : = L.D ISTRIBUTIVE : a ⊗ ( b ⊕ c ) = ( a ⊗ b ) ⊕ ( a ⊗ c ) R.D ISTRIBUTIVE : ( a ⊕ b ) ⊗ c = ( a ⊗ c ) ⊕ ( b ⊗ c ) Distributivity in sp = ( N ∞ , min , +) : L.D ISTRIBUTIVE a + ( b min c ) ( a + b ) min ( a + c ) , : = R.D ISTRIBUTIVE ( a min b ) + c ( a + c ) min ( b + c ) . : = tgg22 ( Computer Laboratory University of Cambridge, UK timothy.griffin@cl.cam.ac.uk ) Algebraic Path Finding 23-05-2012 10 / 37

  11. Additional assumptions Some subset of these axioms are typically assumed. ADD . IDEMPOTENT : a ⊕ a = a ADD . SELECTIVE : a ⊕ b ∈ { a , b } ADD . LEFT . ANN 1 ⊕ a 1 : = ADD . RIGHT . ANN a ⊕ 1 1 : = RIGHT . ABSORBTION : a ⊕ ( a ⊗ b ) = a LEFT . ABSORBTION : a ⊕ ( b ⊗ a ) = a With idempotency, ⊕ induces natural (partial) orders a ≤ l b ≡ a = a ⊕ b a ≤ r b ≡ b = a ⊕ b If 1 is a ⊕ -annihilator (Semiring is bounded ) 1 0 ≤ l 0 1 ≤ r In this case A ∗ exists. tgg22 ( Computer Laboratory University of Cambridge, UK timothy.griffin@cl.cam.ac.uk ) Algebraic Path Finding 23-05-2012 11 / 37

  12. Many variations on basic structures.... weight summarization weight computation algebraic ordered algebraic ( S , ⊕ , ⊗ ) ( S , � , ⊗ ) functional ( S , ⊕ , F ⊆ S → S ) ( S , � , F ⊆ S → S ) ... and many variations on the basic algorithms (Dijkstra’s, Bellman-Ford, ...). tgg22 ( Computer Laboratory University of Cambridge, UK timothy.griffin@cl.cam.ac.uk ) Algebraic Path Finding 23-05-2012 12 / 37

  13. Let’s model LISP! 2 3 d 1 d 1 d 2  ∞ ∞  1 3 ∞ 2 2 5 4 2     M = ∞ ∞ 3    1  ∞ 4 5 1 1 3 3   2 3 5 6 4 3 Mapping matrix 4 1 d 2 d 1 d 2 5 6   1 3 7 2    5 5  = R 3    9 1  routing = path finding + mapping 4   2 3 R = A ∗ M 5 Routing/Forwarding matrix tgg22 ( Computer Laboratory University of Cambridge, UK timothy.griffin@cl.cam.ac.uk ) Algebraic Path Finding 23-05-2012 13 / 37

  14. More Interesting Example : Hot-Potato Idiom d 1 d 2  ∞ ∞  1 ( 0 , 3 ) 2 d 1 ( 0 , 3 ) 2 ∞     M = ∞ ∞ 3 ( 0 , 2 ) 5   2 4  ( 0 , 1 )  4 ∞   ( 0 , 2 ) ( 0 , 3 ) 5 1 1 3 3 5 Mapping matrix ( 0 , 3 ) 6 4 d 1 d 2 ( 2 , 3 ) ( 4 , 3 )   1 ( 0 , 3 ) ( 4 , 3 ) ( 0 , 1 ) 2 4 d 2   ( 3 , 2 ) ( 3 , 3 )   R = 3    ( 7 , 2 ) ( 0 , 1 )  4   ( 0 , 2 ) ( 0 , 3 ) 5 R = A ∗ ✄ M � Routing/Forwarding matrix R (i, d) = A ∗ ( i , q ) ✄ M ( q , d ) q tgg22 ( Computer Laboratory University of Cambridge, UK timothy.griffin@cl.cam.ac.uk ) Algebraic Path Finding 23-05-2012 14 / 37

  15. Working out the algebraic details A model of Internet routing using semi-modules. John N. Billings and Timothy G. Griffin. RelMiCS11/AKA6, November 2009. Application to route redistribution and administrative distance. ◮ On the interaction of multiple routing algorithms. M. Abdul Alim, Timothy G. Griffin. ACM CoNEXT 2011, December 2011. tgg22 ( Computer Laboratory University of Cambridge, UK timothy.griffin@cl.cam.ac.uk ) Algebraic Path Finding 23-05-2012 15 / 37

  16. Semiring limitations — some realistic metrics are not distributive! Two ways of forming “lexicographic” combination of shortest paths sp and bandwidth bw . Widest shortest paths metric values of form ( d , b ) d in sp b in bw consider d first, break ties with b is distributive (some details ignored ...) Shortest Widest paths metric values of form ( b , d ) d in sp b in bw consider b first, break ties with d tgg22 ( Computer Laboratory University of Cambridge, UK timothy.griffin@cl.cam.ac.uk ) Algebraic Path Finding 23-05-2012 16 / 37 NOT distributive

  17. Left-Local Optimality Say that L is a left locally-optimal solution when L = ( A ⊗ L ) ⊕ I . That is, for i � = j we have � L ( i , j ) = A ( i , q ) ⊗ L ( q , j ) q ∈ V L ( i , j ) is the best possible value given the values L ( q , j ) , for all out-neighbors q of source i . Rows L ( i , _ ) represents out-trees from i (think Bellman-Ford). Columns L ( _ , i ) represents in-trees to i . Works well with hop-by-hop forwarding from i . tgg22 ( Computer Laboratory University of Cambridge, UK timothy.griffin@cl.cam.ac.uk ) Algebraic Path Finding 23-05-2012 17 / 37

Recommend


More recommend