






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The key points in these lecture slides, which are core of the discrete modeling and optimization are:Discrete Optimization Problems, Solution Methods, Computational Complexity, Minimum Spanning Tree, Maximum Flow Problem, Efficiency of Algorithms, Speed of Algorithm, Efficient Memory Allocation, Elementary Operations
Typology: Slides
1 / 12
This page cannot be seen from the preview
Don't miss anything!







Efficiency of Algorithms: Example
Efficiency of the “Exhaustive enumeration” algorithm
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?
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