From 255793109327ea1418b0ed159d132ba6f580b945 Mon Sep 17 00:00:00 2001 From: Florian Mathieu Date: Tue, 19 Mar 2024 09:01:37 +0100 Subject: [PATCH] =?UTF-8?q?edit=20repr=C3=A9sentation=20math=C3=A9matique?= =?UTF-8?q?=20du=20logarithme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- algorithmes/DICHOTOMIQUE.md | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) 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(𝑛)