correction ab

This commit is contained in:
2025-10-13 11:51:34 +02:00
parent 6d8c284880
commit e7543e3b01

View File

@@ -191,8 +191,39 @@ $$q0 \xrightarrow{a}{} qa \xrightarrow{b}{} qab$$
qab est acceptant donc le mot est accepté. qab est acceptant donc le mot est accepté.
Pour le mot a: Pour le mot a:
Pour le mot ab:
$$q0 \xrightarrow{a}{} qa$$ $$q0 \xrightarrow{a}{} qa$$
qa est non-acceptant donc le mot est rejeté. qa est non-acceptant donc le mot est rejeté.
###### Le langage formée des mots qui contient ab (de la forme n'importe quoi puis ab puis n'importe quoi, n'importe quoi pouvant être vide).
Un exemple de mot accepté : abab
Un exemple de mot rejeté : aba
Idée de l'automate en décrivant les état.
* q0 Il faut un état initial (je n'ai rien lu).
* qa Il faut un état qui se souvient qu'il vient de lire un a.
* qab Il faut un état qui se souvient qu'on vient de lire a puis b.
On peut ajouter un état poubelle (KO).
| état | a | b |
|:----------------|:---|:----|
| q0 (initial) | qa | KO |
| qa | KO | qab |
| qab (acceptant) | qa | KO |
| KO | KO | KO |
| | | |
Exemples de calcul.
Pour le mot abab :
$$q0 \xrightarrow{a}{} qa \xrightarrow{b}{} qab \xrightarrow{a}{} qa \xrightarrow{b}{} qab $$
qab est acceptant donc le mot abab est accepté.
Pour le mot aba:
$$q0 \xrightarrow{a}{} qa \xrightarrow{b}{} qab \xrightarrow{a}{} qa$$
qa est non-acceptant donc le mot aba est rejeté.