• No results found

15 Graphs and networks

15.1 A hypergraph with nodes 1, . . . , m is a set of nonempty subsets of {1, 2, . . . , m}, called edges. An ordinary graph is a special case in which the edges contain no more than two nodes.

We consider a hypergraph with m nodes and assume coordinate vectors xj ∈ Rp, j = 1, . . . , m, are

associated with the nodes. Some nodes are fixed and their coordinate vectors xj are given. The

other nodes are free, and their coordinate vectors will be the optimization variables in the problem. The objective is to place the free nodes in such a way that some measure of the physical size of the nets is small.

As an example application, we can think of the nodes as modules in an integrated circuit, placed at positions xj ∈ R2. Every edge is an interconnect network that carries a signal from one module

to one or more other modules.

To define a measure of the size of a net, we store the vectors xj as columns of a matrix X ∈ Rp×m.

For each edge S in the hypergraph, we use XS to denote the p × |S| submatrix of X with the

columns associated with the nodes of S. We define

fS(X) = infy kXS− y1Tk. (41)

as the size of the edge S, where k · k is a matrix norm, and 1 is a vector of ones of length |S|.

(a) Show that the optimization problem

minimize P

edges SfS(X)

is convex in the free node coordinates xj.

(b) The size fS(X) of a net S obviously depends on the norm used in the definition (41). We

consider five norms. • Frobenius norm: kXs− y1TkF =   X j∈S p X i=1 (xij− yi)2   1/2 .

• Maximum Euclidean column norm:

kXS− y1Tk2,1 = max j∈S p X i=1 (xij − yi)2 !1/2 .

• Maximum column sum norm:

kXS− y1Tk1,1 = max j∈S p X i=1 |xij − yi|.

• Sum of absolute values norm:

kXs− y1Tksav= X j∈S p X i=1 |xij − yi|

• Sum-row-max norm: kXs− y1Tk srm= p X i=1 max j∈S |xij− yi|

For which of these norms does fS have the following interpretations?

(i) fS(X) is the radius of the smallest Euclidean ball that contains the nodes of S.

(ii) fS(X) is (proportional to) the perimeter of the smallest rectangle that contains the nodes

of S: fS(X) = 1 4 p X i=1 (max j∈S xij − minj∈S xij).

(iii) fS(X) is the squareroot of the sum of the squares of the Euclidean distances to the mean

of the coordinates of the nodes in S:

fS(X) =   X j∈S kxj − ¯xk22   1/2 where x¯i = 1 |S| X k∈S xik, i = 1, . . . , p.

(iv) fS(X) is the sum of the `1-distances to the (coordinate-wise) median of the coordinates

of the nodes in S:

fS(X) =

X

j∈S

kxj − ˆxk1 where xˆi = median({xik | k ∈ S}), i = 1, . . . , p.

15.2 Let W ∈ Sn be a symmetric matrix with nonnegative elements wij and zero diagonal. We can

interpret W as the representation of a weighted undirected graph with n nodes. If wij = wji > 0,

there is an edge between nodes i and j, with weight wij. If wij = wji = 0 then nodes i and j are

not connected. The Laplacian of the weighted graph is defined as

L(W ) = −W + diag(W 1).

This is a symmetric matrix with elements

Lij(W ) =

( Pn

k=1wik i = j

−wij i 6= j.

The Laplacian has the useful property that

yTL(W )y =X

i≤j

wij(yi− yj)2

for all vectors y ∈ Rn.

(a) Show that the function f : Sn→ R,

f (W ) = inf

1Tx=0nλmax(L(W ) + diag(x)) ,

(b) Give a simple argument why f (W ) is an upper bound on the optimal value of the combinatorial optimization problem

maximize yTL(W )y

subject to yi ∈ {−1, 1}, i = 1, . . . , n.

This problem is known as the max-cut problem, for the following reason. Every vector y with components ±1 can be interpreted as a partition of the nodes of the graph in a set S = {i | yi = 1} and a set T = {i | yi = −1}. Such a partition is called a cut of the graph.

The objective function in the max-cut problem is

yTL(W )y =X

i≤j

wij(yi− yj)2.

If y is ±1-vector corresponding to a partition in sets S and T , then yTL(W )y equals four times the sum of the weights of the edges that join a point in S to a point in T . This is called the weight of the cut defined by y. The solution of the max-cut problem is the cut with the maximum weight.

(c) The function f defined in part 1 can be evaluated, for a given W , by solving the optimization problem

minimize nλmax(L(W ) + diag(x))

subject to 1Tx = 0, with variable x ∈ Rn. Express this problem as an SDP.

(d) Derive an alternative expression for f (W ), by taking the dual of the SDP in part 3. Show that the dual SDP is equivalent to the following problem:

maximize X

i≤j

wijkpi− pjk22

subject kpik2= 1, i = 1, . . . , n,

with variables pi ∈ Rn, i = 1, . . . , n. In this problem we place n points pi on the unit sphere

in Rnin such a way that the weighted sum of their squared pair-wise distances is maximized.

15.3 Utility versus latency trade-off in a network. We consider a network with m edges, labeled 1, . . . , m, and n flows, labeled 1, . . . , n. Each flow has an associated nonnegative flow rate fj; each edge or

link has an associated positive capacity ci. Each flow passes over a fixed set of links (its route);

the total traffic ti on link i is the sum of the flow rates over all flows that pass through link i. The

flow routes are described by a routing matrix R ∈ Rm×n, defined as

Rij =

(

1 flow j passes through link i 0 otherwise.

Thus, the vector of link traffic, t ∈ Rm, is given by t = Rf . The link capacity constraint can be expressed as Rf  c. The (logarithmic) network utility is defined as U (f ) =Pn

j=1log fj.

The (average queuing) delay on link i is given by

di =

1 ci− ti

(multiplied by a constant, that doesn’t matter to us). We take di = ∞ for ti = ci. The delay or

latency for flow j, denoted lj, is the sum of the link delays over all links that flow j passes through.

We define the maximum flow latency as

L = max{l1, . . . , ln}.

We are given R and c; we are to choose f .

(a) How would you find the flow rates that maximize the utility U , ignoring flow latency? (In particular, we allow L = ∞.) We’ll refer to this maximum achievable utility as Umax.

(b) How would you find the flow rates that minimize the maximum flow latency L, ignoring utility? (In particular, we allow U = −∞.) We’ll refer to this minimum achievable latency as Lmin. (c) Explain how to find the optimal trade-off between utility U (which we want to maximize) and

latency L (which we want to minimize).

(d) Find Umax, Lmin, and plot the optimal trade-off of utility versus latency for the network with data given in net_util_data.m, showing Lmin and Umax on the same plot. Your plot should cover the range from L = 1.1Lmin to L = 11Lmin. Plot U vertically, on a linear scale, and L

horizontally, using a log scale.

Note. For parts (a), (b), and (c), your answer can involve solving one or more convex optimization problems. But if there is a simpler solution, you should say so.

15.4 Allocation of interdiction effort. A smuggler moves along a directed acyclic graph with m edges and n nodes, from a source node (which we take as node 1) to a destination node (which we take as node n), along some (directed) path. Each edge k has a detection failure probability pk, which is the

probability that the smuggler passes over that edge undetected. The detection events on the edges are independent, so the probability that the smuggler makes it to the destination node undetected is Q

j∈Ppj, where P ⊂ {1, . . . , m} is (the set of edges on) the smuggler’s path. We assume that

the smuggler knows the detection failure probabilities and will take a path that maximizes the probability of making it to the destination node undetected. We let Pmax denote this maximum probability (over paths). (Note that this is a function of the edge detection failure probabilities.) The edge detection failure probability on an edge depends on how much interdiction resources are allocated to the edge. Here we will use a very simple model, with xj ∈ R+ denoting the effort (say,

yearly budget) allocated to edge j, with associated detection failure probability pj = e−ajxj, where

aj ∈ R++ are given. The constraints on x are a maximum for each edge, x  xmax, and a total

budget constraint, 1Tx ≤ B.

(a) Explain how to solve the problem of choosing the interdiction effort vector x ∈ Rm, subject to the constraints, so as to minimize Pmax. Partial credit will be given for a method that involves an enumeration over all possible paths (in the objective or constraints). Hint. For each node i, let Pi denote the maximum of Qk∈Ppk over all paths P from the source node 1

to node i (so Pmax= Pn).

(b) Carry out your method on the problem instance given in interdict_alloc_data.m. The data file contains the data a, xmax, B, and the graph incidence matrix A ∈ Rn×m, where

Aij =     

−1 if edge j leaves node i +1 if edge j enters node i 0 otherwise.

Give Pmax?, the optimal value of Pmax, and compare it to the value of Pmax obtained with uniform allocation of resources, i.e., with x = (B/m)1.

Hint. Given a vector z ∈ Rn, ATz is the vector of edge differences: (ATz)j = zk− zl if edge j

The following figure shows the topology of the graph in question. (The data file contains A; this figure, which is not needed to solve the problem, is shown here so you can visualize the graph.) Node 1 Node 2 Node 3 Node 4 Node 5 Node 6 Node 7 Node 8 Node 9 Node 10

15.5 Network sizing. We consider a network with n directed arcs. The flow through arc k is denoted xk and can be positive, negative, or zero. The flow vector x must satisfy the network constraint

Ax = b where A is the node-arc incidence matrix and b is the external flow supplied to the nodes. Each arc has a positive capacity or width yk. The quantity |xk|/yk is the flow density in arc k.

The cost of the flow in arc k depends on the flow density and the width of the arc, and is given by ykφk(|xk|/yk), where φk is convex and nondecreasing on R+.

(a) Define f (y, b) as the optimal value of the network flow optimization problem

minimize n X k=1 ykφk(|xk|/yk) subject to Ax = b

with variable x, for given values of the arc widths y  0 and external flows b. Is f a convex function (jointly in y, b)? Carefully explain your answer.

(b) Suppose b is a discrete random vector with possible values b(1), . . . , b(m). The probability that b = b(j)is π

the expected cost is minimized:

minimize g(y) + E f (y, b). (42)

The variable is y. Here g is a convex function, representing the installation cost, and E f (y, b) is the expected optimal network flow cost

E f (y, b) =

m

X

j=1

πjf (y, b(j)),

where f is the function defined in part 1. Is (42) a convex optimization problem?

15.6 Maximizing algebraic connectivity of a graph. Let G = (V, E) be a weighted undirected graph with n = |V | nodes, m = |E| edges, and weights w1, . . . , wm ∈ R+ on the edges. If edge k connects

nodes i and j, then define ak ∈ Rn as (ak)i = 1, (ak)j = −1, with other entries zero. The weighted

Laplacian (matrix) of the graph is defined as

L =

m

X

k=1

wkakaTk = A diag(w)AT,

where A = [a1· · · am] ∈ Rn×m is the incidence matrix of the graph. Nonnegativity of the weights

implies L  0.

Denote the eigenvalues of the Laplacian L as

λ1 ≤ λ2≤ · · · ≤ λn,

which are functions of w. The minimum eigenvalue λ1 is always zero, while the second smallest

eigenvalue λ2 is called the algebraic connectivity of G and is a measure of the connectedness of

a graph: The larger λ2 is, the better connected the graph is. It is often used, for example, in

analyzing the robustness of computer networks.

Though not relevant for the rest of the problem, we mention a few other examples of how the algebraic connectivity can be used. These results, which relate graph-theoretic properties of G to properties of the spectrum of L, belong to a field called spectral graph theory. For example, λ2> 0 if and only if the graph is connected. The eigenvector v2 associated with λ2 is often called

the Fiedler vector and is widely used in a graph partitioning technique called spectral partitioning, which assigns nodes to one of two groups based on the sign of the relevant component in v2. Finally,

λ2 is also closely related to a quantity called the isoperimetric number or Cheeger constant of G,

which measures the degree to which a graph has a bottleneck.

The problem is to choose the edge weights w ∈ Rm+, subject to some linear inequalities (and the nonnegativity constraint) so as to maximize the algebraic connectivity:

maximize λ2

subject to w  0, F w  g,

with variable w ∈ Rm. The problem data are A (which gives the graph topology), and F and g (which describe the constraints on the weights).

(a) Describe how to solve this problem using convex optimization.

(b) Numerical example. Solve the problem instance given in max_alg_conn_data.m, which uses F = 1T and g = 1 (so the problem is to allocate a total weight of 1 to the edges of the graph). Compare the algebraic connectivity for the graph obtained with the optimal weights w? to the one obtained with wunif= (1/m)1 (i.e., a uniform allocation of weight to the edges).

Use the function plotgraph(A,xy,w) to visualize the weighted graphs, with weight vectors w? and wunif. You will find that the optimal weight vector v? has some zero entries (which due to the finite precision of the solver, will appear as small weight values); you may want to round small values (say, those under 10−4) of w? to exactly zero. Use the gplot function to visualize the original (given) graph, and the subgraph associated with nonzero weights in w?. Briefly comment on the following (incorrect) intuition: “The more edges a graph has, the more connected it is, so the optimal weight assignment should make use of all available edges.”

15.7 Graph isomorphism via linear programming. An (undirected) graph with n vertices can be described by its adjacency matrix A ∈ Sn, given by

Aij =

(

1 there is an edge between vertices i and j 0 otherwise.

Two (undirected) graphs are isomorphic if we can permute the vertices of one so it is the same as the other (i.e., the same pairs of vertices are connected by edges). If we describe them by their adjacency matrices A and B, isomorphism is equivalent to the existence of a permutation matrix P ∈ Rn×n such that P APT = B. (Recall that a matrix P is a permutation matrix if each row and column has exactly one entry 1, and all other entries 0.) Determining if two graphs are isomorphic, and if so, finding a suitable permutation matrix P , is called the graph isomorphism problem. Remarks (not needed to solve the problem). It is not currently known if the graph isomorphism problem is NP-complete or solvable in polynomial time. The graph isomorphism problem comes up in several applications, such as determining if two descriptions of a molecule are the same, or whether the physical layout of an electronic circuit correctly reflects the given circuit schematic diagram.

(a) Find a set of linear equalities and inequalities on P ∈ Rn×n, that together with the Boolean constraint Pij ∈ {0, 1}, are necessary and sufficient for P to be a permutation matrix satisfying

P APT = B. Thus, the graph isomorphism problem is equivalent to a Boolean feasibility LP. (b) Consider the relaxed version of the Boolean feasibility LP found in part (a), i.e., the LP that results when the constraints Pij ∈ {0, 1} are replaced with Pij ∈ [0, 1]. When this LP is

infeasible, we can be sure that the two graphs are not isomorphic. If a solution of the LP is found that satisfies Pij ∈ {0, 1}, then the graphs are isomporphic and we have solved the

graph isomorphism problem. This of course does not always happen, even if the graphs are isomorphic.

A standard trick to encourage the entries of P to take on the values 0 and 1 is to add a random linear objective to the relaxed feasibility LP. (This doesn’t change whether the problem is feasible or not.) In other words, we minimize P

i,jWijPij, where Wij are chosen randomly

Carry out this scheme for the two isomorphic graphs with adjacency matrices A and B given in graph_isomorphism_data.* to find a permutation matrix P that satisfies P APT = B.

Report the permutation vector, given by the matrix-vector product P v, where v = (1, 2, . . . , n). Verify that all the required conditions on P hold. To check that the entries of the solution of the LP are (close to) {0, 1}, report maxi,jPij(1 − Pij). And yes, you might have to try more

than one instance of the randomized method described above before you find a permutation that establishes isomorphism of the two graphs.