Start théorie des graphes
This commit is contained in:
parent
a20904ef98
commit
94ab4787a0
2 changed files with 132 additions and 0 deletions
16
theorie-graphes/Makefile
Normal file
16
theorie-graphes/Makefile
Normal file
|
@ -0,0 +1,16 @@
|
|||
filename=$(shell basename $(shell pwd))
|
||||
timestamp=$(shell date +%Y-%m-%d_%H:%M)
|
||||
|
||||
all: snapshot
|
||||
|
||||
snapshot: main.tex
|
||||
@latexmk -pdf main.tex
|
||||
@if ! cmp --silent build/main.pdf ${filename}_*.pdf; then \
|
||||
touch ${filename}_tmp.pdf; \
|
||||
rm ${filename}*.pdf; \
|
||||
cp build/main.pdf ${filename}_${timestamp}.pdf; \
|
||||
echo "Updated"; \
|
||||
fi
|
||||
|
||||
clean:
|
||||
@rm -rf build 2>/dev/null
|
116
theorie-graphes/main.tex
Normal file
116
theorie-graphes/main.tex
Normal file
|
@ -0,0 +1,116 @@
|
|||
\documentclass[a4paper,french,12pt]{article}
|
||||
|
||||
\title{Théorie des graphes}
|
||||
\author{}
|
||||
\date{Dernière compilation~: \today{} à \currenttime}
|
||||
|
||||
\usepackage{../cours}
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{shapes.multipart}
|
||||
\usetikzlibrary{automata, arrows.meta, positioning}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
\tableofcontents
|
||||
|
||||
\clearpage
|
||||
|
||||
\section{Introduction}
|
||||
|
||||
\section{Calcul de chemin}
|
||||
|
||||
\section{Coloriage de carte}
|
||||
|
||||
\section{Matrice d'un graphe orienté}
|
||||
|
||||
\begin{multicols}{2}
|
||||
|
||||
On peut passer d'une représentation graphique à un tableau~: \\\\
|
||||
\begin{tabularx}{\linewidth}{YYYYY}
|
||||
& A & B & C & D \\
|
||||
A & 0 & 1 & 1 & 1 \\
|
||||
B & 0 & 0 & 0 & 0 \\
|
||||
C & 0 & 1 & 0 & 1 \\
|
||||
D & 0 & 1 & 0 & 0 \\
|
||||
\end{tabularx}
|
||||
|
||||
\begin{tikzpicture}[-latex,auto,x=2cm,y=2cm]
|
||||
\node(a)[state] at (0,0) {A};
|
||||
\node(b)[state] at (2,0.5) {B};
|
||||
\node(c)[state] at (3,-2) {C};
|
||||
\node(d)[state] at (0.5,-1) {D};
|
||||
\path
|
||||
(a) edge (b)
|
||||
(a) edge (c)
|
||||
(a) edge (d)
|
||||
(c) edge (b)
|
||||
(c) edge (d)
|
||||
(d) edge (b)
|
||||
;
|
||||
\end{tikzpicture}
|
||||
|
||||
\end{multicols}
|
||||
|
||||
\section{Types de graphes}
|
||||
|
||||
\subsection{Cycle}
|
||||
|
||||
Depuis un sommet on peut rejoindre le même somment en empruntant les chemins qu'une seule fois.
|
||||
|
||||
\begin{tikzpicture}[-latex,auto,x=2cm,y=2cm]
|
||||
\node(a)[state] at (0,0) {a};
|
||||
\node(b)[state] at (0,1) {b};
|
||||
\node(c)[state] at (1,1) {c};
|
||||
\node(d)[state] at (1,0) {d};
|
||||
\path
|
||||
(a) edge (b)
|
||||
(b) edge (c)
|
||||
(c) edge (d)
|
||||
(d) edge (a)
|
||||
;
|
||||
\end{tikzpicture}
|
||||
|
||||
\paragraph{Cycle Hamiltonien}
|
||||
|
||||
\paragraph{Cycle Eulerien}
|
||||
|
||||
\subsection{Chaîne}
|
||||
|
||||
Suite de sommets reliés par des arrêtes.
|
||||
|
||||
\paragraph{Chaîne Hamiltonienne}
|
||||
|
||||
C'est une chaîne passant par tous les sommets.
|
||||
|
||||
\begin{tikzpicture}[-,auto,x=2cm,y=2cm]
|
||||
\node(a)[state] at (0,0) {a};
|
||||
\node(b)[state] at (0,1) {b};
|
||||
\node(c)[state] at (1,1) {c};
|
||||
\node(d)[state] at (1,0) {d};
|
||||
\path
|
||||
(a) edge (b)
|
||||
(b) edge (c)
|
||||
(c) edge (d)
|
||||
;
|
||||
\end{tikzpicture}
|
||||
|
||||
\paragraph{Chaîne Eulerienne}
|
||||
|
||||
C'est une chaîne passant par toutes les arrêtes.
|
||||
|
||||
\begin{tikzpicture}[-latex,auto,x=2cm,y=2cm]
|
||||
\node(a)[state] at (0,0) {a};
|
||||
\node(b)[state] at (0,1) {b};
|
||||
\node(c)[state] at (1,1) {c};
|
||||
\node(d)[state] at (1,0) {d};
|
||||
\path
|
||||
(a) edge (b)
|
||||
(a) edge (c)
|
||||
(b) edge (c)
|
||||
(c) edge (d)
|
||||
(d) edge (b)
|
||||
;
|
||||
\end{tikzpicture}
|
||||
|
||||
\end{document}
|
Loading…
Reference in a new issue