ASD/compte_rendu/compte_rendu.tex
Hugo LEVY-FALK 6a908c49de plop
2018-02-04 18:58:46 +01:00

204 lines
10 KiB
TeX

\documentclass[french]{article}
\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{arrows,automata}
\usepackage{MyPack2}
\usepackage{diagbox}
\geometry{top=2cm, bottom=2cm, left=2cm, right=2cm}
\title{Étude de laboratoire - ASD}
\author{Binôme A11 \\ \bsc{Simon} Léo, \bsc{Levy--Falk} Hugo \\ Supélec, promo 2020}
\date{\today}
\begin{document}
\maketitle
\tableofcontents
\clearpage
\listoffigures
\newpage
\initPage{TL - ASD}{\today}{\bsc{Simon}, \bsc{Levy--Falk}}
\part{Objectifs de ce TL}
\part{Génération de carte routière réaliste}
\section{Condition pour un graphe de Gabriel}
En notant $\mathcal{V} = \{P_i\}_{1\leq i\leq n}$ un nuage de $n \in \N$ points dans le plan représentants des villes, on définit pour tout $ A,B \in \mathcal{V}, d(A,B)$ la distance à vol d'oiseau entre les deux villes. On décide de placer une arête entre deux points $A$ et $B$ du plan si et seulement si,
\begin{equation}
\forall C \in \mathcal{V}, \forall M \in [A,B], d(M,V) \geq \min \{d(M,A), d(M,B)\} \label{eq:condArete}
\end{equation}
Montrons que la condition \ref{eq:condArete} est équivalente à ce que pour toute paire de sommets $(A,B)$ du nuage, $\{A,B\}$ forme une arête si et seulement si il n'existe pas de points $C \in \mathcal{V}$ dans le cercle de diamètre $[A,B]$. Un graphe vérifiant cette condition sera par la suite appelé \emph{graphe de Gabriel}.
\paragraph{preuve :} {
Soient $A,B \in \mathcal{V}$ et on appelle $\mathcal{C}$ le cercle de diamètre $[A,B]$. La figure \ref{fig:positionsC} montre différentes positions possibles de points.
Supposons qu'il existe une arête reliant les deux points. Si il existe des points du nuage dans le disque ouvert délimité par $\mathcal{C}$, alors il existe un point $M$ qui ne vérifie pas la condition \ref{eq:condArete}, \emph{absurde}.
Réciproquement, si tous les points de $\mathcal{V}$ sont à l'extérieur du cercle ouvert délimité par $\mathcal{C}$, (dans l'exemple $C'$ et $C''$), alors pour tout $P\in \mathcal{V}\ \{A,B\}$, le point $M\in[A,B]$ le plus proche de $P$ vérifie la condition \ref{eq:condArete} (dans l'exemple, les points $M'$ et $M''$).$\square$
\begin{figure}
\centering
\begin{tikzpicture}
\draw[dashed] (4,0) circle (4);
\draw (0,0) node [anchor=east]{A} -- (8,0) node[anchor=west]{B};
% intérieur
\draw[dashed] (8,0) -- (5,2) node[anchor=south]{C} -- (0,0);
\draw[green] (5,2) -- (5,0) node[anchor=north]{M} -- (5,0.2) -- (5.2,0.2)--(5.2,0);
\draw[green,dashed] (5,0) circle (2);
% frontière
\draw[dashed] (8,0) -- (1.16,2.828) node[anchor=south]{C'} -- (0,0);
\draw[orange] (1.16,2.828) -- (1.16,0) node[anchor=north west]{M'} -- (1.16,0.2) -- (1.36,0.2)--(1.36,0);
\draw[orange,dashed] (1.16,0) circle (1.16);
% extérieur
\draw[dashed] (8,0) -- (7.4,-4) node[anchor=north]{C''} -- (0,0);
\draw[red] (7.4,-4) -- (7.4,0) node[anchor=north east]{M''} -- (7.4,-0.2) -- (7.6,-0.2)--(7.6,0);
\draw[red,dashed] (7.4,0) circle (0.6);
\end{tikzpicture}
\caption{Différentes positions possible de points par rapport à $A$ et $B$}
\label{fig:positionsC}
\end{figure}
}
\section{Mise en pratique : graphe de Gabriel et de voisinage relatif}
\subsection{Création de graphe de Gabriel et de voisinage relatif}
\begin{figure}
\centering
\includegraphics[width=1\linewidth]{images/2_4_gabriel}
\caption{Graphe de gabriel}
\label{fig:2_4_gabriel}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=1\linewidth]{images/2_4_gvr}
\caption{Graphe de voisinage realtif}
\label{fig:2_4_gvr}
\end{figure}
En traçant les graphes de Gabriel (figure \ref{fig:2_4_gabriel}) et de voisinage relatif (figure \ref{fig:2_4_gvr}), on observe que le second est inclus dans le premier.
\subsection{Génération d'un réseau}
En combinant la génération de graphe de Gabriel et de voisinage relatif, on peut générer un réseau routier, comme le montre la figure \ref{fig:2_5}.
\begin{figure}
\centering
\includegraphics[width=1\linewidth]{images/2_5}
\caption{Réseau généré}
\label{fig:2_5}
\end{figure}
\subsection{Temps de génération d'un réseau}
La figure \ref{fig:reseaunaiflog} montre le temps nécessaire à la création d'un réseau.
\begin{figure}
\centering
\includegraphics[width=0.7\linewidth]{images/reseau_naif_log}
\caption{}
\label{fig:reseaunaiflog}
\end{figure}
\section{Triangulation de Delaunay}
\subsection{Pratique}
\subsection{Aspect théorique}
\subsubsection{Condition pour un graphe de Delaunay}
Pour toute paire $\{A,B\}$ de points de $\mathcal{V}$, si on appelle $\mathcal{P}$ et $\mathcal{P}'$ les deux demis plans fermés de frontière $(A,B)$ privés de $A$ et $B$, alors $\{A,B\}$ est une arête de la triangulation de Delaunay sit et seulement si
\[
\forall C\in \mathcal{P}\cap \mathcal{V}, \forall D \in \mathcal{P}' \cap \mathcal{V}, \widehat{ACB} + \widehat{ADB} \leq \pi
\]
\paragraph{preuve:}
Supposons que $\{A,B\}$ soit une arête. Il existe donc un cercle $\mathcal{C}$ d'intérieur vide avec $A$ et $B$ sur le cercle. Cela correspond aux lignes $\mathcal{L}(\theta, A, B)$ et $\mathcal{L}(\pi - \theta, A, B)$. Quitte à renommer $\mathcal{P}$ et $\mathcal{P}'$, on peut supposer que le premier contour correspond à $\mathcal{P}$. On a donc :
\begin{align}
\forall C \in \mathcal{P}\cap \mathcal{V}, \widehat{ACB} < \theta \\
\forall D \in \mathcal{P}' \cap \mathcal{V}, \widehat{ADB} < \theta - \pi
\end{align}
Ainsi :
\[
\forall C\in \mathcal{P}\cap \mathcal{V}, \forall D \in \mathcal{P}' \cap \mathcal{V}, \widehat{ACB} + \widehat{ADB} \leq \pi
\]
Supposons maintenant que :
\[
\forall C\in \mathcal{P}\cap \mathcal{V}, \forall D \in \mathcal{P}' \cap \mathcal{V}, \widehat{ACB} + \widehat{ADB} \leq \pi
\]
Posons :
\begin{align}
m_p &= \max_{C\in \mathcal{P}\cap\mathcal{V}} \widehat{ACB} \\
m_{p'} &= \max_{D\in \mathcal{P}'\cap\mathcal{V}} \widehat{ADB}
\end{align}
On a donc
\[
m_p + m_{p'} \leq \pi
\]
D'après le théorème de l'ange inscrit, si on pose $\theta = \max \{m_p, m_{p'}\}$, les contours $\mathcal{L}(\theta, A, B) \cap \mathcal{P}$ et $\mathcal{L}(\pi - \theta, A, B) \cap \mathcal{P}'$ forment un cercle d'intérieur vide avec $A$ et $B$ sur le cercle.
$\Box$
\subsubsection{Le graphe de Delaunay est planaire}
On remarque qu'il existe des configurations pour lesquelles cette assertion est fausse, par exemple la figure \ref{fig:delaunayPasPlanaire}. On va donc supposer que les configurations défavorables (4 points sur un cercle) ont une probabilité nulle d'être rencontrées.
\begin{figure}
\centering
\begin{tikzpicture}
\draw (2,2) circle (2*1.41);
\draw[dashed] (0,0) node [anchor=north east](A){A} (0,0) -- (4,0) node[anchor=north west](C){C}
-- (4,4) node[anchor=south west](B){B} -- (0,4) node[anchor=south east](D){D} -- (0,0);
\draw (0,0) node[circle, draw=black, fill=white]{} -- (4,4) node[circle, draw=black, fill=white]{}; \draw(0,4) node[circle, draw=black, fill=white]{} -- (4,0) node[circle, draw=black, fill=white]{};
\end{tikzpicture}
\caption{Cas où le graphe de Delaunay n'est pas planaire.}
\label{fig:delaunayPasPlanaire}
\end{figure}
\paragraph{preuve} Si l'on suppose qu'il existe deux arêtes $\{A,B\}$ et $\{C,D\}$ qui se croisent, on a alors $\widehat{ADB} + \widehat{ACB} < \pi$ et $\widehat{DBC} + \widehat{DAC} < \pi$. Or $ABCD$ est un quadrilatère, donc $\widehat{ADB} + \widehat{ACB} + \widehat{DBC} + \widehat{DAC} = 2 \pi$, contradiction. $\Box$
\subsubsection{Le graphe de Delaunay est une triangulation}
Montrons que le graphe de Delaunay est une triangulation.
\paragraph{preuve} Supposons qu'il existe une face polygonale à plus de 3 côtés dans le graphe de Delaunay. On choisit quatre points $A,B,C,D$ de cette faces tels que $\{A,C\}$ et $\{B,D\}$ peuvent être des arêtes, mais pas $\{A,B\}$ et $\{C,D\}$. On a par exemple une maille semblable à la figure \ref{fig:maillePolygonale}.
\begin{figure}
\centering
\begin{tikzpicture}
\draw (0,0) node[anchor=north east]{A} node[circle, draw=black, fill=black]{} -- (1,3) node[circle, draw=black, fill=white]{} -- (3,5) node[circle, draw=black, fill=black]{} node[anchor=south west]{D} -- (4,4) node[circle, draw=black, fill=black]{} node[anchor=south west]{B} -- (5,2) node[circle, draw=black, fill=white]{} -- (3,1)node[circle, draw=black, fill=black]{} node[anchor=north west]{C} -- (0,0);
\end{tikzpicture}
\caption{Maille polygonale.}
\label{fig:maillePolygonale}
\end{figure}
On a alors :
\begin{eqnarray}
\widehat{ACB} + \widehat{ADB} > \pi \\
\widehat{CAD} + \widehat{CBD} > \pi \\
\end{eqnarray}
Puisque $ACDB$ est un quadrilatère, la somme de ses angles devrait être de $2\pi$, ce qui est absurde ici. $\Box$
\subsubsection{Condition sur les faces}
Montrons tout triplet $\{A,B,C\} \subseteq \mathcal{V}$ est une face de la triangulation si et seulement si le disque du cercle circonscrit au triangle $ABC$ est vide de tout point de $\mathcal{V}$ autre que $A,B,C$.
\paragraph{preuve}
Supposons que le disque du cercle $\mathcal{C}$ circonscrit à $ABC$ soit vide de tout point. On va montrer que l'arête ${A,B}$ existe. On pose $\theta = \widehat{ACB}$. On a alors $\mathcal{C} = (\mathcal{L}(\theta, A, B) \cap \mathcal{P}) \cup (\mathcal{L}(\pi - \theta, A, B)\cap \mathcal{P}')$. Puisque le disque est vide,
\[
\forall D \in \mathcal{P}'\cap\mathcal{V}, \widehat{ADB} < \pi - \theta
\]
Donc, puisque $C$ est le point de plus grand angle sur $\mathcal{P}$ :
\[
\forall E\in \mathcal{P}\cap \mathcal{V}, \forall D \in \mathcal{P}' \cap \mathcal{V}, \widehat{AEB} + \widehat{ADB} \leq \pi
\]
Donc l'arête $\{A,B\}$ existe. On montre de la même façon que $\{A,C\}$ et $\{C,B\}$ existent.
Supposons que $\{A,B,C\}$ soit une face de la triangulation. En particulier, $C$ est alors le point de plus grand angle $\widehat{ACB} = \theta$ sur $\mathcal{P}$. Puisque $\{A,B\}$ est une arête, d'après le lemme, tout point $D\in\mathcal{P}'\cap\mathcal{V}$ est d'angle $\widehat{ADB}$ plus petit que $\pi - \theta$. Donc un tel point $D$ ne peut être dans le disque délimité par $(\mathcal{L}(\theta, A, B) \cap \mathcal{P}) \cup (\mathcal{L}(\pi - \theta, A, B)\cap \mathcal{P}')$. $\square$
\part{Algorithme de Dijkstra pour la recherche du plus court chemin}
\end{document}