IFT3295 Démonstration
-
Upload
fiorello-lappin -
Category
Documents
-
view
50 -
download
1
description
Transcript of IFT3295 Démonstration
![Page 1: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/1.jpg)
IFT3295Démonstration
28 septembre 2011
Shift-And (avec erreurs)
![Page 2: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/2.jpg)
Plan
• Présentation en détail de l'algorithme Shift-And (avec erreurs)
• Présentation de PROSITE
![Page 3: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/3.jpg)
Shift-And (avec erreurs)
• Wu et Manber (1992)
• Base du logiciel agrep de Unix
• Recherche approximative d'un mot dans un texte
• Permet les insertions, les délétions et les substitutions de caractères
![Page 4: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/4.jpg)
Shift-And (avec erreurs)
• Exemple :– Texte : aabaacaabacab– Mot : aabac (|mot| = m)– Alphabet : {a, b, c}
• Pré-traitement : – Pour chaque caractère x de l'alphabet, on
construit un tableau de bits Sx tel que Sx[pos] = 1 si motpos = x (pour 1 <= pos <= m)
![Page 5: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/5.jpg)
Shift-And (avec erreurs)
• Pré-traitement : – Pour chaque caractère x de l'alphabet, on
construit un tableau de bits Sx tel que Sx[pos] = 1 si motpos = x (pour 1 <= pos <= m)
1
1
0
1
0
0
0
1
0
0
0
0
0
0
1
a
a
b
a
c
Mot : Sa Sb Sc
![Page 6: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/6.jpg)
Shift-And (avec erreurs)
• Soit k, le nombre d'erreurs que l'on veut permettre
• On doit construire (k+1) tableaux de bits R de taille m * (n+1) (où n = |texte|) (quoique la plupart des colonnes pourront être oubliées) :– R0, R1, …, Rk
![Page 7: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/7.jpg)
Shift-And (avec erreurs)
• Les tableaux R doivent être construits dans l'ordre croissant du nombre d'erreurs
• Regardons d'abord la construction de R0, qui est l'équivalent de Shift-Or (recherche exacte)
![Page 8: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/8.jpg)
Shift-And (avec erreurs)
• Au départ :
a a b a a c a a b a c a b
1 1 1 1 1 1 1 1 1 1 1 1 1 1
a 0
a 0
b 0
a 0
c 0
R0
![Page 9: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/9.jpg)
Shift-And (avec erreurs)
• Objectif : trouver 1 sur la ligne m match
a a b a a c a a b a c a b
1 1 1 1 1 1 1 1 1 1 1 1 1 1
a 0
a 0
b 0
a 0
c 0
R0
![Page 10: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/10.jpg)
Shift-And (avec erreurs)
R0j+1[i] =
a a b a a c a a b a c a b
1 1 1 1 1 1 1 1 1 1 1 1 1 1
a 0
a 0
b 0
a 0
c 0
R0
1 si R0j[i-1] = 1 et moti = textej+1
0 sinonj+1j
i
i-1
![Page 11: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/11.jpg)
Shift-And (avec erreurs)
a a b a a c a a b a c a b
1 1 1 1 1 1 1 1 1 1 1 1 1 1
a 0
a 0
b 0
a 0
c 0
R0
R0j+1[i] =
1 si R0j[i-1] = 1 et moti = textej+1
0 sinonj+1j
i
i-1
![Page 12: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/12.jpg)
Shift-And (avec erreurs)
a a b a a c a a b a c a b
1 1 1 1 1 1 1 1 1 1 1 1 1 1
a 0 1
a 0
b 0
a 0
c 0
R0
R0j+1[i] =
1 si R0j[i-1] = 1 et moti = textej+1
0 sinonj+1j
i
i-1
![Page 13: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/13.jpg)
Shift-And (avec erreurs)
a a b a a c a a b a c a b
1 1 1 1 1 1 1 1 1 1 1 1 1 1
a 0 1
a 0
b 0
a 0
c 0
R0
R0j+1[i] =
1 si R0j[i-1] = 1 et moti = textej+1
0 sinonj+1j
i
i-1
![Page 14: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/14.jpg)
Shift-And (avec erreurs)
a a b a a c a a b a c a b
1 1 1 1 1 1 1 1 1 1 1 1 1 1
a 0 1
a 0
b 0
a 0
c 0
R0
R0j+1[i] =
1 si R0j[i-1] = 1 et moti = textej+1
0 sinonj+1j
i
i-1
![Page 15: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/15.jpg)
Shift-And (avec erreurs)
a a b a a c a a b a c a b
1 1 1 1 1 1 1 1 1 1 1 1 1 1
a 0 1
a 0 0
b 0
a 0
c 0
R0
R0j+1[i] =
1 si R0j[i-1] = 1 et moti = textej+1
0 sinonj+1j
i
i-1
![Page 16: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/16.jpg)
Shift-And (avec erreurs)
a a b a a c a a b a c a b
1 1 1 1 1 1 1 1 1 1 1 1 1 1
a 0 1
a 0 0
b 0 0
a 0 0
c 0 0
R0
R0j+1[i] =
1 si R0j[i-1] = 1 et moti = textej+1
0 sinon
![Page 17: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/17.jpg)
Shift-And (avec erreurs)
a a b a a c a a b a c a b
1 1 1 1 1 1 1 1 1 1 1 1 1 1
a 0 1 1
a 0 0 1
b 0 0 0
a 0 0 0
c 0 0 0
R0
R0j+1[i] =
1 si R0j[i-1] = 1 et moti = textej+1
0 sinon
![Page 18: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/18.jpg)
Shift-And (avec erreurs)
• Qu'est-ce que ça représente?
a a b a a c a a b a c a b
1 1 1 1 1 1 1 1 1 1 1 1 1 1
a 0 1 1
a 0 0 1
b 0 0 0
a 0 0 0
c 0 0 0
R0
j+1j
i
i-1
![Page 19: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/19.jpg)
Shift-And (avec erreurs)
• Qu'est-ce que ça représente?
a a b a a c a a b a c a b
1 1 1 1 1 1 1 1 1 1 1 1 1 1
a 0 1 1
a 0 0 1
b 0 0 0
a 0 0 0
c 0 0 0
R0
j+1j
i
i-1
![Page 20: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/20.jpg)
Shift-And (avec erreurs)
• Qu'est-ce que ça représente?
a a b a a c a a b a c a b
1 1 1 1 1 1 1 1 1 1 1 1 1 1
a 0 1 1
a 0 0 1
b 0 0 0
a 0 0 0
c 0 0 0
R0
j+1j
i
i-1
![Page 21: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/21.jpg)
Shift-And (avec erreurs)
• Qu'est-ce que ça représente?
a a b a a c a a b a c a b
1 1 1 1 1 1 1 1 1 1 1 1 1 1
a 0 1 1 0
a 0 0 1 0
b 0 0 0 1
a 0 0 0 0
c 0 0 0 0
R0
j+1j
i
i-1
![Page 22: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/22.jpg)
Shift-And (avec erreurs)
• Qu'est-ce que ça représente?
a a b a a c a a b a c a b
1 1 1 1 1 1 1 1 1 1 1 1 1 1
a 0 1 1 0
a 0 0 1 0
b 0 0 0 1
a 0 0 0 0
c 0 0 0 0
R0
j+1j
i
i-1
![Page 23: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/23.jpg)
Shift-And (avec erreurs)
• Qu'est-ce que ça représente?
a a b a a c a a b a c a b
1 1 1 1 1 1 1 1 1 1 1 1 1 1
a 0 1 1 0
a 0 0 1 0
b 0 0 0 1
a 0 0 0 0
c 0 0 0 0
R0
j+1j
i
i-1
![Page 24: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/24.jpg)
Shift-And (avec erreurs)
• Cette transition peut être calculée bien plus efficacement
• R0j+1 = Rshift[R0
j] AND Sj+1
où Sj+1 est la table de pré-traitement du caractère qui est à la position j+1 dans le texte
1
1
0
1
0
Sa
0
0
1
0
0
Sb
0
0
0
0
1
Sc
![Page 25: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/25.jpg)
Shift-And (avec erreurs)
• Rshift :– On décale les bits à droite d'une
position, on élimine le dernier bit et on insère 1 à gauche
Rshift[00000] = 10000
Rshift[10001] = 11000
![Page 26: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/26.jpg)
Shift-And (avec erreurs)
• R0j+1 = Rshift[R0
j] AND Sj+1
a a b a a c a a b a c a b
a 0
a 0
b 0
a 0
c 0
R0
1
1
0
1
0
Sa
0
0
1
0
0
Sb
0
0
0
0
1
Sc
![Page 27: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/27.jpg)
Shift-And (avec erreurs)
a a b a a c a a b a c a b
a 0
a 0
b 0
a 0
c 0
R0
1
1
0
1
0
Sa
0
0
1
0
0
Sb
0
0
0
0
1
Sc
j+1j
• R0j+1 = Rshift[R0
j] AND Sj+1
![Page 28: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/28.jpg)
Shift-And (avec erreurs)
a a b a a c a a b a c a b
a 0 1
a 0 0
b 0 0
a 0 0
c 0 0
R0
1
1
0
1
0
Sa
0
0
1
0
0
Sb
0
0
0
0
1
Sc
j+1j
0
• R0j+1 = Rshift[R0
j] AND Sj+1
![Page 29: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/29.jpg)
Shift-And (avec erreurs)
a a b a a c a a b a c a b
a 0 1
a 0 0
b 0 0
a 0 0
c 0 0
R0
1
1
0
1
0
Sa
0
0
1
0
0
Sb
0
0
0
0
1
Sc
j+1j
• R0j+1 = Rshift[R0
j] AND Sj+1
![Page 30: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/30.jpg)
Shift-And (avec erreurs)
a a b a a c a a b a c a b
a 0 1
a 0 0
b 0 0
a 0 0
c 0 0
R0
1
1
0
1
0
Sa
0
0
1
0
0
Sb
0
0
0
0
1
Sc
j+1j
• R0j+1 = Rshift[R0
j] AND Sj+1
![Page 31: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/31.jpg)
Shift-And (avec erreurs)
a a b a a c a a b a c a b
a 0 1
a 0 0
b 0 0
a 0 0
c 0 0
R0
1
1
0
1
0
Sa
0
0
1
0
0
Sb
0
0
0
0
1
Sc
j+1j
• R0j+1 = Rshift[R0
j] AND Sj+1
![Page 32: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/32.jpg)
Shift-And (avec erreurs)
a a b a a c a a b a c a b
a 0 1 1
a 0 0 1
b 0 0 0
a 0 0 0
c 0 0 0
R0
1
1
0
1
0
Sa
0
0
1
0
0
Sb
0
0
0
0
1
Sc
j+1j
0
• R0j+1 = Rshift[R0
j] AND Sj+1
![Page 33: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/33.jpg)
Shift-And (avec erreurs)
a a b a a c a a b a c a b
a 0 1 1
a 0 0 1
b 0 0 0
a 0 0 0
c 0 0 0
R0
1
1
0
1
0
Sa
0
0
1
0
0
Sb
0
0
0
0
1
Sc
j+1j
• R0j+1 = Rshift[R0
j] AND Sj+1
![Page 34: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/34.jpg)
Shift-And (avec erreurs)
a a b a a c a a b a c a b
a 0 1 1
a 0 0 1
b 0 0 0
a 0 0 0
c 0 0 0
R0
1
1
0
1
0
Sa
0
0
1
0
0
Sb
0
0
0
0
1
Sc
j+1j
• R0j+1 = Rshift[R0
j] AND Sj+1
![Page 35: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/35.jpg)
Shift-And (avec erreurs)
a a b a a c a a b a c a b
a 0 1 1
a 0 0 1
b 0 0 0
a 0 0 0
c 0 0 0
R0
1
1
0
1
0
Sa
0
0
1
0
0
Sb
0
0
0
0
1
Sc
j+1j
• R0j+1 = Rshift[R0
j] AND Sj+1
![Page 36: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/36.jpg)
Shift-And (avec erreurs)
a a b a a c a a b a c a b
a 0 1 1 1
a 0 0 1 1
b 0 0 0 1
a 0 0 0 0
c 0 0 0 0
R0
1
1
0
1
0
Sa
0
0
1
0
0
Sb
0
0
0
0
1
Sc
j+1j
0
• R0j+1 = Rshift[R0
j] AND Sj+1
![Page 37: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/37.jpg)
Shift-And (avec erreurs)
a a b a a c a a b a c a b
a 0 1 1 1
a 0 0 1 1
b 0 0 0 1
a 0 0 0 0
c 0 0 0 0
R0
1
1
0
1
0
Sa
0
0
1
0
0
Sb
0
0
0
0
1
Sc
j+1j
• R0j+1 = Rshift[R0
j] AND Sj+1
![Page 38: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/38.jpg)
Shift-And (avec erreurs)
a a b a a c a a b a c a b
a 0 1 1 0
a 0 0 1 0
b 0 0 0 1
a 0 0 0 0
c 0 0 0 0
R0
1
1
0
1
0
Sa
0
0
1
0
0
Sb
0
0
0
0
1
Sc
j+1j
• R0j+1 = Rshift[R0
j] AND Sj+1
![Page 39: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/39.jpg)
Shift-And (avec erreurs)
a a b a a c a a b a c a b
a 0 1 1 0 1 1 0 1 1 0 1 0 1 0
a 0 0 1 0 0 1 0 0 1 0 0 0 0 0
b 0 0 0 1 0 0 0 0 0 1 0 0 0 0
a 0 0 0 0 1 0 0 0 0 0 1 0 0 0
c 0 0 0 0 0 0 0 0 0 0 0 1 0 0
R0
1
1
0
1
0
Sa
0
0
1
0
0
Sb
0
0
0
0
1
Sc• R0j+1 = Rshift[R0
j] AND Sj+1
![Page 40: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/40.jpg)
Shift-And (avec erreurs)
• Nous venons de voir la construction de R0, qui est l'équivalent de Shift-Or (recherche exacte)
• Que fait-on pour R1, R2, …, Rk?
• Trois types d'erreurs sont permises : insertions, délétions et substitutions
![Page 41: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/41.jpg)
Shift-And (avec erreurs)
• Insertion (1er cas) :
a a b a a c a a b a c a b
a a
j+1
i = 2
R0j+1[2] = 0
![Page 42: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/42.jpg)
Shift-And (avec erreurs)
• Insertion (1er cas) :
a a b a a c a a b a c a b
a a b
j+1
i = 2 R1j+1[2] = 1
R0j+1[2] = 0
![Page 43: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/43.jpg)
Shift-And (avec erreurs)
• Insertion (2e cas) :
a a b a a c a a b a c a b
a a
j+1
i = 2
R0j+1[2] = 0
![Page 44: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/44.jpg)
Shift-And (avec erreurs)
• Insertion (2e cas) :
a a b a a c a a b a c a b
a b a
j+1
i = 2
R0j+1[2] = 0
R1j+1[2] = 1
![Page 45: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/45.jpg)
Shift-And (avec erreurs)
• Délétion (1er cas) :
a a b a a c a a b a c a b
a b a a b
j+1
i = 5
R0j+1[5] = 0
![Page 46: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/46.jpg)
Shift-And (avec erreurs)
• Délétion (1er cas) :
a a b a a c a a b a c a b
a b a a b
j+1
i = 5
R0j+1[5] = 0
R1j+1[5] = 1
![Page 47: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/47.jpg)
Shift-And (avec erreurs)
• Délétion (2e cas) :
a a b a a c a a b a c a b
a b a a b c
j+1
i = 6
R0j+1[6] = 0
R1j+1[6] = 1
![Page 48: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/48.jpg)
Shift-And (avec erreurs)
• Substitution (1er cas) :
a a b a a c a a b a c a b
a a b a c
j+1
i = 5
R0j+1[5] = 0
![Page 49: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/49.jpg)
Shift-And (avec erreurs)
• Substitution (1er cas) :
a a b a a c a a b a c a b
a a b a c
j+1
i = 5
R0j+1[5] = 0
R1j+1[5] = 1
![Page 50: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/50.jpg)
Shift-And (avec erreurs)
• Substitution (2e cas) :
a a b a a c a a b a c a b
a a b c a
j+1
i = 5
R0j+1[5] = 0
R1j+1[5] = 1
![Page 51: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/51.jpg)
Shift-And (avec erreurs)
• On peut résumer tous ces cas dans la formule de transition suivante :
Rdj+1 = Rshift[Rd
j] AND Sj+1 OR
Rshift[Rd-1j] OR
Rshift[Rd-1j+1] OR
Rd-1j
![Page 52: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/52.jpg)
Shift-And (avec erreurs)
• On peut résumer tous ces cas dans la formule de transition suivante :
Rdj+1 = Rshift[Rd
j] AND Sj+1 OR
Rshift[Rd-1j OR Rd-1
j+1] OR
Rd-1j
![Page 53: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/53.jpg)
Shift-And (avec erreurs)Rd
j+1 = Rshift[Rdj] AND Sj+1 OR Rshift[Rd-1
j OR Rd-1j+1] OR Rd-1
j
a a b a a c a a b a c a b
a 0
a 0
b 0
a 0
c 0
R1
![Page 54: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/54.jpg)
Shift-And (avec erreurs)Rd
j+1 = Rshift[Rdj] AND Sj+1 OR Rshift[Rd-1
j OR Rd-1j+1] OR Rd-1
j
a a b a a c a a b a c a b
a 0
a 0
b 0
a 0
c 0
R1
![Page 55: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/55.jpg)
Shift-And (avec erreurs)Rd
j+1 = Rshift[Rdj] AND Sj+1 OR Rshift[Rd-1
j OR Rd-1j+1] OR Rd-1
j
R1j+1 = Rshift[00000] AND 11010 OR Rshift[00000 OR 10000] OR 00000
= 10000 AND 11010 OR Rshift[10000] = 10000 OR 11000 = 11000
a a b a a c a a b a c a b
a 0
a 0
b 0
a 0
c 0
R1
j+1j
![Page 56: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/56.jpg)
Shift-And (avec erreurs)
a a b a a c a a b a c a b
a 0 1 1 0 1 1 0 1 1 0 1 0 1 0
a 0 0 1 0 0 1 0 0 1 0 0 0 0 0
b 0 0 0 1 0 0 0 0 0 1 0 0 0 0
a 0 0 0 0 1 0 0 0 0 0 1 0 0 0
c 0 0 0 0 0 0 0 0 0 0 0 1 0 0
R0
1
1
0
1
0
Sa
0
0
1
0
0
Sb
0
0
0
0
1
Sc
![Page 57: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/57.jpg)
Shift-And (avec erreurs)Rd
j+1 = Rshift[Rdj] AND Sj+1 OR Rshift[Rd-1
j OR Rd-1j+1] OR Rd-1
j
R1j+1 = Rshift[00000] AND 11010 OR Rshift[00000 OR 10000] OR 00000
= 10000 AND 11010 OR Rshift[10000] = 10000 OR 11000 = 11000
a a b a a c a a b a c a b
a 0 1
a 0 1
b 0 0
a 0 0
c 0 0
R1
j+1j
![Page 58: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/58.jpg)
Shift-And (avec erreurs)Rd
j+1 = Rshift[Rdj] AND Sj+1 OR Rshift[Rd-1
j OR Rd-1j+1] OR Rd-1
j
a a b a a c a a b a c a b
a 0 1
a 0 1
b 0 0
a 0 0
c 0 0
R1
j+1j
![Page 59: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/59.jpg)
Shift-And (avec erreurs)Rd
j+1 = Rshift[Rdj] AND Sj+1 OR Rshift[Rd-1
j OR Rd-1j+1] OR Rd-1
j
R1j+1 = Rshift[11000] AND 11010 OR Rshift[10000 OR 11000] OR 10000
= 11100 AND 11010 OR Rshift[11000] OR 10000
= 11000 OR 11100 OR 10000 = 11100
a a b a a c a a b a c a b
a 0 1
a 0 1
b 0 0
a 0 0
c 0 0
R1
j+1j
![Page 60: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/60.jpg)
Shift-And (avec erreurs)
a a b a a c a a b a c a b
a 0 1 1 0 1 1 0 1 1 0 1 0 1 0
a 0 0 1 0 0 1 0 0 1 0 0 0 0 0
b 0 0 0 1 0 0 0 0 0 1 0 0 0 0
a 0 0 0 0 1 0 0 0 0 0 1 0 0 0
c 0 0 0 0 0 0 0 0 0 0 0 1 0 0
R0
1
1
0
1
0
Sa
0
0
1
0
0
Sb
0
0
0
0
1
Sc
![Page 61: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/61.jpg)
Shift-And (avec erreurs)Rd
j+1 = Rshift[Rdj] AND Sj+1 OR Rshift[Rd-1
j OR Rd-1j+1] OR Rd-1
j
R1j+1 = Rshift[11000] AND 11010 OR Rshift[10000 OR 11000] OR 10000
= 11100 AND 11010 OR Rshift[11000] OR 10000
= 11000 OR 11100 OR 10000 = 11100
a a b a a c a a b a c a b
a 0 1 1
a 0 1 1
b 0 0 1
a 0 0 0
c 0 0 0
R1
j+1j
![Page 62: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/62.jpg)
Shift-And (avec erreurs)
• Il est inutile de garder toutes les colonnes des (k+1) tableaux en mémoire
• L'idée est de calculer la colonne (j+1) pour R0, ensuite pour R1, … et enfin pour Rk
• Ensuite, on pourra oublier la colonne j de tous les tableaux lorsqu'on calculera la colonne (j+2)
![Page 63: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/63.jpg)
Shift-And (avec erreurs)
• Complexité :
– O(kn) lorsque le mot n'est pas trop grand
avec
k = nombre d'erreurs permises
n = longueur du texte
- O(kn * nbMotsMachine) sinon
![Page 64: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/64.jpg)
PROSITE
• Base de données dédiée à l'identification de familles de protéines et de domaines
• Collection de motifs décrits en tant que patterns ou profils, reliés à la documentation décrivant les familles de protéines ou les domaines en question
![Page 65: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/65.jpg)
PROSITE
• Pattern = expression régulière
• Les patterns sont identifiés à partir des alignements multiples des protéines d'une même famille
![Page 66: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/66.jpg)
PROSITE
• Les patterns choisis représentent des motifs importants dans la séquence (10 à 20 acides aminés)– régions conservées qui ont une signification
biologique importante (site catalytique, site de liaison, etc.)
• On peut identifier la fonction d'une protéine dont la séquence diffère beaucoup avec celles de la base de données si on y retrouve un certain pattern
![Page 67: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/67.jpg)
PROSITE
• Syntaxe des patterns :– Chaque élément est séparé par -– x : n'importe quel– x(2) : x-x– x(2,4) : x-x, x-x-x ou x-x-x-x – [ALT] : Ala, Leu ou Thr– {AM} : n'importe quel sauf Ala, Met– < (au début) : doit être dans la partie N-terminale– > (à la fin) : doit être dans la partie C-terminale
![Page 68: IFT3295 Démonstration](https://reader033.fdocument.pub/reader033/viewer/2022061614/56813484550346895d9b6396/html5/thumbnails/68.jpg)
PROSITE
• Exemples :– [AC]-x-V-x(4)-{ED} =
[Ala or Cys]-any-Val-any-any-any-any-{any but Glu or Asp}
– < A-x-[ST](2)-x(0,1)-V =
Ala-any-[Ser or Thr]-[Ser or Thr]-(any or none)-Val
qui doit être dans la partie N-terminale de la séquence