From 03a74138930cb27ef9d435fc04026e35de97e609 Mon Sep 17 00:00:00 2001 From: fortierq Date: Sun, 5 Nov 2023 20:10:55 +0000 Subject: [PATCH] deploy: 89771d284647f9838ada3b6cf6a1da5c1847c44b --- .../dl/algo/prog_dyn/tp/tp1/tp_prog_dyn.ipynb | 340 ------------------ dl/algo/prog_dyn/tp/tp1/tp_prog_dyn.html | 172 --------- searchindex.js | 2 +- 3 files changed, 1 insertion(+), 513 deletions(-) diff --git a/_sources/dl/algo/prog_dyn/tp/tp1/tp_prog_dyn.ipynb b/_sources/dl/algo/prog_dyn/tp/tp1/tp_prog_dyn.ipynb index 19fffd5c..960af842 100644 --- a/_sources/dl/algo/prog_dyn/tp/tp1/tp_prog_dyn.ipynb +++ b/_sources/dl/algo/prog_dyn/tp/tp1/tp_prog_dyn.ipynb @@ -27,21 +27,6 @@ "````" ] }, - { - "cell_type": "markdown", - "metadata": { - "tags": [ - "cor" - ] - }, - "source": [ - "````{admonition} Solution\n", - ":class: tip, dropdown\n", - "$$\\binom{0}{k} = 0$$\n", - "$$\\binom{n}{0} = 1, \\text{si } n \\neq 0$$\n", - "````" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -51,28 +36,6 @@ "````" ] }, - { - "cell_type": "markdown", - "execution_count": 1, - "metadata": { - "tags": [ - "cor" - ] - }, - "source": [ - "````{admonition} Solution\n", - ":class: tip, dropdown\n", - "``` python\n", - "def binom_rec(n, k): # voir cours\n", - " if k == 0:\n", - " return 1\n", - " if n == 0:\n", - " return 0\n", - " return binom_rec(n - 1, k - 1) + binom_rec(n - 1, k)\n", - "```\n", - "````" - ] - }, { "cell_type": "code", "execution_count": 2, @@ -119,31 +82,6 @@ " return ..." ] }, - { - "cell_type": "markdown", - "execution_count": 4, - "metadata": { - "tags": [ - "cor" - ] - }, - "source": [ - "````{admonition} Solution\n", - ":class: tip, dropdown\n", - "``` python\n", - "def binom_dp(n, k):\n", - " M = [[0]*(k + 1) for _ in range(n + 1)]\n", - " for i in range(0, n + 1):\n", - " M[i][0] = 1 # cas de base\n", - "\n", - " for i in range(1, n + 1):\n", - " for j in range(1, k + 1):\n", - " M[i][j] = M[i - 1][j - 1] + M[i - 1][j]\n", - " return M[n][k]\n", - "```\n", - "````" - ] - }, { "cell_type": "code", "execution_count": 5, @@ -187,31 +125,6 @@ " return aux(n, k)" ] }, - { - "cell_type": "markdown", - "execution_count": null, - "metadata": { - "tags": [ - "cor" - ] - }, - "source": [ - "````{admonition} Solution\n", - ":class: tip, dropdown\n", - "``` python\n", - "def binom(n, k):\n", - " d = {}\n", - " def aux(i, j):\n", - " if j == 0: return 1\n", - " if i == 0: return 0\n", - " if (i, j) not in d:\n", - " d[(i, j)] = aux(i - 1, j - 1) + aux(i - 1, j)\n", - " return d[(i, j)]\n", - " return aux(n, k)\n", - "```\n", - "````" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -241,27 +154,6 @@ "````" ] }, - { - "cell_type": "markdown", - "metadata": { - "tags": [ - "cor" - ] - }, - "source": [ - "````{admonition} Solution\n", - ":class: tip, dropdown\n", - "Si $a_k$ est utilisée : il faut encore rendre $n - a_k$ euros avec les pièces $a_1$, ..., $a_k$ (on a le droit d'utiliser plusieurs fois $a_k$), d'où $r(n, k) = r(n - a_k, k) + 1$.\n", - "\n", - "Dans le cas général, on considère les deux possibilités et on conserve le minimum : \n", - "$$\n", - " r(n, k) = min(r(n, k - 1), r(n - a_k, k) + 1)\n", - "$$\n", - "\n", - "Remarque : on ne peut utiliser $a_k$ pour rendre $n$ euros que si $n \\geq a_k$. Si $n < a_k$, on a donc $r(n, k) = r(n, k - 1)$.\n", - "````" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -272,33 +164,6 @@ "````" ] }, - { - "cell_type": "markdown", - "execution_count": 1, - "metadata": { - "tags": [ - "cor" - ] - }, - "source": [ - "````{admonition} Solution\n", - ":class: tip, dropdown\n", - "``` python\n", - "def rendu(L, n):\n", - " k = len(L) # nombre de pièces\n", - " M = [[0]*(k + 1) for _ in range(n + 1)]\n", - " for i in range(1, n + 1):\n", - " M[i][0] = float(\"inf\")\n", - " for j in range(1, k + 1):\n", - " if i - L[j - 1] >= 0:\n", - " M[i][j] = min(M[i][j - 1], 1 + M[i - L[j - 1]][j])\n", - " else:\n", - " M[i][j] = M[i][j - 1]\n", - " return M[-1][-1]\n", - "```\n", - "````" - ] - }, { "cell_type": "code", "execution_count": 8, @@ -328,43 +193,6 @@ "````" ] }, - { - "cell_type": "markdown", - "execution_count": 9, - "metadata": { - "tags": [ - "cor" - ] - }, - "source": [ - "````{admonition} Solution\n", - ":class: tip, dropdown\n", - "``` python\n", - "def rendu_memo(L, n):\n", - " k = len(L)\n", - " d = {}\n", - " def aux(i, j):\n", - " if (i, j) in d:\n", - " return d[(i, j)]\n", - " if i == 0:\n", - " return 0\n", - " if j == 0:\n", - " return float(\"inf\")\n", - " if i - L[j - 1] >= 0:\n", - " d[(i, j)] = min(aux(i, j - 1), 1 + aux(i - L[j - 1], j))\n", - " else:\n", - " d[(i, j)] = aux(i, j - 1)\n", - " return d[(i, j)]\n", - " return aux(n, k)\n", - "rendu_memo([1, 2, 5], 7)\n", - "```\n", - "``` \n", - "2\n", - "\n", - "```\n", - "````" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -395,23 +223,6 @@ "````" ] }, - { - "cell_type": "markdown", - "execution_count": 5, - "metadata": { - "tags": [ - "cor" - ] - }, - "source": [ - "````{admonition} Solution\n", - ":class: tip, dropdown\n", - "``` python\n", - "M = [[1, 0, 0, 0], [0, 0, 1, 1], [0, 1, 1, 1], [0, 1, 0, 1]]\n", - "```\n", - "````" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -428,28 +239,6 @@ "````" ] }, - { - "cell_type": "markdown", - "execution_count": 6, - "metadata": { - "tags": [ - "cor" - ] - }, - "source": [ - "````{admonition} Solution\n", - ":class: tip, dropdown\n", - "``` python\n", - "def est_carre(M, x, y, k):\n", - " for i in range(x, x + k):\n", - " for j in range(y, y + k):\n", - " if M[i][j] != 1:\n", - " return False\n", - " return True\n", - "```\n", - "````" - ] - }, { "cell_type": "code", "execution_count": 11, @@ -468,29 +257,6 @@ "````" ] }, - { - "cell_type": "markdown", - "execution_count": 9, - "metadata": { - "tags": [ - "cor" - ] - }, - "source": [ - "````{admonition} Solution\n", - ":class: tip, dropdown\n", - "``` python\n", - "def contient_carre(M, k):\n", - " n = len(M)\n", - " for i in range(n - k + 1):\n", - " for j in range(n - k + 1):\n", - " if est_carre(M, i, j, k):\n", - " return True\n", - " return False\n", - "```\n", - "````" - ] - }, { "cell_type": "code", "execution_count": 12, @@ -509,28 +275,6 @@ "````" ] }, - { - "cell_type": "markdown", - "execution_count": 13, - "metadata": { - "tags": [ - "cor" - ] - }, - "source": [ - "````{admonition} Solution\n", - ":class: tip, dropdown\n", - "``` python\n", - "def max_carre1(M):\n", - " n = len(M)\n", - " for k in range(n, 0, -1):\n", - " if contient_carre(M, k):\n", - " return k\n", - " return 0\n", - "```\n", - "````" - ] - }, { "cell_type": "code", "execution_count": 14, @@ -560,22 +304,6 @@ "````" ] }, - { - "cell_type": "markdown", - "metadata": { - "tags": [ - "cor" - ] - }, - "source": [ - "````{admonition} Solution\n", - ":class: tip, dropdown\n", - "- `est_carre(M, x, y, k)` est en $O(k^2)$. \n", - "- `contient_carre(M, k)` appelle O($n$) fois `est_carre`, donc est en $O(n^2 k^2)$. \n", - "- `max_carre1(M)` appelle `contient_carre` pour $k = 1, 2, ..., n$, donc est de complexité $\\sum_{k=1}^n O(n^2 k^2) = O(n^3 \\sum_{k=1}^n k^2)$. Comme $\\sum_{k=1}^n k^2 = \\frac{n(n+1)(2n+1)}{6} = O(n^3)$, la complexité totale est $\\boxed{O(n^6)}$.`\n", - "````" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -593,22 +321,6 @@ "````" ] }, - { - "cell_type": "markdown", - "metadata": { - "tags": [ - "cor" - ] - }, - "source": [ - "````{admonition} Solution\n", - ":class: tip, dropdown\n", - "`c[0][y] = 0` si `m[0][y] = 0` et `c[0][y] = 1` sinon. \n", - "De même pour `c[x][0]`. \n", - "Remarque : `c[0][y]` et `c[x][0]` sont donc les mêmes valeurs que `m[0][y]` et `m[x][0]`, on peut donc initialiser `c` comme une copie de `m`.\n", - "````" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -618,20 +330,6 @@ "````" ] }, - { - "cell_type": "markdown", - "metadata": { - "tags": [ - "cor" - ] - }, - "source": [ - "````{admonition} Solution\n", - ":class: tip, dropdown\n", - "`c[x][y] = 0`.\n", - "````" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -650,29 +348,6 @@ "````" ] }, - { - "cell_type": "markdown", - "execution_count": 15, - "metadata": { - "tags": [ - "cor" - ] - }, - "source": [ - "````{admonition} Solution\n", - ":class: tip, dropdown\n", - "``` python\n", - "def max_carre2(m):\n", - " c = m.copy()\n", - " for i in range(len(m)):\n", - " for j in range(len(m[0])):\n", - " if m[i][j] == 1:\n", - " c[i][j] = 1 + min(c[i - 1][j], c[i][j - 1], c[i - 1][j - 1])\n", - " return max(max(l) for l in c)\n", - "```\n", - "````" - ] - }, { "cell_type": "code", "execution_count": 16, @@ -702,21 +377,6 @@ "````" ] }, - { - "cell_type": "markdown", - "metadata": { - "tags": [ - "cor" - ] - }, - "source": [ - "````{admonition} Solution\n", - ":class: tip, dropdown\n", - "`max_carre2(m)` est en $\\boxed{O(n^2)}$ à cause des deux boucles `for` imbriquées. \n", - "C'est donc beaucoup mieux que `max_carre1(m)` qui est en $O(n^6)$.\n", - "````" - ] - }, { "cell_type": "markdown", "metadata": {}, diff --git a/dl/algo/prog_dyn/tp/tp1/tp_prog_dyn.html b/dl/algo/prog_dyn/tp/tp1/tp_prog_dyn.html index 2f34c260..ce2c629b 100644 --- a/dl/algo/prog_dyn/tp/tp1/tp_prog_dyn.html +++ b/dl/algo/prog_dyn/tp/tp1/tp_prog_dyn.html @@ -602,28 +602,10 @@

Coefficient binomialQuestion

Que peut-on prendre comme cas de base ?

-

Question

Écrire une fonction récursive binom_rec(n, k) renvoyant \(\binom{n}{k}\) à partir de la formule ci-dessus. Expliquer pourquoi la complexité de cette fonction est très mauvaise.

-
-
-

Question

En déduire une fonction rendu(L, n) par programmation dynamique renvoyant le nombre minimum de pièces requises pour rendre n euros, où L est la liste des pièces.
On remplira une matrice M pour que M[i][j] contienne le nombre minimum de pièces pour rendre i euros en utilisant les j premières pièces de L.

-
-
-
-
-

On va construire une matrice c telle que c[x][y] est la taille maximum d’un carré de 1 dans m dont la case en bas à droite est m[x][y] (c’est à dire un carré de 1 qui contient m[x][y] mais aucun m[i][j] si \(i > x\) ou \(j > y\)).
Par exemple, c[1][2] = 1 et c[2][3] = 2 pour la matrice \(M\) ci-dessus.

Question

Que vaut c[0][y] et c[x][0] ?

-

Question

Que vaut c[x][y] si m[x][y] = 0 ?

-
-
-

Pour ceux qui ont fini#

diff --git a/searchindex.js b/searchindex.js index e842ada8..2b695d85 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["0_python/aide_memoire","0_python/entrainement","dl/algo/prog_dyn/cours/prog_dyn","dl/algo/prog_dyn/seam_carving/seam_carving","dl/algo/prog_dyn/tp/tp1/tp_prog_dyn","dl/algo/prog_dyn/tp/tp2/tp_sac_dos","dl/menu/0","dl/menu/1","dl/menu/2","dl/menu/3","dl/python/dict/tp/tp_dict","dl/python/revision/revisions","dl/slides/dict","dl/slides/lis","dl/slides/sp","dl/td/dict_polynome","dl/td/matrice_prog_dyn","intro","menu/0","menu/1","ressource","slides/dict"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":5,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.intersphinx":1,sphinx:56},filenames:["0_python/aide_memoire.ipynb","0_python/entrainement.md","dl/algo/prog_dyn/cours/prog_dyn.ipynb","dl/algo/prog_dyn/seam_carving/seam_carving.ipynb","dl/algo/prog_dyn/tp/tp1/tp_prog_dyn.ipynb","dl/algo/prog_dyn/tp/tp2/tp_sac_dos.ipynb","dl/menu/0.md","dl/menu/1.md","dl/menu/2.md","dl/menu/3.md","dl/python/dict/tp/tp_dict.ipynb","dl/python/revision/revisions.ipynb","dl/slides/dict.md","dl/slides/lis.md","dl/slides/sp.md","dl/td/dict_polynome.md","dl/td/matrice_prog_dyn.md","intro.md","menu/0.md","menu/1.md","ressource.md","slides/dict.md"],objects:{},objnames:{},objtypes:{},terms:{"0":[2,3,4,5,10,11,17],"1":[2,3,5,10,11,17],"10":[2,3,5,11,17],"100":5,"1000":5,"11":[2,11],"12":[2,11],"13":[2,17],"14":[2,11],"15":11,"18":[2,11],"19":2,"1\u00e8re":17,"1er":[5,11],"2":[2,3,4,10,11],"20":4,"200":3,"2023":17,"2024":17,"22":11,"230":3,"231":3,"2787204":11,"28627452":3,"2h":17,"2n":4,"3":[2,4,5,10,11],"3h":17,"3u_n":11,"4":[2,4,5,10,11],"42":[5,11],"484":3,"4845":4,"5":[2,4,5,11],"514":3,"54":11,"6":[2,4,5,11],"696":3,"697":3,"698":3,"699":3,"7":[2,4,5,10,11,17],"700":3,"701":3,"702":3,"705":3,"714":3,"8":[2,5,11,17],"895558157":11,"9":[10,11],"\u00e0":[2,3,4,10,11,17],"\u00e9chap":11,"\u00e9crire":[3,4,5,10,11],"\u00e9crit":17,"\u00e9crite":10,"\u00e9critur":10,"\u00e9dition":11,"\u00e9l\u00e9ment":[5,11],"\u00e9preuv":17,"\u00e9t\u00e9":[3,11],"\u00e9tant":[3,4],"\u00e9tape":[5,11],"\u00e9tiquet\u00e9":10,"\u00e9tiquett":10,"\u00e9ventuel":11,"\u00e9vite":3,"\u00eatre":10,"al\u00e9atoir":5,"ann\u00e9":20,"ao\u00fbt":10,"appel\u00e9":10,"ar\u00eat":[10,11],"associ\u00e9":4,"autoris\u00e9":2,"bool\u00e9en":11,"capacit\u00e9":[2,5],"caract\u00e8r":10,"case":[4,5],"cha\u00een":10,"cl\u00e9":[10,17],"class":[3,11],"commen\u00e7on":3,"compl\u00e9ter":[3,10,11],"compl\u00e9tion":10,"complexit\u00e9":[4,10],"conna\u00eetr":[4,17],"consid\u00e8r":[3,4,10],"consid\u00e9r":5,"consid\u00e9ron":11,"coordonn\u00e9":4,"corrig\u00e9":17,"cr\u00e9er":[3,10,11],"d\u00e9but":11,"d\u00e9cembr":10,"d\u00e9clench":11,"d\u00e9croissant":5,"d\u00e9duir":[4,5,11],"d\u00e9duit":11,"d\u00e9fini":[3,11],"d\u00e9finir":[3,4,10,11],"d\u00e9finit":3,"d\u00e9form\u00e9":3,"d\u00e9j\u00e0":10,"d\u00e9passent":4,"d\u00e9passer":3,"d\u00e9termin":[4,11],"degr\u00e9":11,"demand\u00e9":4,"derni\u00e8r":[3,17],"diff\u00e9rent":[5,10],"do":2,"donn\u00e9":[3,4,5,11],"dur\u00e9":17,"encadr\u00e9":11,"enl\u00e8v":3,"enl\u00e8veron":3,"entr\u00e9":[5,11],"entra\u00een":[17,20],"etiquet\u00e9":10,"ex\u00e9cut":[5,11],"exc\u00e8d":5,"f\u00e9vrier":10,"fa\u00e7on":[3,4,11],"final":3,"float":[2,3,4,11],"forc\u00e9ment":11,"fran\u00e7ai":10,"fus\u00e9":11,"g\u00e9n\u00e8re":5,"g\u00e9n\u00e9r\u00e9e":5,"g\u00e9n\u00e9ral":4,"i\u00e8m":[2,3],"imbriqu\u00e9":4,"import":[2,3,4,5,11],"int":4,"int\u00e9ress":5,"intensit\u00e9":3,"long":10,"m\u00e9mo\u00efsat":[4,17],"m\u00e9thode":[3,11],"m\u00eame":[3,4,5,10],"mod\u00e9lis":17,"n\u00e9cessair":11,"num\u00e9ro":3,"o\u00f9":[2,3,4,5,10,11],"p\u00e8re":10,"pi\u00e8c":4,"pic\u00e8":4,"plut\u00f4t":4,"pointill\u00e9":4,"poss\u00e8d":[4,10],"possibilit\u00e9":[4,11],"pr\u00e9alabl":4,"pr\u00e9c\u00e9dent":[3,4,10,11],"premi\u00e8r":[3,4,20],"probl\u00e8m":[4,11],"propri\u00e9t\u00e9":10,"r\u00e9\u00e9crire":[4,5],"r\u00e9alis":3,"r\u00e9currenc":[4,5],"r\u00e9cursiv":[4,10,11,17],"r\u00e9gion":3,"r\u00e9soudr":4,"r\u00e9sultat":5,"r\u00e9sum\u00e9":20,"r\u00e9utilis":[5,11],"recherch\u00e9":10,"redimensionn\u00e9":3,"rentr\u00e9":17,"renvoy\u00e9":3,"repr\u00e9sent":[3,10],"repr\u00e9sent\u00e9":[3,10],"return":[2,3,4,5,10,11],"rh\u00f4ne":3,"sup\u00e9lec":17,"suppl\u00e9mentair":10,"sym\u00e9triqu":11,"t\u00e9l\u00e9chargeant":3,"t\u00e9l\u00e9charger":4,"t\u00e9l\u00e9phone":10,"tr\u00e8":4,"transpos\u00e9":11,"tri\u00e9":5,"tri\u00e9e":[5,11],"trouv\u00e9":11,"true":[4,5,10,11],"utilis\u00e9":[4,10],"v\u00e9rifi":11,"v\u00e9rifier":[3,10,11],"visit\u00e9":11,"while":[5,11],A:11,In:2,On:[3,4,5,10,11],_:[4,5,11],a_1:4,a_2:4,a_3:4,a_k:4,ab:3,abord:5,absolu:3,actuel:5,acycliqu:10,affich:[3,5,10,11],affichag:3,ainsi:[3,4,17],air:5,ajout:[3,4,5,10,11,17],algorithmiqu:1,all:11,alor:[3,4,5],alp:3,anglai:10,apparaiss:10,apparten:10,apparti:[10,11],appel:[4,10,11],append:[3,5,11],appendleft:11,approx:17,april:10,aret:10,argument:[4,11],arrai:3,art:10,assert:[4,11],associ:10,atteindr:3,attent:3,au:[3,4,5,10,11],aucun:4,august:10,aussi:10,automatiqu:10,autr:[3,17],auvergn:3,aux:[2,4,10,11,17],auxiliair:10,avec:[3,4,5,10,11,17],avez:[3,4],avoir:10,avril:10,ax:10,ayant:10,b:[5,10,11],ba:[3,4,11],base:4,basthon:[3,11],bcpst:20,beaucoup:4,becirspah:20,begin:2,besoin:11,bf:11,bien:3,binom:4,binom_dp:4,binom_memo:4,binom_rec:4,blanc:3,bord:3,boucl:[4,10,11,17],box:[4,11],c:[2,3,4,5,10,11],ca:[4,5,10],cach:2,calcul:[4,11],call:2,cap:10,capytal:3,car:[4,10],cart:10,cat:10,caus:4,ccinp:17,cd:10,ce:[3,4,5,10,11],cela:[3,4,5,10,11],cell:[2,4],cellul:11,central:17,cet:5,cett:[3,4,10,11],ceux:10,chaqu:[3,5,10,11],chargeant:3,charger:3,chemin:10,cherch:11,chercher:3,choisir:5,choisiss:5,choisit:5,choix:[3,11],ci:[3,4,5,10,11],classiqu:[3,11],cliquant:11,cliquer:3,cmap:3,code:[3,10,11],coeffici:17,collect:11,colonn:[3,4],combin:5,comm:[3,4,11],command:11,commenc:[3,11],commis:5,compar:[4,5,11],compt:[3,10],comptant:10,concour:17,confirm:17,connect:3,connex:[10,11],conserv:[4,10],consist:[3,5,11],construir:[4,5],construit:3,conten:[3,10,11],contenir:10,contenu:4,contiendra:4,contienn:[4,10],contient:[3,4,5,10],contient_carr:4,convers:3,copi:[2,4,10],copier:10,cor:10,cord:10,corn:10,correct:10,correspond:[3,4,10],couleur:3,count:10,coupl:5,cour:[4,5,10,11,20],courant:10,croissant:[4,5,11],ctrl:11,cycl:10,d1:10,d2:10,d:[1,2,4,5,10],d_:3,dan:[2,3,5,10,11],de:[1,2,10,20],decemb:10,deepcopi:2,def:[2,3,4,5,10,11],defin:2,deg:11,depui:[3,11],dequ:11,dernier:11,descendr:10,dessin:10,dessou:[5,10,11],dessu:[3,4,10,11],deux:[4,5,10,11],df:11,dict:10,dictionnair:[4,17],dimanch:10,dimens:[3,4],dire:[3,4,10,11],direct:10,dist:[2,11],distanc:11,distingu:[4,5],dit:10,divis:11,doit:10,donc:[3,4,5,11],donner:5,dont:4,dorer:10,dp:[2,5],dp_:2,dp_chemin:3,droit:[4,11],ds:17,du:[3,4,10,11],dynamiqu:17,e:[10,11],effectu:3,efficac:5,elif:11,ell:5,els:[2,4,5,10,11],en:[3,4,5,10],encor:[4,11],end:2,enlever_chemin:3,ensembl:10,ent:3,entier:[4,5],entr:[3,5,10,11],enver:3,erreur:[5,11],est:[2,3,4,5,10,11],est_carr:4,et:[2,3,4,5,10,11,17],euro:4,exempl:[3,4,5,10,11],exercic:[1,17,20],exist:10,expliqu:4,exprim:5,extrair:11,f:[4,5,10],facil:[1,3],fair:4,fals:[4,10,11],faut:[3,4,11],februari:10,feuill:10,fichier:[3,4],fil:10,file:11,fin:10,flottant:3,floydwarshal:2,foi:[3,4,5,11],fonction:[3,4,5,10,11,17],form:[10,11],formul:[3,4,5],fort:3,fr_to_en:10,frac:4,fridai:10,from:[2,11],functool:2,g:[2,3,11],g_:3,g_list:11,gauch:[3,4,11],genere_inst:5,geq:[4,5],glouton_poid:5,glouton_ratio:5,glouton_valeur:5,gp:5,gr:5,grai:3,grand:3,graph:10,gri:3,gro:4,gv:5,haut:[3,4,10,11],hauteur:3,hor:11,http:4,i:[2,3,4,5,10,11],ici:[3,11],identifi:3,il:[3,4,5,10,11],importera:5,imposs:4,imread:3,imshow:3,inclu:5,indic:[4,10,11],inf:[2,4,11],infti:[2,4],initialis:4,inscrir:4,inscriv:4,instanc:5,instruct:3,intuitiv:3,invers:3,j:[2,3,4,5,11],januari:10,janvier:10,jeu:11,jeudi:10,jour:10,juillet:10,juin:10,juli:10,june:10,jusqu:3,just:10,k:[2,4,10],knapsack2:2,knapsack:2,knapsack_memo2:2,knapsack_memo:2,l1:[5,11],l2:[5,11],l3:11,l:[2,4,5,10,11],la:[2,3,4,10,11],lamartin:10,lambda:4,largeur:3,last:2,ldot:4,le:[2,3,4,5,10,11,17],len:[2,3,4,5,10,11],leq:5,lequel:5,lesquel:11,lettr:10,leur:10,lexicographiqu:5,lieu:11,lign:[3,4],line:2,linewidth:3,list:[3,4,10],longueur:[5,10],lor:11,lundi:10,m1:10,m2:[3,10],m:[2,3,4,10,11,20],m_:3,ma:3,mai:[4,10],mainten:[3,11],majoritaire2:10,make_matrix2:11,make_matrix3:11,make_matrix:11,map:4,mar:10,march:10,mardi:10,marquer:11,mat_to_list:11,math:17,mathbf:11,matplotlib:3,matric:[3,5,17],matrice_gradi:3,mauvais:4,max:[2,4,5],max_carre1:4,max_carre2:4,maximum:[2,4,5],meilleur:10,mercredi:10,mettr:[2,5,11],mieux:4,milieu:11,min:[2,3,4],min_chemin:3,min_energie_ba:3,mine:17,mini:3,minim:3,minimal:3,minimum:4,mode:11,modif:17,modifi:[3,17],moi:10,moin:[4,11],mondai:10,montrer:4,most:2,mot:10,moyen:1,moyenn:5,mp:17,mt:11,n1:10,n:[2,3,4,5,10,11],n_1:10,n_2:10,n_aret:11,name:2,nameerror:2,ne:[3,4,5,10,11],neq:4,net:4,niveau:3,noeud:10,noir:3,nombr:[2,3,4,10,11],non:[3,4,11],none:10,nou:3,nouvel:[10,11],novemb:10,novembr:10,np:3,numpi:3,o:[4,10],o_j:5,objectif:[3,5],objet:2,obtenu:[3,5,10],obtient:5,occur:10,octob:10,octobr:10,officiel:[17,20],ok:10,ont:5,optim:5,optimal:5,option:17,ordr:[5,10,11],oreo:10,orthographiqu:10,ou:[3,4],oui:4,ouvrir:3,p067_triangl:4,p:[3,10,11],pa:[3,4,5,10,11],par:[4,5,10],parcour:[3,10],parcourir:[10,11,17],parcourt:10,parcouru:10,parmi:4,parti:[4,11],particuli:10,partir:[3,4,5],pascal:4,pass:3,passer:[3,11],pc:17,permett:11,peu:3,peut:[2,3,4,5,10,11],pire:4,pixel:3,place:3,plan:17,plot:3,plt:3,plu:[3,5,10,11],plusieur:[4,11],pmatrix:2,png:3,poid:[2,5],pont:17,pop:11,posera:4,posit:3,positif:5,possibl:3,pour:[2,3,5,10,11,20],pourquoi:4,pourra:[3,4,5,10,11],pouvez:[3,11],premier:5,prenant:5,prend:3,prendr:[4,5],princip:[4,17],print:[3,5,10,11],priori:3,prog_dyn:5,programm:[11,17,20],project:4,projecteul:4,propos:11,proposit:10,psi:17,pui:[3,5,11],pyplot:3,python:[4,20],pyzo:11,q:11,qcm:17,qu:[4,5,10,11],que:[2,3,4,5,10,11,17],quelconqu:10,quell:[4,5,10],qui:[3,5,10,11],r:[2,3,4,10],racin:10,randint:5,random:5,rang:[2,3,4,5,10,11],rapid:[3,11],rappel:[5,10,11],rapport:5,ratio:5,readlin:4,recent:2,recherch:11,reconstruct:5,refais:17,regard:[4,5,11],relat:4,relativ:3,remarqu:[3,4,5,10],remont:[3,5],rempli:[4,11],remplir:[4,11],remplira:4,rempliss:5,rendr:4,rendu_memo:4,renvoi:[2,3,4,5,11],renvoy:[4,10,11],request:4,requis:4,resourc:4,rest:11,restant:5,restreint:11,revers:5,revient:4,revoir:11,roug:3,s:[4,5,10,11,17,20],sa:10,sac:2,sait:4,samedi:10,san:[5,10],saturdai:10,sauf:[3,4],savoir:[11,17],se:[3,11],seam_carv:3,seam_carving_im:3,second:5,semain:10,septemb:10,septembr:10,sera:3,sert:10,set:10,seulement:3,shape:3,shift:11,show:3,si:[3,4,5,10,11],simplifi:10,sinon:[4,11],site:17,soit:[3,4,5,11],sol:5,sombr:3,somm:[3,4],sommet:[10,11],son:[5,10,11],sont:[4,5,10,11],sort:5,sortant:10,sorti:5,sortir:11,sou:[4,10,11],souhait:[3,4,11],souvent:10,split:[4,5],sql:1,sqrt:11,stocker:[4,10],strictement:5,substack:5,suit:[3,11],suivant:[3,4,5,10,11],sum_:4,sundai:10,suppos:5,supposera:4,supposon:5,supprim:[3,11],sur:[3,4,5,10,11],symetriqu:11,t1:5,t2:5,t:[5,10],tableau:3,tableaux:4,taill:[3,4,5,10,11],tant:11,techniqu:3,tel:[3,4],tell:[3,4,5,11],temp:[3,4,5],test:[10,11],tester:[3,5,10,11],text:[4,5],textbf:11,thursdai:10,time:[3,4,5,11],total:[4,5],tou:11,toujour:5,tout:3,tower:3,traceback:2,traduct:10,transpose:11,tri:10,tri_poid:5,tri_ratio:5,tri_valeur:5,triangl:4,triant:5,trie:5,trie_add:10,trie_ex:10,trie_ha:10,trie_print:10,trie_siz:10,trier:5,triplet:5,trop:3,trouver:[3,11],tuesdai:10,txt:4,u:[2,11],u_0:11,u_:11,u_n:11,un:[2,5,10,11,17],underbrac:5,underlin:11,uniform:3,uniqu:11,urllib:4,urlopen:4,utilis:[3,4,5,10,11],utilisera:10,v2:5,v:[2,5,10,11],v_1:5,v_j:5,v_n:5,va:[4,10,11],valabl:[3,11],valeur:[2,3,4,5,10],variabl:[3,11],variat:3,vaut:[4,5],vendredi:10,venon:3,vertic:3,verticaux:3,veut:[3,4],vide:[10,11],visit:11,vo:3,voir:4,voisin:11,votr:[3,11],vou:[3,4,11],vraiment:11,vu:5,w2:5,w:[2,5],w_1:5,w_j:5,w_n:5,wednesdai:10,x:[2,4,10,11,17],y:[3,4,10],zero:3,zeros_lik:3,zone:11},titles:["R\u00e9sum\u00e9 Python","S\u2019entra\u00eener \u00e0 programmer","Programmation dynamique","DM : Redimensionnement d\u2019image par Seam Carving","TP 1 : Programmation dynamique","TP 2 : Probl\u00e8me du sac \u00e0 dos","Cours","Exercices","Cours","Exercices","TP : Dictionnaire","TP : R\u00e9visions de 1\u00e8re ann\u00e9e","Cours : Dictionnaire","Exemple : Plus longue sous-suite croissante","Exemple : Algorithmes de plus court chemin","Exercice : Polyn\u00f4mes","Exercice : Chemin dans une matrice","Cours d\u2019informatique commune en 2\u00e8me ann\u00e9e de CPGE au lyc\u00e9e La Martini\u00e8re Monplaisir","Cours","TP","Ressources","Cours : Dictionnaire"],titleterms:{"1":4,"1\u00e8re":11,"2":5,"2\u00e8me":17,"\u00e0":[1,5],"\u00e9l\u00e9ment":10,"\u00e9nergi":3,"ann\u00e9":[11,17],"carr\u00e9":4,"do":5,"enracin\u00e9":10,"entra\u00een":1,"lyc\u00e9":17,"m\u00e9thode":4,"martini\u00e8r":17,"na\u00efv":4,"polyn\u00f4m":15,"pr\u00e9fix":10,"probl\u00e8m":5,"r\u00e9sum\u00e9":0,"r\u00e9vision":11,"repr\u00e9sent":11,"strat\u00e9gi":5,adjac:11,algorithm:[5,14],anagramm:10,arbr:10,au:17,base:11,bellman:2,binomi:4,bonu:3,calcul:3,carv:3,ceux:4,chargement:3,chemin:[2,3,14,16],choisi:5,coeffici:4,commun:17,comparaison:5,cour:[6,8,12,17,18,21],court:[2,14],cpge:17,croissant:13,d:[3,11,17],dan:[4,16],de:[3,4,5,11,14,17],dichotomi:11,dictionnair:[10,12,21],dm:3,du:[0,5],dynamiqu:[2,3,4,5],en:[11,17],enlev:3,exempl:[13,14],exercic:[7,9,10,11,15,16],extrait:0,fini:4,floyd:2,ford:2,glouton:5,gloutonn:5,gradient:3,grand:4,graph:11,imag:3,informatiqu:17,internationalis:10,l:3,la:[5,17],largeur:11,leetcod:1,list:[5,11],longu:13,majoritair:10,matric:[4,11,16],minimum:3,monnai:4,monplaisir:17,objet:5,obtenir:5,officiel:0,ont:4,par:[3,11],parcour:11,plu:[2,4,13,14],pour:4,profondeur:11,programm:[0,1,2,3,4,5],python:[0,11],question:[3,4,5,11],qui:4,redimensionn:3,rendu:4,ressourc:20,s:1,sac:5,seam:3,solut:[4,5,10,11],sou:13,suit:13,tp:[4,5,10,11,19],tri:5,trie:10,un:[3,4,16],warshal:2}}) \ No newline at end of file +Search.setIndex({docnames:["0_python/aide_memoire","0_python/entrainement","dl/algo/prog_dyn/cours/prog_dyn","dl/algo/prog_dyn/seam_carving/seam_carving","dl/algo/prog_dyn/tp/tp1/tp_prog_dyn","dl/algo/prog_dyn/tp/tp2/tp_sac_dos","dl/menu/0","dl/menu/1","dl/menu/2","dl/menu/3","dl/python/dict/tp/tp_dict","dl/python/revision/revisions","dl/slides/dict","dl/slides/lis","dl/slides/sp","dl/td/dict_polynome","dl/td/matrice_prog_dyn","intro","menu/0","menu/1","ressource","slides/dict"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":5,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.intersphinx":1,sphinx:56},filenames:["0_python/aide_memoire.ipynb","0_python/entrainement.md","dl/algo/prog_dyn/cours/prog_dyn.ipynb","dl/algo/prog_dyn/seam_carving/seam_carving.ipynb","dl/algo/prog_dyn/tp/tp1/tp_prog_dyn.ipynb","dl/algo/prog_dyn/tp/tp2/tp_sac_dos.ipynb","dl/menu/0.md","dl/menu/1.md","dl/menu/2.md","dl/menu/3.md","dl/python/dict/tp/tp_dict.ipynb","dl/python/revision/revisions.ipynb","dl/slides/dict.md","dl/slides/lis.md","dl/slides/sp.md","dl/td/dict_polynome.md","dl/td/matrice_prog_dyn.md","intro.md","menu/0.md","menu/1.md","ressource.md","slides/dict.md"],objects:{},objnames:{},objtypes:{},terms:{"0":[2,3,4,5,10,11,17],"1":[2,3,5,10,11,17],"10":[2,3,5,11,17],"100":5,"1000":5,"11":[2,11],"12":[2,11],"13":[2,17],"14":[2,11],"15":11,"18":[2,11],"19":2,"1\u00e8re":17,"1er":[5,11],"2":[2,3,4,10,11],"20":4,"200":3,"2023":17,"2024":17,"22":11,"230":3,"231":3,"2787204":11,"28627452":3,"2h":17,"3":[2,4,5,10,11],"3h":17,"3u_n":11,"4":[2,4,5,10,11],"42":[5,11],"484":3,"4845":4,"5":[2,4,5,11],"514":3,"54":11,"6":[2,5,11],"696":3,"697":3,"698":3,"699":3,"7":[2,4,5,10,11,17],"700":3,"701":3,"702":3,"705":3,"714":3,"8":[2,5,11,17],"895558157":11,"9":[10,11],"\u00e0":[2,3,4,10,11,17],"\u00e9chap":11,"\u00e9crire":[3,4,5,10,11],"\u00e9crit":17,"\u00e9crite":10,"\u00e9critur":10,"\u00e9dition":11,"\u00e9l\u00e9ment":[5,11],"\u00e9preuv":17,"\u00e9t\u00e9":[3,11],"\u00e9tant":[3,4],"\u00e9tape":[5,11],"\u00e9tiquet\u00e9":10,"\u00e9tiquett":10,"\u00e9ventuel":11,"\u00e9vite":3,"\u00eatre":10,"al\u00e9atoir":5,"ann\u00e9":20,"ao\u00fbt":10,"appel\u00e9":10,"ar\u00eat":[10,11],"associ\u00e9":4,"autoris\u00e9":2,"bool\u00e9en":11,"capacit\u00e9":[2,5],"caract\u00e8r":10,"case":[4,5],"cha\u00een":10,"cl\u00e9":[10,17],"class":[3,11],"commen\u00e7on":3,"compl\u00e9ter":[3,10,11],"compl\u00e9tion":10,"complexit\u00e9":[4,10],"conna\u00eetr":[4,17],"consid\u00e8r":[3,10],"consid\u00e9r":5,"consid\u00e9ron":11,"coordonn\u00e9":4,"corrig\u00e9":17,"cr\u00e9er":[3,10,11],"d\u00e9but":11,"d\u00e9cembr":10,"d\u00e9clench":11,"d\u00e9croissant":5,"d\u00e9duir":[4,5,11],"d\u00e9duit":11,"d\u00e9fini":[3,11],"d\u00e9finir":[3,4,10,11],"d\u00e9finit":3,"d\u00e9form\u00e9":3,"d\u00e9j\u00e0":10,"d\u00e9passent":4,"d\u00e9passer":3,"d\u00e9termin":[4,11],"degr\u00e9":11,"demand\u00e9":4,"derni\u00e8r":[3,17],"diff\u00e9rent":[5,10],"do":2,"donn\u00e9":[3,4,5,11],"dur\u00e9":17,"encadr\u00e9":11,"enl\u00e8v":3,"enl\u00e8veron":3,"entr\u00e9":[5,11],"entra\u00een":[17,20],"etiquet\u00e9":10,"ex\u00e9cut":[5,11],"exc\u00e8d":5,"f\u00e9vrier":10,"fa\u00e7on":[3,4,11],"final":3,"float":[2,3,4,11],"forc\u00e9ment":11,"fran\u00e7ai":10,"fus\u00e9":11,"g\u00e9n\u00e8re":5,"g\u00e9n\u00e9r\u00e9e":5,"g\u00e9n\u00e9ral":4,"i\u00e8m":[2,3],"import":[2,3,4,5,11],"int":4,"int\u00e9ress":5,"intensit\u00e9":3,"long":10,"m\u00e9mo\u00efsat":[4,17],"m\u00e9thode":[3,11],"m\u00eame":[3,4,5,10],"mod\u00e9lis":17,"n\u00e9cessair":11,"num\u00e9ro":3,"o\u00f9":[2,3,4,5,10,11],"p\u00e8re":10,"pi\u00e8c":4,"pic\u00e8":4,"plut\u00f4t":4,"pointill\u00e9":4,"poss\u00e8d":[4,10],"possibilit\u00e9":11,"pr\u00e9alabl":4,"pr\u00e9c\u00e9dent":[3,4,10,11],"premi\u00e8r":[3,4,20],"probl\u00e8m":[4,11],"propri\u00e9t\u00e9":10,"r\u00e9\u00e9crire":[4,5],"r\u00e9alis":3,"r\u00e9currenc":[4,5],"r\u00e9cursiv":[4,10,11,17],"r\u00e9gion":3,"r\u00e9soudr":4,"r\u00e9sultat":5,"r\u00e9sum\u00e9":20,"r\u00e9utilis":[5,11],"recherch\u00e9":10,"redimensionn\u00e9":3,"rentr\u00e9":17,"renvoy\u00e9":3,"repr\u00e9sent":[3,10],"repr\u00e9sent\u00e9":[3,10],"return":[2,3,4,5,10,11],"rh\u00f4ne":3,"sup\u00e9lec":17,"suppl\u00e9mentair":10,"sym\u00e9triqu":11,"t\u00e9l\u00e9chargeant":3,"t\u00e9l\u00e9charger":4,"t\u00e9l\u00e9phone":10,"tr\u00e8":4,"transpos\u00e9":11,"tri\u00e9":5,"tri\u00e9e":[5,11],"trouv\u00e9":11,"true":[4,5,10,11],"utilis\u00e9":[4,10],"v\u00e9rifi":11,"v\u00e9rifier":[3,10,11],"visit\u00e9":11,"while":[5,11],A:11,In:2,On:[3,4,5,10,11],_:[5,11],a_1:4,a_2:4,a_3:4,a_k:4,ab:3,abord:5,absolu:3,actuel:5,acycliqu:10,affich:[3,5,10,11],affichag:3,ainsi:[3,4,17],air:5,ajout:[3,4,5,10,11,17],algorithmiqu:1,all:11,alor:[3,4,5],alp:3,anglai:10,apparaiss:10,apparten:10,apparti:[10,11],appel:[10,11],append:[3,5,11],appendleft:11,approx:17,april:10,aret:10,argument:[4,11],arrai:3,art:10,assert:[4,11],associ:10,atteindr:3,attent:3,au:[3,4,5,10,11],aucun:4,august:10,aussi:10,automatiqu:10,autr:[3,17],auvergn:3,aux:[2,4,10,11,17],auxiliair:10,avec:[3,4,5,10,11,17],avez:[3,4],avoir:10,avril:10,ax:10,ayant:10,b:[5,10,11],ba:[3,4,11],base:4,basthon:[3,11],bcpst:20,becirspah:20,begin:2,besoin:11,bf:11,bien:3,binom:4,binom_dp:4,binom_memo:4,binom_rec:4,blanc:3,bord:3,boucl:[10,11,17],box:11,c:[2,3,4,5,10,11],ca:[4,5,10],cach:2,calcul:[4,11],call:2,cap:10,capytal:3,car:[4,10],cart:10,cat:10,ccinp:17,cd:10,ce:[3,4,5,10,11],cela:[3,4,5,10,11],cell:[2,4],cellul:11,central:17,cet:5,cett:[3,4,10,11],ceux:10,chaqu:[3,5,10,11],chargeant:3,charger:3,chemin:10,cherch:11,chercher:3,choisir:5,choisiss:5,choisit:5,choix:[3,11],ci:[3,4,5,10,11],classiqu:[3,11],cliquant:11,cliquer:3,cmap:3,code:[3,10,11],coeffici:17,collect:11,colonn:[3,4],combin:5,comm:[3,4,11],command:11,commenc:[3,11],commis:5,compar:[4,5,11],compt:[3,10],comptant:10,concour:17,confirm:17,connect:3,connex:[10,11],conserv:10,consist:[3,5,11],construir:[4,5],construit:3,conten:[3,10,11],contenir:10,contenu:4,contiendra:4,contienn:[4,10],contient:[3,4,5,10],contient_carr:4,convers:3,copi:[2,10],copier:10,cor:10,cord:10,corn:10,correct:10,correspond:[3,4,10],couleur:3,count:10,coupl:5,cour:[5,10,11,20],courant:10,croissant:[4,5,11],ctrl:11,cycl:10,d1:10,d2:10,d:[1,2,4,5,10],d_:3,dan:[2,3,5,10,11],de:[1,2,10,20],decemb:10,deepcopi:2,def:[2,3,4,5,10,11],defin:2,deg:11,depui:[3,11],dequ:11,dernier:11,descendr:10,dessin:10,dessou:[5,10,11],dessu:[3,4,10,11],deux:[4,5,10,11],df:11,dict:10,dictionnair:[4,17],dimanch:10,dimens:[3,4],dire:[3,4,10,11],direct:10,dist:[2,11],distanc:11,distingu:[4,5],dit:10,divis:11,doit:10,donc:[3,4,5,11],donner:5,dont:4,dorer:10,dp:[2,5],dp_:2,dp_chemin:3,droit:[4,11],ds:17,du:[3,4,10,11],dynamiqu:17,e:[10,11],effectu:3,efficac:5,elif:11,ell:5,els:[2,5,10,11],en:[3,4,5,10],encor:11,end:2,enlever_chemin:3,ensembl:10,ent:3,entier:[4,5],entr:[3,5,10,11],enver:3,erreur:[5,11],est:[2,3,4,5,10,11],est_carr:4,et:[2,3,4,5,10,11,17],euro:4,exempl:[3,4,5,10,11],exercic:[1,17,20],exist:10,expliqu:4,exprim:5,extrair:11,f:[4,5,10],facil:[1,3],fair:4,fals:[4,10,11],faut:[3,11],februari:10,feuill:10,fichier:[3,4],fil:10,file:11,fin:10,flottant:3,floydwarshal:2,foi:[3,4,5,11],fonction:[3,4,5,10,11,17],form:[10,11],formul:[3,4,5],fort:3,fr_to_en:10,fridai:10,from:[2,11],functool:2,g:[2,3,11],g_:3,g_list:11,gauch:[3,4,11],genere_inst:5,geq:5,glouton_poid:5,glouton_ratio:5,glouton_valeur:5,gp:5,gr:5,grai:3,grand:3,graph:10,gri:3,gro:4,gv:5,haut:[3,4,10,11],hauteur:3,hor:11,http:4,i:[2,3,4,5,10,11],ici:[3,11],identifi:3,il:[3,5,10,11],importera:5,imposs:4,imread:3,imshow:3,inclu:5,indic:[4,10,11],inf:[2,4,11],infti:[2,4],inscrir:4,inscriv:4,instanc:5,instruct:3,intuitiv:3,invers:3,j:[2,3,4,5,11],januari:10,janvier:10,jeu:11,jeudi:10,jour:10,juillet:10,juin:10,juli:10,june:10,jusqu:3,just:10,k:[2,4,10],knapsack2:2,knapsack:2,knapsack_memo2:2,knapsack_memo:2,l1:[5,11],l2:[5,11],l3:11,l:[2,4,5,10,11],la:[2,3,4,10,11],lamartin:10,lambda:4,largeur:3,last:2,ldot:4,le:[2,3,4,5,10,11,17],len:[2,3,5,10,11],leq:5,lequel:5,lesquel:11,lettr:10,leur:10,lexicographiqu:5,lieu:11,lign:[3,4],line:2,linewidth:3,list:[3,4,10],longueur:[5,10],lor:11,lundi:10,m1:10,m2:[3,10],m:[2,3,4,10,11,20],m_:3,ma:3,mai:[4,10],mainten:[3,11],majoritaire2:10,make_matrix2:11,make_matrix3:11,make_matrix:11,map:4,mar:10,march:10,mardi:10,marquer:11,mat_to_list:11,math:17,mathbf:11,matplotlib:3,matric:[3,5,17],matrice_gradi:3,mauvais:4,max:[2,5],max_carre1:4,max_carre2:4,maximum:[2,4,5],meilleur:10,mercredi:10,mettr:[2,5,11],milieu:11,min:[2,3,4],min_chemin:3,min_energie_ba:3,mine:17,mini:3,minim:3,minimal:3,minimum:4,mode:11,modif:17,modifi:[3,17],moi:10,moin:[4,11],mondai:10,montrer:4,most:2,mot:10,moyen:1,moyenn:5,mp:17,mt:11,n1:10,n:[2,3,4,5,10,11],n_1:10,n_2:10,n_aret:11,name:2,nameerror:2,ne:[3,4,5,10,11],neq:4,net:4,niveau:3,noeud:10,noir:3,nombr:[2,3,4,10,11],non:[3,4,11],none:10,nou:3,nouvel:[10,11],novemb:10,novembr:10,np:3,numpi:3,o:10,o_j:5,objectif:[3,5],objet:2,obtenu:[3,5,10],obtient:5,occur:10,octob:10,octobr:10,officiel:[17,20],ok:10,ont:5,optim:5,optimal:5,option:17,ordr:[5,10,11],oreo:10,orthographiqu:10,ou:[3,4],oui:4,ouvrir:3,p067_triangl:4,p:[3,10,11],pa:[3,4,5,10,11],par:[4,5,10],parcour:[3,10],parcourir:[10,11,17],parcourt:10,parcouru:10,parmi:4,parti:[4,11],particuli:10,partir:[3,4,5],pascal:4,pass:3,passer:[3,11],pc:17,permett:11,peu:3,peut:[2,3,4,5,10,11],pire:4,pixel:3,place:3,plan:17,plot:3,plt:3,plu:[3,5,10,11],plusieur:[4,11],pmatrix:2,png:3,poid:[2,5],pont:17,pop:11,posera:4,posit:3,positif:5,possibl:3,pour:[2,3,5,10,11,20],pourquoi:4,pourra:[3,4,5,10,11],pouvez:[3,11],premier:5,prenant:5,prend:3,prendr:[4,5],princip:[4,17],print:[3,5,10,11],priori:3,prog_dyn:5,programm:[11,17,20],project:4,projecteul:4,propos:11,proposit:10,psi:17,pui:[3,5,11],pyplot:3,python:[4,20],pyzo:11,q:11,qcm:17,qu:[4,5,10,11],que:[2,3,4,5,10,11,17],quelconqu:10,quell:[4,5,10],qui:[3,5,10,11],r:[2,3,4,10],racin:10,randint:5,random:5,rang:[2,3,4,5,10,11],rapid:[3,11],rappel:[5,10,11],rapport:5,ratio:5,readlin:4,recent:2,recherch:11,reconstruct:5,refais:17,regard:[4,5,11],relat:4,relativ:3,remarqu:[3,4,5,10],remont:[3,5],rempli:[4,11],remplir:[4,11],remplira:4,rempliss:5,rendr:4,renvoi:[2,3,4,5,11],renvoy:[4,10,11],request:4,requis:4,resourc:4,rest:11,restant:5,restreint:11,revers:5,revient:4,revoir:11,roug:3,s:[4,5,10,11,17,20],sa:10,sac:2,sait:4,samedi:10,san:[5,10],saturdai:10,sauf:[3,4],savoir:[11,17],se:[3,11],seam_carv:3,seam_carving_im:3,second:5,semain:10,septemb:10,septembr:10,sera:3,sert:10,set:10,seulement:3,shape:3,shift:11,show:3,si:[3,4,5,10,11],simplifi:10,sinon:[4,11],site:17,soit:[3,4,5,11],sol:5,sombr:3,somm:[3,4],sommet:[10,11],son:[5,10,11],sont:[5,10,11],sort:5,sortant:10,sorti:5,sortir:11,sou:[4,10,11],souhait:[3,4,11],souvent:10,split:[4,5],sql:1,sqrt:11,stocker:[4,10],strictement:5,substack:5,suit:[3,11],suivant:[3,4,5,10,11],sundai:10,suppos:5,supposera:4,supposon:5,supprim:[3,11],sur:[3,4,5,10,11],symetriqu:11,t1:5,t2:5,t:[5,10],tableau:3,tableaux:4,taill:[3,4,5,10,11],tant:11,techniqu:3,tel:[3,4],tell:[3,4,5,11],temp:[3,4,5],test:[10,11],tester:[3,5,10,11],text:5,textbf:11,thursdai:10,time:[3,4,5,11],total:5,tou:11,toujour:5,tout:3,tower:3,traceback:2,traduct:10,transpose:11,tri:10,tri_poid:5,tri_ratio:5,tri_valeur:5,triangl:4,triant:5,trie:5,trie_add:10,trie_ex:10,trie_ha:10,trie_print:10,trie_siz:10,trier:5,triplet:5,trop:3,trouver:[3,11],tuesdai:10,txt:4,u:[2,11],u_0:11,u_:11,u_n:11,un:[2,5,10,11,17],underbrac:5,underlin:11,uniform:3,uniqu:11,urllib:4,urlopen:4,utilis:[3,4,5,10,11],utilisera:10,v2:5,v:[2,5,10,11],v_1:5,v_j:5,v_n:5,va:[4,10,11],valabl:[3,11],valeur:[2,3,4,5,10],variabl:[3,11],variat:3,vaut:[4,5],vendredi:10,venon:3,vertic:3,verticaux:3,veut:[3,4],vide:[10,11],visit:11,vo:3,voisin:11,votr:[3,11],vou:[3,4,11],vraiment:11,vu:5,w2:5,w:[2,5],w_1:5,w_j:5,w_n:5,wednesdai:10,x:[2,4,10,11,17],y:[3,4,10],zero:3,zeros_lik:3,zone:11},titles:["R\u00e9sum\u00e9 Python","S\u2019entra\u00eener \u00e0 programmer","Programmation dynamique","DM : Redimensionnement d\u2019image par Seam Carving","TP 1 : Programmation dynamique","TP 2 : Probl\u00e8me du sac \u00e0 dos","Cours","Exercices","Cours","Exercices","TP : Dictionnaire","TP : R\u00e9visions de 1\u00e8re ann\u00e9e","Cours : Dictionnaire","Exemple : Plus longue sous-suite croissante","Exemple : Algorithmes de plus court chemin","Exercice : Polyn\u00f4mes","Exercice : Chemin dans une matrice","Cours d\u2019informatique commune en 2\u00e8me ann\u00e9e de CPGE au lyc\u00e9e La Martini\u00e8re Monplaisir","Cours","TP","Ressources","Cours : Dictionnaire"],titleterms:{"1":4,"1\u00e8re":11,"2":5,"2\u00e8me":17,"\u00e0":[1,5],"\u00e9l\u00e9ment":10,"\u00e9nergi":3,"ann\u00e9":[11,17],"carr\u00e9":4,"do":5,"enracin\u00e9":10,"entra\u00een":1,"lyc\u00e9":17,"m\u00e9thode":4,"martini\u00e8r":17,"na\u00efv":4,"polyn\u00f4m":15,"pr\u00e9fix":10,"probl\u00e8m":5,"r\u00e9sum\u00e9":0,"r\u00e9vision":11,"repr\u00e9sent":11,"strat\u00e9gi":5,adjac:11,algorithm:[5,14],anagramm:10,arbr:10,au:17,base:11,bellman:2,binomi:4,bonu:3,calcul:3,carv:3,ceux:4,chargement:3,chemin:[2,3,14,16],choisi:5,coeffici:4,commun:17,comparaison:5,cour:[6,8,12,17,18,21],court:[2,14],cpge:17,croissant:13,d:[3,11,17],dan:[4,16],de:[3,4,5,11,14,17],dichotomi:11,dictionnair:[10,12,21],dm:3,du:[0,5],dynamiqu:[2,3,4,5],en:[11,17],enlev:3,exempl:[13,14],exercic:[7,9,10,11,15,16],extrait:0,fini:4,floyd:2,ford:2,glouton:5,gloutonn:5,gradient:3,grand:4,graph:11,imag:3,informatiqu:17,internationalis:10,l:3,la:[5,17],largeur:11,leetcod:1,list:[5,11],longu:13,majoritair:10,matric:[4,11,16],minimum:3,monnai:4,monplaisir:17,objet:5,obtenir:5,officiel:0,ont:4,par:[3,11],parcour:11,plu:[2,4,13,14],pour:4,profondeur:11,programm:[0,1,2,3,4,5],python:[0,11],question:[3,4,5,11],qui:4,redimensionn:3,rendu:4,ressourc:20,s:1,sac:5,seam:3,solut:[5,10,11],sou:13,suit:13,tp:[4,5,10,11,19],tri:5,trie:10,un:[3,4,16],warshal:2}}) \ No newline at end of file