Научная статья на тему 'Heuristic approach to the problem of minimal extension of a communication network and its assessment based on a specialized class of weighted digraphs'

Heuristic approach to the problem of minimal extension of a communication network and its assessment based on a specialized class of weighted digraphs Текст научной статьи по специальности «Математика»

CC BY
60
14
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
NETWORKS / GENETIC ALGORITHM / NP-HARD / DELAY AND COST CONSTRAINTS

Аннотация научной статьи по математике, автор научной работы — Gordonov A., Petingi L.

In the paper we are presenting a heuristic approach to solve the problem of changing network topology by minimally extending a digraph G′ through adding edges from a given spanning supergraph G of G', such that the sum of the costs of the new edges is minimum, and in the new graph the end-to-end delay between two distinguished vertices s and t meets a predefined time constraint (ME problem). We develop a heuristic based upon the Genetictype algorithm technique. Moreover, the application of this heuristic is justified and is shown that the solution of ME problem belongs to the NP-hard computational class.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «Heuristic approach to the problem of minimal extension of a communication network and its assessment based on a specialized class of weighted digraphs»

UDC 519.1

Heuristic Approach to the Problem of Minimal Extension of a Communication Network and Its Assessment Based on a Specialized Class of Weighted Digraphs

A. Gordonov, L. Petingi

Computer Science Department College of Staten Island, City University of New York 2800 Victory Boulevard, 1N-215 Staten Island, NY, USA, 10314

In the paper we are presenting a heuristic approach to solve the problem of changing network topology by minimally extending a digraph G' through adding edges from a given spanning supergraph G of G', such that the sum of the costs of the new edges is minimum, and in the new graph the end-to-end delay between two distinguished vertices s and t meets a predefined time constraint(ME problem). We develop a heuristic based upon the Genetic-type algorithm technique. Moreover, the application of this heuristic is justified and is shown that the solution of ME problem belongs to the NP-hard computational class.

Key words and phrases: networks, Genetic Algorithm, NP-hard, delay and cost constraints.

1. Introduction

A huge number of services offered by modern communication networks to the users very often still cannot satisfy highly changeable requirements. A network topology and natural restrictions related to it (such as delays) may prevent clients from implementing new services and introducing new network functions. It is especially true when we are talking about real-time networks. In this paper we are considering a problem of changing network topology by adding additional edges to the network graph in such a way that time constraints will be met and all added edges will have a minimum possible cost. We are also going to assess the performance of the solution by using as an example a specific class of weighted digraphs (which will be defined in 3). We chose this example because of the following two reasons. First of all the structure of the graphs in the class closely corresponds to the structure of a big class of applications - real-time networks for distributed objects (such as communication and control systems of linear gas and oil pipelines). Second - it is easy to find an analytical optimal solution that can be used to evaluate the performance of the algorithm developed in the paper.

Let G = (V, E) be a weighted digraph with vertex-set V, and edge-set E. Edge-set has weight functions T : E ^ R* and C : E ^ R* (where R* are non-negative real numbers).

Let s and t be two distinguished vertices of G. A path P = (V, E) is a digraph with vertex-set V = {v1,v2,... ,Vk} Q V, and edge-set E = ,v2), (v2,v3),..., (vk-i, Vk)} Q E. If s = v1, and t = Vk, then we call this path a s, i-path. Moreover, given a path P, let t(P) and e(P) represent the sum of the weights of the edges of P with regard to the weight functions T and C, respectively. Let Pshovt(G,T) be the shortest path between s and t in G with respect to the weight function T. Let G' = (V, E') be a spanning subgraph of G = (V, E) and let A be a bound. We formulate the following optimization problem:

0 : Minimize C(e) (1)

eeE''C(E-E')

Received 23rd July, 2008.

Such that t(Pahort(G*,T)) < A, where G* = (V,E'\J E").

Informally, this problem is to extend a digraph G' with edges from its supergraph G such that the sum of the costs of the new edges is minimum, and in the new graph there exists a simple path between s and t that meets the A - constraint. For future references we are going to call this problem the Minimal Extension Graph Problem or ME problem. One of the possible applications of the ME problem is an extension of a real-time network. The problem arises, for example, when a node has to deliver real-time data to another network destination node, and the transmission must meet certain delay constraints. In the case that the delay constraints are not met, we want to add additional edges such that the total cost of these edges is minimized, and the transmission time is acceptable. This problem can be shown to be at least as hard as the Constrained Shortest Path problem (CSP), known (see [1-3]) to belong to the NP-hard computational class, as the CSP problem can be reduced to the ME problem: we therefore propose an approximation algorithm using a Genetic Algorithm approach. In Section 2 we present a Genetic-type approximation algorithm to solve the ME problem. In Section 3 we evaluate this approximation technique for a class of weighted graphs where the exact optimal solutions of the ME problem are known. Finally, in Appendix, we formally prove that the ME problem is NP-hard, hence justifying the application of an approximation technique; moreover we discuss the complexity of the algorithm described in this paper.

2. A Generic-Type Algorithm for the Solution of

the ME Problem

2.1. General Description of the Algorithm

As we will show in Appendix, an exact solution of the ME problem requires, in the worst-case, exponential computational time. In this section we develop a polynomial iterative heuristic algorithm for the solution of the ME problem, using a Genetic Algorithm approach.

Given a digraph G' = (V,E'), with terminal vertices s and t, and supergraph G = (V, E) of G'. Since we are concerned only with the costs of the added edges, we define the fitness of an edge e = (u, v) of G as:

FITNESS («)= ( (e)°: |. (2)

Moreover, the fitness function for a s, i-path P = (V, Ë) of G is defined as:

FITNESS (P) = FITNESS (e) (3)

Given the set of all s, ¿-paths of G, to find a s, i-path P of G with minimum fitness, and with t(P) < A, is equivalent to solve the ME problem, as the digraph G* (see optimization problem in previous section) is obtained from G' by adding the edges of P that do not belong to G' i.e., G* = (y,Ê\J E') . As we follow a GA algorithmic technique, each individual in the population represents a s, i-path P of G, with t(P) < A. Its corresponding chromosome contains the list of the edges e G E, that makes up the path. Moreover, each edge e of the path will also contain the information of its associated weight T(e) and fitness FITNESS(e).

For the Genetic Algorithm, the implementation follows the simple pseudo-code:

Procedure : ME Algorithm,

Input : Weighted digraph G' = (V, E')

Corresponding supergraph G = (V,E);

Population Size; \ — constraint; Numberlterations;

Output : Weighted digraph G* representing the solution

yield by the ME algorithm,.

Begin

Generation = 1;

(1) Pop = GeneratelnitialPopulation(G);

(2) While(Generation < Number-Iterations)

(2.1) Pop = Selection(Pop);

(2.2) Pop = Reproduction(Pop);

Generation = Generation + 1;

End While

let P = Best Individual (Pop);

let G* = (V, (E(P) (J E'));

Return (G*);

End

3. Reproduction

Reproduction is accomplished by randomly selecting pairs of a population. Given a pair of s, ¿-paths Pi and P2 of G , two new offsprings P3 and P4 are generated. We start with the strong assumption that the end-to-end delay between vertices s and t of both P\ and P2 meet the constraint A i.e., t(Pi) < A and t(P2) < A. Moreover, the offspring of Pi and P2, P3, will also meet this constraint (i.e.,r(P3) < A).

The original population is created by application of the fc-shortest paths algorithm with respect to the weight function T, and where k = PopulationSize (for further references see for example [4-6]). If the «-path of the original population does not meet the end-to-end constraint with respect to A (i.e., t(Pi) > A), then the solution of the ME problem is obtained from one of the previous i — 1 paths of this population with minimum fitness, thus we can assume that the original fc-shortest paths meet the A constraint.

Let P = (y, E) be a path of G and u,v G t^; the Path(P, u, v) is a subpath of P with end-vertices u and v.

Let Pi = (Vi,Ei) and P2 = (V2,E2) be two s, i-paths of a population. We assume also that the vertex-set Vi = (s = vi, v2, v3,...,t = vn) is an ordered n-tuple such that e = (Vi, Vi+i) is an edge of Ei.

Let V2 = (s = ui,u2,u3,... ,t = um) be also a ordered m-tuple with respect to the edges of E2. In addition let W = ViC\V2 = (s = wi ,w2,w3,.. .t = wp), where W is an ordered p-tuple such that if Wi = vc and Wi+i = vr then c < r (i.e., the vertices of W are ordered with respect to the order of the vertices of Vi).

Let P' = Path(P2,u, v) such that u = wc and v = wr for c < r, and P' does not include any other vertices from W, then we call this subpath a forward-subpath of P2. For example, in Fig. 1, P" = Path(P2,ui,u3) is a forward-subpath of P2, but P" = Path(P2,u3,u4) is not.

Let P3 be the path obtained from Pi by replacing the subpath P' = Path(Pi, Vi, Vj) of Pi by the forward-subpath P" = Path(P2, Vi, Vj), for some nodes Vi, Vj, and suppose that t(P3) < A, then we called P" a permissible-forward-subpath. For example in Fig. 1, there are two forward-subpaths, but P" = Path(P2,ui,u3) is the only

permissible-forward-subpath. In Fig. 2, P3 is obtained by replacing the subpath P' = Path(Pi,vi,v3) in Pi, by the permissible-forward-subpath P" = Path(P2,ui,u3) of P2.

Figure 1. Two paths Pi and P2 and the corresponding T-weights of their edges

Figure 2. P3 is the offspring of Pi and P2. Moreover, t(-P3) ^ A

From all the permissible-forward-subpaths (if any) of P2, the reproduction algorithm randomly chooses one, to generate P3. The second offspring, P4, is obtained in the same manner, but by allowing P2 to be the first path in the pair (P\,P2). Since there are k/2 pairs of paths in a population and each pair produces two offsprings, the reproduction procedure generates k new s, ¿-paths of G.

4. Selection

Given a population Pop of ks, ¿-paths, as we mentioned in the previous section, we assume that each path P of Pop has t(P) < A. Recall from the Section 2.1 that the fitness of a path P is defined as in (2) and (3).

In the Selection process, we determine how many copies of a particular path will be passed to the next generation by ranking each path by an index function, involving the Fitness of a path.

The average fitness of a population Pop composed of k paths P\,P2,P3,... ,Pk is defined as

AveragFitness(Pop) = 1 ^ FITNESS(Pi)j .

We also define the maximal fitness of a population Pop as

MaxFitness(Pop) = max (FITNESS(P)).

The numbers of copies of a path P that will be passed to the next generation is determined by the following index:

NumCopies(P)

MaxFitness(Pop) - FITNESS(P)

MaxFitness(Pop) — AverageFitness(Pop)

Since the solution of the ME problem is obtained by adding to G' the edges of the path with minimum FITNESS in G, the larger the difference between MaxFitness(Pop) and FITNESS(P), the more copies of P will be made. Also the index umCopies is used to rank the paths of Pop in a non-ascending order, and the paths with higher priority will be included first. This procedure will continue until the size of the next generation is k.

5. Empirical Results

In this section we will assess the performance of the ME algorithm by comparing the solution given by the algorithm with the optimal solution analytically obtained for a specific class of weighted digraphs.

Consider the following weighted-digraph G = (V, E) with node-set V = (s = vi,v2,v3,... ,t = vn), with corresponding weight functions on the edges (T and C). The edge-set E is partitioned in three subsets Ei,E2, and E3.

Let

Ei = {(u, z), where u = Vi, z = v^i+i), 1 < i < n — 1}, E2 = {(u,z), where u = Vi, z = 1 < i < n — 2},

and E3 = {(u,z), where u = Vi, z = V(i+3), 1 < i < n — 3}.

Regarding the weight function T, we have T(e) = 1, for e G Ei,T(e) = 6, for e G E2, and T(e) = 12, for e G E3. With respect to the weight function C, we have C(e) = i, for e G Ei,e = (vi, W(^+i)), and C(e) = 0, for e G E2,or e G E3 (see Fig. 3). Let G' = (V, E' = E2\J E3), that is, another way to see this problem is that we extend G' with edges from Ei thus that the sum of the costs of the new edges from Ei is minimized and the new graph meet the end-to-end delay constrained between s and t. Equivalently, as we mentioned previously, the original population is composed of s,t-paths of G that meet the A-constraint, and, by the application of the ME algorithm, we will try to minimize the fitness of the paths under consideration.

Figure 3. Class of weighted-digraphs G

For each edge, the ordered pair (a, b) represents the ¿-weight and cost associated with that edge. For this class of graphs, let n be the number of nodes of G. If we let A = 2n, the analytical solution for the ME problem is represented by the path P with edge-set E(P) = E*UE**, where E* = {(u,z) such as u = Vi, z = V(i+i), 1 < i < n/2 — 1}, and E** = {(u, z) such as u = Vi, z = V(i+2), n/2 < i < n — 2} (see Fig. 4). The optimal solution is a path P with FITNESS(P) = (n — 1)(n + 1)/8. In Table 1 we compare the optimal solution obtained analytically and the ones obtained by the ME algorithm for the case where A = 2n, for different values of n. Moreover, we let PopulationSize = 100, and Numberlterations = 100. As Table 1 shows, the error deviation is within nine percent.

(6.01 16.0! (6.0)

(1.1) (W2-1)

V, V,

Figure 4. Optimal solution for the ME problem for the class of weighted-graphs G, and

for A = 2n

Table 1

Experimental and Analytical Results

Number of Vertices Optimal Solution ME Algorithm Solution Deviation

13 21 21 0

25 78 78 0

37 171 180 2

49 300 312 4

61 465 480 4

73 666 694 4

85 903 937 4

97 1176 1231 4.5

109 1485 1527 2.8

121 1830 1874 2.4

241 7260 7863 7

361 16290 17334 6

481 28290 31254 7

601 45150 47107 4

721 64980 70988 9

841 88410 94413 6

961 115440 119215 6

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

1081 146070 155687 6.5

6. Appendix

First we would like to show that the minimal extension of a communication network to meet an end-to-end delay constraint problem belongs to the NP-hard computational class. As the ME problem, the Constrained Shortest Path problem (CSP) is to find a minimum cost path P of G between s and t (see (1)) such that t(P) > A (i.e., find among all s, ¿-paths of G that meet the time constraint A, the one that has minimum cost). If we restrict G' = (V, 0) to be the subgraph of G = (V, E) (i.e., G' is an spanning subgraph of G with no edges), then to solve the ME problem for an instance conformed of weighted digraphs G' and G, is equivalent to solve the CSP for the instance G. Thus the ME problem is at least as hard as the CSP problem. Since in [1] it was shown that a CSP problem is NP-hard, then by restriction the ME problem also belong to this computational class.

Let consider next the computational complexity of the heuristic presented in this paper. Given a digraph G = (V, E), an algorithm was introduced in [4] to find the fc-shortest path between two vertices s and t in a digraph G = (V, E) in time

0(kn(e + nlogn)), where n number of nodes in V and e number of edges in E. Let k = PopulationSize and i = Numberlterations. The original population Pop (step 1 of the algorithm presented in Section 2.1) for the digraph G = (V, E) was created by using the fc-shortest path Algorithm (see [4]) with respect to the weight function T of G. Given two s, ¿-paths P\,P2, assuming both have lengths n, the complexity of generating their offspring P3 is of order O(n). For a population of size k, since there are k/2 pairs of paths and since each pair produces two offsprings, P3 and P4, the reproduction (step 2.2) will take O(kn). In the Selection (step 2.1) to find the MaxFitness of Pop, as well as to determine the AverageFitness of Pop will take O(kn). Step 2 (while structure) will take O(ikn), thus the complexity of the algorithm is 0(ikn + kn(e + nlogn)), thus the complexity of the ME algorithm is the same as the one to generate the fc-shortest paths of G.

References

1. Handler G. Y., Zang I. A Dual Algorithm for the Constrained Shortest Path Problem // Networks. — Vol. 10. — 1980. — Pp. 293-310.

2. Gellermann T., Sellmann M., Wright R. Shortest Path Constraints for the Resource Constrained Shortest Path Problem // Lecture Notes in Computer Science. — 2005. — Vol. 3524/2005. — Pp. 201-216.

3. Sigurd M., Zachariasen M. Constrained Shortest Path // Proceeding of AlgorithmsESA 2004, 12-th Annual European Symposium. — Bergen, Norway: 2004. — P. 802.

4. Eppstein D. Finding the fc-Shortest Paths // SIAM J. Computing. — Vol. 28(2). — 1998. — Pp. 652-673.

5. J. Hershberger M. M., Suri S. Finding the k — Shortest Simple Paths: A New Algorithm and its Implementation // Proceeding of the Fifth Workshop on Algorithm Engineering and Experiments. ALENEX 2003. — Baltimore, MD, USA: 2003. — Pp. 26-36.

6. Lawler E. L. A Procedure for Computing the K Best Solutions to Discrete Optimization Problems and its Application to the Shortest Path Problem // Management Science. — Vol. 18. — 1972. — Pp. 401-405.

УДК 519.1

Эвристический подход к проблеме минимального расширения коммуникационной сети и его оценка, основанная на использовании специального класса графов

А. Гордонов, Л. Петинжи

Кафедра вычислительной техники Колледж Стейтен Айленда, Нью-Йоркский городской университет 2800 Бульвар победы, Статен-Айленд, Нью-Йорк, США, 10314

В статье представлен эвристический подход к проблеме изменения топологии сети путём минимального расширения ориентированного графа С с помощью добавления рёбер из суперграфа С графа С таким образом, что сумма стоимостей новых рёбер минимальна и общая задержка между двумя выделенными узлами в и £ удовлетворяет заранее определённым ограничениям. Для решения этой проблемы авторами разработан алгоритм генетического типа. Более того, проведена оценка эвристического подхода с использованием специального класса ориентированных графов, и показано, что решение проблемы минимального расширения коммуникационной сети с ограничениями на задержку принадлежит к классу МР-полных вычислительных задач.

i Надоели баннеры? Вы всегда можете отключить рекламу.