Professional Documents
Culture Documents
Path Problems Networks - Baras Theodorakopoulos Walrand
Path Problems Networks - Baras Theodorakopoulos Walrand
Synthesis Lectures on
Communication Networks
Editor
Jean Walrand, University of California, Berkeley
Synthesis Lectures on Communication Networks is an ongoing series of 50- to 100-page
publications on topics on the design, implementation, and management of communication
networks. Each lecture is a self-contained presentation of one topic by a leading expert. The topics
range from algorithms to hardware implementations and cover a broad spectrum of issues from
security to multiple-access protocols. The series addresses technologies from sensor networks to
reconfigurable optical networks. The series is designed to:
• Provide the best available presentations of important aspects of communication networks.
• Help engineers and advanced students keep up with recent developments in a rapidly
evolving technology.
• Facilitate the development of courses in this field.
Network Simulation
Richard M. Fujimoto, Kalyan S. Perumalla, and George F. Riley
2006
Copyright © 2010 by Morgan & Claypool
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in
any form or by any means—electronic, mechanical, photocopy, recording, or any other except for brief quotations in
printed reviews, without the prior permission of the publisher.
DOI 10.2200/S00245ED1V01Y201001CNT003
Lecture #3
Series Editor: Jean Walrand, University of California, Berkeley
Series ISSN
Synthesis Lectures on Communication Networks
Print 1935-4185 Electronic 1935-4193
Path Problems in Networks
John S. Baras
University of Maryland
George Theodorakopoulos
École Polytechnique Fédérale de Lausanne
M
&C Morgan & cLaypool publishers
ABSTRACT
The algebraic path problem is a generalization of the shortest path problem in graphs. Various
instances of this abstract problem have appeared in the literature, and similar solutions have been
independently discovered and rediscovered. The repeated appearance of a problem is evidence of
its relevance. This book aims to help current and future researchers add this powerful tool to their
arsenal, so that they can easily identify and use it in their own work.
Path problems in networks can be conceptually divided into two parts: A distillation of the
extensive theory behind the algebraic path problem, and an exposition of a broad range of appli-
cations. First of all, the shortest path problem is presented so as to fix terminology and concepts:
existence and uniqueness of solutions, robustness to parameter changes, and centralized and dis-
tributed computation algorithms. Then, these concepts are generalized to the algebraic context of
semirings. Methods for creating new semirings, useful for modeling new problems, are provided.
A large part of the book is then devoted to numerous applications of the algebraic path problem,
ranging from mobile network routing to BGP routing to social networks. These applications show
what kind of problems can be modeled as algebraic path problems; they also serve as examples on
how to go about modeling new problems.
This monograph will be useful to network researchers, engineers, and graduate students. It
can be used either as an introduction to the topic, or as a quick reference to the theoretical facts,
algorithms, and application examples. The theoretical background assumed for the reader is that of
a graduate or advanced undergraduate student in computer science or engineering. Some familiarity
with algebra and algorithms is helpful, but not necessary. Algebra, in particular, is used as a convenient
and concise language to describe problems that are essentially combinatorial.
KEYWORDS
algebraic path problem, algebraic modeling, semiring, dioid, graph, shortest path prob-
lem, communication network, routing, distributed algorithms, Dijkstra, Bellman-Ford,
Floyd-Warshall
vii
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
4 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.1 Path enumeration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27
4.2 Expectation Semirings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.3 Minimum Weight Spanning Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.4 Longest path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.5 Quality of Service (QoS) routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.6 BGP routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.7 Shortest path with time-inhomogeneous edges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.8 Network reliability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.8.1 Deterministic failures 34
4.8.2 Probabilistic failures 35
4.9 Shortest paths with gains/losses on the edges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.10 Trust-reputation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.10.1 Path semiring 38
4.10.2 Distance semiring 38
4.10.3 PGP trust computation model 39
4.10.4 EigenTrust 40
4.10.5 Semantic Web Semiring 41
4.11 Social networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
CONTENTS ix
4.11.1 Balance Semiring 42
4.11.2 Cluster Semiring 42
4.11.3 Geodetic semiring 43
4.11.4 Geosetic semiring 43
4.12 Traffic Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.13 Applications of sensitivity analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47
4.13.1Traffic Redirection Attacks 47
5 Related Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.1 Non-semiring path problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.2 Semiring non-path problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.2.1 The Max-Plus semiring revisited 53
5.2.2 Semirings as an algebra for combinatorics 53
5.2.3 Network Calculus 54
Authors’ Biographies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Preface
Numerous network problems can be viewed as instances of the same abstract “algebraic path
problem,” the most classical example being shortest path routing. In all these problems, the un-
derlying model is a graph, and the objects of central importance are the paths between two given
vertices of that graph. The edges of each path are aggregated along the path, and then the results
are aggregated across all paths. In the shortest path problem, we aggregate along a path by adding its
edge weights, and we aggregate across paths by taking the minimum path weight.
The differences among the various instances of the algebraic path problem lie in the meaning
assigned to edge weights (delays in the case of shortest path routing), and in the operations used
to aggregate these weights. For example, suppose that the weight of an edge is the probability of
successfully transmitting a data packet along that edge. We can multiply edge weights along each
path, and then take the maximum path weight across all paths from a given source to a given
destination. Then, we have the maximum reliability path problem. As long as the set of weights and
the operators satisfy certain algebraic properties (those of a semiring), the same facts are true and the
same algorithms can be used to find the solution.
Knowing these common and reusable facts and algorithms adds a valuable modeling and
evaluation tool to the network researcher’s arsenal. The main motivation for writing this text was the
observation that these facts were independently discovered in various areas. Therefore, it behooves
one to become familiar with their common structure, so as to be able to identify it when it appears.
A particularly useful feature, which seems not to have received due attention in the literature, is that
algorithms described as an algebraic path problem lend themselves to distributed implementation,
similarly to the distributed version of the Bellman-Ford algorithm for shortest paths.
This monograph is targeted at network researchers, engineers, and graduate students. The
theoretical background assumed for the reader is that of a graduate or advanced undergraduate
student in computer science or engineering. Some familiarity with algebra and algorithms is helpful,
but not necessary. Algebra, in particular, should be seen as a convenient and concise language to
describe problems that are essentially combinatorial. The presented applications are mostly drawn
from the networking literature, so network researchers can use them as examples of how to apply the
theory to their own specific areas. In fact, one could start with the applications as a quick introduction
to the topic.
The content of this monograph is divided into theory and applications. In Chapter 1, we
refresh the reader’s memory on the classical shortest path problem, and touch upon the concepts
(solutions and algorithms) that are generalized in the following chapters. In Chapter 2, we define
semirings, describe ways for creating new ones, and present the main problem to be solved, namely,
resolution of x = Ax + b in semirings. We present properties of the solutions (existence, uniqueness,
xii PREFACE
sensitivity to parameter changes) in Chapter 3, where we also generalize the algorithms for computing
solutions.
In Chapter 4, we discuss numerous applications and show how they fit in the algebraic path
framework. Chapter 5 gives examples from two areas that are very close to semiring path problems.
First, non-semiring path problems, i.e., problems that can be formulated as path problems, but their
natural formulation does not lead to a semiring. We show how one can still try to overcome some
of the obstacles so as to satisfy the properties of a semiring. The second area is that of semiring
non-path problems, i.e., different applications of semirings, but still in the areas of combinatorics
and networking. A summary chapter (Chapter 6) at the end lists all the semirings and applications
presented in Chapter 4.
In general, we have refrained from giving detailed proofs. Already existing books have ap-
proached the algebraic path problem from a more mathematical viewpoint [31], [14], [22], [21]
and most recently [23]. Our choice in this monograph has been to give the main theoretical facts,
and then present a broad range of applications so as to demonstrate the practical relevance of the
algebraic path problem.
CHAPTER 1
k−1
w(p) = w(vi , vi+1 ). (1.2)
i=0
The shortest path weight from vertex u to vertex v is the smallest path weight among all paths
that start at u and end at v:
minuv w(p). (1.3)
p∈P
If there is no path from u to v, then the shortest path weight is defined to be infinite. Any
path whose weight is equal to the shortest path weight, is a shortest path from u to v.
Existence If a negative weight cycle exists in G and is reachable from s, then there is no shortest
path to any destination vertex t that is reachable from any vertex of the cycle: For any finite number
M ∈ R, there are s − t paths with weight less than M. In this case, we define the shortest path
weight for the appropriate destinations to be −∞.
1.2. COMPUTATION OF SHORTEST PATHS 3
Uniqueness If there are no negative weight cycles, then the shortest path weight is unique although
the shortest path might not be. If there are zero-weight cycles, there will be an infinity of shortest
paths traversing the zero-weight cycle an arbitrary number of times. If all the cycles have positive
weight, then the shortest paths will be elementary.
The Single Source Shortest Path problem (SSSP) amounts to finding the shortest paths from
a given vertex s to all other vertices of G.
The All-Pairs Shortest Path problem (APSP) amounts to finding the shortest paths from
every vertex s ∈ V to every other vertex of G.
There are two remarks: The algorithms that follow compute the shortest path weight. It is
easy to augment them to compute the corresponding path, too. Note also that in network routing,
an alternative version is used, that of the single destination shortest path. But this is equivalent to
the SSSP; all that is needed is to reverse the direction of all the edges.
1.2.1 DIJKSTRA
Dijkstra’s algorithm [16] solves the SSSP when all edges have non-negative weights. It iterates over
progressively longer path weights.
Dijkstra(G, w, s)
1 d[s] ← 0
2 for v ∈ V \ {s}
3 do d[v] ← ∞
4 Q←V
5 while Q = ∅
6 do u ← v s.t. d[v] = min{d[x]|x ∈ Q}
7 Q ← Q \ {u}
8 for each vertex v ∈ Q
9 do d[v] ← min{d[v], d[u] + w(u, v)}
The invariant of Dijkstra’s algorithm is that, in line 5, the set V \ Q contains vertices whose
shortest path weights have been determined. At the beginning of each while loop, the vertex v with
the lowest shortest path estimate d[v] is removed from Q. It can be proven that at the time of this
removal, d[v] is equal to the weight of the shortest s − v path. Therefore, when Q is empty, all
shortest path weights have been determined.
4 1. CLASSICAL SHORTEST PATH
The time complexity of Dijkstra’s algorithm is O(n2 ). If the graph is sparse, i.e., many edge
weights are ∞, we can improve it to O(n log n + m) by relaxing only the finite edge weights and
maintaining the estimates d[v], v ∈ V as a Fibonacci heap data structure1 .
1.2.2 BELLMAN-FORD
The Bellman-Ford algorithm (based on Bellman [6] and Ford [33]) solves the SSSP even when
there are negative weight edges, but it is slower than Dijkstra. It can be also used to detect negative
cycles.
It iterates over the number of edges in the paths. At each execution of the loop (lines 4 - 6),
paths that have exactly k edges are taken into account. So, at the end of the loop for a given value
of k, the estimate d[v] is equal to the shortest s − v path weight among all paths, not necessarily
elementary, with at most k edges.
There are two slightly different versions of the Bellman-Ford algorithm, which are equivalent
only if the initial distance estimates to all non-source nodes are set to values higher than the true
ones.
Bellman-Ford-v1(G, w, s)
1 d[s] ← 0
2 for v ∈ V \ {s}
3 do d[v] ← ∞
4 for k ← 1 to n − 1
5 do for each edge (u, v) ∈ E
6 do d[v] ← min{d[v], d[u] + w(u, v)}
This version of Bellman-Ford takes O(nm) time, which is equal to O(n3 ) if the graph is
dense. From line 6, we can see that the value of each d[v] can only decrease at each iteration, so the
initial conditions need to be higher than the true shortest path weights. Otherwise, the algorithm
will converge, if at all, to a solution that is irrelevant for the shortest path problem.
Bellman-Ford-v2(G, w, s)
1 d 0 [s] ← 0
2 for v ∈ V \ {s}
3 do d 0 [v] ← ∞
4 for k ← 1 to n − 1
5 do for each node v ∈ V \ {s}
6 do d k [v] ← minu∈V {d k−1 [u] + w(u, v)}
We will use the term relaxation for the operation of line 6:
d k [v] ← min{d k−1 [u] + w(u, v)}. (1.4)
u∈V
1 For more on data structures and running time of algorithms, we refer the reader to textbooks on algorithms [15].
1.3. DISTRIBUTED COMPUTATION OF SHORTEST PATHS 5
This version of Bellman-Ford takes O(n3 ) time, which can be shortened to O(nm) if in line 6
we take the minimum over existing edges only. The only solution to which this version can converge
is the correct shortest path weights. Moreover, the initial conditions d 0 [v] for v = s are arbitrary. If
there is no convergence after n − 1 iterations, then there is a negative weight cycle in the graph.
Observe that convergence is equivalent to Bellman’s equation:
1.2.3 FLOYD-WARSHALL
The Floyd-Warshall algorithm computes the shortest paths between all pairs of vertices (APSP), as
opposed to just one source and all destinations.
It iterates over increasing sets of vertices allowed to be used in the paths. At step k of the
outermost loop below, Dijk contains the shortest path weight from i to j among the paths that only
use nodes 1, . . . , k as intermediate nodes.
Recall that A is the weighted adjacency matrix of G.
Floyd-Warshall(A)
1 D0 ← A
2 for k ← 1 to n
3 do for i ← 1 to n
4 do for j ← 1 to n
5 do Dijk ← min{Dijk−1 , Dik
k−1
+ Dkj
k−1
}
Since line 5 is executed n3 times, and each execution takes constant time, the time complexity
of Floyd-Warshall is (n3 ).
Nodes asynchronously receive their neighbors’ estimates and update their local copies of their
neighbors’ estimates. Then, they compute new estimates of their own shortest distances. At node v
the following happens:
d t [v] = min {w(v, u) + dvt [u]}. (1.8)
u∈N (v)
After this update, node v sends these estimates to its neighbors. The algorithm converges
within finite time to the correct shortest distance values, as long as:
• The nodes never stop sending/receiving estimates from their neighbors and computing new
estimates of their own shortest distances.
• Nodes stop sending old distance estimates some finite time after computing them.
Because of the arbitrary choice of initial conditions, the algorithm may need an excessive
number of iterations to terminate. This is called the “counting to infinity” problem. It occurs, for
example, after the following sequence of events: Consider two successive links (u, v) and (v, w) on
the shortest path from u to the destination. The link (v, w) breaks, i.e., its cost becomes infinite.
Node u sends to v its estimate for its shortest path weight to the destination, and v thinks that u
has a path with that cost to the destination. This, however, is not true since u’s path was using the
now broken link (v, w). But u is not aware of the link break, and v is not aware that u’s path was
using the link (v, w). Node v performs the update (1.8) and sends to u its new estimate. Node u,
in turn, uses the new estimate received from v to update its own estimate, which u then sends to v.
The message exchanges continue until the estimates reach the cost of the next shortest path to the
destination, or, if no other path exists, until the estimates reach the value chosen by the algorithm
to represent infinity.
9
CHAPTER 2
where the weight of a path p = (v0 , v1 , . . . , vk ) is equal to the sum of the weights of its edges:
Many more network (and not only) problems can be solved by finding appropriate operators
to replace min and +. We will see examples in Chapter 4. We will denote by ⊕ the operator that
replaces min and by ⊗ the operator that replaces +. However, the operators cannot be arbitrary: they
have to satisfy, at the very least, some properties. If the operators, defined on an appropriate set, form
a semiring, then the resulting problem is called the algebraic path problem.
Definition 2.1 A semiring is a set S, the carrier set, endowed with two binary operators ⊕ and ⊗
that satisfy the following properties:
• (S, ⊕) is a commutative monoid, i.e., ⊕ is commutative, associative, with neutral element
0 ∈ S:
a⊕b =b⊕a
(a ⊕ b) ⊕ c = a ⊕ (b ⊕ c)
a⊕ 0 = a.
(ab)c = a(bc)
a1 = a
1 =a
a0 = a
0 = .0
• ⊗ distributes over ⊕:
a(b ⊕ c) = ab ⊕ ac
(b ⊕ c)a = ba ⊕ ca.
10 2. THE ALGEBRAIC PATH PROBLEM
The algebraic path problem is the computation of the ⊕-sum of the weights of all the paths
p from s to t (see Figure 2.1):
dst = w(p), (2.3)
p∈P st
where the weight of a path p is computed from the weights of its edges using the ⊗ operator:
dst = p∈P st w(p)
w(p) = e∈p w(e)
e2 e4 e6 e8 e10
s e1 e3 e5 e7 e9 t
Figure 2.1: The algebraic path problem computes the ⊕-sum of the weights of all paths from a source
s to a destination d. Each path weight is the ⊗-product of the weights of its edges.
Associativity and non-commutativity of ⊗ For computing the path weight from its constituent
edge weights, associativity means that it should not matter in which sequence one performs the
pairwise operations. But since, in general, we may need to preserve the order of the edges on the
path, ⊗ is not necessarily commutative. If it is, the semiring is called commutative, as is the case for
the (min, +) semiring. Note that the non-commutativity of ⊗ implies that the weight of a cycle is
not uniquely determined: one also has to specify an initial vertex. For each choice of initial vertex,
the weight of the corresponding cycle is in general different.
Commutativity and Associativity of ⊕ The ⊕ operator aggregates the weights of a set of paths. A
set does not imply an order among its elements, therefore ⊕ applied to {a, b} should give the same
result as ⊕ applied to {b, a}. Moreover, any sequence of pairwise aggregations should have the same
result.
2.1. SEMIRINGS AND THE ALGEBRAIC PATH PROBLEM 11
Neutral and absorbing elements The element 0 represents the weight of a non-existing edge/path.
So, it is ignored when aggregated by ⊕. Also, it is natural that the weight of any edge/path extended
with a non-existing edge/path is also .The
0 element 1 is more a technical requirement. Sometimes,
it corresponds to the best possible path weight.
We can always add neutral elements for both ⊕ and ⊗ if they do not exist. For ⊕, for example,
we just define a new element 0 with the property
a⊕
0 =
0 ⊕ a = a, ∀a ∈ S, (2.5)
Distributivity of ⊗ over ⊕ Distributivity comes into play when aggregating paths with overlapping
edges. If the paths being aggregated are independent, then distributivity is irrelevant. But if there is
an edge overlap, the APP definition dictates that path weights should be computed individually with
⊗, and only then it is aggregated with ⊕. However, this is inefficient if there are many edge overlaps.
The number of paths is exponential in the number of nodes in the graph, but this complexity can be
severely decreased if distributivity holds. With distributivity, a common edge can be “factored out”
and be taken into account in the calculations only once for all the paths that go through it. This is
in general what is leveraged by the algorithms that we will present later in the book.
Absence of distributivity or ⊗-associativity When modeling a path problem, it might be the case
that the most natural way of assigning edge weights does not lead to a semiring. Nevertheless, it
might still be possible to find appropriate weights and operators that solve the same problem but
satisfy the semiring properties. When distributivity, ⊗-associativity, or both are lacking, Section 5.1
provides hints for how to proceed.
Definition 2.2 A binary relation on a set S is an order if it is reflexive, transitive, and antisym-
metric. That is, for all a, b, c ∈ S the following statements hold:
• (reflexivity) a a.
Definition 2.4 A semiring is called a dioid if it is canonically ordered. That is, if the following
relation is an order on S:
a b ⇔ ∃c ∈ S : a ⊕ c = b. (2.7)
Is there a smallest element in any semiring? That is, is there an element x ∈ S, such that
∀a ∈ S, x a? What about a largest element?
We can see that the properties of this order depend only on the properties of ⊕. Because of the
properties of ⊕ within a semiring, reflexivity and transitivity are automatically satisfied; antisymmetry
is not. Actually, if ⊕ is such that antisymmetry is satisfied (i.e., the semiring is a dioid), then the
semiring cannot be a ring. In other words, dioids and rings are mutually exclusive structures. Note
that there are semirings that are neither dioids, nor rings.
If ⊕ is idempotent (∀a ∈ S, a ⊕ a = a), then S is canonically ordered since the antisymmetry
of can be deduced.
If ⊕ is selective (∀a, b ∈ S, a ⊕ b = a or b), then S is canonically ordered, and the order
is total: Selectivity implies idempotency, and it also implies that for any pair a, b ∈ S, either a b
or b a.
In a dioid, the direction of the order is preserved when multiplying both sides with the
same element or adding to both sides the same element:
a ⊕ x b ⊕ x,
a b ⇒ ∀x ∈ S, (2.8)
a ⊗ x b ⊗ x.
2.2.2 CONVOLUTION
If (M, ∗) is a monoid with identity 1̄, then the set of functions f : M −→ S forms a semiring under
+ and :
(f + g)(m) =f (m) ⊕ g(m) (2.12)
(f g)(m) = f (m ) ⊗ g(m ). (2.13)
m ∗m =m
For example, let the monoid M have two elements {1̄, x}, with the operation ∗ defined as
1̄ ∗ 1̄ = 1̄ 1̄ ∗ x = x (2.14)
x ∗ 1̄ = x x ∗ x = 1̄. (2.15)
Then, the operator of the resulting semiring is
(f g)(1̄) =f (1̄)g(1̄) ⊕ f (x)g(x) (2.16)
(f g)(x) =f (1̄)g(x) ⊕ f (x)g(1̄). (2.17)
It is isomorphic to a semiring on S × S with operators
(a, b) + (c, d) =(a ⊕ c, b ⊕ d) (2.18)
(a, b) (c, d) =(ac ⊕ bd, ad ⊕ bc). (2.19)
Now, consider the following monoid: M = {x k , k ∈ N}, where x is a formal variable, and ∗
is defined by x k1 ∗ x k2 = x k1 +k2 , k1 , k2 ∈ N. The functions f : M −→ S can be viewed as formal
power series in x with coefficients in S: E.g., f (xk ) = ak ⇔ f = a0 ⊕ a1 x ⊕ a2 x 2 ⊕ . . . ⊕ an x n ⊕
x
0 n+1 ⊕ . . .. Then,
∞
f +g = (ak ⊕ bk )x k (2.20)
k=0
∞
f g = ck x k , (2.21)
k=0
14 2. THE ALGEBRAIC PATH PROBLEM
where ck = i+j =k ai bj .
Another useful monoid to keep in mind is the set of paths of a graph, under concatenation of
paths.
f ()
0 = 0 (2.22)
f ()
1 = 1 (2.23)
f (a ⊕ b) = f (f (a) ⊕ b), ∀a, b ∈ S (2.24)
f (ab) = f (f (a)b) = f (af (b)), ∀a, b ∈ S. (2.25)
and
a + b =f (a ⊕ b) (2.27)
a b =f (ab). (2.28)
An example where a reduction function is used is the network reliability semiring, given in
Section 4.8.
The first way to create a new semiring is by defining addition and multiplication in H
as [23] [28]
That is, endomorphism addition is defined as pointwise addition, and endomorphism addition is
defined as composition.
Then, the triplet (H, +, ) is a semiring. If (S, ⊕, ⊗) is a dioid then (H, +, ) is a dioid.
Note that the operator ⊗ is not used at all in the definition of H , so all we need from S are the
properties of ⊕ and the canonical order.
Note that the result of finding A∗ in this setting amounts to finding functions, rather than
numbers. In general, this means finding the image of every element of S for which a function is
2.2. CREATING NEW SEMIRINGS 15
defined; this might not be computationally tractable. So, the algorithms for computing A∗ will be
used to compute the image of a single element a ∈ S.
An application of this semiring creation technique can be found in Section 4.7.
Alternatively, if we fix two endomorphisms h1 , h2 ∈ H , then the set S together with the two
following operations is a semiring [28]:
CHAPTER 3
Note that the set of s − t paths will in general have an infinite number of terms. To deal with
issues of infinite sums, we will define for every element a ∈ S
• a (k) =
1 ⊕ a ⊕ a 2 ⊕ . . . ⊕ a k , k ∈ N,
There is an equivalent formulation of the algebraic path problem as a matrix equation, at the
heart of which is Bellman’s equation (1.5):
We write Bellman’s equation in matrix form using the operators of the semiring (R ∪ ∞, min, +).
Matrix multiplication is done in the usual way, except that we use the semiring addition and multi-
plication:
A ⊕ B = C, [cij ] = aij ⊕ bij , (3.3)
AB = C, [cij ] = aik ⊗ bkj . (3.4)
k
Under these two operations, the set of square matrices with elements from S is a semiring.
The matrix formulation of the algebraic path problem is
dT = dT A ⊕
1 Ts , (3.5)
18 3. PROPERTIES AND COMPUTATION OF SOLUTIONS
where d T is the row vector of shortest path weights from vertex s to all vertices, A is the weighted
adjacency matrix of the graph G, and 1 Ts is the row vector with all entries equal to ,
0 except the
s-th column entry which is equal to .1
The Bellman-Ford iteration can also be seen as a matrix iteration of the previous equation:
(d k+1 )T = (d k )T A ⊕
1 Ts . (3.6)
For the all pairs shortest paths problem, the matrix formulation is
D = DA ⊕ I, (3.7)
where D = dij contains the shortest path weights from i to j , for all i, j ∈ V , and I =
⎛1
0 ···
0
⎞
0
1 ···
0
⎝ . . . . ⎠.
.. .. . . ..
0
0 ···
1
Repeatedly substituting D = DA ⊕ I into the right-hand side of (3.7) we get
D = DA ⊕ I (3.8)
= (DA ⊕ I )A ⊕ I = DA2 ⊕ A ⊕ I (3.9)
= (DA ⊕ I )A2 ⊕ A ⊕ I = DA3 ⊕ A2 ⊕ A ⊕ I (3.10)
= ... (3.11)
= DAk+1 ⊕ Ak ⊕ . . . ⊕ A2 ⊕ A ⊕ I. (3.12)
If the series converges, the limit matrix is A∗ :
A∗ = lim I ⊕ A ⊕ A2 ⊕ . . . ⊕ Ak . (3.13)
k→∞
By directly substituting A∗ for D into (3.7), we can verify that A∗ is a solution of (3.7).
For each matrix Ak , the element Akij is equal to the sum of the weights of all k-edge paths
from i to j . For k = 0, A0 is defined to be I . The partial sums in (3.13) can then be interpreted
similarly: The paths summed have up to k edges, instead of exactly k edges.
We can see that the elements of the matrices Ak for k ≥ n necessarily correspond to the
weights of paths that contain cycles. So, the convergence of (3.13) is closely linked to the weights
of paths that traverse cycles an increasing number of times. For example, if there are no cycles, then
there are no paths with n or more edges, and so An = An+1 = . . . = 0. Then, from (3.13), we get
n−1 k
that A∗ = k=0 A .
3.1.1 EXISTENCE OF A∗
We will give some sufficient conditions for the existence of A∗ . First, we need to define the concept
of a p-stable element of a semiring.
Definition 3.1 An element a of a semiring S is called p-stable, if there exists p ∈ N such that
a (p) = a (p+1) = . . ..
3.2. EDGE SENSITIVITIES 19
Under any of the conditions below, the convergence to A∗
happens within a finite number of
steps. The conditions guarantee that after traversing any existing cycles enough times, the sum no
longer changes.
• For every cycle c in G(A) it holds that
w(c) ⊕
1 = .
1 (3.14)
In this case, the limit is reached for k ≤ n − 1.This condition corresponds to the non-negativity
of cycles in the classical shortest path problem.
• ⊗ is commutative and, for every cycle c in G(A), w(c) is p-stable for some p ≥ 1. In this case,
the limit is reached for k ≤ n − 1 + pnt steps, where t is the number of elementary cycles of
G(A).
• The set of entries aij of A is p-nilpotent: There exists a p ∈ N, such that, for any sequence of
p + 1 elements of A, a1 , a2 , . . . , ap+1 , it holds that a1 ⊗ a2 ⊗ . . . ⊗ ap+1 = .
0 The limit is
reached for k ≤ p.
3.1.2 UNIQUENESS OF A∗
In general, the solution of (3.7) is not unique. But if the semiring is a dioid, then the solution A∗ is
k0
minimal with respect to the canonical order. Assume there exists k0 ∈ N such that A∗ = k=0 Ak .
Then, from the last line of (3.8), we can see that for k > k0 we have from (3.8) that any D should
satisfy
D = DAk ⊕ A∗ . (3.15)
We conclude that A∗ is -smaller than any matrix D that satisfies (3.7).Therefore, if there is another
matrix B ∗ with the same property, then we would have A∗ B ∗ and B ∗ A∗ , that is, A∗ = B ∗ .
∀a, b ∈ S, a ⊗ b ⊕ a = a ⊗ (b ⊕ )
1 (3.16)
=a⊗ 1 (3.17)
=a (3.18)
⇒ ∀a, b ∈ S, a ⊗ b a. (3.19)
In the algebraic path sensitivity problem, we are given a connected undirected edge-weighted
graph G = (V , E, w), with associated weighted adjacency matrix A, and an edge e ∈ E. We want
20 3. PROPERTIES AND COMPUTATION OF SOLUTIONS
e
P∈ (e)
P∈/ (e)
s t
Figure 3.1: Partitioning the s − t paths according to whether they use edge e or not.
to see the effect of changing the weight w(e) on the optimal paths between any pair of nodes. We
assume that for each pair of nodes there exists exactly one path in G that achieves the optimal weight.
For a given source-destination node pair (s, t), and an edge e ∈ E, we define the upper and
lower tolerance of e with respect to the pair (s, t): The upper tolerance u(e) of e is the -maximum
value that w(e) can have without violating the optimality of the s − t path that was optimal in G.
The lower tolerance l(e) is similarly defined as the -minimum value that w(e) can have without
violating the optimality of the s − t path that was optimal in G.
In what follows, we will show how to compute upper and lower tolerances of an edge e with
respect to all (s, t) pairs.
Take an arbitrary (s, t) pair, and recall that P st is the set of all s − t paths. For brevity, we will
be omitting the superscript and use instead just P . We partition P into two subsets P∈ (e), P∈/ (e)
according to whether a path includes edge e or not (Figure 3.1):
We define w(X), where X is a set of paths with the same source and the same destination, to
be the ⊕-sum of the weights of the paths in X. So, we have that
But the quantity inside the square brackets is exactly equal to the optimal s − t path weight
in a graph with w(e) = .1 We denote by A 1 the weighted adjacency matrix of the graph G where
the weight of edge e has been replaced with .1 Then, we can write (3.24) as
A∗ [s, t] = w(e)A∗ ∗
1 [s, t] ⊕ A
0 [s, t]. (3.27)
The optimal path weight A∗ [s, t] is either equal to w(e)A∗ 1 [s, t], if e is on the optimal path,
∗
or equal to A 0 [s, t], if e is not on the optimal path.
Edge e is on the optimal path if and only if the optimal path weight A∗ [s, t] is equal to
w(e)A∗ 1 [s, t]. In this case, the lower tolerance is the lowest value of w(e) for which w(e)A
∗ [s, t]
1
still exceeds A∗ 0 [s, t]. The upper tolerance is .
1
Edge e is not on the optimal path if and only if the optimal path weight A∗ [s, t] is equal to
A∗0 [s, t]. In this case, the lower tolerance is . 0 The upper tolerance is the largest value of w(e) for
∗ ∗
which w(e)A 1 [s, t] does not exceed A 0 [s, t].
22 3. PROPERTIES AND COMPUTATION OF SOLUTIONS
Semiring Bellman-Ford(G, w, s)
1 d← 1s
2 for i ← 1 to n − 1
3 do d ← 1s ⊕d ⊗W
By extension of the relaxation operation (1.4), we call algebraic relaxation the operation in
line 3 above. For a single element d[v], v ∈ V \ {s} of the vector d, not corresponding to the source
node s, algebraic relaxation means
d[v] = {d[u] ⊗ w(u, v)}. (3.28)
u∈V
Bellman-Ford does not require both left and right distributivity. Only one of the two is
necessary.
Semiring Dijkstra(G, w, s)
1 d[s] ← 1
2 for v ∈ V \ {s}
3 do d[v] ← 0
4 Q←V
5 while Q = ∅
6 do u ← arg ⊕{d[v]|v ∈ Q}
7 Q ← Q \ {u}
8 for each vertex v ∈ Q
9 do d[v] ← d[v] ⊕ d[u] ⊗ w(u, v)
The line u ← arg ⊕{d[v]|v ∈ Q} means that to the variable u we assign the vertex v ∈ Q that
satisfies d[v] = u∈Q d[u]. Such a vertex exists and is unique if the semiring is a selective dioid
3.4. DECENTRALIZED COMPUTATION OF A∗ 23
but not in general. The condition for 1 being the largest element is equivalent to the condition for
non-negativity of edges in the classical algorithm of Dijkstra.
Semiring Floyd-Warshall(A)
1 for k ← 1 to n
2 do akk ← (akk )∗
3 for i ← 1 to n, i = k
4 do aik ← aik ⊗ akk
5 for i ← 1 to n, i = k
6 do for j ← 1 to n, j = k
7 do aij ← aij ⊕ aik ⊗ akj
8 for j ← 1 to n, j = k
9 do akj ← akk ⊗ akj
Definition 3.2 Given a graph G = (V , E) and a semiring S, each node v ∈ V owns a variable
d[v] and it continually performs the algebraic relaxation step d[v] = u∈V {d[u] ⊗ w(u, v)} with
the variables received from its neighbors and sends its updated variable to its neighbors.
We focus on the totally asynchronous timing model for message exchanges among the nodes.
We are interested in the following question: What are the necessary and sufficient properties that
the operators ⊕ and ⊗ of S need to have in order for the distributed algebraic path computation to
converge?
x = Ax ⊕ b, (3.29)
where the vector b was actually equal to 1 s for a source vertex s, but b can be more general. Also,
we were describing the system with row vectors, when the vector x would multiply A on the left,
instead of on the right as now. But the two versions are completely equivalent.
24 3. PROPERTIES AND COMPUTATION OF SOLUTIONS
We will now describe a model and convergence results for the distributed asynchronous
iterative computation of the above system when the timing model is the totally asynchronous one.
As a reminder, the synchronous iteration is
• Each processor performs the update (relaxation step) infinitely often, i.e., the sets Ti are infinite
(non-starvation condition), and
• Old information can be used for some time, but is purged from the system eventually, i.e., if
tk ∈ Ti , k = 1, 2, . . . then limk→∞ tk = ∞ ⇒ ∀j limk→∞ tj i (tk ) = ∞.
such that
3.4. DECENTRALIZED COMPUTATION OF A∗ 25
• (Synchronous convergence condition)
• (Box Condition) For every k, there exist sets Xi (k) ⊂ Xi such that
the initial value of the vector x(0) = (xi (0), i = 1, . . . , n) is in the set X(0), then every limit point
and
of x k is a solution of x = Ax ⊕ b.
Üresin and Dubois [49] show an equivalent form of these conditions to also be necessary when
the set X is finite. They then make the point that X will always be finite in digital computers with
finite memory space and word length.
∀z, w ∈ X, z w ⇒ Az ⊕ b Aw ⊕ b. (3.34)
In this case, the asynchronous iteration with initial data x(0) ∈ X converges in a finite number of
steps if
UD2 The synchronous iteration converges in a finite number of steps starting from initial data
y(0) = x(0).
UD3 The synchronous iteration is non-expansive at all steps starting from initial data y(0) = x(0):
y(k) Ay(k) ⊕ b, k = 0, 1, . . ..
If X is finite, conditions UD2 and UD3 can be replaced with UD3 on all elements of X.
An alternative set of sufficient conditions is [9, 6.4] that the solution is unique, and that two
vectors x, x ∈ X exist, and are such that
• x Ax ⊕ b Ax ⊕ b x.
• The synchronous iteration converges with initial data x and with initial data x.
We know that 0 is the -minimum element of S. If there is also a -largest element, say ,
then two candidates for x and x are
• For x: (,
0 . . . , ).
0
• For x: (, . . . , ).
27
CHAPTER 4
Applications
In this chapter, we describe a variety of applications of semirings to path problems.That is, we describe
the application area, and provide the semiring that solves the corresponding problem. References
are given to the literature where these application were first proposed; if none are given, the default
references are the tutorial paper by Rote [44] and the book by Gondran and Minoux [23]. A good
exercise for the reader is to verify the semiring properties of each pair of operators. At times, we
show how semiring creation techniques from Section 2.2 were (or could have been) used to find the
new semirings.
In the concatenation w1 w2 , we do not duplicate the common vertex (last vertex of w1 and first of
w2 ).
For example,
Markov Chain semiring The nodes of the graph are the states of a Markov chain, and the edge
probabilities are the Markov chain’s one step transition probabilities. So, we require j pij = 1, ∀i.
The semiring operators are the usual addition and multiplication and the carrier set is [0, ∞) ∪ {∞}.
The element (i, j ) of the k-th power Ak of the weighted adjacency matrix A is equal to the
probability that the Markov chain is in state j after step k, given that it was in state i after step 0.
Fletcher semiring We do not require j pij = 1, only that j pij ≤ 1. It is possible that the
random walk stops at vertex i with probability 1 − j pij . We want to compute the expected
number of visits of the random walk to a vertex t, given that it starts at vertex s.
The carrier set of the semiring is S = [0, ∞) ∪ {∞}, and the two operations are the usual
addition and multiplication. We need the ∞ element to account for cases when there is a subgraph
where the random walk might stay forever.
This semiring appeared at [19] as an example of a non-idempotent semiring that applies to a
reasonable problem.
Eisner semiring It is required that j pij = 1. Also, a value ve ∈ R is associated with each edge
e. Traversal of edge e brings value (cost or benefit) ve , and value accumulates additively along a path.
The objective is to calculate the expected value of paths from a vertex s to a vertex t.
The carrier set of the semiring is S = ([0, ∞) × R), and the two operations are
But to use this semiring for the problem described above, we set the weight of edge e to
be (pe , pe ve ). In other words, the second element of the weight is the expected value of edge
e = (i, j ) given that we are at i. This semiring was used by Eisner in the context of natural language
processing [17].
4.3. MINIMUM WEIGHT SPANNING TREE 29
Figure 4.1: Condition for an edge (i, j ) to belong to the minimum spanning tree.
So, we need to compute the minimum cost paths between all pairs of vertices where the cost
of a path is equal to the maximum of its edge weights. Then, if the minimum path cost between
vertices i and j is equal to the weight of the edge (i, j ), that edge would be on the MST, otherwise
not.
The carrier set of the semiring is the set of possible edge weights S = R, and the operations are
⊕ = min, ⊗ = max. Maggs and Plotkin [35] first proposed this semiring for constructing MSTs.
30 4. APPLICATIONS
Shortest path Edge weights correspond to communication delays. We want to compute the shortest
path from node s to node t. The semiring is (S, ⊕, ⊗) = (R ∪ {∞}, min, +). This semiring was
studied extensively in the first chapter of this book.
Most reliable path The weight of an edge corresponds to its reliability: the probability of suc-
cessful packet transmission along the edge. We want to compute the most reliable path from
node s to node t. We assume that successful packet transmissions are independent across edges,
so the reliability of a path is just the product of edge reliabilities. The appropriate semiring is
(S, ⊕, ⊗) = ([0, 1], max, ×).
Widest-shortest path This is a multiobjective problem: Edge weights are pairs of values, corre-
sponding to the delay and to the bandwidth of a link. Among the shortest paths, if there is more
than one, we want to compute the one with largest bandwidth. The carrier set is S = {(d, b) ∈
4.6. BGP ROUTING 31
([0, ∞) ∪ {∞}, [0, ∞) ∪ {∞}}. Addition is selective:
(d1 , b1 ) if d1 < d2 or d1 = d2 and b1 > b2 ,
(d1 , b1 ) ⊕ (d2 , b2 ) = (4.5)
(d2 , b2 ) otherwise.
Multiplication combines the two multiplications of the shortest path and the widest path
problem:
(d1 , b1 ) ⊗ (d2 , b2 ) = (d1 + d2 , min(b1 , b2 )). (4.6)
Consider the superficially similar problem of shortest widest paths. That is, among the largest
bandwidth paths, if there is more than one, we wish to select the shortest.This problem is not solvable
with a semiring, at least, not with a simple modification of the previous one, i.e., with addition being
(d1 , b1 ) if b1 > b2 or b1 = b2 and d1 < d2 ,
(d1 , b1 ) ⊕ (d2 , b2 ) = (4.7)
(d2 , b2 ) otherwise,
and multiplication being the same as before. These two operators do not form a semiring.
In general, one can define more than two criteria per link (delay, bandwidth, loss, jitter,
monetary cost, etc.) and define a lexicographic preference among them. But the existence of a
semiring is not guaranteed in the general case.
k-shortest paths We want to find the k shortest paths (not necessarily elementary, i.e., repetitions
of edges and vertices are allowed) between all pairs of vertices. Edges have weights from a set W as
in the usual shortest path problem.
The carrier set is the set of k-tuples of W , S = W k , and the operations are
• An AS does not export to a provider or peer any routes that it learned from other providers
and other peers.
• Routes learned from customers should be preferred to routes learned from either providers or
peers.
• Preferences among customer routes, as well as among peer and provider routes, are left un-
specified.
The situation described above is modeled as an edge-weighted directed graph where each
node represents an AS. The set of edge weights contains the five elements {c, p, r, , 1 }0 (see
Fig. 4.2): Weight c signifies a provider-to-customer link, p signifies a customer-to-provider link,
and r signifies a peer-to-peer link. The weight 1 is given to trivial paths comprising of a single
node, whereas the weight 0 is given to forbidden paths, i.e., to paths that cannot be exported.
p c
r
D C
r
p c
r
B A
r
Figure 4.2: BGP example network. Weights c, p, r indicate, respectively, provider-to-customer links,
customer-to-provider links, and peer-to-peer links between autonomous systems. For instance, AS C is
a provider of AS A, a customer of AS E, and a peer of AS D.
The two operators are defined (4.1) so as to be faithful to the rules and guidelines stated.
The preferences among paths are encoded in the canonical order induced by the operators. Roughly
4.7. SHORTEST PATH WITH TIME-INHOMOGENEOUS EDGES 33
speaking, ⊗ encodes which paths are allowed, and ⊕ encodes the preferences among the allowed
paths.
⊕ c r p
1
0 ⊗ c r p
1
0
c c c c
1 c c c
0
0 c
0
r c r r
1 r r r
0
0 r
0
p c r p
1 p p p p p p
0
1
1
1
1
1
1
1 c r p
1
0
0 c r p
1
0
0
0
0
0
0
0
For example, r ⊗ p = 0 encodes the rule that an AS (e.g., A in Fig. 4.2) does not export
to a peer a route that it learnt from a provider: To a valid (non-)0 route learnt from a provider,
the customer AS A prepends weight p (customer-to-provider link weight). So, the weight of that
route will become p. If this new route is further sent to a peer AS of A (e.g., B), it would have to be
prepended with weight r (peer-to-peer link). To encode that this is not allowed, the result of r ⊗ p
is .
0
The canonical order is defined as
a b ⇔ a ⊕ b = b. (4.10)
To encode the preference for routes learned from customers rather than from peers or providers,
Table 4.1 indicates that c ⊕ r = c ⊕ p = c, i.e., c r and c p. And since c = r, p, we have that
c r and c p.
Note that in Table 4.1, we have set r ⊕ p = p ⊕ r = r, i.e., we have specified a preference
between provider routes and peer routes in favor of the latter.
This modeling of BGP, with a slightly different notation, was given by Sobrinho [47].
Bridge and cut vertex finding In an undirected graph, an edge is called a bridge if its removal
increases the number of connected components of the graph. Similarly, a vertex is called a cut vertex
if its removal increases the number of connected components of the graph. If we try to define bridges
in terms of paths, we could propose the following definition: An edge e is a bridge if there exists a
pair of nodes s, t such that e is on all s − t paths. So, to find the bridges of a graph, we need to find
for each pair s, t the intersection of the sets of all s − t path edges.
The carrier set of the semiring is the powerset of edges S = 2E ∪ {},
0 with ⊕ = ∩ (the usual
set intersection), and ⊗ = ∪ (the usual set union). The weight of an edge e ∈ E is the singleton set
{e}. Then, the weight of a path can be seen to be the set of its edges. The element , 0 neutral element
of ⊕ and absorbing element of ⊗, is the weight assigned to non-existing edges: If a ∈ S, then we
define a ∩ 0 = a and a ∪ 0 = .
0 The element , 1 neutral element of ⊗ = ∪, is the empty set:
1 ≡ ∅.
To see that this semiring finds the bridges recall the fundamental formulation of the algebraic
path problem (2.3):
dst = w(p). (4.11)
p∈P st
4.8. NETWORK RELIABILITY 35
Since ⊕ is set intersection and the weight of a path is the set union of its edges, the set dst consists of
the edges that are on all paths from s to t. All these edges are bridges, since their removal disconnects
s from t. Also, every bridge of the graph G must be a member of at least one set dst for some nodes
s, t.
For finding the cut vertices we use a similar semiring, only the carrier set is now the powerset
of vertices: S = 2V ∪ {},0 ⊕ = ∩ (set intersection), ⊗ = ∪ (set union). The weight of edge (i, j )
is the set {i, j }.
Edges in a graph G are subject to random failure, possibly dependent on the failure of other edges.
We want to compute, for a given pair s − t, the probability that at least one s − t path survives, i.e.,
none of its edges fail. This probability is called the 2-terminal reliability Rst (G).
A formal monomial term we is associated with each edge e, corresponding to the probability
of survival of e. The monomial can be a single variable xe or a product of variables xe1 xe2 . . . xek
distinct from each other. These variables correspond to components that can fail independently of each
other and cause the failure of edges. Note that one or more components might be shared among
multiple edges, thus modeling dependent edge failures. The idea is that if we substitute numerical
values pei for the formal variables xei , the value of each monomial we will be equal to the survival
probability of edge e.
We want to construct a formal polynomial in the variables xei , such that, when substituting
numerical values pei , the result is Rst (G).
We start with monomial variables as defined above, and we define multiplication and addition:
w1 ⊗ w2 = w1 w2 (4.12)
w1 ⊕ w2 = w1 + w2 − w1 w2 . (4.13)
We see that ⊗ will in general result in products where one or more variables are raised to an
exponent larger than 1. Also, ⊕ will in general result in polynomials, rather than monomials. The
former is undesirable since we want components common to multiple edges to appear only once.
The latter is not a problem since we want w1 ⊕ w2 to correspond to the probability that at least
one of w1 or w2 survives. However, because of the way multiplication is defined, distributivity does
not hold:
w1 ⊗ (w2 ⊕ w3 ) = w1 w2 + w1 w3 − w1 w2 w3 (4.14)
w1 ⊗ w2 ⊕ w1 ⊗ w3 = w1 w2 + w1 w3 − w12 w2 w3 . (4.15)
36 4. APPLICATIONS
We can rectify the situation by resorting to a reduction function (Section 2.2.3) that reduces
all exponents to 1:
If w = xei nei , nei ≥ 1, (4.16)
e∈E,i∈I
then f (w) = xe i . (4.17)
e∈E,i∈I
and
w1 ⊕ w2 = w1 + w2 − w1 ⊗ w2 . (4.19)
The carrier set S of the semiring should be the set of all polynomials that can be formed by
the two operators ⊕ and ⊗.
This semiring is a dioid, where the canonical order relation is defined as
w1 w2 ⇔ w1 ⊕ w2 = w2 . (4.20)
The order is consistent with the usual order of the real numbers, in the sense that w1 w2 ⇔ w1 ≤
w2 for any polynomials w1 , w2 ∈ S and any numerical values of xei .
Shier [46] discusses this semiring and its application to reliability calculations at greater length.
and multiplication as
(c1 , μ1 ) ⊗ (c2 , μ2 ) = (c1 + μ1 c2 , μ1 μ2 ). (4.22)
Note that this semiring is only right-distributive. But think back to the iterative algorithms:
They do not require both left and right distributivity, only one is necessary.
Similar problems have appeared under the name “generalized network flow” [39], or “gener-
alized minimum cost maximum flow” [18].
4.10 TRUST-REPUTATION
We define trust as a set of weighted pairwise relations among entities in a network. The relations
are established on the basis of a body of supporting assurance (trust) evidence. A trust metric is a
function applied to that evidence that produces the weights for each relation. Examples of relations
are: friends in a social network, buyers/sellers in an online marketplace, peers in a peer-to-peer
network, and issuers of public key certificates in a PGP [51] web of trust.
We view the trust computation problem as a generalized shortest path problem on a weighted
directed graph G(V , E) (trust graph).The vertices of the graph are the users/entities in the network. A
weighted edge from vertex i to vertex j corresponds to the opinion that entity i, also referred to as the
issuer, has about entity j , also referred to as the target.The weight function is w(i, j ) : V × V −→ S,
where S is the opinion space. The objective of the problem is, given a source vertex s and a target
vertex t, to aggregate the opinions on the s − t paths, in order to compute an indirect (transitive)
opinion that s should have about t.
The reputation of an entity is often used in a similar manner to trust; the difference is that
the reputation value depends only on one entity (the target, in the terminology above). That is, all
sources should end up with the same value for the same destination.
We present two trust metrics, a model of PGP’s web of trust computations, a reputation
algorithm, and a Semantic Web trust management algorithm.
In both of the following two metrics, each opinion consists of two numbers: the trust value, and
the confidence value. The former corresponds to the issuer’s estimate of the target’s trustworthiness.
For example, a high trust value may mean that the target is one of the good guys, or that the target
is able to give high quality location information, or that a digital certificate issued for the target’s
38 4. APPLICATIONS
public key is believed to be correct. On the other hand, the confidence value corresponds to the
accuracy of the trust value assignment. A high confidence value means that the target has taken a
large number of tests that the issuer has set, or that the issuer has interacted with the target for a
long time. Since opinions with a high confidence value are more useful in making trust decisions,
the confidence value is also referred to as the quality of the opinion.
Since both the trust and the confidence values are in the [0, 1] interval, they both decrease
when aggregated along a path. When opinions are aggregated across paths, the one with the highest
confidence prevails. If the two opinions have equal confidences but different trust values, we pick
the one with the highest trust value. We could have also picked the lowest trust value; the choice
depends on the desired semantics of the application.
This semiring essentially computes the trust distance along the most confident trust path to
the destination. An important feature is that this distance is computed along a single path, since
the ⊕ operator picks exactly one path. Other paths are ignored, so not all available information is
being taken into account. One of the advantages is that if the trust value turns out to be high, then
a trusted path to the destination has also been discovered. Also, fewer messages are exchanged for
information gathering.
The opinion space is S = [0, ∞] × [0, 1]. Before using this semiring, the pair (trust,
confidence)=(t, c) is mapped to the weight (c/t, c). The motivation for this mapping becomes
clear when we describe its effect on the results of the operators. The binary operators are then ap-
plied to this weight, and the result is mapped back to a (trust, confidence) pair. For simplicity, we
only show the final result without the intermediate mappings.
4.10. TRUST-REPUTATION 39
1
(t1 , c1 ) ⊗ (t2 , c2 ) → , c1 c2 (4.27)
1
+ 1
t1 t2
c1 + c2
(t1 , c1 ) ⊕ (t2 , c2 ) → c1 c2 , c1 + c2 . (4.28)
t1 + t2
So, when aggregating along a path, both the trust and the confidence decrease.The component
trust values are combined like parallel resistors. Recall that two resistors in parallel offer lower
resistance than either of them in isolation. Also, a zero trust value in either opinion will result in
a zero trust value in the resulting opinion (absorbing element), while a trust value equal to infinity
will cause the corresponding opinion to disappear from the result (neutral element). On the other
hand, the component confidence values are between 0 and 1, and they are multiplied, so the resulting
confidence value is smaller than both.
When aggregating across paths, the total trust value is the weighted harmonic average of the
components, with weights according to their confidence values. So, the result is between the two
component values, but closer to the more confident one. Note, also, the behavior caused by extreme
(zero or infinity) trust values: A zero trust value dominates the result (unless its corresponding
confidence is zero); a trust value equal to infinity results in an increase in the trust value given by
the other opinion. In order for the resulting trust value to be the maximum possible, both opinions
have to assign the maximum. So, in general, we can say that this operator is conservative. A zero
confidence value (neutral element) causes the corresponding opinion to disappear from the result.
a ⊗ b = valid(a)b ∈ Nk . (4.29)
4.10.4 EIGENTRUST
The EigenTrust algorithm was proposed [30] in the context of peer-to-peer file sharing networks
as a way to combat malicious peers that provide inauthentic files to the network. A high value for a
peer corresponds to a high expectation that a file coming from that peer will be authentic.
The weights in this case are real numbers between 0 and 1: S = [0, 1]. The weights are
normalized per user, i.e., for each user i, j ∈N (i) w(i, j ) = 1.
Addition is defined as
t1 ⊕ t2 = t1 + t2 , (4.30)
In other words, a partitionable graph models a community where people can be separated
into groups of friends, without putting two persons that dislike each other in the same group, or two
friends in separate groups. A special case is when we are able to separate the people into only two
such groups.
Definition 4.3 A partitionable graph is called balanced if the number of its clusters is equal to 2.
42 4. APPLICATIONS
4.11.1 BALANCE SEMIRING
We want to construct a semiring for identifying balanced graphs. To this end, we make use of the
following theorem to express the property of balance in terms of paths in the graph:
Theorem 4.4 A signed graph is balanced if and only if every cycle (ignoring, however, the direction of
the edges) has weight equal to 1.
The carrier set of the semiring is S = {0, −1, 1, a}. The weight of non-existing edges/paths is
0, while 1 and -1 are defined (for edges) and then computed (for paths) to comply with Definition 4.1
above. The element a signifies that both negative and positive paths exist between two given nodes.
The two operations are shown in the following table:
⊕ 0 -1 1 a ⊗ 0 -1 1 a
0 0 -1 1 a 0 0 0 0 0
-1 -1 -1 a a -1 0 1 -1 a
1 1 a 1 a 1 0 -1 1 a
a a a a a a 0 a a a
Theorem 4.5 A signed graph is balanced if and only if the diagonal of A∗ contains only 1s.
Theorem 4.6 A signed graph is partitionable if and only if it contains no cycle (ignoring the direction of
the edges) with exactly one negative edge.
The carrier set of the semiring is defined as S = {0, −1, 1, a, b}. The weight 0 corresponds
again to non-existing edges/paths. The meaning of the rest, however, changes:
-1 At least one path with exactly one negative arc; no path with only positive arcs.
1 At least one path with only positive arcs; no path with exactly one negative arc.
a At least one path with only positive arcs; at least one path with exactly one negative arc.
⊕ 0 -1 1 a b ⊗ 0 -1 1 a b
0 0 -1 1 a b 0 0 0 0 0 0
-1 -1 -1 a a -1 -1 0 b -1 -1 b
1 1 a 1 a 1 1 0 -1 1 a b
a a a a a a a 0 -1 a a b
b b -1 1 a b b 0 b b b b
Theorem 4.7 A signed graph is partitionable if and only if the diagonal of A∗ contains only 1s.
and multiplication as
(d1 , n1 ) ⊗ (d2 , n2 ) = (d1 + d2 , n1 n2 ). (4.34)
The
0 and
1 of the semiring are
0 = {(∞, 0)} (4.35)
1 = {(0, 1)}. (4.36)
s1 ⊕ s2 = Reduction(s1 ∪ s2 ) (4.38)
where Reduction(s) is a reduction function (see also Sec. 2.2.3) that merges quadruples with identical
(i, j ) by repeated application of the following merge rule:
⎧
⎪
⎨(i, P1 , j, d1 ) if d1 < d2
merge((i, P1 , j, d1 ), (i, P2 , j, d2 )) = (i, P2 , j, d2 ) if d1 > d2 . (4.39)
⎪
⎩
(i, P1 ∪ P2 , j, d1 ) if d1 = d2
In other words, Reduction(s1 ∪ s2 ) is a set containing one quadruple for each distinct (i, j ) pair
in s1 ∪ s2 . For a given pair (i, j ), this quadruple contains the length and the set of vertices of the
shortest i − j paths. The 0 of the semiring is
0 = {(∗, ∅, ∗, ∞)}, (4.40)
(i1 , P1 , j1 , d1 ) (i2 , P2 , ⎧
j2 , d2 ) =
⎪
⎪ (i1 , P1 , j1 , d1 ) if d2 = 0, j1 = i2
⎪
⎪
⎪
⎪
⎪
⎪ (i2 , P2 , j2 , d2 ) if d1 = 0, j1 = i2
⎪
⎪
⎪
⎨(i1 , P1 ∪ P2 , j2 , d1 + d2 ) if i1 , j1 , and j2 are all distinct,
⎪
and P1 ∩ P2 = {j1 }, j1 = i2 (4.41)
⎪
⎪
⎪
⎪ or if j1 = i1 = j2 ,
⎪
⎪
⎪
⎪
⎪
⎪ and P1 ∩ P2 = {i1 , j1 }, j1 = i2
⎪
⎪
⎩ 0 otherwise.
The intuition goes as follows: First of all, if the two quadruples are not consecutive, i.e., the
terminal vertex of the first does not coincide with the initial vertex of the second, then the result is .
0
If they are consecutive and either one is the trivial quadruple with length 0 (not the 0 quadruple),
then the result is equal to the other quadruple. The remaining case, which is the general case of
consecutive non-trivial quadruples, can be dealt with by way of graph theoretical arguments. An
important point for this latter case is that if the intersection of P1 and P2 contains more vertices
4.12. TRAFFIC ASSIGNMENT 45
j1 ≡ i2
P1 P2
i1 j2
than the endpoints of the quadruples, then the i1 − j2 paths that go through j1 ≡ i2 cannot be
shortest paths (see Fig. 4.3). Consequently, the result of the multiplication would again be .
0
Now, we use multiplication for singletons to define multiplication for multi-element sets:
s 1 ⊗ s2 = w1 w 2 . (4.42)
w1 ∈s1 ,w2 ∈s2
The
1 of the semiring is the set
1 = {(i, {i}, i, 0) : i ∈ V }. (4.43)
e−μdp
Pr{Path p is chosen from s to t} = −μdp
, (4.44)
p∈P st e
where μ > 0 is a parameter that tunes how much a lower delay path is favored over a higher delay
path. When μ −→ ∞, the lowest delay path is chosen with probability 1, but when μ −→ 0, all
paths are chosen with the same probability. The fraction of tst that goes through a given s − t path
is given by the probability that the Logit Assignment dictates.
A brief justification for this assignment is as follows: We assume that the delay d(p) of a path
p is equal to a constant dp plus a zero mean Gumbel distributed random variable Ep :
−μx−γ
d(p) = dp + Ep , Pr{Ep < x} = e−e , (4.45)
where γ = 0.577 . . . is Euler’s constant.The Gumbel random variables of different paths are assumed
π2
to be independent and to have the same variance, which is equal to 6μ 2 . Then, the probability of
path p having the minimum delay is given by (4.44).
We now create a semiring to compute the traffic assignment given the road network and the
traffic demands. The elements of the semiring are the non-negative real numbers. The semiring
operations are defined as follows:
1
a ⊕ b = − log e−μa + e−μb (4.46)
μ
a ⊗ b = a + b. (4.47)
We create the weighted adjacency matrix A = [aij ], where aij is equal to average delay of
edge (i, j ). We can then compute the closure matrix A∗ . Denoting the elements of A by w(i, j )
and the elements of A∗ by d(i, j ), the fraction of s − t traffic that goes through edge (i, j ) is given
by [5]
e−μd(s,i) e−μw(i,j ) e−μd(j,t)
pstij = (4.48)
e−μd(s,t)
4.13. APPLICATIONS OF SENSITIVITY ANALYSIS 47
and so to compute the total amount of traffic on edge (i, j ) we have to sum over all traffic demands,
weighted by the probability that they use edge (i, j ):
tij = pstij tst . (4.49)
st
Since the semiring is not a dioid, we have issues of convergence of the closure computa-
tion. A sufficient condition for convergence is that the matrix W = [wij ] = [e−μaij ] is such that
limn→∞ W n = 0. This can always be guaranteed for large enough μ.
• The redirected traffic could cause congestion to the part of the network it is redirected to.
• The redirected traffic will experience worse than optimal conditions (for instance, longer delay),
assuming, of course, that before the attack it was being routed optimally.
• The attacker could eavesdrop on the traffic, modify it, or drop it.
There are two general mechanisms that can be used to achieve traffic redirection: traffic
attraction and traffic repulsion. Traffic attraction occurs when a link is advertised to have much
lower weight than it really has, thus luring traffic to go through it. Traffic repulsion occurs when the
advertised weight of the link is much larger than in reality, thus causing traffic to avoid it.
Traffic attraction attacks have been known for a long time in the networking field [7], [40].
In wireless networks, the false advertisement of non-existent routes has been called the wormhole
attack [29]. The effect is a traffic attraction attack.
The relevance of tolerances for traffic attraction attacks is the following: If the weight of a link
is changed (advertised) to a value better than its upper tolerance, then the associated end-to-end
traffic will be redirected to a path that crosses the changed link. Advertising non-existent links can
be handled by finding upper tolerances for edges with initial weight . 0 Depicted in Figure 4.4 are
the initial weights and upper tolerances of a simple topology. We can see that not all links can be
used for an attraction attack. Only links that are “close enough” to the currently optimal end-to-end
path in question are candidates.
In the case of traffic repulsion attacks lower tolerances are relevant (Figure 4.5). They show
how much a link’s weight needs to deteriorate before traffic is redirected. The new path can also be
computed, which will show which new links and routers the new path goes through.
If we know the tolerances for all the edges in the network, we can see which edges, if artificially
improved, destroyed, or degraded, will cause traffic to be redirected through which path. So, we can
see the effects of the possible single-link attacks, and plan accordingly. For example, one could check
the trustworthiness of routers that could be used as replacements, or guard certain parts of a path
whose replacements are judged undesirable for one reason or another.
Algorithms for upper and lower tolerances for shortest paths and for maximum capacity paths
were given in [41] by reducing these problems to the same problem, called Minimum Cost Interval
problem. In [27], an algorithm was given that computes how much the length of the shortest path
changes when an arbitrary link disappears. This is equivalent to computing lower tolerances.
4.13. APPLICATIONS OF SENSITIVITY ANALYSIS 49
∞6
x z
10 100
s t
y
∞11
Figure 4.4: Traffic attraction attack: By artificially improving the weight of a link beyond its upper
tolerance, the attacker can lure traffic away from the optimal path. Shown next to each link are the
initial weights and upper tolerances (remember that the upper tolerance of an edge is the tolerance in the
direction of improvement, i.e., weight reduction in the (min, +) semiring). Upper tolerances of two non-
existent edges are also shown. Note that the negative values of tolerances are only shown for completeness
purposes: negative values for delays cannot be admitted. The optimal path is painted thick.
x z
110 1012
s t
y
Figure 4.5: Traffic repulsion attack: By decreasing the weight of a link beyond its lower tolerance, the
attacker can lure traffic away from the optimal path. Remember that the lower tolerance of an edge is the
tolerance in the direction of deterioration, i.e., weight increase in the (min, +) semiring. Shown next to
each link are the initial weights and lower tolerances. The optimal path is painted thick.
51
CHAPTER 5
Related Areas
5.1 NON-SEMIRING PATH PROBLEMS
Certain problems seem to resist a natural description in terms of semirings. A certain class of such
problems have been called “non Markovian path problems” [45]. There, the contribution of an edge
to the total path weight depends not only on the weight of that edge but also on the weights of
the edges already traversed by the path. The consequence is that subpaths of optimal paths are not
necessarily optimal. Algebraically, the distributivity property is violated.
As an example, consider the problem of finding shortest paths with discounting. In this
problem, we are still looking for shortest paths, but now the cost of a path p = (v0 , v1 , . . . , vk ) is
the discounted sum of its edge weights:
k−1
w(p) = δ i w(vi , vi+1 ), 0 < δ < 1. (5.1)
i=0
An attempt to model this problem with a semiring would be to choose the carrier set to encode
both the (discounted) length, and the number of edges of a path:
S = R × N. (5.2)
P1
1 4
e
i 1 j k
8
P2
Figure 5.1: Distributivity does not hold in the problem of shortest paths with discounting.
whereas
w(p1 )w(e) ⊕ w(p2 )w(e) = ((3, 3) ⊗ (8, 1)) ⊕ ((1, 1) ⊗ (8, 1)) (5.8)
= (4, 4) ⊕ (5, 2) (5.9)
= (4, 4). (5.10)
However, there are methods [32] for transforming certain non-semiring costs to semirings.
In particular, the non-distributivity of ⊗ over ⊕ can be overcome by enlarging the carrier set and
selecting an appropriate reduction function. Which reduction function is appropriate depends on
the particular problem.
In the shortest path problem with discounting, the obstacle to distributivity comes from ⊕-
adding the weights of paths with a different number of edges. So, we first enlarge the carrier set to
have as elements the multisets of weights of the form (c, n). We define a reduction function that
operates on a multiset M, returning a set with only one element for each value of n that appears in M:
the element with the minimum cost c. Addition of two multisets is the reduction function applied
to their union. Multiplication of two multisets is the reduction function applied to the multiset of
pairwise products of weights, one from each multiset.
One can verify that the resulting algebraic structure is indeed a semiring. Applying this
semiring to the problem instance in Fig. 5.1, the result obtained is the set {(4, 4), (5, 2)}. If we want
to compute the optimal i − k path, we can just compare lexicographically the two elements of this
set, and conclude in favor of (4, 4).
The non-associativity of ⊗ can also be circumvented, but we will not go into the details here;
we will only give a motivating example [32]. Non-associativity appears when edge/path weights do
not provide enough information on how to multiply them. For example, in the shortest path problem
5.2. SEMIRING NON-PATH PROBLEMS 53
with discounting, we may want to discount only every other edge:
! "
k−1 i
w(p) = δ 2
w(ei ), 0 < δ < 1. (5.11)
i=0
Let A be the weighted adjacency matrix of graph G. We write the permanent in semiring
notation as
# n
ai,π(i) . (5.15)
π∈Pn i=1
n
max ai,π(i) . (5.16)
π∈Pn
i=1
So, the value of the max-plus permanent is equal to the value of the optimal assignment. The
permutation that achieves the maximum is the optimal assignment.
But the right-hand side is exactly the min-plus convolution of the input flow R(t) and the function
fr (t) = rt.
The concept of a service curve is now defined, aiming to capture the general effect that a
network element has on a flow that traverses it: An element S offers a service curve β to a flow with
input function R and output function R ∗ , if and only if β is non-decreasing, β(t) = 0, t < 0 and
R ∗ ≥ R ∗ β, where ∗ denotes convolution in the min-plus semiring.
Consider now a flow traversing two network elements E1 , E2 , connected in series, with input
and output flows, consecutively, R1 , R1∗ , R2 , R2∗ . Element Ei offers a service curve βi , i = 1, 2 to
the flow. Applying the definition of the service curve at E1 and E2 , we have
R1∗ ≥ R1 ∗ β1 (5.19)
R2∗ ≥ R2 ∗ β2 . (5.20)
Because of the connection in series, it holds that R1∗ = R2 . Also, convolution preserves the order of
the inequality and is associative. Therefore,
So, comparing with the definition of the service curve, we can see that the concatenation of
the two elements offers a service curve of β1 ∗ β2 to the flow.
57
CHAPTER 6
Application S ⊕ ⊗
Path enumeration Subsets of ∪ni=1 V i Set union Latin multiplication
Markov chain stationary distri- [0, ∞) ∪ {∞} + ×
bution
Expected number of visits of [0, ∞) ∪ {∞} + ×
random walk from vertex s to
t
Expected cost of paths from ver- {(p, c) ∈ ([0, ∞) × R)} (p1 + p2 , c1 + c2 ) (p1 p2 , p1 c2 + p2 c1 )
tex s to t
Minimum weight spanning tree R min max
Longest path R ∪ {−∞} max +
Shortest path R ∪ {∞} min +
Widest path [0, ∞) ∪ {∞} max min
Most reliable path [0, 1] max ×
6. LIST OF SEMIRINGS AND APPLICATIONS
Widest-shortest path {(d, b) ∈ [0, ∞) × [0, ∞)} lexicographic min (d1 + d2 , min(b1 , b2 ))
k-shortest paths a, b ∈ {R ∪ {∞}}k min-k{a1 , a2 , . . . , ak , b1 , b2 , . . . , bk } min-k{ai + bj |i, j = 1, . . . , k}
BGP routing {c, p, r, ,
1 }
0 see Table 4.1 see Table 4.1
Shortest path with time- w1 , w2 : R ∪ {∞} → R ∪ {∞} min{w1 (t), w2 (t)} w2 (w1 (t))
inhomogeneous edges and t → ∞ ⇒ w(t) ∞
Reachability under determinis- {0, 1} max min
tic edge failures
Bridge and cut vertices 2E ∪ {}
0 Set intersection Set union
Reachability under probabilistic formal polynomials we in the vari- w1 + w2 − w1 ⊗ w2 {all xe in w1 or w2 }
edge failures ables xei , e ∈ E, i ∈ N
⎧ c1 c2
⎪
⎨(c1 , μ1 ) if μ1 < μ2
Shortest paths with edge gains {(c, μ) ∈ R × (0, ∞)} c1 (c1 + μ1 c2 , μ1 μ2 )
(c1 , μ1 ) if μ1 = μc22 and μ1 > μ2
⎪
⎩
or losses (c2 , μ2 ) otherwise
59
Application S ⊕ ⊗
⎧
⎪(t , c )
⎨ 1 1 if c1 > c2
Trust: Path semiring {(t, c) ∈ [0, 1] × [0, 1]} (t1 t2 , c1 c2 ) (t , c ) if c1 < c2
⎪ 2 2
⎩
(max{t1 , t2 }, c1 ) if c1 = c2
Trust: Distance semiring {(a, b) ∈ ([0, ∞] × [0, 1])} (a1 + a2 , b1 + b2 ) (a1 a2 , a1 b2 + a2 b1 )
Trust: PGP computation model a1 , a2 ∈ Nk , k ∈ N + valid(a1 )a2
Trust: EigenTrust [0, 1] + ×
Trust: Semantic web [0, 1] max ×
Social: balance semiring {0, −1, 1, a} see Table 4.2 see Table 4.2
Social: cluster semiring {0, −1, 1, a, b} see Table 4.3 see Table 4.3
⎧
⎪
⎨ (d 1 , n1 ) if d1 < d2
Social: Geodetic semiring {(d, n) ∈ ([0, ∞) ∪ {∞}) × (N ∪ {∞})} (d , n ) if d1 > d2 (d1 + d2 , n1 n2 )
⎪ 2 2
⎩
(length and number of shortest (d1 , n1 + n2 ) if d1 = d2
paths)
Social: Geosetic semiring (set of finite sets with quadruples of the form see Sec. 4.11.4 see Sec. 4.11.4
vertices of shortest paths) (i, P , j, d), i, j ∈ V , P ⊆ V , d ∈ N
−μa
Traffic assignment a1 , a2 ∈ [0, ∞) 1
−μ log e 1 + e −μa2 a1 + a 2
Edge sensitivity: Traffic attrac- [0, ∞) ∪ {∞} min +
tion attack
Edge sensitivity: Traffic repul- [0, ∞) ∪ {∞} min +
sion attack
61
Bibliography
[1] http://maxplus.org/. 5.2.1
[2] F. Baccelli and D. Hong. TCP is Max-Plus Linear and what it tells us on its
throughput. ACM SIGCOMM Computer Communication Review, 30(4):219–230, 2000.
DOI: 10.1145/347057.347548 5.2.1
[3] F. L. Baccelli, G. Cohen, G. J. Olsder, and J.-P. Quadrat. Synchronization and Linearity: An
Algebra for Discrete Event Systems. John Wiley & Sons, 1992. 4.4, 5.2.1
[4] V. Batagelj. Semirings for social networks analysis. Journal of Mathematical Sociology, 19(1):53–
68, 1994. 4.11
[5] M. G. H. Bell. Alternatives to dial’s logit assignment algorithm. Transportation Research Part
B: Methodological, 29(4):287 – 295, 1995. DOI: 10.1016/0191-2615(95)00005-X 4.12
[6] R. Bellman. On a routing problem. Quarterly of Applied Mathematics, 16(1):87–90, 1958. 1.2.2
[7] S. M. Bellovin. Security problems in the TCP/IP protocol suite. Computer Communications
Review, 19(2):32–48, 1989. DOI: 10.1145/378444.378449 4.13.1
[8] D. Bertsekas and R. Gallager. Data Networks. Prentice-hall Englewood Cliffs, NJ, 2nd edition,
1992. 1.1
[9] D. Bertsekas and J. Tsitsiklis. Parallel and Distributed Computation: Numerical Methods. Athena
Scientific, 1997. 1.3.1, 3.4.2, 3.4.3
[10] B. Bollobás. Modern Graph Theory. Number 184 in Graduate Texts in Mathematics. Springer
Verlag, 1998. 1.1
[11] J.-Y. L. Boudec and P. Thiran. Network Calculus: A Theory of Deterministic Queueing Systems for
the Internet, volume 2050 of Lecture Notes in Computer Science. Springer-Verlag, 2001. 5.2.3
[12] P. Butkovič. Max-algebra: the linear algebra of combinatorics? Linear Algebra and its applica-
tions, 367:313–335, 2003. DOI: 10.1016/S0024-3795(02)00655-9 5.2.2
[13] R. W. Callon. RFC 1195: Use of OSI IS-IS for routing in TCP/IP and dual environments,
December 1990. 1.3
[14] B. A. Carré. Graphs and Networks. Clarendon Press, Oxford, UK, 1979. (document)
62 BIBLIOGRAPHY
[15] T. H. Cormen, C. E. Leiserson, and R. L. Rivest. Introduction to Algorithms. MIT Press,
Cambridge, MA, 1st edition, 1990. 1.1, 1
[16] E. W. Dijkstra. A note on two problems in connection with graphs. Numerische Mathematik,
1:269–271, 1959. DOI: 10.1007/BF01386390 1.2.1
[17] J. Eisner. Parameter estimation for probabilistic finite-state transducers. In Proceedings of the
40th Annual Meeting of the Association for Computational Linguistics, pages 1–8, Philadelphia,
July 2002. DOI: 10.3115/1073083.1073085 4.1, 4.2
[18] L. Fleischer and K. Wayne. Fast and simple approximation schemes for generalized flow.
Mathematical Programming, 91(2):215–238, 2002. DOI: 10.1007/s101070100238 4.9
[19] J. Fletcher. A more general algorithm for computing closed semiring costs between vertices of
a directed graph. 1980. DOI: 10.1145/358876.358884 4.2
[20] L. Gao and J. Rexford. Stable internet routing without global coordination. IEEE/ACM
Transactions in Networking, 9(6):681–692, 2001. DOI: 10.1109/90.974523 4.6
[22] M. Gondran and M. Minoux. Graphs and algorithms. John Wiley & Sons, Inc, New York, NY,
1979. (document), 4.7
[23] M. Gondran and M. Minoux. Graphs, Dioids and Semirings: New Models and Algorithms.
Springer Publishing Company, Incorporated, 2008. (document), 2.2.4, 4
[26] C. L. Hedrick. RFC 1058: Routing information protocol, June 1988. 1.3
[27] J. Hershberger and S. Suri. Vickrey prices and shortest paths: What is an edge worth? In
Proceedings of the 42nd IEEE Symposium on Foundations of Computer Science, pages 252–259,
Las Vegas, NV, October 2001. 4.13, 4.13.1
[28] L. Hooi-Tong. Notes on Semirings. Mathematics Magazine, 40(3):150–152, 1967. 2.2.4, 2.2.4
[29] Y.-C. Hu, A. Perrig, and D. B. Johnson. Wormhole attacks in wireless networks.
IEEE Journal on Selected Areas in Communications, 24(2):370–380, February 2006.
DOI: 10.1109/JSAC.2005.861394 4.13, 4.13.1
[30] S. D. Kamvar, M.T. Schlosser, and H. Garcia-Molina. The EigenTrust algorithm for reputation
management in p2p networks. In WWW2003, May 2003. DOI: 10.1145/775152.775242
4.10.4
BIBLIOGRAPHY 63
[31] J. Kuntzmann. Théorie des réseaux (graphes). Dunod, 1972. (document)
[32] T. Lengauer and D. Theune. Unstructured path problems and the making of semirings (pre-
liminary version). In Algorithms and Data Structures: 2nd Workshop, WADS’91, Ottawa, Canada,
August 14-16, 1991: Proceedings, page 189. Springer, 1991. DOI: 10.1007/BFb0028261 5.1,
5.1
[33] J. Lestor R. Ford and D. R. Fulkerson. Flows in Networks. Princeton University Press, 1962.
1.2.2
[34] P. Lotito, E. Mancinelli, and J. Quadrat. Traffic Assignment and Gibbs-Maslov Semirings. In
Idempotent Mathematics and Mathematical Physics: International Workshop, February 3-10, 2003,
Erwin Schrödinger International Institute for Mathematical Physics, Vienna, Austria, volume 377,
page 209. American Mathematical Society, 2005. 4.12
[35] B. M. Maggs and S. A. Plotkin. Minimum-cost spanning tree as a path-finding problem. Infor-
mation Processing Letters, 26(6):291–293, January 1988. DOI: 10.1016/0020-0190(88)90185-8
4.3
[36] M. Mohri. Semiring frameworks and algorithms for shortest-distance problems. Journal of
Automata, Languages and Combinatorics, 7(3):321–350, 2002. 4.1
[38] N. Nisan and A. Ronen. Algorithmic mechanism design. In Proceedings of the 31st ACM
Symposium on Theory of Computing, pages 129–140, Atlanta, GA, 1999. 4.13
[39] J. D. Oldham. Combinatorial approximation algorithms for generalized flow problems. Journal
of Algorithms, 38(1):135 – 169, 2001. DOI: 10.1006/jagm.2000.1130 4.9
[40] R. Perlman. Network layer protocols with Byzantine robustness. PhD thesis, M.I.T., 1988. 4.13.1
[41] R. Ramaswamy, J. B. Orlin, and N. Chakravarti. Sensitivity analysis for shortest path prob-
lems and maximum capacity path problems in undirected graphs. Mathematical Programming,
102(2):355–369, 2005. DOI: 10.1007/s10107-004-0517-8 4.13.1
[42] Y. Rekhter, T. Li, and S. Hares. RFC 4271: A border gateway protocol 4 (BGP-4), January
2006. 4.6
[43] M. Richardson, R. Agrawal, P. Domingos, et al. Trust management for the semantic web.
Lecture Notes in Computer Science, pages 351–368, 2003. 4.10.5
[44] G. Rote. Path problems in graphs. Computing Supplementum, 7:155–189, 1990. 4, 4.1
64 BIBLIOGRAPHY
[45] A. Sen, K. Candan, A. Ferreira, B. Beauquier, and S. Perennes. On Shortest Path Problems with
"Non-Markovian" Link Contribution to Path Lengths. LECTURE NOTES IN COMPUTER
SCIENCE, pages 859–870, 2000. DOI: 10.1007/3-540-45551-5_72 5.1
[46] D. R. Shier. Network reliability and algebraic structures. Clarendon Press, New York, NY, USA,
1991. 4.8.2
[48] G. Theodorakopoulos and J. S. Baras. On trust models and trust evaluation metrics for ad hoc
networks. IEEE Journal on Selected Areas in Communications, 24(2):318–328, February 2006.
DOI: 10.1109/JSAC.2005.861390 4.10.3
[49] A. Üresin and M. Dubois. Parallel asynchronous algorithms for discrete data. Journal of the
ACM (JACM), 37(3):588–606, 1990. DOI: 10.1145/79147.79162 3.4.2
[50] A. Wongseelashote. Semirings and path spaces. Discrete Mathematics, 26(1):55–78, 1979.
DOI: 10.1016/0012-365X(79)90061-X 2.2.3
[51] P. R. Zimmermann. The Official PGP User’s Guide. MIT Press, 1995. 4.10, 4.10.3
65
Authors’ Biographies
JOHN S. BARAS
John S. Baras received a B.S. in Electrical Engineering from the National Technical University of
Athens, Greece, in 1970, M.S. and Ph.D. in Applied Mathematics from Harvard Univ. in 1971
and 1973. Founding Director of the Institute for Systems Research from 1985 to 1991. Since
August 1973 he has been with the Electrical and Computer Engineering Department, and the
Applied Mathematics Faculty, at the University of Maryland, College Park. Since 1991 Dr. Baras
has been the Director of the Maryland Center for Hybrid Networks (HYNET). His many awards
include the 1980 George S. Axelby Prize of the IEEE Control Systems Society and the 2007 IEEE
Communications Society Leonard G. Abraham Prize in the Field of Communication Systems.
Fellow of the IEEE and a Foreign Member of the Royal Swedish Academy of Engineering Sciences
(IVA). He has given many invited plenary lectures at prestigious international conferences including
the IEEE CDC, ECC, ECAI, Mobicom. His research interests include control, communication
and computing systems.
GEORGE THEODORAKOPOULOS
George Theodorakopoulos is a senior researcher at the École Polytechnique Fédérale de Lausanne
(EPFL), Lausanne, Switzerland. He received his Ph.D. and M.Sc. from the University of Maryland,
College Park, and his B.Sc. from the National Technical University of Athens, Greece, all in Electrical
and Computer Engineering, in 2007, 2004, and 2002, respectively.
Half of his Ph.D. work was on the application of the algebraic path problem to trust com-
putation. This work resulted in two awards: the best paper award at the ACM Wireless Security
workshop (WiSe 2004) and the IEEE Leonard G. Abraham prize (IEEE Journal on Selected Areas
in Communications 2006).
His research interests also include game theory (the other half of his Ph.D.), trust and repu-
tation systems, and network security.