Docsity

Combinatorial Optimization - Artificial Neural Networks - Lecture Slides, Slides of Computer Science

Toggle sidebar
bg1
Ugur HALICI - METU EEE - ANKARA 11/18/2004
EE543 - ANN - CHAPTER 4 1
Combinatorial Optimization
Combinatorial Optimization
by Neural Networks
by Neural Networks
CHAPTER
CHAPTER IV
IV
CHAPTER
CHAPTER IV :
IV : Combinatorial Optimization by Neural Networks
Combinatorial Optimization by Neural Networks
Introduction
Several authors have suggested the use of neural networks as a tool to provide
approximate solutions for combinatorial optimization problems such as graph matching,
the traveling salesman, task placement in a distributed system, etc.
In this chapter, we first give a brief description of combinatorial optimization problems.
Next we explain in general how neural networks can be used in combinatorial
optimization and then introduce Hopfield network as optimizer for two well known
combinatorial optimization problems: the graph partitioning and the traveling salesman.
Hopfield optimizer solves combinatorial optimization problems by gradient descent,
which has the disadvantage of being trapped in local minima of the cost function.
By the use of techniques of complexity theory, it has been proved that no network of
polynomial size exists to solve the traveling salesman problem unless NP=P. However,
their parallel nature and good performance in finding approximate solution make the
neural optimizers interesting.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14

Partial preview of the text

Download Combinatorial Optimization - Artificial Neural Networks - Lecture Slides and more Slides Computer Science in PDF only on Docsity!

Combinatorial Optimization Combinatorial Optimization

by Neural Networksby Neural Networks

CHAPTER IV CHAPTER IV

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

Introduction

Several authors have suggested the use of neural networks as a tool to provide approximate solutions for combinatorial optimization problems such as graph matching, the traveling salesman, task placement in a distributed system, etc.

In this chapter, we first give a brief description of combinatorial optimization problems. Next we explain in general how neural networks can be used in combinatorial optimization and then introduce Hopfield network as optimizer for two well known combinatorial optimization problems: the graph partitioning and the traveling salesman.

Hopfield optimizer solves combinatorial optimization problems by gradient descent, which has the disadvantage of being trapped in local minima of the cost function.

By the use of techniques of complexity theory, it has been proved that no network of polynomial size exists to solve the traveling salesman problem unless NP=P. However, their parallel nature and good performance in finding approximate solution make the neural optimizers interesting.

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.1. Combinatorial Optimization Problems

The problems typically having a large but finite set of solutions among which we want to find the one that minimizes or maximizes a cost function are often referred as combinatorial optimization problems.

Since any maximization problem can be reduced to a minimization problem simply by changing the sign of the cost function, we will consider only the minimization problem with no loss of generality.

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.1. Combinatorial Optimization Problems

An instance of a combinatorial optimization problem can be formalized as a pair ( S, g).

The solution space, denoted by S, is the finite set of all possible solutions.

The cost function, denoted by g , is a mapping from the set of solutions to real numbers, that is, g : S →R.

In the case of minimization, the problem is to find a solution S* ∈ S , called globally- optimal solution , which satisfies

(4.1.1)

Notice that for a given instance of the problem, such an optimal solution may not be unique.

S g S

S S i i

* = min ( ).

∈

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.1. Combinatorial Optimization Problems: NP_complete

The probable situations for P and NP_complete problems are sketched in Figure 4.1.

(a) (b)

Figure 4.1 The class of NP problems a) assuming that P≠NP b) if any p∈NP_complete becomes p∈P, then implies P=NP

NP P

NP-complete

NP

P=NP-complete

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.1. Combinatorial Optimization Problems: Traveling Salesman

A combinatorial optimization problem of a major theoretical and practical interest, is the traveling salesman problem (TSP), and it has been subject of much work.

This problem is NP_complete, and therefore computationally intractable for large instances of the problem.

It is of great practical use in various important areas such as circuit placement in VLSI, tool motion in manufacturing, network design etc.

Thus the development of methods searching for solutions that are close to the optimum, and yet not excessively time consuming, is the source for continued research.

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.1. Combinatorial Optimization Problems: Traveling Salesman

In the TSP, the shortest closed path traversing each city under consideration exactly once is searched (Figure 4.2).

For TSP, the number of cities determines the size of the problem.

Figure 4.2 The traveling salesman problem a) an instance with 4 cities b) the optimum solution c) a nonoptimum solution d) a non feasible solution having some unvisited cities

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.1. Combinatorial Optimization Problems: Vertex Cover

Another problem that we will consider in this chapter because of its simplicity in designing a neural optimizer is the vertex cover problem.

It is also an NP_complete problem, therefore no efficient algorithms for its exact solution is available when the number of nodes in the graph is large.

The problem size is determined by the number of nodes in the graph for which a minimum cover is searched.

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.1. Combinatorial Optimization Problems: Vertex Cover

If we have to solve an NP_complete problem, then a very long computation may be needed for an exact solution.

The optimum solution of the vertex cover problem can be obtained by enumerating all the covers and then selecting the minimum one.

However such an enumerative search for the exact optimum solution have a time complexity of O(2 n ), where n is the number of vertices in the graph.

As vertex cover is an NP_complete problem, finding the exact minimum cover of G is not practical when the number of vertices is very large.

Thus, in some cases, approximate algorithms are preferred.

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.2. Mapping an Optimization Problems onto Neural Networks

Solving a combinatorial optimization problem aims to find the "best" or "optimal" solution among a finite or countably infinite number of alternative solutions.

As an alternative to the conventional optimization methods, neural networks are used for the solution of combinatorial optimization problems.

In general, a neural optimizer is a neural network whose neurons are affecting the problem solution.

For instance neurons affecting the (city, position) pair of the tour can be used in the neural optimizer for solving the traveling salesman problem.

If a neuron is "on", this implies that the corresponding city should be visited in the given position in the approximately optimal solution.

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.2. Mapping an Optimization Problems onto Neural Networks

Then strongly inhibitory links are established between neurons, which represent incompatible elements of the solution; for example, a city should not be visited twice, and a position should not be occupied by two different cities.

Furthermore, inhibitory links representing the cost are placed between neurons. For example, the intensity of inhibitory links can represent the distances between cities in the traveling salesman problem.

Once the model is set up, it is allowed to relax dynamically to a steady-state which should be of "minimum energy" representing a quasi-minimal cost solution.

Hopfield network, Boltzmann machine, mean field network, Gaussian machine and several other neural networks can be used as neural optimizers.

The units in these networks tend to optimize a global function of the state space, by using only local information.

Mean Field, Boltzmann and Gaussian machines are stochastic in nature and allow escaping from local optima.

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.2. Mapping an Optimization Problems onto Neural Networks

An instance of a combinatorial optimization problem can be considered as a tuple ( S,S', g) where S is the finite set of solutions;

S' is the set of feasible solutions that satisfy the constraints of the problem;

g: S →R, is the cost function assigning a real value to each solution.

The aim is to find a feasible solution for which the cost function is optimal.

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.2. Mapping an OPs onto NNs: Feasibility

Another desired property of the network is feasibility. Let X* to denote the set of stable states of a neural network. The energy function E of the neural network is called feasible if all local minima of the energy function correspond to feasible solutions, that is

m ( X* )⊆ S' (4.2.2)

where

m ( X* ) = { S (^) i ∈ S ⎢ ∃ x k^ ∈ X* : m ( x k ) = Si }. (4.2.3)

  • Feasibility of the energy function implies that the solution achieved by the network will always be a feasible one, since a neural optimizer always converges to a configuration x ∈ X*

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.2. Mapping an OPs onto NNs: Feasibility, Order Preservation

Note that, if the energy function is order preserving, then the energy will be minimal for configurations corresponding to an optimal solution (Figure 4.3).

Furthermore, if the energy function is feasible, the network is guaranteed to converge to a feasible solution.

Figure 4.3: The goal of a neural optimizer is to converge to the global minimum of the energy function

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.2. Mapping an OPs onto NNs: Feasibility, Order Preservation

Hence, feasibility and order-preservation of the energy function imply that the network will tend to find an optimal feasible solution for the given instance of the combinatorial optimization problem.

Further notice that if { S* }⊆ S' - m ( X *), where S * is the minimum solution. In such a case, the neural network will never converge to a state corresponding to the minimum solution, but to a near minimum one.

The neural optimizers are usually designed such that m ( X* )= S'

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.3. Hopfield Network as Combinatorial Optimizer

Consider the continuous valued asynchronous Hopfield model in which the outputs of the neurons are computed from its inputs using the sigmoidal relation. That is, for neuron i , it is in the form:

(4.3.1)

where κ is the gain constant and a (^) i is the activation determined by the equation:

As in the case of associative memory given in Chapter 3, we will consider again an extreme case. However, the output transfer function of the neurons here is shifted so that it takes values between 0 and 1, instead of -1 and 1.

xi = f a ( i ) = 1 ( +tanh( ai ))

1 κ

j i

N

j

ai = (^) ∑ wjix + θ = 1

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.3. Hopfield NN as Combinatorial Optimizer : Vertex cover

The problem can be represented by a neural network in which each neuron corresponds to a vertex in the graph.

The outputs of neurons indicate whether the corresponding vertex is included in the cover or not.

  • The case xi =1 indicates that vertex i is in the cover while xi =0 indicates it is not.

The energy function should be formed so that it satisfies the constraints that we discussed above.

We are thus dealing with a special case of a very general class of problems, namely to find the minimum of a function in the presence of constraints.

  • The standard method of solution is to introduce the constraint via constants called Lagrange multipliers into the cost function, so the minimum of the cost function automatically satisfies the constraints for the feasibility.

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.3. Hopfield NN as Combinatorial Optimizer : Vertex cover

  • Let a 0-1 variable eij be assigned value 1 if there is an edge from vertex i to vertex j in the graph, and it is 0 otherwise.
  • Consider summation
  • The two terms related to i=m, j=n and i=n, j=m results in

emn + enm -2 xm emn -2 x (^) n emn + x (^) mxne (^) mn + xn x (^) m enm

ij

N i

N j ij ij

N i

N j i

N i

N j

∑∑ eij^ ∑∑ xe ∑∑ xxe

= = = = = =

1 1 1 1 1 1

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.3. Hopfield NN as Combinatorial Optimizer : Vertex cover

  • Case emn = enm =

emn + enm -2 xm emn -2 x (^) n emn + x (^) mxne (^) mn + xn x (^) m enm = 2 -2 x (^) m -2 xn + x (^) mxn + xnx (^) m

  • Case emn = enm =

emn + enm -2 xm emn -2 x (^) n emn + x (^) mxne (^) mn + xn x (^) m enm = 0

xm xn 2 -2 xm -2 xn + xm xn + x (^) nxm

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.3. Hopfield NN as Combinatorial Optimizer : Vertex cover

  • Below, the cost function to be minimized is formulated as 0-1 programming

(4.3.5)

  • The term with coefficient A in Eq. (4.3.5) goes to zero when the requirement for a valid cover has been met. That is, all the edges in the graph are adjacent to at least one of the vertices in the cover.
  • The term with coefficient B increases the energy by an amount proportional to the number of vertices in the cover, emphasizing minimality.
  • Dropping the constant part, equation (4.3.5) becomes

(4.3.6)

C A e (^) ij x e x x e B x j

N

i

N i j

N

i

N ij i j j

N

i

N ij i i

N ( x ) = ( − + ) + = = = = = = =

1 1 1 1 1 1 1

= = = = =

n

i

ij i

n

i

n

j

ij i j

n

i

n

j

C A xi e xxe B x 1 1 1 1 1

( x ) ( 2 )

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.3.Hopfield NN as Combinatorial Optimizer: Traveling salesman

Now we will try to solve some more complicated traveling salesman problem. TSP is a benchmark attempted by almost all methods developed for combinatorial optimization.

This problem is also the one attempted by the Hopfield optimizer proposed in the classical paper [Hopfield 85].

TSP aims to find best order among the n cities to be visited. Expressed in a slightly different way, the visit order i in the tour should be determined for the each city α.

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.3.Hopfield NN as Combinatorial Optimizer: Traveling salesman

  • Introducing a square matrix containing nxn binary elements, the solution can be represented in 0- programming (Figure 4.4).
  • An entry having value "1" in the ith position of row α indicates that the visit order of city α is i.
  • The matrix corresponds to a feasible solution if and only if each row and column contains exactly one entry having value "1". Figure 4.4. Representation of the tour by an nxn matrix, in which the rows corresponds to the cities while columns are indicating the order of visit

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.3.Hopfield NN as Combinatorial Optimizer: Traveling salesman

When a matrix of neurons is used to represent the problem, the energy of the network becomes:

(4.3.9)

where

x αi is the output of neuron α i, w α i, β j is the connection strength between the units α i and β j θ (^) α i,=w (^) α i, α i /2 is bias of neuron α i.

i j

n n

i

n n

j

ij

i

n n

i

i j i

n n

i

n n

j

ij

E w xx

E w xx x

α β α β

αβ

α α

α β α α β

αβ θ

∑∑∑∑

∑∑∑∑ ∑∑

= = = =

= = = = = =

1 1 1 1 2 ,

1

1 1 1 1 1 1 2 ,

1

or

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.3.Hopfield NN as Combinatorial Optimizer: Traveling salesman

For a TSP solution , the followings should be satisfied

Each city should be visited exactly once; At each position of the travel route, there should be exactly one city; The length of the tour should be the minimum.

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.3.Hopfield NN as Combinatorial Optimizer: Traveling salesman

In order to have the cost function in the format of the energy function given it can be reorganized as:

i j

n n n

j

ij ij

n

i

n

i

n i

n

i

n

j

ij i j

n n

i

n

n n

i

i

n n

j

i j

n n n

i

d xx

D

B

x x B x

B

A

xx A x

A

C

α β α β

αβ αβ

α

α β α α β

α

α α

αβα β α β

∑ ∑∑∑

∑ ∑ ∑ ∑ ∑∑ ∑

∑ ∑∑∑ ∑∑ ∑

, 1 , 1

x

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.3.Hopfield NN as Combinatorial Optimizer: Traveling salesman

Since the constant terms have no effect on the location of the minima of the cost function, they can be eliminated. Furthermore, x α i = x α i^2 whenever x α i ∈{0,1}. Therefore, the cost function can be written as:

i j

n n n

j

ij ij

n

i

j

n

j

ij i

n

i

n n n

j

ij i j

n n

i

n

j

n j ij i

n i

n n n j i j

n n n i

d xx

D

xx B xx

B

xx A xx

A

C

α β α β

αβ αβ

αβ α β α β

αβ α β

αβ α β α β αβαβ α β

δ δ δ

δ δ δ

δ δ δ

, 1 , 1

x

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.3.Hopfield NN as Combinatorial Optimizer: Traveling salesman

  • Compare the energy function

and the cost function

i j

n n n

i

ij ij

n

i

j

n j

ij i

n i

n n n j

ij i j

n n i

n

j

n j ij i

n i

n n n j i j

n n n i

d xx

D

B xx B xx

xx A xx

A

C

α β α β

αβ αβ

αβ α β α β

αβ α β

αβ α β α β αβαβ α β

δ δ δ

δ δ δ

δ δ δ

, 1 , 1

x

i j

n n

i

n n

j

E wi jx α x β

α β

∑∑∑∑ αβ = = = =

1 1 1 1 2 ,

1

CHAPTERCHAPTER IV :IV : Combinatorial Optimization by Neural NetworksCombinatorial Optimization by Neural Networks

4.3.Hopfield NN as Combinatorial Optimizer: Traveling salesman

Setting the weights as:

(4.3.14)

makes the energy function order preserving.

  • The constraints can be made equally weighted by setting A=B. In such a case the connection weights become:

(4.3.15)

In order to have a feasible energy function, the inequality

(4.3.16)

should be satisfied [Abe 91].

wαi,βj = − A δ αβ ( 1 − 2 δ ij )− B δ ij ( 1 − 2 δ αβ )− Ddαβ ( 1 −δ αβ )(δ j , i + 1 + δ j , i − 1 )

w α i , β j = − A (δ (^) αβ+δ ij − 4 δαβδ ij )− Dd αβ( 1 −δαβ)(δ j , i + 1 + δ j , i − 1 )

A > 2 D max( d ) α β, αβ