diff --git a/algorithmes/DICHOTOMIQUE.md b/algorithmes/DICHOTOMIQUE.md index a58a902..24c2d30 100644 --- a/algorithmes/DICHOTOMIQUE.md +++ b/algorithmes/DICHOTOMIQUE.md @@ -74,27 +74,34 @@ Soit un tableau de taille 𝑛. Si on « coupe » ce tableau en deux parts égales, cela revient à diviser 𝑛 par deux à chaque itération : - +$$ +n_1=\frac{n}{2} +$$ -
- +$$ +n_2=\frac{n_1}{2} +$$ - -
- - - +$$ +n_3=\frac{n_2}{2} +$$ ***Important*** : la taille d’un tableau étant forcément un *nombre entier*, 𝑛𝑖 va devenir à un moment ou un autre égal à 1. Cela signifiera qu’après avoir divisé 𝑛 par 2 un nombre de fois égal à un certain nombre 𝑎, le tableau ne comportera plus qu’une seule valeur (et par conséquent l’algorithme s’arrête). - +$$ + +$$ + +$$ +n_i=1=\frac{n}{2*2*...*2}=\frac{n}{2a} +$$ Soit : 𝑎 =log2(𝑛)