\( %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 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} } \)

Théorème [Lemme d'Arden]


Soient \( A\) et \( B\) deux langages sur un alphabet \( \Sigma\) .
\( (i)\)
Une solution de l'équation \( L=AL\cup B\) est \( L=A^*B\) .

\( (ii)\)
Si \( \varepsilon\not\in A\) , \( L=A^*B\) est l'unique solution de l'équation \( L=AL\cup L\)

Démonstration

Admise
Ce théorème est très puissant et va permettre de déterminer le langage reconnu par un automate.

Définition


Soient \( i\) et \( j\) des états d'un ADEF \( \A\) et \( L\) un langage sur \( \Sigma_\A\) . On note
\( \Sigma_{i, j}\)
l'ensemble des lettres de l'alphabet qui permettent de passer de l'état \( i\) à l'état \( j\) . \[\Sigma_{i, j}=\left\{x\in \Sigma\Big| \tau_\A(i, x)=j\right\}\]

\( \A_i\)
l'automate identique à l'automate \( \A\) où l'état initial a été remplacé par \( i\) . \[\sigma_{\A_i}=\Sigma_\A, \ E_{\A_i}=E_\A, \ I_{\A_i}=\{i\}, \ F_{\A_i}=F_{\A}, \ \tau_{\A_i}=\tau_\A\]

Exemple


Considérons l'automate \[ \xymatrix{ \ar[r]&A\ar[r]^a\ar@(lu, ru)[]^b&B\ar[r]^a\ar@(lu, ru)[]^b&C\ar[r]\ar@/^1pc/[ll]^a\ar@(lu, ru)[]^b\ar[r]& } \] On a \( \Sigma_{A, A}=\{b\}\) , \( \Sigma_{A, B}=\{a\}\) , \( \Sigma_{A, C}=\varnothing\) . De même \( \A_A=\A\) et \( \A_C\) est l'automate \[ \xymatrix{ &A\ar[r]^a\ar@(lu, ru)[]^b&B\ar[r]^a\ar@(lu, ru)[]^b&C\ar[r]\ar@/^1pc/[ll]^a\ar@(lu, ru)[]^b\ar[r]&\\ &&&\ar[u]& } \]

Proposition


Soit \( \A\) un automate. \[ \begin{array}{lrl} \forall i \in E_\A-F_\A & L(\A_i) = & \dpl{\bigcup_{j\in E_\A} \Sigma_{i, j}L(\A_j)}\\ \forall i \in F_\A & L(\A_i) = & \dpl{\{\varepsilon\}\cup\bigcup_{j\in E_\A} \Sigma_{i, j}L(\A_j)} \end{array} \]

Démonstration

Notons \( L_i=L(\A_i)\) . On observe pour commencer que si \( \varepsilon\) est un mot reconnu alors l'état initial est un état final. En particulier \( \varepsilon\in L_f\) si \( f\) est un état final, la réciproque est trivialement vrai. Ainsi pour démontrer les deux cas de la proposition, il suffit de montrer que \( L_i-\{\varepsilon\}=\dpl{\bigcup_{j\in E_\A} \Sigma_{i, j}L_j}\) .
\( \dpl{\bigcup_{j\in E_\A} \Sigma_{i, j}L_j}\subseteq L_i-\{\varepsilon\}\) .
Si \( a\in \Sigma_{i, j}\) et \( m\in L_j\) alors \( am\in L_i\) donc \( \Sigma_{i, j}L_j\subset L_j\) et à fortiori \( \dpl{\bigcup_{j\in E_\A} \Sigma_{i, j}L_j}\subseteq L_i-\{\varepsilon\}\) .

\( \dpl{L_i-\{\varepsilon\}\subseteq\bigcup_{j\in E_\A} \Sigma_{i, j}L_j}\) .
Soit \( m\in L_i-\{\varepsilon\}\) et \( a\in \Sigma_\A\) la première lettre de \( m\) : \( m=am'\) . Posons \( j=\tau_\A(i, a)\) alors \( m'\in L_j\) ainsi \( am=\Sigma_{i, j}L_j\) ce qui prouve l'inclusion.

Exemple


Reprenons l'automate précédent. Notons \( L_{X}=L(\A_X)\) . \[L_A = \Sigma_{A, A}L_{A}\cup\Sigma_{A, B}L_B\cup\Sigma_{A, C}L_C\] Nous avons \( \Sigma_{A, A}=\{b\}\) , \( \Sigma_{A, B}=\{a\}\) et \( \Sigma_{A, C}=\varnothing\) . Sachant que pour tout langage \( L\) on a \( \varnothing L = \varnothing\) , l'égalité précédente se simplifie en \[L_A = \{b\}L_{A}\cup\{a\}L_B\] Le lemme d'Arden permet alors de trouver \( L_A\) : \( L_A=\{b\}^*\{a\}L_B\) De la même manière, on a \( L_B=\{b\}L_B\cup\{a\}L_C\) qui permet, par le lemme d'Arden, d'obtenir \( L_B=\{b\}^*\{a\}L_C\) ce qui donne en jumelant avec l'égalité précédente : \[L_A=\{b\}^*\{a\}\left(\{b\}^*\{a\}L_C\right)=\left(\{b\}^*\{a\}\right)^2L_C\] Enfin, puisque \( C\) est final, on a \( L_{C}=\{\varepsilon\}\cup\{b\}L_C\cup\{a\}L_A \) ce qui donne par le lemme d'Arden \begin{eqnarray*} L_C&=&\{b\}^*\left(\{\varepsilon\}\cup\{a\}L_A\right)\\ &=&\{b\}^*\{\varepsilon\}\cup\{b\}^*\{a\}L_A\\ &=&\{b\}^*\cup\{b\}^*\{a\}L_A \end{eqnarray*} En jumelant nos deux dernières égalités nous arrivons a \begin{eqnarray*} L_A&=&\left(\{b\}^*\{a\}\right)^2L_C\\ &=&\left(\{b\}^*\{a\}\right)^2\left(\{b\}^*\cup\{b\}^*\{a\}L_A\right)\\ &=& \left(\left(\{b\}^*\{a\}\right)^2\{b\}^*\right) \cup \left(\left(\{b\}^*\{a\}\right)^2\{b\}^*\{a\}L_A\right)\\ &=& \left(\left(\{b\}^*\{a\}\right)^2\{b\}^*\right) \cup \left(\left(\{b\}^*\{a\}\right)^3L_A\right)\\ \end{eqnarray*} Encore un petit coup de lemme d'Arden pour pouvoir conclure (puisque \( L=L_A\) ) : \[ L = \left(\left(\{b\}^*\{a\}\right)^3\right)^*\left(\left(\{b\}^*\{a\}\right)^2\{b\}^*\right) \] De plus, il est évident que la REGEX associée est \( \left(\left({b}^*{a}\right)^3\right)^*\left(\left({b}^*{a}\right)^2{b}^*\right)\) .

Exercice


Pour chacun des automates suivants, calculer une REGEX reconnaissant le langage de l'automate.
  1. \( \begin{array}{c|*{3}{c}} & \alpha & \beta \\ \hline A & B& C \\ B \rightarrow & C & C \\ \rightarrow C & B & C \\ \end{array}\)
  2. \( \begin{array}{c|*{3}{c}} & 0 & 1 \\ \hline A & B & A \\ \rightarrow B & A & C \\ C \rightarrow & C & A \\ \end{array}\)
  3. \( \begin{array}{c|*{3}{c}} & u & v \\ \hline \rightarrow A & A & A \\ B \rightarrow & B & A \\ C & B & A \\ \end{array}\)
  4. \( \begin{array}{c|*{3}{c}} & u & v \\ \hline \rightarrow A & C & A \\ B \rightarrow & B & A \\ C & B & A \\ \end{array}\)
  5. \( \begin{array}{c|*{3}{c}} & u & v \\ \hline \rightarrow A & C & A \\ B \rightarrow & B & A \\ C & B & A \\ \end{array}\)
  6. \( \begin{array}{c|*{3}{c}} & x & y \\ \hline A & C & A, B, C \\ \rightarrow B & B & A, C \\ C \rightarrow & B & B, C \\ \end{array}\)