{"id":1619,"date":"2022-11-01T11:12:00","date_gmt":"2022-11-01T10:12:00","guid":{"rendered":"https:\/\/eva.louis-le-grand.net\/maths\/?p=1619"},"modified":"2023-11-01T22:40:00","modified_gmt":"2023-11-01T21:40:00","slug":"des-gateaux-irreversibles","status":"publish","type":"post","link":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/2022\/11\/01\/des-gateaux-irreversibles\/","title":{"rendered":"Des g\u00e2teaux irr\u00e9versibles"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Les pr\u00e9parations culinaires sont-elles r\u00e9versibles ? Peut-on d\u00e9faire un m\u00e9lange ? <em>d\u00e9cuire<\/em> un gateau ? De l&rsquo;irr\u00e9versibilit\u00e9 du monde et de la croissance de l&rsquo;entropie.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Prenons 100 M&amp;M&rsquo;S de 5 couleurs.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"628\" src=\"https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/11\/IMG_0665-1024x628.jpg\" alt=\"\" class=\"wp-image-1665\" srcset=\"https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/11\/IMG_0665-1024x628.jpg 1024w, https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/11\/IMG_0665-300x184.jpg 300w, https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/11\/IMG_0665-768x471.jpg 768w, https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/11\/IMG_0665-1536x941.jpg 1536w, https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/11\/IMG_0665-2048x1255.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Prenons un bol avec 100 M&amp;M&rsquo;S et m\u00e9langeons.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>VIEDO A INSERER ICI<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-video\"><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Surprenant n&rsquo;est-ce pas ?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Calculons combien de positions ordonn\u00e9es existe-t-il de 5 paquets de 20 M&amp;M&rsquo;S<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">C(20 parmis 100) = n! \/ (20 ! * 80!) = 10^20<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/ql-cache\/quicklatex.com-a37557b33602cb84deee90deb785f56a_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#92;&#102;&#114;&#97;&#99;&#123;&#123;&#49;&#48;&#48;&#33;&#125;&#125;&#123;&#123;&#50;&#48;&#33;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#56;&#48;&#33;&#125;&#125;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#123;&#56;&#48;&#33;&#125;&#125;&#123;&#123;&#50;&#48;&#33;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#54;&#48;&#33;&#125;&#125;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#123;&#54;&#48;&#33;&#125;&#125;&#123;&#123;&#50;&#48;&#33;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#52;&#48;&#33;&#125;&#125;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#123;&#52;&#48;&#33;&#125;&#125;&#123;&#123;&#50;&#48;&#33;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#50;&#48;&#33;&#125;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"23\" width=\"206\" style=\"vertical-align: -6px;\"\/><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Cela fait un nombre \u00e0 67 chiffres: 1094915415525119820987225688309818220883072063883928031640993360000<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Il serait d\u00e9j\u00e0 remarquable qu&rsquo;un ensemble d&rsquo;une seule couleur soit regroup\u00e9e. cela repr\u00e9sente alors une chance sur 107196674080761936594. En effet si on impose parmi les combinaisons possible qu&rsquo;une des 5 couleurs soit regroup\u00e9e \u00e0 n&rsquo;importe quelle des 100 positions du carr\u00e9 possible, il reste encore un grand nombre de combinaisons:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/ql-cache\/quicklatex.com-81cf2b5dc758e07a33f077b43b1faae7_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#48;&#48;&#125;&#123;&#53;&#125;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#48;&#48;&#33;&#125;&#123;&#50;&#48;&#33;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#56;&#48;&#33;&#125;&#32;&#61;&#32;&#49;&#48;&#55;&#49;&#57;&#54;&#54;&#55;&#52;&#48;&#56;&#48;&#55;&#54;&#49;&#57;&#51;&#54;&#53;&#57;&#52;&#48;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"23\" width=\"307\" style=\"vertical-align: -6px;\"\/><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Si l&rsquo;on teste 10 de ces positions par seconde, il faudrait &#8230;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/ql-cache\/quicklatex.com-c2be5f17457a5dacc6e27f8ac0a2ce9e_l3.png\" class=\"ql-img-inline-formula \" alt=\"&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#48;&#55;&#49;&#57;&#54;&#54;&#55;&#52;&#48;&#56;&#48;&#55;&#54;&#49;&#57;&#51;&#54;&#53;&#57;&#52;&#48;&#125;&#123;&#123;&#54;&#48;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#50;&#52;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#51;&#54;&#53;&#125;&#125;&#32;&#61;&#32;&#51;&#51;&#32;&#57;&#57;&#49;&#32;&#56;&#52;&#50;&#32;&#51;&#54;&#52;&#32;&#53;&#50;&#51;\" title=\"Rendered by QuickLaTeX.com\" height=\"22\" width=\"302\" style=\"vertical-align: -6px;\"\/><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">&#8230; plus de 30 000 milliards d&rsquo;ann\u00e9es, 2 000 fois l&rsquo;\u00e2ge de l&rsquo;univers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Boltzman a mod\u00e9lis\u00e9 l&rsquo;<em>entropie<\/em>, c&rsquo;est-\u00e0-dire une mesure du d\u00e9sordre, qui ne peut que augmenter dans l&rsquo;univers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Voici 100 M&amp;Ms. Toutes les secondes, 10 couples de M&amp;M&rsquo;S sont \u00e9chang\u00e9s. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Mod\u00e8le sans corr\u00e9lation<\/strong>: des paires de M&amp;Ms sont \u00e9chang\u00e9es. Le syst\u00e8me est irr\u00e9versible:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">(lancer le mod\u00e8le ci-dessous)<\/p>\n\n\n\n<div><button id=\"startButton0\">Commencer<\/button><br>\n<canvas id=\"myCanvas0\" width=\"400\" height=\"400\"><\/canvas>\n    <\/div>\n\n    <script>\n        const canvas0 = document.getElementById(\"myCanvas0\");\n        const ctx0 = canvas0.getContext(\"2d\");\n        const cellSize0 = 40;\n        const numRows0 = 10;\n        const numCols0 = 10;\n        const colors0 = [\"red\", \"green\", \"blue\", \"yellow\", \"brown\"];\n        let colorGrid0 = [];\n\nconst img = new Array();\nvar couleur=\"red\";\nfor (c=0;c<5;c++) {\n  img[colors0[c]] = new Array();\n  for (f=1;f<5;f++) {\n    img[colors0[c]][f] = new Image();\n    img[colors0[c]][f].src = \"https:\/\/eva.louis-le-grand.net\/maths\/mm\/\"+colors0[c]+f+\".jpg\";\n  }\n}\n        function initializeGrid0() {\n            for (let i = 0; i < numRows0; i++) {\n                for (let j = 0; j < numCols0; j++) {\n                    const columnIndex = (Math.floor(j \/ 2) % 5);\n                    colorGrid0.push(colors0[columnIndex]);\n                }\n            }\n        }\n\n        function drawGrid0() {\n            for (let i = 0; i < numRows0; i++) {\n                for (let j = 0; j < numCols0; j++) {\n                    const color = colorGrid0[i * numCols0 + j];\n                    ctx0.fillStyle = color;\n                    const x = j * cellSize0;\n                    const y = i * cellSize0;\n                    const radius = cellSize0 \/ 2;\n                    ctx0.beginPath();\n                    ctx0.arc(x + radius, y + radius, radius, 0, Math.PI * 2);\n                    ctx0.fill();\n                    \/\/\/\/ctx0.drawImage(img[color][1+Math.floor(Math.random()*4)], x, y, cellSize0, cellSize0);\n                    ctx0.drawImage(img[color][1+(i+j)%4], x, y, cellSize0, cellSize0);\n                }\n            }\n        }\n\n        function swapColors0() {\n            const index1 = Math.floor(Math.random() * numRows0 * numCols0);\n            let index2 = Math.floor(Math.random() * numRows0 * numCols0);\n\n            while (index1 === index2) {\n                index2 = Math.floor(Math.random() * numRows0 * numCols0);\n            }\n\n            const tempColor = colorGrid0[index1];\n            colorGrid0[index1] = colorGrid0[index2];\n            colorGrid0[index2] = tempColor;\n\n            drawGrid0();\n        }\n\n        document.getElementById(\"startButton0\").addEventListener(\"click\", () => {\n            setInterval(swapColors0, 100);\n        });\n\n        initializeGrid0();\n        drawGrid0();\n    <\/script>\n\n\n\n<p class=\"wp-block-paragraph\">En \u00e0 peine quelques secondes, tout semble bien m\u00e9lang\u00e9 irr\u00e9m\u00e9diablement. Il faudrait des millions d&rsquo;ann\u00e9es pour avoir la chance de retomber sur la situation de d\u00e9part ! Le d\u00e9sordre (c&rsquo;est-\u00e0-dire l&rsquo;entropie) a augment\u00e9.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Mod\u00e8le avec corr\u00e9lation<\/strong>: les paires de M&amp;M&rsquo;S sont \u00e9chang\u00e9es mais pas ind\u00e9pendamment. Le syst\u00e8me est irr\u00e9el:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">(lancer le mod\u00e8le ci dessous, et patienter un peu &#8230;)<\/p>\n\n\n\n<div><button id=\"startButton\">Commencer<\/button><br><canvas id=\"myCanvas\" width=\"400\" height=\"400\"><\/canvas>\n    <\/div>\n\n    <script>\n        const canvas = document.getElementById(\"myCanvas\");\n        const ctx = canvas.getContext(\"2d\");\n        const cellSize = 40;\n        const numRows = 10;\n        const numCols = 10;\n        const colors = [\"red\", \"green\", \"blue\", \"yellow\", \"brown\"];\n        let colorGrid = [];\n        let colorHistory = [];\n        let undoTimeout;\n        let swapInterval;\n\n        function initializeGrid() {\n            for (let i = 0; i < numRows; i++) {\n                for (let j = 0; j < numCols; j++) {\n                    const columnIndex = (Math.floor(j \/ 2) % 5);\n                    colorGrid.push(colors[columnIndex]);\n                }\n            }\n        }\n\n        function drawGrid() {\n            for (let i = 0; i < numRows; i++) {\n                for (let j = 0; j < numCols; j++) {\n                    const color = colorGrid[i * numCols + j];\n                    ctx.fillStyle = color;\n                    const x = j * cellSize;\n                    const y = i * cellSize;\n                    const radius = cellSize \/ 2;\n                    ctx.beginPath();\n                    ctx.arc(x + radius, y + radius, radius, 0, Math.PI * 2);\n                    ctx.fill();\n                    ctx.drawImage(img[color][1+(i+j)%4], x, y, cellSize, cellSize);\n                }\n            }\n        }\n\n        function swapColors() {\n            const index1 = Math.floor(Math.random() * numRows * numCols);\n            let index2 = Math.floor(Math.random() * numRows * numCols);\n\n            while (index1 === index2) {\n                index2 = Math.floor(Math.random() * numRows * numCols);\n            }\n\n            const tempColor = colorGrid[index1];\n            colorGrid[index1] = colorGrid[index2];\n            colorGrid[index2] = tempColor;\n\n            \/\/ Ajouter l'\u00e9change \u00e0 l'historique\n            colorHistory.push({ index1, index2, color1: tempColor, color2: colorGrid[index2] });\n\n            drawGrid();\n        }\n\n        function swapColorsReverse() {\n            if (colorHistory.length > 0) {\n                const lastSwap = colorHistory.pop();\nvar colorGridTEMP1 = colorGrid[lastSwap.index1];\nvar colorGridTEMP2 = colorGrid[lastSwap.index2];\n                colorGrid[lastSwap.index1] = colorGridTEMP2;\n                colorGrid[lastSwap.index2] = colorGridTEMP1;\n                drawGrid();\n            }\n        }\n\n        document.getElementById(\"startButton\").addEventListener(\"click\", () => {\n            clearInterval(swapInterval); \/\/ Arr\u00eater l'ancien intervalle si existant\n            initializeGrid();\n            drawGrid();\n            swapInterval = setInterval(swapColors, 100);\n            undoTimeout = setTimeout(() => {\n                clearInterval(swapInterval);\n                swapInterval = setInterval(swapColorsReverse, 100);\n            }, 15000);\n        });\n        initializeGrid();\n        drawGrid();\n    <\/script>\n\n\n\n<p class=\"wp-block-paragraph\">Cette fois, il n&rsquo;y a pas d&rsquo;information perdue. M\u00eame si au bout de quelques secondes tout semble aussi m\u00e9lang\u00e9, on se souvient quelles paires ont \u00e9t\u00e9 \u00e9chang\u00e9es successivement. Et au bout d&rsquo;une trentaine de secondes, on peut revenir \u00e0 une situation bien rang\u00e9e. Et cela doit surprendre.<\/p>\n\n\n\n<div style='border: 2px solid #88AA88; background: #DDFFDD; padding:8px;' ><img decoding=\"async\" src=\"https:\/\/eva.louis-le-grand.net\/maths\/wp-content\/uploads\/2023\/10\/qui.png\" alt=\"\" class=\"wp-image-1120\" width=30 \/> <b>Inspiration<\/b><br>Conf\u00e9rence de Laure Saint-Raymond, professeur de math\u00e9matique \u00e0 l&rsquo;IHES dans le cadre de &lsquo;<i>1 texte 1 math\u00e9maticien<\/i>&lsquo;:<br>\n<iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/6E307TZo6hQ?si=LHWmuoe2H9BHb2Z_&amp;start=3091\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Les pr\u00e9parations culinaires sont-elles r\u00e9versibles ? Peut-on d\u00e9faire un m\u00e9lange ? d\u00e9cuire un gateau ? De l&rsquo;irr\u00e9versibilit\u00e9 du monde et de la croissance de l&rsquo;entropie.<\/p>\n","protected":false},"author":1,"featured_media":1704,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1619","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-non-classe"],"_links":{"self":[{"href":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/wp-json\/wp\/v2\/posts\/1619","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/wp-json\/wp\/v2\/comments?post=1619"}],"version-history":[{"count":56,"href":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/wp-json\/wp\/v2\/posts\/1619\/revisions"}],"predecessor-version":[{"id":1716,"href":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/wp-json\/wp\/v2\/posts\/1619\/revisions\/1716"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/wp-json\/wp\/v2\/media\/1704"}],"wp:attachment":[{"href":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/wp-json\/wp\/v2\/media?parent=1619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/wp-json\/wp\/v2\/categories?post=1619"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eva.louis-le-grand.net\/maths\/index.php\/wp-json\/wp\/v2\/tags?post=1619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}