diff --git a/cours.md b/cours.md index a7225a439e99fd39b9981c45f33e2a5c426f9ece..e26a5921ca675015574b87836345e11537a3d352 100644 --- a/cours.md +++ b/cours.md @@ -2756,14 +2756,36 @@ efficacité. En effet, on peut montrer que la complexité de l’équation On peut écrire l'@eq:tfd comme un produit matrice-vecteur sous la forme suivante -$$\begin{array}{l} \underbrace{\begin{pmatrix} {\hat{f}}[0] \\ {\hat{f}}[1] \\ f[2] \\ \vdots \\ {\hat{f}}[N-1] \end{pmatrix}}_{\hat{\bm{f}}} = \underbrace{\begin{pmatrix} 1 & 1 & 1 & \cdots & 1\\ 1 & w & w^2 & \cdots & w^{N-1}\\ 1 & w^2 & w^4 & \cdots & w^{2(N-1)}\\ \vdots & \vdots & \vdots & \ddots & \vdots &\\ 1 & w^{N-1} & w^{2(N-1)} & \cdots & w^{(N-1)^2} \end{pmatrix}}_{\bm{W}}\cdot \end{array} \underbrace{\begin{pmatrix} f[0] \\ f[1] \\ f[2] \\ \vdots \\ f[N-1] \end{pmatrix}}_{\bm{f}},$$ +$$ +\begin{array}{l} + \underbrace{ + \begin{pmatrix} {\hat{f}}[0] \\ {\hat{f}}[1] \\ f[2] \\ \vdots \\ {\hat{f}}[N-1] + \end{pmatrix} + }_{\hat{\vec{f}}} = + \underbrace{ + \begin{pmatrix} 1 & 1 & 1 & \cdots & 1\\ + 1 & w & w^2 & \cdots & w^{N-1}\\ + 1 & w^2 & w^4 & \cdots & w^{2(N-1)}\\ + \vdots & \vdots & \vdots & \ddots & \vdots &\\ + 1 & w^{N-1} & w^{2(N-1)} & \cdots & w^{(N-1)^2} + \end{pmatrix}}_{\underline{\underline{W}}}\cdot +\end{array} +\underbrace{ +\begin{pmatrix} +f[0] \\ f[1] \\ f[2] \\ \vdots \\ f[N-1] +\end{pmatrix}}_{\vec{f}}, +$$ où $w = e^{-\frac{2 \pi i}{N}}$. On peut donc de façon plus compacte -l’écrire $$\hat{\bm{f}}=\bm{W}\cdot \bm{f}.$$ Les éléments de la matrice -$\bm{W}$ peuvent être précalculés et il reste donc à calculer uniquement -le produit matrice vecteur $\bm{W}\cdot\bm{f}$. Pour ce faire il faut -pour chaque ligne de $\hat{\bm{f}}$ faire le calcul de $N$ produits et +l’écrire +$$ +\hat{\vec{f}}=\underline{\underline{W}}\cdot \vec{f}. +$$ +Les éléments de la matrice +$\underline{\underline{W}}$ peuvent être précalculés et il reste donc à calculer uniquement +le produit matrice vecteur $\underline{\underline{W}}\cdot\vec{f}$. Pour ce faire il faut +pour chaque ligne de $\hat{\vec{f}}$ faire le calcul de $N$ produits et $N$ sommes (donc une complexité $N$). Comme il y a $N$ lignes à -$\hat{\bm{f}}$, la complexité est $N\cdot N$. +$\hat{\vec{f}}$, la complexité est $N\cdot N$. Il existe des algorithmes beaucoup plus efficaces pour effectuer de genre de calculs que nous allons brièvement discuter maintenant. Ils