correction ab
This commit is contained in:
@@ -243,7 +243,7 @@ Il suffit d'accepter ensuite.
|
|||||||
|:----------------|:---|:----|
|
|:----------------|:---|:----|
|
||||||
| q0 (initial) | qa | KO |
|
| q0 (initial) | qa | KO |
|
||||||
| qa | KO | qab |
|
| qa | KO | qab |
|
||||||
| qab (acceptant) | qab | qab |
|
| qab (acceptant) | **qab** | **qab** |
|
||||||
| KO | KO | KO |
|
| KO | KO | KO |
|
||||||
|
|
||||||
Pour le mot aba :
|
Pour le mot aba :
|
||||||
@@ -255,3 +255,26 @@ Pour le mot bab:
|
|||||||
$$q0 \xrightarrow{b}{} KO \xrightarrow{a}{} KO \xrightarrow{b}{} KO$$
|
$$q0 \xrightarrow{b}{} KO \xrightarrow{a}{} KO \xrightarrow{b}{} KO$$
|
||||||
KO est non-acceptant donc le mot bab est rejeté.
|
KO est non-acceptant donc le mot bab est rejeté.
|
||||||
|
|
||||||
|
|
||||||
|
###### Le langage des mots qui terminent par ab.
|
||||||
|
|
||||||
|
Exemple pour le oui : aaabab
|
||||||
|
|
||||||
|
Exemple pour le non : aa
|
||||||
|
|
||||||
|
On peut proposer un automate déterministe en utilisant le principe qui consiste à mémoriser dans les états les deux dernières lettres lues.
|
||||||
|
Il est facile de mettre à jour les fenêtres quand on lit une nouvelle lettre à droite.
|
||||||
|
|
||||||
|
Par exemple la fenêtre aa suivi de b devient la fenêtre ab.
|
||||||
|
|
||||||
|
Pour le début du mot, il faut des fenêtres partielles pour le mot vite (état initial q0), la lettre a (état qa), la lettre b (état qb).
|
||||||
|
|
||||||
|
| état | a | b |
|
||||||
|
|:----------------|:----|:----|
|
||||||
|
| q0 (initial) | qa | qb |
|
||||||
|
| qa | qaa | qab |
|
||||||
|
| qb | qba | qbb |
|
||||||
|
| qaa | qaa | qab |
|
||||||
|
| qab (acceptant) | qba | qbb |
|
||||||
|
| qba | qaa | qab |
|
||||||
|
| qbb | qba | qbb |
|
||||||
|
Reference in New Issue
Block a user