\( %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Mes commandes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\multirows}[3]{\multirow{#1}{#2}{$#3$}}%pour rester en mode math \renewcommand{\arraystretch}{1.3}%pour augmenter la taille des case \newcommand{\point}[1]{\marginnote{\small\vspace*{-1em} #1}}%pour indiquer les points ou le temps \newcommand{\dpl}[1]{\displaystyle{#1}}%megamode \newcommand{\A}{\mathscr{A}} \newcommand{\LN}{\mathscr{N}} \newcommand{\LL}{\mathscr{L}} \newcommand{\K}{\mathbb{K}} \newcommand{\N}{\mathbb{N}} \newcommand{\Z}{\mathbb{Z}} \newcommand{\Q}{\mathbb{Q}} \newcommand{\R}{\mathbb{R}} \newcommand{\C}{\mathbb{C}} \newcommand{\M}{\mathcal{M}} \newcommand{\D}{\mathbb{D}} \newcommand{\E}{\mathcal{E}} \renewcommand{\P}{\mathcal{P}} \newcommand{\G}{\mathcal{G}} \newcommand{\Kk}{\mathcal{K}} \newcommand{\Cc}{\mathcal{C}} \newcommand{\Zz}{\mathcal{Z}} \newcommand{\Ss}{\mathcal{S}} \newcommand{\B}{\mathbb{B}} \newcommand{\inde}{\bot\!\!\!\bot} \newcommand{\Proba}{\mathbb{P}} \newcommand{\Esp}[1]{\dpl{\mathbb{E}\left(#1\right)}} \newcommand{\Var}[1]{\dpl{\mathbb{V}\left(#1\right)}} \newcommand{\Cov}[1]{\dpl{Cov\left(#1\right)}} \newcommand{\base}{\mathcal{B}} \newcommand{\Som}{\textbf{Som}} \newcommand{\Chain}{\textbf{Chain}} \newcommand{\Ar}{\textbf{Ar}} \newcommand{\Arc}{\textbf{Arc}} \newcommand{\Min}{\text{Min}} \newcommand{\Max}{\text{Max}} \newcommand{\Ker}{\text{Ker}} \renewcommand{\Im}{\text{Im}} \newcommand{\Sup}{\text{Sup}} \newcommand{\Inf}{\text{Inf}} \renewcommand{\det}{\texttt{det}} \newcommand{\GL}{\text{GL}} \newcommand{\crossmark}{\text{\ding{55}}} \renewcommand{\checkmark}{\text{\ding{51}}} \newcommand{\Card}{\sharp} \newcommand{\Surligne}[2]{\text{\colorbox{#1}{ #2 }}} \newcommand{\SurligneMM}[2]{\text{\colorbox{#1}{ #2 }}} \newcommand{\norm}[1]{\left\lVert#1\right\rVert} \renewcommand{\lim}[1]{\underset{#1}{lim}\,} \newcommand{\nonor}[1]{\left|#1\right|} \newcommand{\Un}{1\!\!1} \newcommand{\sepon}{\setlength{\columnseprule}{0.5pt}} \newcommand{\sepoff}{\setlength{\columnseprule}{0pt}} \newcommand{\flux}{Flux} \newcommand{\Cpp}{\texttt{C++\ }} \newcommand{\Python}{\texttt{Python\ }} %\newcommand{\comb}[2]{\begin{pmatrix} #1\\ #2\end{pmatrix}} \newcommand{\comb}[2]{C_{#1}^{#2}} \newcommand{\arrang}[2]{A_{#1}^{#2}} \newcommand{\supp}[1]{Supp\left(#1\right)} \newcommand{\BB}{\mathcal{B}} \newcommand{\arc}[1]{\overset{\rotatebox{90}{)}}{#1}} \newcommand{\modpi}{\equiv_{2\pi}} \renewcommand{\Re}{Re} \renewcommand{\Im}{Im} \renewcommand{\bar}[1]{\overline{#1}} \newcommand{\mat}{\mathcal{M}} \newcommand{\und}[1]{{\mathbf{\color{red}\underline{#1}}}} \newcommand{\rdots}{\text{\reflectbox{$\ddots$}}} \newcommand{\Compa}{Compa} \newcommand{\dint}{\dpl{\int}} \newcommand{\intEFF}[2]{\left[\!\left[#1 ; #2\right]\!\right]} \newcommand{\intEFO}[2]{\left[\!\left[#1 ; #2\right[\!\right[} \newcommand{\intEOF}[2]{\left]\!\left]#1 ; #2\right]\!\right]} \newcommand{\intEOO}[2]{\left]\!\left]#1 ; #2\right[\!\right[} \newcommand{\ou}{\vee} \newcommand{\et}{\wedge} \newcommand{\non}{\neg} \newcommand{\implique}{\Rightarrow} \newcommand{\equivalent}{\Leftrightarrow} \newcommand{\Ab}{\overline{A}} \newcommand{\Bb}{\overline{B}} \newcommand{\Cb}{\overline{C}} \newcommand{\Cl}{\texttt{Cl}} \newcommand{\ab}{\overline{a}} \newcommand{\bb}{\overline{b}} \newcommand{\cb}{\overline{c}} \newcommand{\Rel}{\mathcal{R}} \newcommand{\superepsilon}{\varepsilon\!\!\varepsilon} \newcommand{\supere}{e\!\!e} \makeatletter \newenvironment{console}{\noindent\color{white}\begin{lrbox}{\@tempboxa}\begin{minipage}{\columnwidth} \ttfamily \bfseries\vspace*{0.5cm}} {\vspace*{0.5cm}\end{minipage}\end{lrbox}\colorbox{black}{\usebox{\@tempboxa}} } \makeatother \def\ie{\textit{i.e. }} \def\cf{\textit{c.f. }} \def\vide{ { $ {\text{ }} $ } } %Commande pour les vecteurs \newcommand{\grad}{\overrightarrow{Grad}} \newcommand{\Vv}{\overrightarrow{v}} \newcommand{\Vu}{\overrightarrow{u}} \newcommand{\Vw}{\overrightarrow{w}} \newcommand{\Vup}{\overrightarrow{u'}} \newcommand{\Zero}{\overrightarrow{0}} \newcommand{\Vx}{\overrightarrow{x}} \newcommand{\Vy}{\overrightarrow{y}} \newcommand{\Vz}{\overrightarrow{z}} \newcommand{\Vt}{\overrightarrow{t}} \newcommand{\Va}{\overrightarrow{a}} \newcommand{\Vb}{\overrightarrow{b}} \newcommand{\Vc}{\overrightarrow{c}} \newcommand{\Vd}{\overrightarrow{d}} \newcommand{\Ve}[1]{\overrightarrow{e_{#1}}} \newcommand{\Vf}[1]{\overrightarrow{f_{#1}}} \newcommand{\Vn}{\overrightarrow{0}} \newcommand{\Mat}{Mat} \newcommand{\Pass}{Pass} \newcommand{\mkF}{\mathfrak{F}} \renewcommand{\sp}{Sp} \newcommand{\Co}{Co} \newcommand{\vect}[1]{\texttt{Vect}\dpl{\left( #1\right)}} \newcommand{\prodscal}[2]{\dpl{\left\langle #1\left|\vphantom{#1 #2}\right. #2\right\rangle}} \newcommand{\trans}[1]{{\vphantom{#1}}^{t}{#1}} \newcommand{\ortho}[1]{{#1}^{\bot}} \newcommand{\oplusbot}{\overset{\bot}{\oplus}} \SelectTips{cm}{12}%Change le bout des flèches dans un xymatrix \newcommand{\pourDES}[8]{ \begin{itemize} \item Pour la ligne : le premier et dernier caractère forment $#1#2$ soit $#4$ en base 10. \item Pour la colonne : les autres caractères du bloc forment $#3$ soit $#5$ en base 10. \item A l'intersection de la ligne $#4+1$ et de la colonne $#5+1$ de $S_{#8}$ se trouve l'entier $#6$ qui, codé sur $4$ bits, est \textbf{\texttt{$#7$}}. \end{itemize} } \)
Exercice

L'exercice suivant est automatiquement et aléatoirement généré par ataraXy.
Si vous regénérez la page (F5) les valeurs seront changées.
La correction se trouve en bas de page.


Exercice


Voici les informations dont vous disposez sur un code secret composé de quatre chiffres :

    \( \rightarrow\)
    La somme des chiffres qui composent ce code est \( 20\) .

    \( \rightarrow\)
    Le chiffre des dizaines est le double de celui des milliers.

    \( \rightarrow\)
    La différence entre les chiffres des centaines et celui des unités est \( -3\) .

    \( \rightarrow\)
    \( 18\) fois le chiffre des centaines est \( 12\) fois celui des dizaines.
  1. Ecrire le système associé à ce problème. Justifier précisément votre réponse. Réécrire ce problème sous forme matricielle \( AX=B \) pour des matrices \( A \) , \( B \) et \( X \) que vous donnerez.
  2. Sans calculer les déterminants ci-dessous, comment justifier ces égalités ? Vous préciserez les opéarations élémentaires sur les lignes ou les colonnes qui ont pu être effectuées. \[\det\begin{pmatrix}1 & 1 & 1 & 1 \\ 2 & 0 & -1 & 0 \\ 0 & 1 & 0 & -1 \\ 0 & 18 & -12 & 0\end{pmatrix} =\det\begin{pmatrix}-2 & -3 & -2 \\ 1 & 0 & -1 \\ 18 & -12 & 0\end{pmatrix}=-\det\begin{pmatrix}-3 & -4 \\ -12 & 18\end{pmatrix}\]
  3. En déduire \( \det(A)\) .
  4. Quel est le code (vous utiliserez la méthode de votre choix, mais justifierez les calculs) ?
Cliquer ici pour afficher la solution

Exercice


  1. Notons ce code secret \( mcdu \) , les quatres variables représentants respectivement les milliers, les centaines, les dizaines et les unités du code. Les quatres informations données se traduisent alors comme suit :
    1. La somme des chiffres qui composent ce code est \( 20\) : \( m+c+d+u=20\) .
    2. Le chiffre des dizaines est le double de celui des milliers : \( d=2m \) .
    3. La différence entre les chiffres des centaines et celui des unités est \( -3\) : \( c-u = -3\) .
    4. \( 18\) fois le chiffre des centaines est \( 12\) fois celui des dizaines : \( 18c=12d\) .
    Soit le système \[\left\{\begin{array}{*{5}{cr}} &m&+&c &+&d &+&u &=&20\\ &2m&&&-&d &&&=&0\\ &&&c&&&-&u &=&-3\\ &&&18c&-&12d &&&=&0\\ \end{array} \right.\] Son écriture matricielle \( AX=B \) pour \[ A=\begin{pmatrix}1 & 1 & 1 & 1 \\ 2 & 0 & -1 & 0 \\ 0 & 1 & 0 & -1 \\ 0 & 18 & -12 & 0\end{pmatrix}, \qquad B=\begin{pmatrix}20 \\ 0 \\ -3 \\ 0\end{pmatrix}\quad \text{et}\quad X=\begin{pmatrix}m\\ c\\ d\\ u\end{pmatrix}\]
  2. La valeur d'un déterminant ne change pas lorsque l'on ajoute à une ligne (ou une colonne) une combinaison linéaire des autres. Ainsi l'opération \( L_2\leftarrow L_2-2L_1\) justifie la première égalité puis en développant par rapport à la première colonne, on justifie la seconde égalité. \[\det\begin{pmatrix}1 & 1 & 1 & 1 \\ 2 & 0 & -1 & 0 \\ 0 & 1 & 0 & -1 \\ 0 & 18 & -12 & 0\end{pmatrix} =\det\begin{pmatrix}1 & 1 & 1 & 1 \\ 0 & -2 & -3 & -2 \\ 0 & 1 & 0 & -1 \\ 0 & 18 & -12 & 0\end{pmatrix}=\det\begin{pmatrix}-2 & -3 & -2 \\ 1 & 0 & -1 \\ 18 & -12 & 0\end{pmatrix}\] De même, l'opération \( C_3\leftarrow C_3+C_1\) justifie la première égalité ; le développement par rapport à la seconde ligne justifie la seconde. \[\det\begin{pmatrix}-2 & -3 & -2 \\ 1 & 0 & -1 \\ 18 & -12 & 0\end{pmatrix} =\det\begin{pmatrix}-2 & -3 & -4 \\ 1 & 0 & 0 \\ 18 & -12 & 18\end{pmatrix}=-\det\begin{pmatrix}-3 & -4 \\ -12 & 18\end{pmatrix}\]
  3. D'après la question précédente \( \det(A)=-\det\begin{pmatrix}-3 & -4 \\ -12 & 18\end{pmatrix}\) . En appliquant la règle du gamma on en déduit \( \det(A)=-\left((-3)\times18-(-4)\times(-12)\right)=102\) .
  4. D'après la question précédente, puisque \( \det(A)\neq 0\) alors la matrice \( A \) est inversible et la solution \( X \) vérfie \( X=A^{-1}B\) . En appliquant la formule de l'inverse (par la transposée de la comatrice), on arrive à \[ X = \begin{pmatrix}\dfrac{3}{17} & \dfrac{7}{17} & \dfrac{3}{17} & -\dfrac{1}{51} \\ \dfrac{4}{17} & -\dfrac{2}{17} & \dfrac{4}{17} & \dfrac{1}{34} \\ \dfrac{6}{17} & -\dfrac{3}{17} & \dfrac{6}{17} & -\dfrac{2}{51} \\ \dfrac{4}{17} & -\dfrac{2}{17} & -\dfrac{13}{17} & \dfrac{1}{34}\end{pmatrix}\begin{pmatrix}20 \\ 0 \\ -3 \\ 0\end{pmatrix}=\begin{pmatrix}3 \\ 4 \\ 6 \\ 7\end{pmatrix}\]
Autre méthode en appliquant l'algorithme de Gauss (un oeil agueri retrouvera les opérations élémentaires appliquées à chaque itérations) : \[\left\{\begin{array}{*{5}{cr}} &m&+&c &+&d &+&u &=&20\\ &2m&&&-&d &&&=&0\\ &&&c&&&-&u &=&-3\\ &&&18c&-&12d &&&=&0\\ \end{array} \right.\]\[\left\{\begin{array}{*{5}{cr}} &m&+&c &+&d &+&u &=&20\\ &&&-2c&-&3d &-&2u &=&-40\\ &&&c&&&-&u &=&-3\\ &&&18c&-&12d &&&=&0\\ \end{array} \right.\]\[\left\{\begin{array}{*{5}{cr}} &m&+&c &+&d &+&u &=&20\\ &&&c&&&-&u &=&-3\\ &&&-2c&-&3d &-&2u &=&-40\\ &&&18c&-&12d &&&=&0\\ \end{array} \right.\]\[\left\{\begin{array}{*{5}{cr}} &m&+&c &+&d &+&u &=&20\\ &&&c&&&-&u &=&-3\\ &&&&&-3d&-&4u &=&-46\\ &&&&&-12d&+&18u &=&54\\ \end{array} \right.\]\[\left\{\begin{array}{*{5}{cr}} &m&+&c &+&d &+&u &=&20\\ &&&c&&&-&u &=&-3\\ &&&&&-3d&-&4u &=&-46\\ &&&&&&&-102u&=&-714\\ \end{array} \right.\] Finalement le code est \( 3467\)