TNK104 Applied Optimization
Introduction
Lecture 1
based on the slides provided by Nikolaos Pappas
The course aims at providing you with insights into applying optimization to real-world problems
2
Aim
You are expected to gain
2024 Course Evaluation
Only 6 out of 14 answered
Overall course evaluation was quite good
The link to the full evaluation document
3
Course Information
4
Organization
Course staff
Please see the course information document for more details
Course Information (cont’d)
5
Prerequisites
Course Information (cont’d)
6
Material
MIT open courseware lectures, textbook, + good YT videos
It is strongly recommended that you study and prepare for the lab assignments before the scheduled sessions
Course Information (cont’d)
7
Examination and grading
Course Content
8
Problem Solving by Applied Optimization: A Framework
Applied Optimization
This course
Real-world Optimization Problem
System Modeling
Modeling
(Simple) Heuristics
Implementation
Solution-tool
Software with GUI
Numerical Solution
Simulation
Optimization
Mathematical Modeling
Modeling
Practitioner
Pure Mathematics
Computer Science
Optimization Theory
Acknowledgment: The figure by Nikolaos Pappas, is inspired by a presentation of Prof. Arie Koster, University of Aarchen, Germany
Mathematical Theory
Solver-based Methods Problem-specific Methods Advanced Heuristics
9
Applied Mathematical Optimization: Key Components
System Modeling |
Assumptions |
Decision variables |
Objectives |
Requirements/constraints |
Mathematical Modeling
Method Development |
Pre-processing |
General solver |
Problem-specific methods |
Parameter tuning |
Evaluation |
Implementation |
Experiments |
Result analysis |
Performance assessment |
The World is complex
→ No unique definition of “the problem”
→ Breakdown of planning tasks in system modeling
f(x)
10
max min
s. t.
x ∈ X
Model Classification
11
otherwise it is non-convex
Combinatorial Optimization
12
Examples of Combinatorial Optimization Problems
13
t
The Shortest Path problem
s
i
j
ci j
Examples of Combinatorial Optimization Problems (cont’d)
14
Minimum spanning tree (MST)
→ Optimum is a spanning tree
3
5
1
4
9
7
6
4
8
2
5
3
3
6
7
Examples of Combinatorial Optimization Problems (cont’d)
15
Traveling salesman problem (TSP)
Examples of Combinatorial Optimization Problems (cont’d)
16
Vehicle Routing Problem (VRP)
Depot
What’s does VRP relate to TSP?
Minimum Cost Set Covering
Examples of Combinatorial Optimization Problems (cont’d)
17
Examples of Combinatorial Optimization Problems (cont’d)
Vertex coloring
18
Examples of Combinatorial Optimization Problems (cont’d)
19
Knapsack problem
$25 5 kg
$24 3 kg
$10 1 kg
$12 2 kg
$11
2.5 kg
$30 4 kg
How to approach the problem?
20
Size
10
15
20
25
. . .
100
MST
0.01 second
2.25 days 831 years
450 trillion years
. . .
. . .
TSP
0.36 millisecond
2.17 minutes
7.7 years 49 million years
. . .
. . .
Knapsack
0.1 microsecond
3.27 microsecond
0.1 millisecond
3.35 millisecond
. . .
4 million years
What about the Brute Force?
A finite number of possible solutions
→ Exhaustive search gives the optimum
Assume that we can test a solution in 10-10 second (one CPU cycle at 10 GHz)
Mathematical Modeling
21
Shortest Path |
Variables: Link selection |
Objective: Total length |
Constraint: The links selected must form a path |
Graph coloring |
Variables: Color assignment |
Objective: Total number of colors |
Constraint: Two adjacent nodes are assigned different colors |
Optimization and Mathematical Programming
22
23
Example: Modeling Shortest Path with the Flow
Example: Modeling Shortest Path (cont’d)
24
25
Example: Modeling Graph Coloring
24
Example: Modeling Graph Coloring (cont’d)
or simply:
27
Implementation: What is an Algorithm?
28
Input
Output
Calculations
Algorithm
Sequential:
29
Algorithm: Example v.0
30
Algorithm: Structure
Conditional:
Input radius r
if (r >=0)
calculate A
output A
else
output Error
31
ATTN:
r>=0!
Algorithm: Example v.1
Is our algorithm efficient?
Measured using runtime = time to get the solution
Depends on the input size
Linear time (polynomial, P problems) algorithms are efficient
Several other complexity classes = not polynomially solvable
NP problems: check the correctness of the given solution in polynomial time
Solving problem in general is harder than checking the correctness (P vs. NP)
NP-complete problems: the hardest among NP problems, no efficient solutions
NP-hard problems: are not possible to solve in polynomial time (running time depends non-linearly from the input size, e.g. can grow exponentially)
32
Algorithm: Complexity
Time complexity:
The running times of operations on the data structure should be as small as possible
Space complexity:
The data structure should use as little memory as possible
Correctness:
The algorithm should correctly implement its model and output correct results
What does it mean that “the algorithm does work?”
33
Algorithm: characteristics
Solving Comb. Opt. Problems: What Options Do We Have?
34