Programme
Rappel sur la programmation linéaire
Programmation en nombres entiers (Integer programming)
Programmation dynamique
Notions d’optimisation combinatoire.
Notions de complexités
Principales méthodes heuristiques (algorithmes génétiques, tabou, etc.)
1
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
L’optimisation combinatoire
2
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
problème d’optimisation combinatoire ?
Question :
Déterminer n éléments de coût minimum ou de poids maximum,...
3
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Quelques exemples :
4
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Quelques exemples
Plus court chemins
Données:
Un graphe G = ( X , U )
Une valuation v : U → ℝ
deux sommets distincts de s, t ∈ X
Question :
Trouver le plus court chemin de sà t
Solution :
Algorithme de Dijkstra, Bellman-Ford. [Algorithmes polynomiaux.]
5
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Quelques exemples
Arbre de poids minimum:
Données:
Un graphe G = ( X , U )
Une valuation v : U → ℝ
Question :
Trouver un arbre couvrant de poids minimum ?
Solution :
Algorithme de Kruskal, Prim. [Algorithmes polynomiaux.]
6
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Quelques exemples
Voyageur de commerce :
Données:
m villes
un ensembles de routes entre les villes.
un graphe orienté G = ( X , U )
Question :
Trouver une tournée (chemin hamiltonien de coût minimum).
7
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Quelques exemples
Connexité dans un réseau de communication :
Données:
un graphe orienté G = ( X , U )
Question :
Trouver le nombre maximum de chemins arcs disjoints
Le nombre minimum d’arcs dont la suppression déconnecte le graphe.
8
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Exemple
Combien y-a-t’il d’arbre dans un graphe complet à n sommets ?
9
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Outils de l’optimisation combinatoire
1. Graphe
3. Programmation dynamique
10
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Formulation
f ( s ∗) = min { f ( s )}
s∈S
11
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Problème d’existence
12
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Problème d’existence associé
f ( s) ≤ k
13
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Problèmes faciles et difficiles
14
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Notion de complexité
15
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Une donnée ?
16
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Exemple des graphes
Pour les graphes, il est d’usage d’utiliser le nombre de sommets N et le
nombre d’arcs M pour exprimer la taille.
17
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Ordre d'une fonction
Soient deux algorithmes A1 et A2 pour un problème de taille N avec :
C A1 ( N ) = 0.5 N 2 et C A2 ( N ) = 5 N
à partir de N ≥ 10 , on a C A < C A
2 1
On écrit : f est en O ( g ) ou f = O ( g ) ou f ∈ O ( g )
18
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Ordre d'une fonction (suite)
f
Si lim = c f et g sont du même ordre
n →∞ g
f = O ( g ) et g = O ( f ) on note f = Θ ( g )
f
Si lim
n →∞
=0 f = O ( g ) mais g ≠ O ( f )
g
f
Si lim = +∞ f et d'ordre supérieur à g , on note f = Ω ( g )
n →∞ g
ce qui est équivalent à g = O ( f )
19
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Quelques propriétés
20
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
une opération prend une microseconde
n
10 20 30 40 50 60
T(n)
n 10µs 20 µs 30 µs 40 µs 50 µs 60 µs
2n 1ms 1s
Déprimant
18mn
13jours 36 ans 366 siècles
2 x 108 1.3 x 1013
3n 59ms 58 mn 6 mn 3855 siècles
siècles siècles
22
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Impact des progrès technologiques ?
Question:
Si aujourd'hui on peut résoudre un
problème de taille N en temps
raisonnable,
quelle est la taille du problème que
l'on peut résoudre si les machines
vont 100 fois ou 1000 fois plus vite ?
23
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
T(n) aujourd'hui 100 fois plus vite 1000 fois plus vite
n N 100N 1000N
n2 N 10N 32N
n3 N 4.6N 10N
n5 N 2.5N 4N
2n N N+7 N + 10
3n N N+4 N+6
24
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
T(n) aujourd'hui 100 fois plus vite 1000 fois plus vite
n N 100N 1000N
n2 N 10N 32N
n3 N 4.6N 10N
n5 N 2.5N 4N
2n N N+7 N + 10
Encore plus
3n N N+4 N+6
déprimant
25
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Théorie de la complexité
Question fondamentale
Existe-t-il toujours un algorithme polynômial pour résoudre un problème ?
on ne connaît pas la réponse. . .
26
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Classes P et NP
La classe P regroupent les problèmes d’existence qui admettent des
algorithmes polynômiaux.
Algorithmes de complexité polynomiale O(
O(nnk),
algorithmes dont le temps d’exécution peut être majoré par un polynôme.
le terme polynomial est utilisé par opposition à exponentiel
Note :
En algorithmique, il sera très important de faire la différence entre les algorithmes
polynomiaux, utilisables en pratique, et les algorithmes exponentiels, inutilisables
en pratique.
il est important de pouvoir vérifier qu’une proposition s est bien une solution
du problème en un temps polynômial.
La classe NP regroupe les problèmes d’existence où l’on peut vérifier en temps
polynômial la qualité d’une solution.
P ⊂ NP
NP : Non-déterministe Polynomial 27
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Prouver NP
28
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Les problèmes NP-
NP-complets
29
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
La conjecture P ≠ NP
alors P = NP !
Si la réponse était “oui”,
30
© Y. Ouinten, Université de Laghouat, 2009
Notions d’optimisation combinatoire
Conclusions
Il existe des problèmes d’optimisation qui ne peuvent être résolus de
manière optimale.
Avant de s’attaquer à un problème, il faut bien vérifier qu’il n’a pas
déjà été étudié.
Un problème difficile peut être résolu de manière exacte sur de petits
cas ou simplement parce que le temps de calcul en moyenne est
raisonnable.
On peut diminuer la combinatoire à l’aide de méthodes arborescentes
et de la programmation dynamique.
Il faut parfois se résoudre à utiliser des méthodes approchées
(heuristiques)
31
© Y. Ouinten, Université de Laghouat, 2009
32
© Y. Ouinten, Université de Laghouat, 2009
In computer science, a heuristic is a technique designed to solve a problem that ignores whether the
solution can be proven to be correct, but which usually produces a good solution or solves a simpler
problem that contains or intersects with the solution of the more complex problem. Most real-time,
and even some on-demand, anti-virus scanners use heuristic signatures to look for specific attributes
and characteristics for detecting viruses and other forms of malware.
Heuristics are intended to gain computational performance or conceptual simplicity, potentially at the
cost of accuracy or precision.
In their Turing Award acceptance speech, Herbert Simon and Allen Newell discuss the Heuristic Search
Hypothesis: a physical symbol system will repeatedly generate and modify known symbol structures until
the created structure matches the solution structure.
That is, each successive iteration depends upon the step before it, thus the heuristic search learns what
avenues to pursue and which ones to disregard by measuring how close the current iteration is to the
solution. Therefore, some possibilities will never be generated as they are measured to be less likely to
complete the solution.
A heuristic method can accomplish its task by using search trees. However, instead of generating all
possible solution branches, a heuristic selects branches more likely to produce outcomes than other
branches. It is selective at each decision point, picking branches that are more likely to produce
solutions.[13]
In human-computer interaction, heuristic evaluation is a usability-testing technique devised by expert
usability consultants. In heuristic evaluation, the user interface is reviewed by experts and its compliance
to usability heuristics (broadly stated characteristics of a good user interface, based on prior experience)
is assessed, and any violating aspects are recorded.
http://en.wikipedia.org/wiki/Heuristics
33
© Y. Ouinten, Université de Laghouat, 2009
Metaheuristic
In computer science, metaheuristic designates a computational method that
optimizes a problem by iteratively trying to improve a candidate solution with
regard to a given measure of quality. Metaheuristics make few or no
assumptions about the problem being optimized and can search very large
spaces of candidate solutions. However, metaheuristics do not guarantee an
optimal solution is ever found. Many metaheuristics implement some form of
stochastic optimization.
http://en.wikipedia.org/wiki/Metaheuristics 34
© Y. Ouinten, Université de Laghouat, 2009
Applications
Metaheuristics are used for combinatorial optimization in which an optimal solution is
sought over a discrete search-space. An example problem is the travelling salesman
problem where the search-space of candidate solutions grows more than exponentially as
the size of the problem increases which makes an exhaustive search for the optimal
solution infeasible. This phenomenon is commonly known as the curse of dimensionality.
Popular metaheuristics for combinatorial problems include simulated annealing by
Kirkpatrick et al.,[7] genetic algorithms by Holland et al.[8], ant colony optimization by
Dorigo.[9] and tabu search by Glover.
Metaheuristics are also used for problems over real-valued search-spaces, where the classic
way of optimization is to derive the gradient of the function to be optimized and then employ
gradient descent or a quasi-Newton method. Metaheuristics do not use the gradient or
Hessian matrix so their advantage is that the function to be optimized need not be continuous
or differentiable and it can also have constraints. Popular metaheuristic optimizers for real-
valued search-spaces include particle swarm optimization by Eberhart and Kennedy,[10]
differential evolution by Storn and Price[11] and evolution strategies by Rechenberg[12] and
Schwefel.[13]
http://en.wikipedia.org/wiki/Metaheuristics 35
© Y. Ouinten, Université de Laghouat, 2009
Criticism
Mathematical analyses of metaheuristics have been presented in the literature, see e.g.
Holland's schema theorem[8] for the genetic algorithm, the work by Trelea,[49] amongst
others, for analysis of particle swarm optimization, and Zaharie[50] for analysis of differential
evolution. These analyses make a number of assumptions in regard to the optimizer variants
and the simplicity of the optimization problems which limit their validity in real-world
optimization scenarios. Performance and convergence aspects of metaheuristic optimizers
are therefore often demonstrated empirically in the research literature. This has been
criticized in the no free lunch set of theorems by Wolpert and Macready,[35] which, among
other things, prove that all optimizers perform equally well when averaged over all problems.
The practical relevance of the no free lunch theorems however is minor, because they will
generally not hold on the collection of problems a practitioner is facing.
For the practitioner the most relevant issue is that metaheuristics are not guaranteed to find
the optimum or even a satisfactory near-optimal solution. All metaheuristics will eventually
encounter problems on which they perform poorly and the practitioner must gain experience
in which optimizers work well on different classes of problems.
http://en.wikipedia.org/wiki/Metaheuristics 36
© Y. Ouinten, Université de Laghouat, 2009