Title: Network monitoring: detecting node failures
1Network monitoringdetecting node failures
2Monitoring failures in (communication) DS
- A major activity in DS consists of monitoring
whether all the system components work properly. - To our scopes, we will concentrate our attention
on DS which can be modelled by means of a MPS,
thus embracing all those real-life applications
which make use of an underlying communication
graph G(V,E). - Here, we have to monitor nodes and links
(mal)functioning, through the use of a set of
sentinel nodes, which will periodically return to
a network administrator a certain set of
information about their neighborhood
3Example locating a burglar
- This could be your nice apartment ?
Problem suppose that you want to protect it
against intrusions, and that you decide to
install an Intruder Detection System (IDS)
guarding the apartment, based on video
surveillance.
and so you decide to put 2 cameras in rooms b
and c (it is easy to see that in this way all the
rooms are guarded)
4Example locating a burglar (2)
- But now you leave the apartment and then a
burglar enters in ? fortunately, your IDS
detects it and remotely inform you about that
Question can you call the police and tell them
precisely in which room the burglar is located?
This depends on the information returned by the
IDS
5Example locating a burglar (3)
- Luckily enough, you installed an IDS consisting
of advanced detectors, each of which can return
the name of the room from which the intrusion
comes
In this case, detectors in rooms b and c are
effective (they will both tell to you "room
f")
6Example locating a burglar (4)
- On the other hand, assume that you had installed
an IDS guarding the apartment consisting of basic
detectors, which are only able to send an alarm
bit after they detect an intrusion in a guarded
room so, both b and c reports an alarm bit
but now the question is where is the burglar?
Either in room b, c, or f??? The IDS does not
work properly here, since we do not know in which
room the burglar is!
7Example locating a burglar (5)
- However, if you had installed 4 old detectors
guarding the apartment as in the picture, the
situation gets back to be safe
Now detectors b and c send an alarm bit, but a
and d do not, and so you can infer the burglar is
in room f can you see why?
Because each room has a distinct set of guarding
detectors!
8Transposition to network monitoring
- While in the previous example, the IDS monitors
the apartment for threats from the outside, a
network monitoring system (NMS) monitors the
network for problems caused by crashed servers
(nodes), or network connection disruptions
(edges). - A NMS has to monitor continuously the network,
and has to report immediately a malfunctioning
in a MPS, this means that we need synchronicity
among processors. - In a NMS, the status of nodes and edges is
monitored through the use of sentinel nodes,
which periodically exchange messages with
adjacent nodes (for instance, a reciprocal status
request every k rounds), and then report some
kind of information to the network administrator. - Which type of message is exchanged among nodes in
the network? And which type of message a sentinel
node is able to report to the network
administrator? This depends on the underlying
network infrastructure, along with the monitoring
software. For instance, in a wireless network, a
sentinel node could not be able to precisely
establish which of its neighbors is not replying
to a ping, and so it can only return an alarm bit
to the administrator!
9Formalizing the node-monitoring problem
- Input A graph G (V,E) modeling a MPS, and a
query model Q, namely a formal description of the
entire process through which a sentinel node x
reports its piece of information to the network
administrator (i.e., (1) which nodes are queried
by x, and (2) through which type of message, and
finally (3) which type of information x can
return) - Goal Compute a minimum-size subset of sentinel
node S?V allowing to monitor G with respect to
the simultaneous failure of at most k nodes in G,
i.e., such that the composition of the
information reported by the nodes in S to the
network administrator is sufficient to identify
the precise set of crashed nodes, for any such
set of size at most k.
10Again on the query model
- In the burglar example, in the first case a
sentinel node returns the name of an adjacent
affected node, while in the second case it just
returns the information that an adjacent node has
been affected! - This is exactly what the definition of a query
model is about the set of information that a
sentinel node x is able to return. - Observe that the largest is the set of returned
information, the strongest is the query model,
and the sparsest is the set of sentinels that we
need to monitor the graph!
11Network monitoring and dominance in graphs
- The simplest possible query models are those in
which each sentinel node communicates with its
neighbors only, and thus a sentinel node can
report a set of information about its
neighborhood ? the monitoring problem in this
case is naturally related with the concept of
dominance in graphs, i.e., with the activity of
selecting a set of nodes (dominators) in a graph
in order to have all the nodes of the graph
within distance at most 1 from at least a
dominator - These query models are then further refined on
the basis of the type of messages that sentinel
nodes exchange with their neighbors and with the
network administrator
12Dominating Set
Given a graph G(V,E), a dominating set of G is a
set of nodes D such that every node of G is at
distance at most 1 from D
y
z
x
D4
x dominates x,y,z
13Minimum Dominating Set (MDS)
This is a dominating set of minimum size
c
a
e
b
d
g
y
z
x
f
D3
14Network monitoring and MDS
- In a query model in which a sentinel node
- Sends a ping to each adjacent node and waits for
a reply - Sends to the network administrator the id of the
set of adjacent nodes which did not reply - a MDS D of a graph G(V,E) defines a
minimum-size set of processors which can monitor
the correct functioning of all the nodes in V\
D, since every node in G is pinged by at least
one node in D (notice that if a node x in D
fails, the network administrator is not able to
understand whether besides x- some of the nodes
dominated by x have failed or not in this sense,
if we are guaranteed that at most a single node
in G can fail, then a MDS is enough to monitor
the entire graph!)
15A special type of Dominating Set the
Identifying Code (IC)
This is a dominating set D in which every node v
is dominated by a distinct set of nodes in D
(this is called the identifying set of v)
A Minimum IC (MIC) is an IC of smallest
cardinality.
16Network monitoring and MIC
- In a query model in which a sentinel node
- Sends a ping to each adjacent node and waits for
a reply - Sends to the network administrator an alarm bit
(0 if all the adjacent replied, 1 otherwise) - a MIC C of a graph G(V,E) defines a
minimum-size set of processors which can monitor
the failure of at most one node in V\C, since
every node in G is pinged by a distinct set of
nodes in C (notice that if a node x in C fails,
the network administrator is not able to
understand whether besides x- some of the nodes
dominated by x have failed or not so again, if
we are guaranteed that at most a single node in G
can fail, then a MIC is enough to monitor the
entire graph!)
17Our problems
- We will study the monitoring problem for single
node failures (i.e., node crashes) w.r.t. the two
following two query models - Sentinels are able to return the id of the
adjacent failed node ? we will search a MDS of
the network (MDS problem) - Sentinels are only able to return an alarm bit
about the neighborhood (i.e., a warning that an
adjacent node has failed) ? we will search a MIC
of the network (MIC problem) - Main questions Are MDS and MIC problems easy or
NP-hard? If so, can we provide efficient
(distributed) approximation algorithms to solve
it? - We will show that MDS and MIC problems are
NP-hard, and that they are both not approximable
within o(ln n) we will also provide an T(ln
n)-approximation distributed algorithm for MDS
and MIC (only a skecth)
18Reminder being NP-hard
- A problem P is NP-hard iff one can Turing-reduce
in polynomial time any NP-complete problem P to
it - Turing-reducing in polynomial time P to P means
that there exists a polynomial-time algorithm
that solves P (i.e., it recognizes the
YES-instances of P) by calling an oracle machine
as a subroutine for solving P, and such
subroutine call takes only one step to compute - Of course, if we could solve an NP-hard problem
in polynomial time, then PNP - MDS and MIC are optimization problems, since we
search for solutions of minimum size - For optimization problems, we can use a special
(strongest) type of reduction, namely the
L-reduction, which linearly preserves the degree
of approximability of a problem such a type of
reduction is also useful to prove NP-hardness, as
we will see soon
19Reminder optimization problems and
approximability
- An optimization problem A is a quadruple (I, f,
m, g), where - I is a set of instances
- given an instance x ? I, f(x) is the set of
feasible solutions - given a feasible solution y of x, c(y) denotes
the measure of y, which is usually a positive
real - g is the goal function, and is either min or max.
- The goal is then to find for some instance x an
optimal solution, that is, a feasible solution y
with - c(y) g c(y') y' ? f(x).
- Given a minimization (resp., maximization)
problem A, let OPTA(x) denote the cost of an
optimal solution to A w.r.t. instance x. Then, we
say that A is ?-approximable, ?1, if there
exists a polynomial-time algorithm for A which
for any instance x ? I returns a feasible
solution whose measure is at most (resp., at
least) ?OPTA(x).
20L-reduction definition
- Let A and B be optimization problems and cA and
cB their respective cost functions. A pair of
functions f and g is an L-reduction from A to B
(we write ALB) if all of the following
conditions are met - functions f and g are computable in polynomial
time - if x is an instance of problem A, then f(x) is an
instance of problem B (and so f is used to
transform instances) - if y is a solution to f(x), then g(y) is a
solution to x (and so g is used to transform
solutions) - there exists a positive constant a such that
- OPTB(f(x)) a OPTA(x)
- (informally, the cost of an optimal solution of
the transformed instance is not far way from the
cost of an optimal solution of the original
instance) - there exists a positive constant ß such that for
every solution y to f(x) - OPTA(x) - cA(g(y)) ßOPTB(f(x)) - cB(y)
- (informally, the distance from the cost of an
optimal solution of the transformed solution, is
not far way from the distance of the cost of the
solution found for the transformed instance from
its optimal).
21L-reduction consequences
- If A is L-reducible to B and B admits a
(1d)-approximation algorithm, then A admits a
(1daß)-approximation algorithm, where a and ß
are the constants associated with the reduction.
Indeed, by dividing both sides of the last
inequality by OPTA(x) - 1 - cA(g(y))/OPTA(x) ßOPTB(f(x))/OPTA(x) -
(1d) OPTB(f(x))/OPTA(x) - and since OPTB(f(x)) a OPTA(x)
- 1 - cA(g(y))/OPTA(x) a ß1 - (1d) ?
cA(g(y))/OPTA(x) 1daß. - If A is L-reducible to B and A is NP-hard, then B
is also NP-hard (this comes from the first three
items of the definition, since any Turing
reduction from an NP-complete problem to A can be
easily extended in polynomial time to a reduction
to B). - If A is L-reducible to B and A is not
approximable within a factor of ?, then B is not
approximable within a factor of o(?) (this comes
from the fourth item, since otherwise one could
use the approximate solution of B to compute in
polynomial time a o(?)-approximate solution to
A). - If A is L-reducible to B and B is L-reducible to
A, then A and B are asymptotically equivalent in
terms of (in)approximability.
22The Set Cover problem
- We will show that the Set Cover Problem and the
Minimum Dominating Set Problem are asymptotically
equivalent in terms of (in)approximability (and
so we show an L-reduction in both directions) - First of all, we recall the definition of the Set
Cover (SC) problem. An instance of SC is a pair
(Uo1,,om, SS1,,Sn), where U is a universe
of objects, and S is a collection of subsets of
U. The objective is to find a minimum-size
collection of subsets in S whose union is U. - SC is well-known to be NP-hard, and to be not
approximable within (1-e) ln n, for any e gt 0,
unless NP ? DTIME(nlog log n) (i.e., unless NP
has deterministic algorithms operating in
slightly super-polynomial time this is just a
bit more believable to happen than PNP). - On the positive side, the greedy heuristic (i.e.,
at each step, and until exhaustion, choose the
so-far unselected set in S that covers the
largest number of uncovered elements in U)
provides a T(ln n) approximation ratio.
23L-reduction from MDS to SC
- Given a graph G (V, E) with V 1, 2, ..., n,
construct an SC instance (U, S) as follows the
universe U is V, and the family of subsets is
S S1, S2, ..., Sn such that Sv consists of
the vertex v and all vertices adjacent to v in G
(this is the function f, and notice that the two
instances have the same size, i.e., n). - Now, it is easy to see that if C Sv v ? D
is a feasible solution of SC, then D is a
dominating set for G, with D C (this is the
function g, and notice that the two solutions
have the same size). - Now notice that if D is a dominating set for G,
then C Sv v ? D is a feasible solution of
SC, with C D. Hence, an optimal solution of
MDS for G equals the size of a Minimum Set Cover
(MSC) for (U, S). - From the two previous points, we have OPTB(f(x))
OPTA(x), cA(g(y))cB(y), and so aß1. - ? Therefore, MDS LSC, and a ?-approximation
algorithm for SC provides exactly a
?-approximation algorithm for MDS.
24Example of the L-reduction from MDS to SC
- For example, given the graph G (V,E) shown
below, we construct a set cover instance with the
universe U 1, 2, ..., 6 and the subsets
S1 1, 2, 5, S2 1, 2, 3, 5,
S3 2, 3, 4, 6, S4 3, 4,
S5 1, 2, 5, 6, and S6 3, 5, 6. In this
example, D 3, 5 is a dominating set for G,
and this corresponds to the set cover
C S3, S5 of the universe. For example, the
vertex 4 ? V is dominated by the vertex 3 ? D,
and the element 4 ? U is contained in the set S3
? C.
25L-reduction from SC to MDS
- Let (U, S) be an instance of SC with the universe
Uo1,,om, and the family of subsets
SS1,,Sn, and let I1,,n w.l.o.g., we
assume that U and the index set I are disjoint.
Construct a graph G (V, E) as follows the set
of vertices is V I ? U, there is an edge
i, j ? E between each pair i, j ? I, and there
is also an edge i, o for each i ? I and o ? Si.
That is, G is a split graph I is a clique and U
is an independent set. This is the function f,
and notice that the two instances have not the
same size (i.e., n vs nm). - Now let D be a dominating set for G. Then it is
possible to construct another dominating set X
such that X D and X ? I simply replace
each o ? D n U by a neighbour i ? I of o. Then
C Si i ? X is a feasible solution of SC,
with C X D. This is the function g, but
notice that the two solutions have not the same
size.
26L-reduction from SC to MDS (2)
- Conversely, if C Si i ? D is a feasible
solution of SC for some subset D ? I, then D is a
dominating set for G, with D C First, for
each o ? U there is an i ? D such that o ? Si,
and by construction, o and i are adjacent in G
hence o is dominated by i. Second, since D must
be nonempty, each i ? I is adjacent to a vertex
in D. - From the two previous points, and from the fact
that U is an independent set in G, it is easy to
see that - OPTB(f(x)) OPTA(x), and so a1.
- Moreover, cA(g(y)) cB(y), and since these are
minimization problems, we have that - OPTA(x) - cA(g(y)) OPTB(f(x)) - cB(y)
- and so ß1.
- ? Then, SC LMDS, and a o(?)-inapproximability of
SC provides a o(?)-inapproximability for MDS.
27Example of the L-reduction from SC to MDS
- For example, let be given the following instance
of SC U a, b, c, d, e, S1 a, b, c,
S2 a, b, S3 b, c, d, and S4 c, d, e,
and so I 1, 2, 3, 4. In this example,
C S1, S4 is a set cover this corresponds to
the dominating set D 1, 4. Conversely, given
any other dominating set for the graph G, say
D a, 3, 4, we can construct a dominating set
X 1, 3, 4 which is not larger than D and
which is a subset of I. The dominating set X now
corresponds to the set cover C S1, S3, S4.
I
U
28Consequences on the approximability of MDS
- From the 2-direction L-reductions, it follows
that MDS is as hard to approximate as SC. - More precisely, MDS is NP-hard and cannot be
approximated within (1-e) ln n, for any e gt 0,
unless NP ? DTIME(nlog log n). - On the positive side, the greedy heuristic (i.e.,
at each step, and until exhaustion, choose the
so-far unselected set in S that covers the
largest number of uncovered elements in U)
provides a T(ln n) approximation ratio.
29Special cases
- If the graph has maximum degree ?, then the
greedy approximation algorithm finds an
O(log ?)-approximation of a MDS (we will see soon
the proof). - For special (but still prominent, from an
application point of view) cases, such as unit
disk graphs (UDG) and planar graphs (PG), the
problem admits a polynomial-time approximation
scheme (PTAS), where - A PTAS is an algorithm which takes an instance of
a minimization (resp., maximization) problem, and
a parameter e gt 0, and in polynomial time (for
fixed e), produces a solution that is within a
factor 1 e (resp., 1 e) of being optimal. - A UDG is the intersection graph of a set of unit
circles in the Euclidean plane they are often
used to model wireless networks. - A PG is a graph that can be drawn in such a way
that no edges cross each other they are often
used to model transportation networks, but also
communication networks.
30A UDG
31Some PGs
32Sequential MDS Greedy Algorithm
- Greedy Algorithm (GA) For any node v of the
given graph G, define its span to be the number
of non-dominated nodes in v U N(v). Then, start
with empty dominating set D, and at each step add
to D node v with maximum span, until all nodes
are dominated. - Theorem The GA is H(?1)-approximating, where ?
is the degree of G, and H(n) 11/21/31/n ?
ln n, i.e., the GA is (1ln ?) -approximating.
33Sequential MDS Greedy Algorithm (2)
- Proof We prove the theorem by using amortized
analysis. We call black the nodes in D, grey the
nodes which are dominated (neighbors of nodes in
D), and white all the non-dominated nodes. Each
time we choose a new node of the dominating set
(each greedy step), we have a cost of 1, (since
one node is added to the solution), but instead
of assigning the whole cost to the node we have
chosen, we distribute the cost equally among all
newly dominated nodes. - Now, assume that we know a MDS D. By definition,
to each node which is not in D, we can assign a
neighbor from D. By assigning each node to
exactly one node of D, the graph is decomposed
into stars, each having a dominator (node in D)
as center, and non-dominators as leaves. Clearly,
the cost of a MDS is 1 for each such star.
34Sequential MDS Greedy Algorithm (3)
- Now, we now look at a single star with center v
in D. Assume that in the current step of the GA,
v is not black, and let w(v) be the number of
white nodes in the star of v. If a set of nodes
in the star of v become grey in the current step
of the GA, they get charged some cost. By the
greedy condition of the algorithm, this weight
can be at most 1/w(v), since otherwise the
algorithm could rather have chosen v for D,
because v would cover at least w(v) nodes. Notice
that after becoming grey, nodes do not get
charged any more. - In the worst case (i.e., to maximize the cost
charged to the star of v), no two nodes in the
star of v becomes grey at the same step of the
GA. In this case, the first node gets charged at
most 1/(d(v)1), the second node gets charged at
most 1/d(v), and so on, where d(v) is the degree
of v in G. Thus, the total amortized cost of a
star is at most - 1/(d(v)1)1/d(v) 1/21 H(d(v)1) H(?1)
1 ln ?. -
35Distributing (synchronously) the GA
- Synchronous, non-anonymous, uniform MPS
- Proceed in phases, initially no node is in D
- Each phase has 3 steps
- each node calculates its current span, by testing
adjacent nodes (2 rounds) - each node sends (span, ID) to all nodes within
distance 2 (2 rounds) - each node joins the dominating set D iff its
(span, ID) is lexicographically higher than all
others within distance 2 (1 round to notify
neighbors)
36Distributed Greedy Algorithm
- It can be easily proven that the distributed
algorithm has the same approximation ratio as the
greedy algorithm. - However, the algorithm can be quite slow look at
caterpillar graphs (paths of decreasing degrees) - Nodes along the "backbone" add themselves to D
sequentially from left to right ? ?(?n) phases
(and rounds) are needed! - Via randomization, the greedy algorithm can be
modified so as to terminate w.h.p. in O(log ? log
n) rounds, with an expected O(log
?)-approximation ratio.
37(In)approximability of MIC
- Concerning the MIC problem, the situation is very
similar to MDS. - More precisely, MIC is NP-hard and cannot be
approximated within (1-e) ln n, for any e gt 0,
unless NP ? DTIME(nlog log n). - On the positive side, there exists a sequential
(1ln n)-approximation algorithm for MIC. - Moreover, there exists an asynchronous
distributed algorithm for MIC running in O(IC)
iterations (where IC is the returned solution,
and an iteration is essentially an exploration of
the 3-neighborood of a node), and with IC(1ln
n) MIC.