95 lines
2.6 KiB
TeX
95 lines
2.6 KiB
TeX
\documentclass[a4paper,french,12pt]{article}
|
|
|
|
\title{Théorie des graphes --- Exercices}
|
|
\author{}
|
|
\date{Dernière compilation~: \today{} à \currenttime}
|
|
|
|
\usepackage{styles}
|
|
\usepackage{tikz}
|
|
\usetikzlibrary{shapes.multipart}
|
|
\usetikzlibrary{automata, arrows.meta, positioning}
|
|
|
|
\begin{document}
|
|
|
|
\maketitle
|
|
|
|
\section{Exercice 1}
|
|
|
|
\paragraph{Graphe simple}
|
|
\begin{tikzpicture}[auto,x=2cm,y=2cm]
|
|
\node(a)[state] at (0,0) {};
|
|
\node(b)[state] at (2,0) {};
|
|
\path (a) edge (b);
|
|
\end{tikzpicture}
|
|
|
|
\paragraph{Graphe multigraphe}
|
|
\begin{tikzpicture}[auto,x=2cm,y=2cm]
|
|
\node(a)[state] at (0,0) {};
|
|
\node(b)[state] at (2,0) {};
|
|
\path
|
|
(a) [bend left] edge (b)
|
|
(b) [bend left] edge (a)
|
|
;
|
|
\end{tikzpicture}
|
|
|
|
\paragraph{Graphe connexe}
|
|
\begin{tikzpicture}[auto,x=2cm,y=2cm]
|
|
\node(a)[state] at (0,0) {};
|
|
\node(b)[state] at (1,1) {};
|
|
\node(c)[state] at (2,0) {};
|
|
\path
|
|
(a) edge (b)
|
|
(b) edge (c)
|
|
(c) edge (a)
|
|
;
|
|
\end{tikzpicture}
|
|
|
|
\paragraph{Graphe non connexe}
|
|
\begin{tikzpicture}[auto,x=2cm,y=2cm]
|
|
\node(a)[state] at (0,0) {};
|
|
\node(b)[state] at (1,1) {};
|
|
\node(c)[state] at (2,0) {};
|
|
\path
|
|
(a) edge (b)
|
|
(b) edge (c)
|
|
;
|
|
\end{tikzpicture}
|
|
|
|
\paragraph{Graphe complet}
|
|
\begin{tikzpicture}[auto,x=2cm,y=2cm]
|
|
\node(a)[state] at (0,0) {};
|
|
\node(b)[state] at (1,0) {};
|
|
\node(c)[state] at (0,1) {};
|
|
\node(d)[state] at (1,1) {};
|
|
\path
|
|
(a) edge (b)
|
|
(a) edge (c)
|
|
(a) edge (d)
|
|
(b) edge (c)
|
|
(b) edge (d)
|
|
(c) edge (d)
|
|
;
|
|
\end{tikzpicture}
|
|
|
|
\paragraph{Graphe biparti}
|
|
\begin{tikzpicture}[auto,x=2cm,y=2cm]
|
|
\node(a)[state] at (0,0) {};
|
|
\node(b)[state] at (1,0) {};
|
|
\node(c)[state] at (0,1) {};
|
|
\node(d)[state] at (1,1) {};
|
|
\node(e)[state] at (2,0) {};
|
|
\node(f)[state] at (2,1) {};
|
|
\path
|
|
(a) edge (b)
|
|
(a) edge (c)
|
|
(a) edge (d)
|
|
(b) edge (c)
|
|
(b) edge (d)
|
|
(c) edge (d)
|
|
(d) edge (e)
|
|
(d) edge (f)
|
|
(e) edge (f)
|
|
;
|
|
\end{tikzpicture}
|
|
|
|
\end{document}
|