Docsity

Discrete Optimization Problems - Discrete Modeling and Optimization - Lecture Slides, Slides of Discrete Structures and Graph Theory

Partial preview of the text

Download Discrete Optimization Problems - Discrete Modeling and Optimization - Lecture Slides and more Slides Discrete Structures and Graph Theory in PDF only on Docsity!

Solution methods for

Discrete Optimization

Problems

Computational complexity of

discrete optimization problems

  • In terms of complexity of solution methods, discrete optimization problems can be divided into two classes:
    1. Problems that have efficient algorithms for finding optimal solutions.
    2. Problems that don’t have such efficient algorithms.
  • The first class problems (Minimum Spanning Tree Problem, Maximum Flow Problem, etc.) will be considered in the second half of this class.
  • Most discrete optimization problems are in the second class.

Analysis of Running Time

Running time of an algorithm

is a function of input size.

Two kind of analyses of running time:

  • Worst-case running time analysis
  • Average-case running time analysis

Most results in the analysis of algorithms

concern the worst-case running time.

Efficiency of Algorithms: Example

Recall the Traveling Salesman Problem (TSP):

There are n cities. The salesman

  • starts his tour from City 1,
  • visits each of the cities exactly once,
  • and returns to City 1.

For each pair of cities i, j there is a cost c ij

associated with traveling from City i to City j.

  • Goal: Find a minimum-cost tour.

Efficiency of the “Exhaustive enumeration” algorithm

  • Is the “exhaustive enumeration” algorithm efficient?

Assume that each elementary operation can be done in 1 nanosecond = 10-9^ seconds. Then the running time:

n=10 n=20 n=

0.004 sec 77 years 8.4× 10 13 centuries

“Nearest neighbor” algorithm

 Consider another method for solving the TSP,

the “Nearest neighbor” algorithm: In every iteration (except the last one) go to the closest city not visited yet.

 What is the running time of this algorithm?

  • In each iteration we choose one of the n cities; so there are n iterations.
  • In each iteration, we need at most n comparisons to choose the next city. Thus, the total number of elementary operations is at most n^2.

Order of an Algorithm

Definition: Let A be an algorithm.

Let w(n) be the maximum number of elementary operations required to execute A for all possible input sets of size n. If w(n) is O (f(n)) , we say that A has a ( worst case ) order of f(n).

Ex.: Suppose the maximum number of operations needed to execute algorithm A is 5n^2 +3n+. Then A has an order of n^2.

Time comparisons of the most common algorithm orders

f(n) n=10 n=1000 n=10 5 n=10 7

log 2 n 3.3sec.^ ×^10 -9^10 -8^ sec.^ 1.7^ ×^10 -8^ sec.^ 2.3sec.^ ×^10 -

n^10 -8^ sec.^10 -6^ sec.^10 -4^ sec.^ 0.01 sec.

n∙ log 2 n 3.3sec.^ ×^10 -8^10 -5^ sec.^ 0.0017 sec.^ 0.23 sec.

n^2^10 -7^ sec.^10 -3^ sec.^ 10 sec.^ 27.8 min.

n^3^10 -6^ sec.^ 1 sec.^ 11.6 min.^ 317 cent.

2 n^^10 -6^ sec.^ 3.4×^10284 years

3.2× 1030095 years

3.1× 10 3001022 years