correction exos plus dérterminisation
This commit is contained in:
@@ -195,7 +195,7 @@ $$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).
|
|
||||||
|
|
||||||
|
|
||||||
###### Le langage formé de successions du mot ab (au moins une fois ce motif).
|
###### Le langage formé de successions du mot ab (au moins une fois ce motif).
|
||||||
@@ -278,3 +278,42 @@ Pour le début du mot, il faut des fenêtres partielles pour le mot vite (état
|
|||||||
| qab (acceptant) | qba | qbb |
|
| qab (acceptant) | qba | qbb |
|
||||||
| qba | qaa | qab |
|
| qba | qaa | qab |
|
||||||
| qbb | qba | qbb |
|
| qbb | qba | qbb |
|
||||||
|
|
||||||
|
|
||||||
|
###### 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).
|
||||||
|
|
||||||
|
On peut reprendre l'automate déterministe précédent. Il suffit de transformer l'état qab en un puit acceptant (on a rencontré le motif ab on est content).
|
||||||
|
|
||||||
|
| état | a | b |
|
||||||
|
|:----------------|:----|:----|
|
||||||
|
| q0 (initial) | qa | qb |
|
||||||
|
| qa | qaa | qab |
|
||||||
|
| qb | qba | qbb |
|
||||||
|
| qaa | qaa | qab |
|
||||||
|
| qab (acceptant) | **qab** | **qab** |
|
||||||
|
| qba | qaa | qab |
|
||||||
|
| qbb | qba | qbb |
|
||||||
|
|
||||||
|
|
||||||
|
**Retour sur le non déterministe.**
|
||||||
|
|
||||||
|
Si on a queleque part dans la table de transition deux états ou plus dans une case, on a un choix.
|
||||||
|
Dans ce cas un calcul peut en fait avoir plusieurs branches.
|
||||||
|
On a un **arbre de calcul** plutôt qu'un chemin unique.
|
||||||
|
|
||||||
|
On accepte un mot, si l'arbre de calcul a un chemin acceptant.
|
||||||
|
|
||||||
|
On peut facilement produire par exemple un automate non déterministe pour les mots qui terminent par ab.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
On a vu en cours l'arbre de calcul pour le mot abab.
|
||||||
|
Il y a trois chemins acceptants dont un seul accepte en terminant dans l'état acceptant.
|
||||||
|
|
||||||
|
Peut-on toujours trouver un automate déterministe?
|
||||||
|
|
||||||
|
Oui. On peut fabriquer un automate qui simule en parralèle tous les chemins de calculs.
|
||||||
|
JFLAP permet de faire la transformation.
|
||||||
|
|
||||||
|
|
||||||
|

|
||||||
|
BIN
1-ComputationAndData/JFLAP/DFAendsInabViaDetermnisation.jpg
Normal file
BIN
1-ComputationAndData/JFLAP/DFAendsInabViaDetermnisation.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 49 KiB |
BIN
1-ComputationAndData/JFLAP/NDFAendsInab.jpg
Normal file
BIN
1-ComputationAndData/JFLAP/NDFAendsInab.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
Reference in New Issue
Block a user