Lectures 2 Heuristic Optimization Methods:: Combinatorial Optimization Complexity Theory When and Why To Use Heuristics
Lectures 2 Heuristic Optimization Methods:: Combinatorial Optimization Complexity Theory When and Why To Use Heuristics
Lectures 2
Heuristic Optimization Methods:
Department of Telecommunications 2
Examples of classical combinatorial
optimization problems
University of Zagreb, Croatia
Department of Telecommunications 3
Traveling Salesman Problem (TSP)
University of Zagreb, Croatia
A 2 B
Some possible tours:
A-B-C-D, distance=9
3 4 1 3
A-B-D-C, distance=10
C D
2
Department of Telecommunications 4
Satisfiability problem (SAT)
University of Zagreb, Croatia
5 2
colors = 3
4 3
Department of Telecommunications 7
Minimum Steiner Tree Problem
University of Zagreb, Croatia
(1) (2)
(4) (1) (2)
c
(4)
g
Department of Telecommunications 8
Bin packing (BP)
University of Zagreb, Croatia
...
Department of Telecommunications 9
Bin packing (BP)
University of Zagreb, Croatia
2 bins
needed
...
Department of Telecommunications 10
Combinatorial explosion
University of Zagreb, Croatia
Department of Telecommunications 11
Complexity theory
University of Zagreb, Croatia
Algorithm complexity
Problem complexity
Department of Telecommunications 12
Algorithm complexity
University of Zagreb, Croatia
p(n) = ak n k + + a j n j + + a1n + a0
O(nk)
ak 0; a j 0, 1 k k − 1
Example:
Dijkstra’s shortest path algorithm
O(n2)
Department of Telecommunications 14
Exponential time algorithm
University of Zagreb, Croatia
Example:
Exhaustive search for SAT
O(2n)
Department of Telecommunications 15
Polynomial vs. Exponential Growth
University of Zagreb, Croatia
O(3n) 2x108
growth
Values from: M Garey and D. Johnson, “Computers and Intractability: A Guide to the Theory of
NP-completeness”, W.H. Freeman and Co. Publishers, NY, 1979
Department of Telecommunications 16
University of Zagreb, Croatia
Department of Telecommunications 17
Problem Complexity
University of Zagreb, Croatia
Department of Telecommunications 18
Decision problems
University of Zagreb, Croatia
Department of Telecommunications 20
Complexity classes
University of Zagreb, Croatia
P
OR P = NP = NP-complete
NP NP -
complete
Department of Telecommunications 21
Complexity classes
University of Zagreb, Croatia
P = NP =
NP - P
NP -hard
complete
OR NP-complete
NP NP -hard
Department of Telecommunications 22
NP-hard problems
University of Zagreb, Croatia
Classical examples:
Flow-shop and job scheduling problems
Generalized assignment problem, location facility
Data clustering, graph partitioning, graph coloring
Vehicle routing problem, set covering, Steiner
tree problem
Knapsack problem, bin packing
Department of Telecommunications 23
Summary: Why are some problems
difficult to solve?
University of Zagreb, Croatia
Department of Telecommunications 24
Optimization methods
University of Zagreb, Croatia
Exact Approximate
A*
methods methods
Simplex-based Constraint
for LP programming Approximation
algorithms
Heuristic
Branch and Bound, Dynamic
Cut , Price (B&B, programming algorithms
B&C, B&P)
Improvement (meta)heuristics
Constructive heuristics
• Local search
• Greedy algorithms
•Nature inspired
• Tabu search, Genetic
Hybrid methods
algorithms, Simmulated
• GRASP Annealing, Ant colony
•Problem specific
heuristics
Department of Telecommunications 25
Exact methods:
University of Zagreb, Croatia
Department of Telecommunications 26
Approximate algorithms
University of Zagreb, Croatia
First Fit
(17/10)s*+2
Department of Telecommunications 28
Approximation algorithms
University of Zagreb, Croatia
Department of Telecommunications 29
Heuristic algorithms
University of Zagreb, Croatia
Department of Telecommunications 30
Heuristic algorithms
University of Zagreb, Croatia
Department of Telecommunications 31
Metaheuristics
University of Zagreb, Croatia
Department of Telecommunications 32
When to use heuristics?
University of Zagreb, Croatia
Department of Telecommunications 33
Which optimization method to use?
University of Zagreb, Croatia
Problem type:
Design problems: long-term decision making,
financial investments
Solution quality very important; Search time can be months
Planning problems: medium-term decision making,
network planning
Solution quality important; Search time can be hours/days
Control problems: short-term decision making,
operational problem; online problems (routing)
Search time critical; Solution as good as can be with limited
time
Department of Telecommunications 34
Trade off: solution quality vs. search time
University of Zagreb, Croatia
Design
problems
Solution quality
Planning
problems NOTE:
Doesn’t
necessarily
Control grow linearly
problems
Search time
Department of Telecommunications 35
Which optimization method to apply?
University of Zagreb, Croatia
Examples:
routing → Steiner tree problem
Multicast
Wavelength assignment → Graph coloring
Department of Telecommunications 37