\documentclass[10pt]{article} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage{fourier} \usepackage{fouriernc} \usepackage[scaled=0.875]{helvet} \renewcommand{\ttdefault}{lmtt} \usepackage{amsmath,amssymb,makeidx} \usepackage{pst-plot,pst-text} \usepackage[normalem]{ulem} \usepackage{fancybox} \usepackage{ulem} \usepackage{dcolumn} \usepackage{textcomp} %\usepackage{slashbox} \usepackage{mathrsfs} \usepackage{esvect} \usepackage{tabularx} \usepackage{lscape} \newcommand{\euro}{\eurologo{}} \usepackage{color} \usepackage{pstricks,pst-all,pstricks-add,pst-tree,pst-3dplot} \usepackage[colorlinks=true,pdfstartview=FitV,linkcolor=blue,citecolor=blue,urlcolor=blue]{hyperref} \setlength{\columnseprule}{0.5pt} \newcommand{\R}{\mathbb{R}} \newcommand{\N}{\mathbb{N}} \newcommand{\D}{\mathbb{D}} \newcommand{\Z}{\mathbb{Z}} \newcommand{\Q}{\mathbb{Q}} \newcommand{\C}{\mathbb{C}} %%%%%%%%%%%% Algorithmes %%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{xcolor} \colorlet{LFBcoultable1}{blue!25!black!20} \usepackage[french,ruled,lined,linesnumbered,inoutnumbered]{algorithm2e} \SetKwInput{Lire}{Lire} \SetKwInput{Afficher}{Afficher} \SetKwFor{VarAlgo}{Variables}{}{finVariables} \newcommand{\Variables}[1]{\SetAlgoVlined% \VarAlgo{}{#1} \SetAlgoLined} \SetKwFor{EntrAlgo}{Entrées}{}{fin} \newcommand{\Entrees}[1]{\SetAlgoVlined% \EntrAlgo{}{#1} \SetAlgoLined} \SetKwFor{TraitAlgo}{Traitement}{}{fin} \newcommand{\Traitement}[1]{\SetAlgoVlined% \TraitAlgo{}{#1} \SetAlgoLined} \SetKwFor{SortAlgo}{Sorties}{}{fin} \newcommand{\Sorties}[1]{\SetAlgoVlined% \SortAlgo{}{#1} \SetAlgoLined} \makeatletter \newsavebox{\LFB@lgo} \newenvironment{algoLFB}[2][0.5]% % 2 parametres : 1-facultatif largeur en proportion 2-titre de l'algo {\setlength{\fboxsep}{0pt}\begin{lrbox}{\LFB@lgo} \small\begin{minipage}{#1\linewidth}% \begin{algorithm}[H]% \caption{#2}}% {\end{algorithm}% \end{minipage}% \end{lrbox}% \begin{center} \fcolorbox{black}{LFBcoultable1}{\usebox{\LFB@lgo}} % \fcolorbox{LFBcoultable2}{LFBcoultable1}{\usebox{\LFB@lgo}} \end{center}} \makeatother \newcommand{\recoit}{\ensuremath{\rightarrow}} \newcommand{\vect}[1]{\mathchoice% {\overrightarrow{\displaystyle\mathstrut#1\,\,}}% {\overrightarrow{\textstyle\mathstrut#1\,\,}}% {\overrightarrow{\scriptstyle\mathstrut#1\,\,}}% {\overrightarrow{\scriptscriptstyle\mathstrut#1\,\,}}} \renewcommand{\theenumi}{\textbf{\arabic{enumi}}} \renewcommand{\labelenumi}{\textbf{\theenumi.}} \renewcommand{\theenumii}{\textbf{\alph{enumii}}} \renewcommand{\labelenumii}{\textbf{\theenumii.}} \newcommand{\QCM}[3]{ $\bullet$ \quad #1 \hfill $\bullet$ \quad #2 \hfill $\bullet$ \quad #3 } \newcommand{\QCMc}[4]{ #1 \\ \makebox[3cm][l]{\psframe(.25,.25) \qquad #2 }\hfill \makebox[3cm][l]{\psframe(.25,.25) \qquad #3 }\hfill \makebox[3cm][l]{\psframe(.25,.25) \qquad #4 }} % QCM avec cases à cocher% \def\Oij{$\left(\text{O},~\vect{\imath},~\vect{\jmath}\right)$} \def\Oijk{$\left(\text{O},~\vect{\imath},~ \vect{\jmath},~ \vect{k}\right)$} \def\Ouv{$\left(\text{O},~\vect{u},~\vect{v}\right)$} \usepackage{fancyhdr} \usepackage[np]{numprint} \textheight 26.5 cm \topmargin -4cm \headheight 12pt \parindent 0pt \textwidth 170mm \oddsidemargin -5 mm \evensidemargin -25 mm \usepackage{multicol} \newcommand{\ds}[3]{ \begin{center} \begin{LARGE} \textbf{\textsc{Devoir Surveillé de Mathématiques n°#1}}\\ \end{LARGE} \vspace*{0.3cm} \textit{#2}\hfill\textit{#3} \end{center} \hrule} \newcounter{numeroexo} \newcommand{\exercice}{\par\noindent\stepcounter{numeroexo} \underline{{\textbf{Exercice \arabic{numeroexo} :}}}\quad} \begin{document} \pagestyle{empty} \ds{3}{le 31 janvier 2014 }{Spé TES} \hrule \vspace*{0.5cm} \exercice% \emph{(7 points)} %Asie 2013 \medskip Les deux parties de l'exercice sont indépendantes. \medskip \textbf{Partie A} \medskip Pour accéder à sa messagerie, Antoine a choisi un code qui doit être reconnu par le graphe étiqueté suivant, de sommets 1, 2, 3 et 4 : \begin{center} \psset{unit=3cm} \begin{pspicture}(0,-.5)(3,.5) \psset{labelsep=2pt,nodesep=1pt} \rput(0,0){\dianode{A}{1}} \rput(1,0){\dianode{B}{2}} \rput(2,0){\dianode{C}{3}} \rput(3,0){\dianode{D}{4}} \ncarc{->}{A}{B}\naput{\textbf{S}} \ncarc{->}{B}{A}\naput{\textbf{U}} \nccircle[nodesep=3pt]{<-}{B}{.7cm}\naput{\textbf{P}} \rput{180}(1,0){\nccircle[nodesep=3pt]{->}{B}{.7cm}\naput[nrot=:U]{\textbf{C}}} \ncline{->}{B}{C}\naput{\textbf{E}} \nccircle[nodesep=3pt]{<-}{C}{.7cm}\naput{\textbf{N}} \ncline{->}{C}{D}\naput{\textbf{S}} \end{pspicture} \end{center} Une succession des lettres constitue un code possible si ces lettres se succèdent sur un chemin du graphe orienté ci-dessus, en partant du sommet 1 et en sortant au sommet 4. Les codes SES et SPPCES sont ainsi des codes possibles, contrairement aux codes SUN et SPEN. \begin{enumerate} \item Parmi les trois codes suivants, écrire sur votre copie le (ou les) code(s) reconnu(s) par le graphe. \begin{center} \begin{tabularx}{.8\linewidth}{*{3}{>{\centering \arraybackslash}X}} SUCCES & SCENES & SUSPENS \end{tabularx} \end{center} \item Recopier et compléter la matrice d'adjacence A associée au graphe. On prendra les sommets dans l'ordre 1-2-3-4. \[ A= \begin{pmatrix} 0 & 1 & 0 & 0 \\ 1 & 2 & 1 & 0 \\ \cdots & \cdots & \cdots & \cdots \\ \cdots & \cdots & \cdots & \cdots \\ \end{pmatrix} \] \item %Avec une calculatrice on a calculé : $A^4 =\begin{pmatrix} % 5 & 12 & 8 & 3 \\ % 12 & 29 & 20 & 8 \\ % 0 & 0 & 1 & 1 \\ % 0 & 0 & 0 & 0 \\ % \end{pmatrix}$. Quel est le nombre de codes de 4 lettres reconnus par le graphe. Quels sont ces codes ? \end{enumerate} \medskip \textbf{Partie B} \medskip \begin{center} \psset{xunit=2cm,yunit=1.5cm} \begin{pspicture}(0,-1)(6,1) \psset{linewidth=.75pt} \cnodeput(0,0){N}{\bf N} \cnodeput(1,-1){R}{\bf R} \cnodeput(1,1){V}{\bf V} \cnodeput(2.2,1){T}{\bf T} \cnodeput(3,0){A}{\bf A} \cnodeput(3.8,-1){E}{\bf E} \cnodeput(5,1){B}{\bf B} \cnodeput(5,-1){C}{\bf C} \cnodeput(6,0){D}{\bf D} \ncline{B}{A}\ncput*{\bf \sf 35} \ncline{A}{E}\ncput*{\bf \sf 12} \ncline{E}{C} \ncput*{\bf \sf 38} \ncline{C}{D} \ncput*{\bf \sf 18} \ncline{D}{B} \ncput*{\bf \sf 19} \ncline{B}{E} \ncput*{\bf \sf 41} \ncline{E}{R} \ncput*{\bf \sf 53} \ncline{R}{N} \ncput*{\bf \sf 21} \ncline{N}{V} \ncput*{\bf \sf 32} \ncline{V}{T} \ncput*{\bf \sf 16} \ncline{T}{R} \ncput*{\bf \sf 24} \ncline{R}{A} \ncput*{\bf \sf 58} \ncline{A}{T} \ncput*{\bf \sf 25} \ncline{T}{B} \ncput*{\bf \sf 63} \end{pspicture} \end{center} \medskip Antoine décide d'aller visiter neuf châteaux de la Loire. Il a construit le graphe ci-dessus où les sommets représentent: \begin{tabularx}{\linewidth}{*{4}X} A : Amboise & B : Blois & C : Cheverny & D : Chambord\\ E : Chenonceau & T : Tours & V : Villandry & R : Azay-le-Rideau\\ N : Chinon & & & \\ \end{tabularx} Sur les arêtes sont indiquées les distances en km. \begin{enumerate} \item Antoine peut-il partir de Blois et y revenir, en parcourant une et une seule fois chacune des routes matérialisées par les arêtes de ce graphe ? On justifiera la réponse. \item Déterminer le plus court chemin pour aller du château de Chambord au château de Chinon. On donnera le parcours ainsi que le nombre total de kilomètres. \end{enumerate} % % \bigskip % % \exercice \emph{(5 points)} % % \medskip % % % \bigskip % % \exercice \emph{(5 points)} % % \medskip % % % % \bigskip \end{document}