L11: Algebraic Path Problems with applications to Internet Routing Lectures 7 and 8

Similar documents
L11: Algebraic Path Problems with applications to Internet T.G.Griffin Routingc 2015 Lectures 1, 2 / 2, 64and

L11: Algebraic Path Problems with applications to Internet Routing Lecture 9

L11: Algebraic Path Problems with applications to Internet Routing Lecture 15. Path Weight with functions on arcs?

What Have We Learned from Reverse-Engineering the Internet s Inter-domain Routing Protocol?

Building Algebraic Structures with Combinators

cs/ee/ids 143 Communication Networks

Chapter 6. Dynamic Programming. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

6. DYNAMIC PROGRAMMING II. sequence alignment Hirschberg's algorithm Bellman-Ford distance vector protocols negative cycles in a digraph

NOTES WEEK 02 DAY 1. THEOREM 0.3. Let A, B and C be sets. Then

CMPSCI 250: Introduction to Computation. Lecture #29: Proving Regular Language Identities David Mix Barrington 6 April 2012

Axioms of Kleene Algebra

1 Introduction. 2 First Order Logic. 3 SPL Syntax. 4 Hoare Logic. 5 Exercises

Asynchronous Convergence of Policy-Rich Distributed Bellman-Ford Routing Protocols

Lecture 2: Divide and conquer and Dynamic programming

PRINCIPLES OF ANALYSIS - LECTURE NOTES

Mathematics for Decision Making: An Introduction. Lecture 8

FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016)

For example, p12q p2x 1 x 2 ` 5x 2 x 2 3 q 2x 2 x 1 ` 5x 1 x 2 3. (a) Let p 12x 5 1x 7 2x 4 18x 6 2x 3 ` 11x 1 x 2 x 3 x 4,

Random Variables. Andreas Klappenecker. Texas A&M University

Extensive Form Abstract Economies and Generalized Perfect Recall

An algebraic framework for a unified view of route-vector protocols

Section Summary. Relations and Functions Properties of Relations. Combining Relations

Markov Chains. Andreas Klappenecker by Andreas Klappenecker. All rights reserved. Texas A&M University

6. DYNAMIC PROGRAMMING II

Introduction to Kleene Algebras

CS173 Strong Induction and Functions. Tandy Warnow

NOTES WEEK 13 DAY 2 SCOT ADAMS

Finite Automata and Formal Languages

The Emptiness Problem for Valence Automata or: Another Decidable Extension of Petri Nets

Mathematics for Decision Making: An Introduction. Lecture 13

L E C T U R E 2 1 : M AT R I X T R A N S F O R M AT I O N S. Monday, November 14

NOTES WEEK 01 DAY 1 SCOT ADAMS

ADVANCE TOPICS IN ANALYSIS - REAL. 8 September September 2011

Definition: A binary relation R from a set A to a set B is a subset R A B. Example:

Final Exam December 12, 2017

Valence automata as a generalization of automata with storage

How to Pop a Deep PDA Matters

Review: Review: 'pgq imgp'q th P H h 'pgq for some g P Gu H; kerp'q tg P G 'pgq 1 H u G.

Analysis of Algorithms. Outline. Single Source Shortest Path. Andres Mendez-Vazquez. November 9, Notes. Notes

Pruning digraphs for reducing catchment zones

Semantic Groundedness I: Kripke and Yablo

Final Exam December 12, 2017

CMPS 6610 Fall 2018 Shortest Paths Carola Wenk

Flows. Chapter Circulations

Subrings and Ideals 2.1 INTRODUCTION 2.2 SUBRING

Representations of the Kau man Bracket Skein Algebra of a Surface

Absorbing Lexicographic Products in Metarouting

Discrete Mathematics. Spring 2017

HOMEWORK 4 MATH B4900 DUE: 2/28/ Annihilators. Let R be a ring with 1, and let M be an R-module. The annihilator of M in R is

xy xyy 1 = ey 1 = y 1 i.e.

CS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018

Methods for Solving Linear Systems Part 2

Linear algebra comments. Sophie Marques

Lexicographic products in metarouting

Data Gathering and Personalized Broadcasting in Radio Grids with Interferences

Fall 1999 Formal Language Theory Dr. R. Boyer. 1. There are other methods of nding a regular expression equivalent to a nite automaton in

Hoare Logic and Model Checking

6.842 Randomness and Computation March 3, Lecture 8

Algorithms: Lecture 12. Chalmers University of Technology

Solving Linear Systems Using Gaussian Elimination

Discrete Mathematics. Spring 2017

Section 4.2: Mathematical Induction 1

Discrete Optimization 2010 Lecture 3 Maximum Flows

1 Alphabets and Languages

Regular Expressions and Language Properties

Data Structures and Algorithms CMPSC 465

Lecture Topic 4: Chapter 7 Sampling and Sampling Distributions

5.4 Solve Special Types of Linear Systems

Last week: proétale topology on X, with a map of sites ν : X proét X ét. Sheaves on X proét : O + X = ν O + X ét

DYNAMICAL CUBES AND A CRITERIA FOR SYSTEMS HAVING PRODUCT EXTENSIONS

Stochastic Shortest Path Problems

Theoretical Computer Science. Partially dynamic efficient algorithms for distributed shortest paths

Lecture 11: Random Variables

Data Gathering and Personalized Broadcasting in Radio Grids with Interferences

CMSC 858F: Algorithmic Game Theory Fall 2010 BGP and Interdomain Routing

Discrete Mathematics Review

On principal eigenpair of temporal-joined adjacency matrix for spreading phenomenon Abstract. Keywords: 1 Introduction

Combinatorial Optimization

14. Rational maps It is often the case that we are given a variety X and a morphism defined on an open subset U of X. As open sets in the Zariski

MATH 387 ASSIGNMENT 2

Discrete Optimization 2010 Lecture 2 Matroids & Shortest Paths

Real Time Value Iteration and the State-Action Value Function

Pathfinding through Congruences

This pre-publication material is for review purposes only. Any typographical or technical errors will be corrected prior to publication.

Lecture Notes 1 Basic Probability. Elements of Probability. Conditional probability. Sequential Calculation of Probability

Advanced topic: Space complexity

Proof Techniques (Review of Math 271)

Scribes: Po-Hsuan Wei, William Kuzmaul Editor: Kevin Wu Date: October 18, 2016

Single Source Shortest Paths

Lecture 7: Shortest Paths in Graphs with Negative Arc Lengths. Reading: AM&O Chapter 5

6.207/14.15: Networks Lectures 4, 5 & 6: Linear Dynamics, Markov Chains, Centralities

Lecture 2: Homotopy invariance

Problem One: Order Relations i. What three properties does a binary relation have to have to be a partial order?

Separation Logic. Part 3. Arthur Charguéraud. February / 66

CSE 431/531: Analysis of Algorithms. Dynamic Programming. Lecturer: Shi Li. Department of Computer Science and Engineering University at Buffalo

Lecture 1. Chapter 1. (Part I) Material Covered in This Lecture: Chapter 1, Chapter 2 ( ). 1. What is Statistics?

NOTES WEEK 14 DAY 2 SCOT ADAMS

Notes for Lecture Notes 2

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

OpenFst: An Open-Source, Weighted Finite-State Transducer Library and its Applications to Speech and Language. Part I. Theory and Algorithms

Transcription:

L: Algebraic Path Problems with applications to Internet Routing Lectures 7 and 8 Timothy G. Grifn timothy.grifn@cl.cam.ac.uk Computer Laboratory University of Cambridge, UK Michaelmas Term, 27 tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routingc 27 Lectures 7 and / 33 8 Recall our basic iterative algorithm A closer look... A xy I A xk`y AA xky I A xk`y pi, jq Ipi, jq à Api, uqa xky pu, jq u Ipi, jq à Api, uqa xky pu, jq pi,uqpe This is the basis of distributed Bellman-Ford algorithms (as in RIP and BGP) a node i computes routes to a destination j by applying its link weights to the routes learned from its immediate neighbors. It then makes these routes available to its neighbors and the process continues... tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routingc 27 Lectures 72 and / 33 8

What if we start iteration in an arbitrary state M? In a distributed environment the topology (captured here by A) can change and the state of the computation can start in an arbitrary state (with respect to a new A). Theorem For ď k, A xy M M A xk`y M AA xky M I A xky M If A is q-stable and q ă k, then Ak M A pk q A xky M Ak M A tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routingc 27 Lectures 73 and / 33 8 RIP-like example (see RFC 58) 2 3 2 3 Adjacency matrix A Adjacency matrix A 2 2 3 8 8 8 f f 2 8 3 8 8 2 3 8 8 8 8 f f 2 8 3 8 8 8 Using AddZerop8, pn, min, `qq but ignoring inl and inr tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routingc 27 Lectures 74 and / 33 8

RIP-like example counting to convergence (2) 2 3 2 3 The solution A The solution A 2 2 3 2 2 2 3 2 2 f f 2 3 2 3 f f tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routingc 27 Lectures 75 and / 33 8 RIP-like example counting to convergence (3) The scenario: we arrived at A, but then links tp, 3q, p3, qu fail. So we start iterating using the new matrix A 2. xky Let B K represent A 2 M, where M A. tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routingc 27 Lectures 76 and / 33 8

RIP-like example counting to convergence (4) B 2 3 2 2 2 3 2 2 f f B 3 2 3 4 4 2 4 3 f f B 2 3 2 3 2 2 3 f f B 4 2 3 5 5 2 5 3 f f B 2 2 3 3 3 2 3 3 f f B 5 2 3 6 6 2 6 3 f f tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routingc 27 Lectures 7 and / 33 8 RIP-like example counting to convergence (5) B 6 2 3 7 7 2 7 3 2 2 f f B 9 2 3 2 3 f f B 7 2 3 8 8 2 8 3 f f B 2 3 2 3 f f B 8 2 3 9 9 2 9 3 f f tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routingc 27 Lectures 78 and / 33 8

RIP-like example counting to innity () 2 3 2 3 The solution A The solution A 3 2 3 2 2 2 3 2 2 f f 2 3 8 8 2 8 3 8 8 8 f f xky Now let B K represent A 3 M, where M A. tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routingc 27 Lectures 79 and / 33 8 RIP-like example counting to innity (2) B B B 2 2 3 2 2 2 3 2 2 f f 2 3 2 3 2 2 3 8 8 8 2 3 3 3 2 3 3 8 8 8 f f f f.. B 376.. B 998... 2 3 377 377 2 377 3 8 8 8. 2 3 999 999 2 999 3 8 8 8. f f f f tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures 7 and / 33 8

RIP-like example What s going on? Recall A xky M pi, jq Ak Mpi, jq A pi, jq A (i, j) may be arrived at very quickly but A k Mpi, jq may be better until a very large value of k is reached (counting to convergence) or it may always be better (counting to innity). Solutions? RIP: 8 6 tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures 7 and / 33 8 Other solutions? The Border Gateway Protocol (BGP) BGP exchanges metrics and paths. It avoids counting to innity by throwing away routes that have a loop in the path. The plan... Starting from pn, min, `q we will attempt to construct a semiring (using our lexicographic operators) that has elements of the form pd, Xq, where d is a shortest-path metric and X is a set of paths. Then, by succsessive renements, we will arrive at a BGP-like solution. tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures2 7 and / 33 8

A useful construction: The Lifted Product Lifted product semigroup Assume ps, q is a semigroup. Let liftps, q pnp2 S q, ˆ q where Xˆ Y tx y x P X, y P Y u. t, 3, 7u ˆ` t, 3, 7u t2, 4, 6, 8, 2, 34u tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures3 7 and / 33 8 Some rules (remember 2 ď S ) ASpliftpS, qq ô ASpS, q IDpliftpS, qq ô IDpS, q pˆα tαuq ANpliftpS, qq ô TRUE pω tuq CMpliftpS, qq ô CMpS, q SLpliftpS, qq ô ILpS, q _IRpS, q _ pipps, q ^ S 2q IPpliftpS, qq ô SLppS, qq ILpliftpS, qq ô FALSE IRpliftpS, qq ô FALSE tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures4 7 and / 33 8

Turn the Crank... ô ô ô ô IPpliftpliftptt, f u, ^qq SLpliftptt, f u, ^q ILptt, f u, ^q _IRptt, f u, ^q _ pipptt, f u, ^q ^ tt, f u 2q FALSE _FALSE _ ptrue ^TRUEq TRUE Note This kind of calculation become more interesting as we introduce more complex constructors and consider more complex properties... tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures5 7 and / 33 8 Let s use lift to construct bi-semigroups... Union with lifted product Assume ps, q is a semigroup. Let union_liftps, q pp n psq, Y, ˆ q where Xˆ Y tx y x P X, y P Y u, and X, Y P P n psq, the set of nite subsets of S. tu is the if has idenity α, then tαu is the a non-empty sequence will be written as rs, s,, s k s when does it have an annihilator for Y? we really need some inference rules here... tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures6 7 and / 33 8

pathspeq over graph G pv, Eq pathspeq union_liftpe, q where is sequence concatenation. spwp For our graph G pv, Eq, we will build a shortest paths with paths semiring spwp AddZerop, pn, min, `q ˆ pathspeqq Given an arc pi, jq we will give it a weight of the form Api, jq inlpn, trpi, jqsuq for some n P N. However, for ease of reading we will write and so on. Api, jq pn, trpi, jqsuq tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures7 7 and / 33 8 Recall : RIP-like counting to convergence 2 3 2 3 The solution A The solution A 2 2 3 2 3 2 f f 2 2 2 3 2 2 3 Imagine that we have augmented this example with paths. f f tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures8 7 and / 33 8

B Let B A be the solution for the (path augmented) matrix A : 2 3 p, tǫuq p, trp, qsuq p, trp, 2qsuq p2, trp, q, p, 3qsuq p, trp, qsuq p, tǫuq p, trp, 2qsuq p, trp, 3qsuq 2 p, trp2, qsuq p, trp2, qsuq p, tǫuq p2, trp2, q, p, 3qsuq 3 p2, trp3, q, p, qsuq p, trp3, qsuq p2, trp3, q, p, 2qsuq p, tǫuq tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures9 7 and / 33 8 B Now, arcs p, 3q and p3, q vanish! With the new (path-augmented) matrix A 2, we start the iteration in the old state B. After one iteration we have B p, 3q p2, trp, q, p, 3qsuq B p, 3q p3, trp, q, p, q, p, 3qs, rp, 2q, p2, q, p, 3qsuq B p2, 3q p2, trp2, q, p, 3qsuq B p3, q p, trp3, 2q, p2, qsuq (stable!) B p3, q p, trp3, 2q, p2, qsuq (stable!) B p3, 2q p, trp3, 2qsuq (stable!) tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures2 7 and / 33 8

B 2 After another iteration we have B 2 p, 3q p3, trp, 2q, p2, q, p, 3qsuq B 2 p, 3q p3, trp, q, p, q, p, 3qs, rp, 2q, p2, q, p, 3qsuq B 2 p2, 3q p3, trp2, q, p, q, p, 3qsuq tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures2 7 and / 33 8 B 3 After another iteration we have B 3 p, 3q p4, trp, q, p, q, p, q, p, 3qs, rp, q, p, 2q, p2, q, p, 3qs, rp, 2q, p2, q, p, q, p, 3qsuq B 3 p, 3q p4, trp, q, p, 2q, p2, q, p, 3qs, rp, 2q, p2, q, p, q, p, 3qsuq B 3 p2, 3q p4, trp2, q, p, 2q, p2, q, p, 3qs, rp2, q, p, q, p, q, p, 3qs, rp2, q, p, 2q, p2, q, p, 3qsuq tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures22 7 and / 33 8

B Finally, the problem is resolved at the -th iteration: 2 3 p, tǫuq p, trp, qsuq p, trp, 2qsuq p, trp, 2q, p p, trp, qsuq p, tǫuq p, trp, 2qsuq p, trp, 2q, p 2 p, trp2, qsuq p, trp2, qsuq p, tǫuq p, trp2, 3 3 p, trp3, 2q, p2, qsuq p, trp3, 2q, p2, qsuq p, trp3, 2qsuq p, tǫuq tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures23 7 and / 33 8 Recall RIP-like counting to innity 2 3 2 3 It should be clear that we have not yet reached our goal. This example will lead to sets of ever longer and longer paths and never terminate. How do we x this? tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures24 7 and / 33 8

Reductions If ps,, bq is a semiring and r is a function from S to S, then r is a reduction if for all a and b in S rpaq rprpaqq 2 rpa bq rprpaq bq rpa rpbqq 3 rpa b bq rprpaq b bq rpa b rpbqq Note that if either operation has an identity, then the rst axioms is not needed. For example, rpaq rpa q rprpaq q rprpaqq tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures25 7 and / 33 8 Reduce operation If ps,, bq is semiring and r is a reduction, then let red r psq ps r, r, b r q where S r ts P S rpsq su 2 x r y rpx yq 3 x b r y rpx b yq Is the result always semiring? tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures26 7 and / 33 8

Elementary paths reduction Recall pathspeq pathspeq union_liftpe, q where is sequence concatenation. A path p is elementary if no node is repeated. Dene the reduction rpxq tp P X p is an elementary pathu Semiring of Elementary Paths epathspeq red r ppathspeqq tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures27 7 and / 33 8 Starting in an arbitrary state? 2 3 2 3 tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures28 7 and / 33 8

Starting in an arbitrary state? No! using AddZerop8, pn, min, `q ˆ epathspeqq.. B 998... 2 3 p, tǫuq p, trp, qsuq p, trp, 2qsuq p999, tuq p, trp, qsuq p, tǫuq p, trp, 2qsuq p999, tuq 2 p, trp2, qsuq p, trp2, qsuq p, tǫuq p999, tuq 3 8 8 8 p, tǫuq. f f tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures29 7 and / 33 8 Solution: use another reduction! r pinrp8qq inrp8q " inrp8q if W tu rpinlqps, W q inlps, W q otherwise Now use this instead red r paddzerop8, pn, min, `q ˆ epathspeqqq tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures3 7 and / 33 8

Starting in an arbitrary state? B and B 2 3 p, tǫuq p, trp, qsuq p, trp, 2qsuq p2, trp, q, p, 3qsuq p, trp, qsuq p, tǫuq p, trp, 2qsuq p, trp, 3qsuq 2 p, trp2, qsuq p, trp2, qsuq p, tǫuq p2, trp2, q, p, 3qsuq 3 p2, trp3, q, p, qsuq p, trp3, qsuq p2, trp3, q, p, 2qsuq p, tǫuq 2 3 p, tǫuq p, trp, qsuq p, trp, 2qsuq p2, trp, q, p, 3qsuq p, trp, qsuq p, tǫuq p, trp, 2qsuq 8 2 p, trp2, qsuq p, trp2, qsuq p, tǫuq p2, trp2, q, p, 3qsuq 3 8 8 8 p, tǫuq f f tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures3 7 and / 33 8 Starting in an arbitrary state? B 2 and B 3 2 3 p, tǫuq p, trp, qsuq p, trp, 2qsuq p3, trp, 2q, p2, q, p, 3qsuq p, trp, qsuq p, tǫuq p, trp, 2qsuq 8 2 p, trp2, qsuq p, trp2, qsuq p, tǫuq p3, trp2, q, p, q, p, 3qsuq 3 8 8 8 p, tǫuq f f 2 3 p, tǫuq p, trp, qsuq p, trp, 2qsuq 8 p, trp, qsuq p, tǫuq p, trp, 2qsuq 8 2 p, trp2, qsuq p, trp2, qsuq p, tǫuq 8 3 8 8 8 p, tǫuq f f tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures32 7 and / 33 8

Homework 3 (due 6 November) Prove SLpliftpS, qq ô ILpS, q _IRpS, q _ pipps, q ^ S 2q Characterise exactly when union_liftps, q is a semiring. tgg22 (cl.cam.ac.uk) L: Algebraic Path Problems with applications to Internet T.G.Grifn Routing c 27 Lectures33 7 and / 33 8