Þ ¤pathÙ8/home/runner/work/LSINC1113/LSINC1113/Lectures/number.jl¬cell_resultsÞ £Ù$a7985d16-500b-4024-aaa1-78e654b94be4Чrunning§runtimeÎ ”ç¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$a7985d16-500b-4024-aaa1-78e654b94be4¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|S°Ñ_·has_pluto_hook_features¤bodyÚÝ
Comment trouver l'inverse modulaire ?
Si on avait les coefficients $x$ et $y$ tels que $xa + yn = 1$ , l'inverse serait $x$ . Dans l'algorithme d'Euclide, on ne garde que le reste et on oublie le quotient . Il faudrait combiner les quotients des différentes opérations pour trouver $x$ .
°persist_js_stateÂÙ$eb311761-ace2-4632-9ebf-9c7c166659f7Чrunning§runtimeÎ í&¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$eb311761-ace2-4632-9ebf-9c7c166659f7¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|Nl
�·has_pluto_hook_features¤bodyÙ„
$$A' \equiv B^a \pmod{p} \qquad B' \equiv A^b \pmod{p}$$
°persist_js_stateÂÙ$d8a28762-8aab-49e9-b9ac-38901d34abffЧrunning§runtimeÎ C®¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$d8a28762-8aab-49e9-b9ac-38901d34abff¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NF�X·has_pluto_hook_features¤bodyÙF
Fast powering
°persist_js_stateÂÙ$a826d9d1-47db-4645-be6e-3ae0ed8d4e18Чrunning§runtimeÎ –c¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$a826d9d1-47db-4645-be6e-3ae0ed8d4e18¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NC¶�·has_pluto_hook_features¤bodyÚ.Est-ce que 2345 est divisible par 3 ou 9?
$$\begin{align}
2 \cdot 10^3 + 3 \cdot 10^2 + 4 \cdot 10 + 5 & \equiv \,\, ? \pmod{9}\\
2 \cdot 1^3 + 3 \cdot 1^2 + 4 \cdot 1 + 5 & \equiv \,\, ? \pmod{9}\\
2 + 3 + 4 + 5 & \equiv 14 \pmod{9}\\
\end{align}$$
Est-ce que 2345 est divisible par 11?
$$\begin{align}
2 \cdot (10)^3 + 3 \cdot 10^2 + 4 \cdot 10 + 5 & \equiv \,\, ? \pmod{11}\\
2 \cdot (-1)^3 + 3 \cdot (-1)^2 + 4 \cdot (-1) + 5 & \equiv \,\, ? \pmod{11}\\
-2 + 3 - 4 + 5 & \equiv 2 \pmod{11}\\
\end{align}$$
°persist_js_stateÂÙ$8f6ba1c4-a971-4dc4-ac5d-2f30790aecdeЧrunning§runtimeÎ *θdepends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$8f6ba1c4-a971-4dc4-ac5d-2f30790aecde¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NGº|·has_pluto_hook_features¤bodyÙ^
Fermat’s Little Theorem
°persist_js_stateÂÙ$a293bb0e-078d-4335-a446-3096a79c03bcЧrunning§runtimeÎ h¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$a293bb0e-078d-4335-a446-3096a79c03bc¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NHÒš·has_pluto_hook_features¤bodyÙH
Diffie-Hellman
°persist_js_stateÂÙ$38744170-9af6-44b5-a0be-46a83da3253eЧrunning§runtimeÎ àJ¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$38744170-9af6-44b5-a0be-46a83da3253e¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|T›#«·has_pluto_hook_features¤bodyÙ(fib_pow (generic function with 1 method)°persist_js_stateÂÙ$87fdefa1-3bbd-4b69-ad3a-72baca6e55eeЧrunning§runtimeÍ68¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$87fdefa1-3bbd-4b69-ad3a-72baca6e55ee¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|U©í�·has_pluto_hook_features¤body¡4°persist_js_stateÂÙ$77093b36-c232-4477-be49-845f1a631829Чrunning§runtimeÎ
¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$77093b36-c232-4477-be49-845f1a631829¹depends_on_disabled_cells¦queued¤logs‘ˆ¥group¦stdout¤lineÿ£msg’³ 0.000001 seconds
ªtext/plain¥level®LogLevel(-555)¢id´PlutoRunner_40f9f5d1§cell_idÙ$77093b36-c232-4477-be49-845f1a631829¦kwargs�¤fileÙP/home/runner/.julia/packages/Pluto/reLAF/src/runner/PlutoRunner/src/io/stdout.jl¦output†¤mimeªtext/plain¬rootassignee®@time pow_1000²last_run_timestampËAÚ¼|UÙ>%·has_pluto_hook_features¤body£248°persist_js_stateÂÙ$462fa407-d973-4e9e-8512-b7cd3bb98b7bЧrunning§runtimeÎ
Æý¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$462fa407-d973-4e9e-8512-b7cd3bb98b7b¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|T†~ ·has_pluto_hook_features¤bodyÙ(fib_seq (generic function with 1 method)°persist_js_stateÂÙ$ca8905ef-97a3-424c-bb2e-559f7151585bЧrunning§runtimeÎ u�¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$ca8905ef-97a3-424c-bb2e-559f7151585b¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NFT·has_pluto_hook_features¤bodyÚ3Ensemble de solutions: $(x + kb, y - ka)$ pour un $k \in \mathbb{Z}$ arbitraire. Prenons $k$ tel que $0 \le x + kb < b$ avec mod.
°persist_js_stateÂÙ$59817f59-429b-4f17-a46a-185571fd1e5aЧrunning§runtimeÎ #‘¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$59817f59-429b-4f17-a46a-185571fd1e5a¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NFÊ:·has_pluto_hook_features¤bodyÙV
Fast modular powering
°persist_js_stateÂÙ$ee43c389-55f4-4cf9-a8db-ce37d1b89db4Чrunning§runtimeÎ M9¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$ee43c389-55f4-4cf9-a8db-ce37d1b89db4¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NH¨¬·has_pluto_hook_features¤bodyÙ‚
Shanks's Babystep–Giantstep Algorithm
°persist_js_stateÂÙ$9b9fc5e6-1a41-43c5-ba43-2c93bc3ef66bЧrunning§runtimeÎ
âi¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$9b9fc5e6-1a41-43c5-ba43-2c93bc3ef66b¹depends_on_disabled_cells¦queued¤logs‘ˆ¥group¦stdout¤lineÿ£msg’Ù/ 0.000049 seconds (22 allocations: 1.586 KiB)
ªtext/plain¥level®LogLevel(-555)¢id´PlutoRunner_40f9f5d1§cell_idÙ$9b9fc5e6-1a41-43c5-ba43-2c93bc3ef66b¦kwargs�¤fileÙP/home/runner/.julia/packages/Pluto/reLAF/src/runner/PlutoRunner/src/io/stdout.jl¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|UuÙŒ·has_pluto_hook_features¤bodyÙU2.531162323732361242240155003520607291766356485802485278951929841991312781989138e4179°persist_js_stateÂÙ$cd481f6c-66f4-4ebf-9769-c3edc24f403bЧrunning§runtimeÎ ?b¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$cd481f6c-66f4-4ebf-9769-c3edc24f403b¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NBpÁ·has_pluto_hook_features¤bodyÙz
Algorithme d'Euclide : élaboration
°persist_js_stateÂÙ$9752afbb-96e6-4f96-92cb-09654cf46155Чrunning§runtimeÎ ¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$9752afbb-96e6-4f96-92cb-09654cf46155¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|S°§µ·has_pluto_hook_features¤bodyÚ
Est-ce que l'inverse modulaire existe toujours ?
Par le théorème de Bézout, il existe si et seulement si $\text{gcd}(a, n) \mid 1$ , c'est à dire que $\text{gcd}(a, n) = 1$ .
°persist_js_stateÂÙ$7bad8c6c-45c7-402f-ad59-6857e9268901Чrunning§runtimeÎL·ù¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$7bad8c6c-45c7-402f-ad59-6857e9268901¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|S:4·has_pluto_hook_features¤bodyÚ…
Comment prouver que l'égalité $ax + by = c$ implique que $\text{gcd}(a, b)$ divise $c$ ?
Soit $g = \text{gcd}(a, b)$ . Par définition, il existe $\alpha, \beta$ tels que $a = \alpha g$ et $b = \beta g$ . On a alors $c = ax + by = (\alpha x + \beta y) g$ ce qui implique que $c$ est un multiple de $g$ .
°persist_js_stateÂÙ$0c8ab02e-80b0-44d6-a4a8-c813aac38209Чrunning§runtimeÎ u¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$0c8ab02e-80b0-44d6-a4a8-c813aac38209¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeªfib_picker²last_run_timestampËAÚ¼|Uùd·has_pluto_hook_features¤bodyÚÖ10 °persist_js_stateÂÙ$059b0ada-2442-48e4-82dd-489cb97e5dccЧrunning§runtimeÍX¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$059b0ada-2442-48e4-82dd-489cb97e5dcc¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeÙ,application/vnd.pluto.reactdomelement+object¬rootassigneeÀ²last_run_timestampËAÚ¼|VB¿Ó·has_pluto_hook_features¤bodyƒ¨children’’Ú÷©text/html’Úö©text/htmlªattributes�¥styleÙWjustify-content: space-around; display: flex; flex-direction: row; align-items: center;£tag£div°persist_js_stateÂÙ$b319619e-8f8d-4650-8fb4-76e5ba953470Чrunning§runtimeÎ }�¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$b319619e-8f8d-4650-8fb4-76e5ba953470¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|ND�·has_pluto_hook_features¤bodyÚÍ$$xb + yr = g \quad \text{et} \quad r = a - qb \quad \Rightarrow \quad (x - yq)b + ya = g$$
Solution homogène $x = b$ , $y = -a$ → $ba - ab = 0$ . Donc si $(x, y)$ est solution, $(x + b, y - a)$ aussi.
°persist_js_stateÂÙ$7db2060b-d69e-42e7-ae81-fd37ee793876Чrunning§runtimeÎ N]¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$7db2060b-d69e-42e7-ae81-fd37ee793876¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NC‹Á·has_pluto_hook_features¤bodyÚZCorollaire
$$n \mid a \quad \text{et} \quad n \mid b \quad \Rightarrow \quad n \mid (ab)$$
À ne pas confondre avec
$$a \mid n \quad \text{et} \quad b \mid n \quad \Rightarrow \quad (ab/\text{gcd}(a,b)) \mid n$$
°persist_js_stateÂÙ$594829e2-585b-4d48-bb6e-b35d9543cfbeЧrunning§runtimeÎ /l¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$594829e2-585b-4d48-bb6e-b35d9543cfbe¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NGc€·has_pluto_hook_features¤bodyÙ`
Fast powering for matrices
°persist_js_stateÂÙ$6107d03d-1e45-4eb9-b8e2-51e4a72485e6Чrunning§runtimeÎ f�¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$6107d03d-1e45-4eb9-b8e2-51e4a72485e6¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NF¶R·has_pluto_hook_features¤bodyÙ\
Recursive implementation
°persist_js_stateÂÙ$e1b5733f-a7a8-458f-a345-b358b9a03fcfЧrunning§runtimeÎ bo¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$e1b5733f-a7a8-458f-a345-b358b9a03fcf¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NHfË·has_pluto_hook_features¤bodyÚ·On remarque que la matrice est de rang 1. Elle vaut
$$\begin{bmatrix}
1 & g^n & \cdots & g^{n^2-n}\\
g & g^{n+1} & \ddots & g^{n^2-n+1}\\
\vdots & \ddots & \ddots & \vdots\\
g^{n-1} & g^{2n-1} & \cdots & g^{n^2 - 1}
\end{bmatrix}
\equiv
\begin{bmatrix}
1\\
g\\
g^2\\
\vdots\\
g^{n-1}
\end{bmatrix}
\begin{bmatrix}
1 &
g^{n} &
g^{2n} &
\cdots &
g^{n^2-n}
\end{bmatrix}
\pmod{p}$$
°persist_js_stateÂÙ$b5f3620d-0942-41bb-80b0-d2ddcfe65090Чrunning§runtimeÎ ‰Ó„¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$b5f3620d-0942-41bb-80b0-d2ddcfe65090¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassignee¡E²last_run_timestampËAÚ¼|U[Ä·has_pluto_hook_features¤bodyÙÐEigen{Float64, Float64, Matrix{Float64}, Vector{Float64}}
values:
2-element Vector{Float64}:
-0.6180339887498948
1.618033988749895
vectors:
2×2 Matrix{Float64}:
0.525731 -0.850651
-0.850651 -0.525731°persist_js_stateÂÙ$18031ccb-657f-409a-9080-9a0ada3ae8b5Чrunning§runtimeÎ \¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$18031ccb-657f-409a-9080-9a0ada3ae8b5¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassignee¨slider_b²last_run_timestampËAÚ¼|U¨T“·has_pluto_hook_features¤bodyÚä13 °persist_js_stateÂÙ$1e27eedc-5308-4608-863f-fb81d60acdf0Чrunning§runtimeÎ Á¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$1e27eedc-5308-4608-863f-fb81d60acdf0¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|U “`·has_pluto_hook_features¤bodyÚ
Quelle est la complexité?
$\mathcal{O}(\sqrt{p}\log(p))$
°persist_js_stateÂÙ$4ef2c7e9-fb37-4e38-a252-b9c3f83d2a82Чrunning§runtimeÍ!^¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$4ef2c7e9-fb37-4e38-a252-b9c3f83d2a82¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|UÐO·has_pluto_hook_features¤bodyÚ;°persist_js_stateÂÙ$c8f85081-3659-4796-8550-2e708b09c8d7Чrunning§runtimeÎ :œ¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$c8f85081-3659-4796-8550-2e708b09c8d7¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|Uн�·has_pluto_hook_features¤bodyÚ"©°persist_js_stateÂÙ$bc9a718f-4b97-4e15-acf8-d180abc5b6d5Чrunning§runtimeÎ ;¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$bc9a718f-4b97-4e15-acf8-d180abc5b6d5¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|U�Ž~·has_pluto_hook_features¤bodyÚå
Est-ce une complexité linéaire ou exponentielle en fonction de la taille de l'input
La taille est proportionnelle à $\log_2(p)$ donc on être linéaire en $p$ c'est être proportionnel à $2^{\log_2(p)}$ et donc la complexité est exponentielle en la taille de l'input ! Hoffstein et al., Section 2.6
°persist_js_stateÂÙ$ce07d5c5-90a3-4c12-bada-30e4da1b99fdЧrunning§runtimeÍ·Z¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$ce07d5c5-90a3-4c12-bada-30e4da1b99fd¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeÙ!application/vnd.pluto.tree+object¬rootassigneeÀ²last_run_timestampËAÚ¼|VExÍ·has_pluto_hook_features¤body…¦prefix¥Int64¨objectid°7523b0f7b16bd51d¤type¥Array¬prefix_short ¨elementsÜ ’’¡1ªtext/plain’’¡2ªtext/plain’’¡4ªtext/plain’’¡8ªtext/plain’’¢16ªtext/plain’’¢15ªtext/plain’’¢13ªtext/plain’’¡9ªtext/plain’ ’¡1ªtext/plain’
’¡2ªtext/plain’’¡4ªtext/plain’’¡8ªtext/plain’
’¢16ªtext/plain’’¢15ªtext/plain’’¢13ªtext/plain’’¡9ªtext/plain°persist_js_stateÂÙ$59254bfd-48f2-4585-9ba5-e4c809421072Чrunning§runtimèܸdepends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$59254bfd-48f2-4585-9ba5-e4c809421072¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassignee¨shanks_x²last_run_timestampËAÚ¼|VeP/·has_pluto_hook_features¤body¡8°persist_js_stateÂÙ$93aa2719-f962-497b-9fda-30f54fd848ebЧrunning§runtimeÎò¾�¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$93aa2719-f962-497b-9fda-30f54fd848eb¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeÙ!application/vnd.pluto.tree+object¬rootassigneeÀ²last_run_timestampËAÚ¼|Sîf·has_pluto_hook_features¤body…¦prefix¥Int64¨objectid¯f1e013877b3a91b¤type¥Array¬prefix_short ¨elements—’’¡0ªtext/plain’’¡4ªtext/plain’’¡1ªtext/plain’’¡5ªtext/plain’’¡2ªtext/plain’’¡6ªtext/plain’’¡3ªtext/plain°persist_js_stateÂÙ$9f55cad1-b01a-45e3-93df-a4349e2dfbd3Чrunning§runtimeÍvu¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$9f55cad1-b01a-45e3-93df-a4349e2dfbd3¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeÙ!application/vnd.pluto.tree+object¬rootassigneeÀ²last_run_timestampËAÚ¼|V@ñí·has_pluto_hook_features¤body…¦prefix¥Int64¨objectid°26381e7431fc9ad1¤type¥Array¬prefix_short ¨elementsš’’¡1ªtext/plain’’¡2ªtext/plain’’¡3ªtext/plain’’¡4ªtext/plain’’¡5ªtext/plain’’¡6ªtext/plain’’¡7ªtext/plain’’¡8ªtext/plain’ ’¡9ªtext/plain’
’¢10ªtext/plain°persist_js_stateÂÙ$a41722b8-8c21-4d3c-a38b-4d248a79e80aЧrunning§runtimeÎ N¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$a41722b8-8c21-4d3c-a38b-4d248a79e80a¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|ND(å·has_pluto_hook_features¤bodyÙ<°persist_js_stateÂÙ$9cef898e-192c-418a-bec6-511f8b6da179Чrunning§runtimeÍ+Ѹdepends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$9cef898e-192c-418a-bec6-511f8b6da179¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|Uáà·has_pluto_hook_features¤body¦252248°persist_js_stateÂÙ$ed023033-1044-4d48-aab1-39e9300043f7Чrunning§runtimeÎ ”‚¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$ed023033-1044-4d48-aab1-39e9300043f7¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NGÒ·has_pluto_hook_features¤bodyÚuFermat's little theorem Hoffstein et al., Theorem 1.24
$$\text{Si} \quad p \text{ est premier}\quad \text{et} \quad p \nmid g,\quad \text{alors} \quad
g^{p - 1} \equiv 1 \pmod{p}.$$
°persist_js_stateÂÙ$2cb5c6e0-b431-4d2e-b023-cd2131112ecaЧrunning§runtimeÎ #^¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$2cb5c6e0-b431-4d2e-b023-cd2131112eca¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NCþr·has_pluto_hook_features¤bodyÙl
Algorithme d'Euclide étendu
°persist_js_stateÂÙ$ab467d70-ceb1-40e5-b8fe-82e2f1bd95fdЧrunning§runtimeÍ+•¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$ab467d70-ceb1-40e5-b8fe-82e2f1bd95fd¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|VeØM·has_pluto_hook_features¤body¡3°persist_js_stateÂÙ$a7d9703a-5121-4b43-8cd4-2acf9a0d91efЧrunning§runtimeÎ ZL¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$a7d9703a-5121-4b43-8cd4-2acf9a0d91ef¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NH?W·has_pluto_hook_features¤bodyÚ#La méthode meet in the middle est une méthode générique permettant de passer d'une complexité de $\mathcal{O}(N)$ à $\mathcal{O}(\sqrt{N})$ .
°persist_js_stateÂÙ$57816e2c-a675-43e7-b674-2877ffcf1415Чrunning§runtimeÎ$|ë¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$57816e2c-a675-43e7-b674-2877ffcf1415¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassignee¨p_picker²last_run_timestampËAÚ¼|V<=â·has_pluto_hook_features¤bodyÚ½11 °persist_js_stateÂÙ$f4f49568-dcf2-4c76-ba66-065d2fda7a4aЧrunning§runtimeÎ %£¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$f4f49568-dcf2-4c76-ba66-065d2fda7a4a¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NC=:·has_pluto_hook_features¤bodyÙç$$a \equiv \alpha \pmod{n} \quad \text{et} \quad b \equiv \beta \pmod{n}
\quad \Rightarrow \quad a + b \equiv \alpha + \beta \pmod{n}$$
°persist_js_stateÂÙ$4a98507b-653e-4354-a825-7605f8fcb31bЧrunning§runtimeÎ
Îù¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$4a98507b-653e-4354-a825-7605f8fcb31b¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|V^Ãi·has_pluto_hook_features¤bodyÙK4×4 Matrix{Int64}:
1 16 1 16
2 15 2 15
4 13 4 13
8 9 8 9°persist_js_stateÂÙ$a59a20e2-a7c7-48a9-ad8d-8094e03a749dЧrunning§runtimeÍ–¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$a59a20e2-a7c7-48a9-ad8d-8094e03a749d¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeÙ!application/vnd.pluto.tree+object¬rootassigneeÀ²last_run_timestampËAÚ¼|Sî¼·has_pluto_hook_features¤body…¦prefix¥Int64¨objectid°e2fa1fdc8bde29b1¤type¥Array¬prefix_short ¨elements—’’¡0ªtext/plain’’¡1ªtext/plain’’¡2ªtext/plain’’¡3ªtext/plain’’¡4ªtext/plain’’¡5ªtext/plain’’¡6ªtext/plain°persist_js_stateÂÙ$4e35d650-b9a6-4668-90f0-f27a50af29adЧrunning§runtimeÎÜoX¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$4e35d650-b9a6-4668-90f0-f27a50af29ad¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeªabn_picker²last_run_timestampËAÚ¼|UÍÀ·has_pluto_hook_features¤bodyÚ;°persist_js_stateÂÙ$4cff1d10-422f-4b12-b790-a589c972fbb7Чrunning§runtimeÍÒ¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$4cff1d10-422f-4b12-b790-a589c972fbb7¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeÙ,application/vnd.pluto.reactdomelement+object¬rootassigneeÀ²last_run_timestampËAÚ¼|V=È·has_pluto_hook_features¤bodyƒ¨children’’Ú÷©text/html’Úö©text/htmlªattributes�¥styleÙWjustify-content: space-around; display: flex; flex-direction: row; align-items: center;£tag£div°persist_js_stateÂÙ$909b8a36-79bb-4c1a-9dd7-4acaffc0434eЧrunning§runtimeΠødepends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$909b8a36-79bb-4c1a-9dd7-4acaffc0434e¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|N?ÕÔ·has_pluto_hook_features¤bodyÙV
Théorème de Bézout
°persist_js_stateÂÙ$642d545f-b1b9-49da-8a03-ad63e3214f59Чrunning§runtimeÎ ml¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$642d545f-b1b9-49da-8a03-ad63e3214f59¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NCtC·has_pluto_hook_features¤bodyÙÛ$$a \equiv \alpha \pmod{n} \quad \text{et} \quad b \equiv \beta \pmod{n}
\quad \Rightarrow \quad a b \equiv \alpha \beta \pmod{n}$$
°persist_js_stateÂÙ$6c3bca1a-3109-4e48-97e1-e0ed4599ffb2Чrunning§runtimeÎ .¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$6c3bca1a-3109-4e48-97e1-e0ed4599ffb2¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NGŠ ·has_pluto_hook_features¤bodyÙT
°persist_js_stateÂÙ$a7afc0cb-a980-4f4f-b782-9791d932ee52Чrunning§runtimeÎ w˸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$a7afc0cb-a980-4f4f-b782-9791d932ee52¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NG;~·has_pluto_hook_features¤bodyÙ°persist_js_stateÂÙ$d81bbd74-42df-4bb2-a045-9c2642cc19e5Чrunning§runtimeÍ!®¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$d81bbd74-42df-4bb2-a045-9c2642cc19e5¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|UÏÏ1·has_pluto_hook_features¤bodyÚ;°persist_js_stateÂÙ$087cbe82-b42a-4f80-a1af-97f3aa93aeebЧrunning§runtimeÎ }O¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$087cbe82-b42a-4f80-a1af-97f3aa93aeeb¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|UÐä�·has_pluto_hook_features¤bodyÚ"©°persist_js_stateÂÙ$8b16a522-9be4-4286-b64d-3d1bbdef7142Чrunning§runtimeÎ †w¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$8b16a522-9be4-4286-b64d-3d1bbdef7142¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NH<·has_pluto_hook_features¤bodyڰÉtant donné un nombre premier $p$ et une racine primitive $g$ modulo $p$ et un entier $a$ tel que $p \nmid a$ , le Discrete logarithme problem consiste à retrouver $x$ tel que $g^x \equiv a \pmod{p}$ .
°persist_js_stateÂÙ$bbc907b1-63f8-435a-badc-11ed88bd6cf5Чrunning§runtimeÎ å"¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$bbc907b1-63f8-435a-badc-11ed88bd6cf5¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|N=ö²·has_pluto_hook_features¤bodyÙ<
Exemples
°persist_js_stateÂÙ$c2fab245-8a98-4b41-ade2-c5b16e9c39f9Чrunning§runtimeÎ ?M¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$c2fab245-8a98-4b41-ade2-c5b16e9c39f9¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NG#¼·has_pluto_hook_features¤bodyÙ^
Chinese remainder theorem
°persist_js_stateÂÙ$35b7b8b7-bff6-4f64-91b9-b65035162365Чrunning§runtimeÎ ®¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$35b7b8b7-bff6-4f64-91b9-b65035162365¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|Nl`Ý·has_pluto_hook_features¤bodyÙ~°persist_js_stateÂÙ$3cd40d9e-fcea-427d-9877-cea65e7ea413Чrunning§runtimeΔçA¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$3cd40d9e-fcea-427d-9877-cea65e7ea413¹depends_on_disabled_cells¦queued¤logs‘ˆ¥group¦stdout¤lineÿ£msg’Ù5 0.004179 seconds (40.01 k allocations: 17.619 MiB)
ªtext/plain¥level®LogLevel(-555)¢id´PlutoRunner_40f9f5d1§cell_idÙ$3cd40d9e-fcea-427d-9877-cea65e7ea413¦kwargs�¤fileÙP/home/runner/.julia/packages/Pluto/reLAF/src/runner/PlutoRunner/src/io/stdout.jl¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|T“ƒQ·has_pluto_hook_features¤bodyÚT2531162323732361242240155003520607291766356485802485278951929841991312781760541315230153423463758831637443488219211037689033673531462742885329724071555187618026931630449193158922771331642302030331971098689235780843478258502779200293635651897483309686042860996364443514558772156043691404155819572984971754278513112487985892718229593329483578531419148805380281624260900362993556916638613939977074685016188258584312329139526393558096840812970422952418558991855772306882442574855589237165219912238201311184749075137322987656049866305366913734924425822681338966507463855180236283582409861199212323835947891143765414913345008456022009455704210891637791911265475167769704477334859109822590053774932978465651023851447920601310106288957894301592502061560528131203072778677491443420921822590709910448617329156135355464620891788459566081572824889514296350670950824208245170667601726417091127999999941149913010424532046881958285409468463211897582215075436515584016297874572183907949257286261608612401379639484713101138120404671732190451327881433201025184027541696124114463488665359385870910331476156665889459832092710304159637019707297988417848767011085425271875588008671422491434005115288334343837778792282383576736341414410248994081564830202363820504190074504566612515965134665683289356188727549463732830075811851574961558669278847363279870595320099844676879457196432535973357128305390290471349480258751812890314779723508104229525161740643984423978659638233074463100366500571977234508464710078102581304823235436518145074482824812996511614161933313389889630935320139507075992100561077534028207257574257706278201308302642634678112591091843082665721697117838726431766741158743554298864560993255547608496686850185804659790217122426535133253371422250684486113457341827911625517128815447325958547912113242367201990672230681308819195941016156001961954700241576553750737681552256845421159386858399433450045903975167084252876848848085910156941603293424067793097271128806817514906531652407763118308162377033463203514657531210413149191213595455280387631030665594589183601575340027172997222489081631144728873621805528648768511368948639522975539046995395707688938978847084621586473529546678958226255042389998718141303055036060772003887773038422366913820397748550793178167220193346017430024134496141145991896227741842515718997898627269918236920453493946658273870473264523119133765447653295022886429174942653014656521909469613184983671431465934965489425515981067546087342348350724207583544436107294087637975025147846254526938442435644928231027868701394819091132912397475713787593612758364812687556725146456646878912169274219209708166678668152184941578590201953144030519381922273252666652671717526318606676754556170379350956342095455612780202199922615392785572481747913435560866995432578680971243966868110016581395696310922519803685837460795358384618017215468122880442252343684547233668502313239328352671318130604247460452134121833305284398726438573787798499612760939462427922917659263046333084007208056631996856315539698234022953452211505675629153637867252695056925345220084020071611220575700841268302638995272842160994219632684575364180160991884885091858259996299627148614456696661412745040519981575543804847463997422326563897043803732970397488471644906183310144691243649149542394691524972023935190633672827306116525712882959108434211652465621144702015336657459532134026915214509960877430595844287585350290234547564574848753110281101545931547225811763441710217452979668178025286460158324658852904105792472468108996135476637212057508192176910900422826969523438985332067597093454021924077101784215936539638808624420121459718286059401823614213214326004270471752802725625810953787713898846144256909835116371235019527013180204030167601567064268573820697948868982630904164685161783088076506964317303709708574052747204405282785965604677674192569851918643651835755242670293612851920696732320545562286110332140065912751551110134916256237884844001366366654055079721985816714803952429301558096968202261698837096090377863017797020488044826628817462866854321356787305635653577619877987998113667928954840972022833505708587561902023411398915823487627297968947621416912816367516125096563705174220460639857683971213093125°persist_js_stateÂÙ$4cb070de-e8bf-4a1d-9625-043c19466c46Чrunning§runtimeΠѸdepends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$4cb070de-e8bf-4a1d-9625-043c19466c46¹depends_on_disabled_cells¦queued¤logs‘ˆ¥group¦stdout¤lineÿ£msg’Ù2 0.000136 seconds (826 allocations: 100.875 KiB)
ªtext/plain¥level®LogLevel(-555)¢id´PlutoRunner_40f9f5d1§cell_idÙ$4cb070de-e8bf-4a1d-9625-043c19466c46¦kwargs�¤fileÙP/home/runner/.julia/packages/Pluto/reLAF/src/runner/PlutoRunner/src/io/stdout.jl¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|UlÆ·has_pluto_hook_features¤bodyÚT2531162323732361242240155003520607291766356485802485278951929841991312781760541315230153423463758831637443488219211037689033673531462742885329724071555187618026931630449193158922771331642302030331971098689235780843478258502779200293635651897483309686042860996364443514558772156043691404155819572984971754278513112487985892718229593329483578531419148805380281624260900362993556916638613939977074685016188258584312329139526393558096840812970422952418558991855772306882442574855589237165219912238201311184749075137322987656049866305366913734924425822681338966507463855180236283582409861199212323835947891143765414913345008456022009455704210891637791911265475167769704477334859109822590053774932978465651023851447920601310106288957894301592502061560528131203072778677491443420921822590709910448617329156135355464620891788459566081572824889514296350670950824208245170667601726417091127999999941149913010424532046881958285409468463211897582215075436515584016297874572183907949257286261608612401379639484713101138120404671732190451327881433201025184027541696124114463488665359385870910331476156665889459832092710304159637019707297988417848767011085425271875588008671422491434005115288334343837778792282383576736341414410248994081564830202363820504190074504566612515965134665683289356188727549463732830075811851574961558669278847363279870595320099844676879457196432535973357128305390290471349480258751812890314779723508104229525161740643984423978659638233074463100366500571977234508464710078102581304823235436518145074482824812996511614161933313389889630935320139507075992100561077534028207257574257706278201308302642634678112591091843082665721697117838726431766741158743554298864560993255547608496686850185804659790217122426535133253371422250684486113457341827911625517128815447325958547912113242367201990672230681308819195941016156001961954700241576553750737681552256845421159386858399433450045903975167084252876848848085910156941603293424067793097271128806817514906531652407763118308162377033463203514657531210413149191213595455280387631030665594589183601575340027172997222489081631144728873621805528648768511368948639522975539046995395707688938978847084621586473529546678958226255042389998718141303055036060772003887773038422366913820397748550793178167220193346017430024134496141145991896227741842515718997898627269918236920453493946658273870473264523119133765447653295022886429174942653014656521909469613184983671431465934965489425515981067546087342348350724207583544436107294087637975025147846254526938442435644928231027868701394819091132912397475713787593612758364812687556725146456646878912169274219209708166678668152184941578590201953144030519381922273252666652671717526318606676754556170379350956342095455612780202199922615392785572481747913435560866995432578680971243966868110016581395696310922519803685837460795358384618017215468122880442252343684547233668502313239328352671318130604247460452134121833305284398726438573787798499612760939462427922917659263046333084007208056631996856315539698234022953452211505675629153637867252695056925345220084020071611220575700841268302638995272842160994219632684575364180160991884885091858259996299627148614456696661412745040519981575543804847463997422326563897043803732970397488471644906183310144691243649149542394691524972023935190633672827306116525712882959108434211652465621144702015336657459532134026915214509960877430595844287585350290234547564574848753110281101545931547225811763441710217452979668178025286460158324658852904105792472468108996135476637212057508192176910900422826969523438985332067597093454021924077101784215936539638808624420121459718286059401823614213214326004270471752802725625810953787713898846144256909835116371235019527013180204030167601567064268573820697948868982630904164685161783088076506964317303709708574052747204405282785965604677674192569851918643651835755242670293612851920696732320545562286110332140065912751551110134916256237884844001366366654055079721985816714803952429301558096968202261698837096090377863017797020488044826628817462866854321356787305635653577619877987998113667928954840972022833505708587561902023411398915823487627297968947621416912816367516125096563705174220460639857683971213093125°persist_js_stateÂÙ$1a4da418-147f-46f4-9b95-7955183aa5cfЧrunning§runtimeÎÓàŸdepends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$1a4da418-147f-46f4-9b95-7955183aa5cf¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|S�hf·has_pluto_hook_features¤bodyÚ8€°persist_js_stateÂÙ$192f608c-0563-4179-903f-49fad2db4c74Чrunning§runtimeÎ Ä#¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$192f608c-0563-4179-903f-49fad2db4c74¹depends_on_disabled_cells¦queued¤logs‘ˆ¥group¦stdout¤lineÿ£msg’Ù2 0.000125 seconds (826 allocations: 100.766 KiB)
ªtext/plain¥level®LogLevel(-555)¢id´PlutoRunner_40f9f5d1§cell_idÙ$192f608c-0563-4179-903f-49fad2db4c74¦kwargs�¤fileÙP/home/runner/.julia/packages/Pluto/reLAF/src/runner/PlutoRunner/src/io/stdout.jl¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|UxÁηhas_pluto_hook_features¤bodyÚT2531162323732361242240155003520607291766356485802485278951929841991312781760541315230153423463758831637443488219211037689033673531462742885329724071555187618026931630449193158922771331642302030331971098689235780843478258502779200293635651897483309686042860996364443514558772156043691404155819572984971754278513112487985892718229593329483578531419148805380281624260900362993556916638613939977074685016188258584312329139526393558096840812970422952418558991855772306882442574855589237165219912238201311184749075137322987656049866305366913734924425822681338966507463855180236283582409861199212323835947891143765414913345008456022009455704210891637791911265475167769704477334859109822590053774932978465651023851447920601310106288957894301592502061560528131203072778677491443420921822590709910448617329156135355464620891788459566081572824889514296350670950824208245170667601726417091127999999941149913010424532046881958285409468463211897582215075436515584016297874572183907949257286261608612401379639484713101138120404671732190451327881433201025184027541696124114463488665359385870910331476156665889459832092710304159637019707297988417848767011085425271875588008671422491434005115288334343837778792282383576736341414410248994081564830202363820504190074504566612515965134665683289356188727549463732830075811851574961558669278847363279870595320099844676879457196432535973357128305390290471349480258751812890314779723508104229525161740643984423978659638233074463100366500571977234508464710078102581304823235436518145074482824812996511614161933313389889630935320139507075992100561077534028207257574257706278201308302642634678112591091843082665721697117838726431766741158743554298864560993255547608496686850185804659790217122426535133253371422250684486113457341827911625517128815447325958547912113242367201990672230681308819195941016156001961954700241576553750737681552256845421159386858399433450045903975167084252876848848085910156941603293424067793097271128806817514906531652407763118308162377033463203514657531210413149191213595455280387631030665594589183601575340027172997222489081631144728873621805528648768511368948639522975539046995395707688938978847084621586473529546678958226255042389998718141303055036060772003887773038422366913820397748550793178167220193346017430024134496141145991896227741842515718997898627269918236920453493946658273870473264523119133765447653295022886429174942653014656521909469613184983671431465934965489425515981067546087342348350724207583544436107294087637975025147846254526938442435644928231027868701394819091132912397475713787593612758364812687556725146456646878912169274219209708166678668152184941578590201953144030519381922273252666652671717526318606676754556170379350956342095455612780202199922615392785572481747913435560866995432578680971243966868110016581395696310922519803685837460795358384618017215468122880442252343684547233668502313239328352671318130604247460452134121833305284398726438573787798499612760939462427922917659263046333084007208056631996856315539698234022953452211505675629153637867252695056925345220084020071611220575700841268302638995272842160994219632684575364180160991884885091858259996299627148614456696661412745040519981575543804847463997422326563897043803732970397488471644906183310144691243649149542394691524972023935190633672827306116525712882959108434211652465621144702015336657459532134026915214509960877430595844287585350290234547564574848753110281101545931547225811763441710217452979668178025286460158324658852904105792472468108996135476637212057508192176910900422826969523438985332067597093454021924077101784215936539638808624420121459718286059401823614213214326004270471752802725625810953787713898846144256909835116371235019527013180204030167601567064268573820697948868982630904164685161783088076506964317303709708574052747204405282785965604677674192569851918643651835755242670293612851920696732320545562286110332140065912751551110134916256237884844001366366654055079721985816714803952429301558096968202261698837096090377863017797020488044826628817462866854321356787305635653577619877987998113667928954840972022833505708587561902023411398915823487627297968947621416912816367516125096563705174220460639857683971213093125°persist_js_stateÂÙ$027fe67c-d2f0-49f6-b894-959795551d27Чrunning§runtimeÎUv¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$027fe67c-d2f0-49f6-b894-959795551d27¹depends_on_disabled_cells¦queued¤logs‘ˆ¥group¦stdout¤lineÿ£msg’³ 1.412847 seconds
ªtext/plain¥level®LogLevel(-555)¢id´PlutoRunner_40f9f5d1§cell_idÙ$027fe67c-d2f0-49f6-b894-959795551d27¦kwargs�¤fileÙP/home/runner/.julia/packages/Pluto/reLAF/src/runner/PlutoRunner/src/io/stdout.jl¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|TyL·has_pluto_hook_features¤body©267914296°persist_js_stateÂÙ$bcf73ad7-a08b-4cbb-bcd2-d0abc002e7e2Чrunning§runtimeÎ Ö¡¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$bcf73ad7-a08b-4cbb-bcd2-d0abc002e7e2¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|U�\-·has_pluto_hook_features¤bodyÚ:
Quelle est la complexité spatiale et temporelle de discrete_log ?
°persist_js_stateÂÙ$cbabee34-2ca2-4ad4-93ba-2ec3c941da5eЧrunning§runtimeÎ ·|¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$cbabee34-2ca2-4ad4-93ba-2ec3c941da5e¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|N?¸(·has_pluto_hook_features¤bodyÚ¬Si tous les mois avaient 30 jours, est-ce qu'il y a des jours de la semaine qui ne seront jamais le premier du mois ?
Reformulation: pour tout nombre $0 \le j < 7$ , existe-t-il $x$ et $y$ tels que $30x = j + 7y$ . Notation modulo : $30x \equiv j \pmod{7}$ .
Si tous les ans avaient 365 jours, est-ce qu'il y a des jours de la semaine qui ne seront jamais le 25 Décembre ? Est si tous les ans avaient 366 jours ? Et s'ils avaient 364 jours ?
Reformulation: pour tout nombre $0 \le j < 7$ , existe-t-il $x$ et $y$ tels que $365x = j + 7y$ . Notation modulo : $365x \equiv j \pmod{7}$ .
°persist_js_stateÂÙ$e1aafab7-c4f3-45ac-81ee-7f875ac7c8c6Чrunning§runtimeÎ �F¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$e1aafab7-c4f3-45ac-81ee-7f875ac7c8c6¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NCêl·has_pluto_hook_features¤bodyÚM
Inverse modulaire : étant donné $a, n$ , trouver $x$ (noté $a^{-1}$ ) tel que $xa \equiv 1 \pmod{n}$
Division modulaire : étant donné $a, b, n$ , trouver $x$ tel que $xa \equiv b \pmod{n}$ → $x \equiv a^{-1}b \pmod{n}$ .
°persist_js_stateÂÙ$535f4bc1-e88c-47c7-990b-e3c8b5054accЧrunning§runtimeÎ i¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$535f4bc1-e88c-47c7-990b-e3c8b5054acc¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|Ut
Ä·has_pluto_hook_features¤bodyÙ+fib_closed (generic function with 1 method)°persist_js_stateÂÙ$bd0c0258-7040-42e7-a20e-532b55af3a62Чrunning§runtimeÎ I=¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$bd0c0258-7040-42e7-a20e-532b55af3a62¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NB¶t·has_pluto_hook_features¤bodyÙ€
Algorithme d'Euclide : implémentation
°persist_js_stateÂÙ$65f4990f-1952-4682-8fa8-9e3dd4bf1ebfЧrunning§runtimeÎ £Ñ¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$65f4990f-1952-4682-8fa8-9e3dd4bf1ebf¹depends_on_disabled_cells¦queued¤logs‘ˆ¥group¦stdout¤lineÿ£msg’³ 0.000001 seconds
ªtext/plain¥level®LogLevel(-555)¢id´PlutoRunner_40f9f5d1§cell_idÙ$65f4990f-1952-4682-8fa8-9e3dd4bf1ebf¦kwargs�¤fileÙP/home/runner/.julia/packages/Pluto/reLAF/src/runner/PlutoRunner/src/io/stdout.jl¦output†¤mimeªtext/plain¬rootassignee@time pow_999²last_run_timestampËAÚ¼|UÚÓ·has_pluto_hook_features¤body£500°persist_js_stateÂÙ$d1b260fb-7500-47fb-bb48-21b5857ab55aЧrunning§runtimeΠ뵸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$d1b260fb-7500-47fb-bb48-21b5857ab55a¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NB¡·has_pluto_hook_features¤bodyÙåLemme : Si $a \equiv r \pmod{b}$ alors $\text{gcd}(a, b) = \text{gcd}(b, r)$ .
°persist_js_stateÂÙ$31388128-33a3-4443-835e-74b91bf48268Чrunning§runtimeÍ(¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$31388128-33a3-4443-835e-74b91bf48268¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|U©+õ·has_pluto_hook_features¤body¡4°persist_js_stateÂÙ$9207b107-e1b0-4328-a004-f4b8152b423fЧrunning§runtimeÎ Á&¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$9207b107-e1b0-4328-a004-f4b8152b423f¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|S;é·has_pluto_hook_features¤bodyÚ÷
Observation clé Si $a > b$ , trouver un mono-variant.
On a $(a, b) > (b, r)$ . En effet, $a > b$ par supposition et $b > r$ par définition de l'algorithme d'Euclide. Notons que même si la supposition $a > b$ n'est pas vraie, elle le devient pour $\text{gcd}(b, r)$ .
°persist_js_stateÂÙ$06679a09-47d7-4024-8232-4954c08747a0Чrunning§runtimeÎ$Þˆn¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$06679a09-47d7-4024-8232-4954c08747a0¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|R¤�²·has_pluto_hook_features¤body °persist_js_stateÂÙ$4714b7d7-32ee-42a1-bfa5-93eafda739d3Чrunning§runtimeΠødepends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$4714b7d7-32ee-42a1-bfa5-93eafda739d3¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NGwW·has_pluto_hook_features¤bodyÙt
Diagonalization to speed up powering
°persist_js_stateÂÙ$3da58487-192f-458a-9d47-7a4ce98b6da3Чrunning§runtimeÎ "¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$3da58487-192f-458a-9d47-7a4ce98b6da3¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|Nl‘â·has_pluto_hook_features¤bodyÙ6
Utils
°persist_js_stateÂÙ$6cf004be-5205-429e-8131-ef607cebeaecЧrunning§runtimeÍ5R¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$6cf004be-5205-429e-8131-ef607cebeaec¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|U?9T·has_pluto_hook_features¤bodyÙA2×2 Matrix{Float64}:
0.525731 -0.850651
-0.850651 -0.525731°persist_js_stateÂÙ$0e3fb524-bea1-4ef0-9589-36230a84e949Чrunning§runtimeÎ O:¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$0e3fb524-bea1-4ef0-9589-36230a84e949¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeÙ,application/vnd.pluto.reactdomelement+object¬rootassignee©gp_picker²last_run_timestampËAÚ¼|V<—зhas_pluto_hook_features¤bodyƒ¨children’’Ú÷©text/html’Úö©text/htmlªattributes�¥styleÙWjustify-content: space-around; display: flex; flex-direction: row; align-items: center;£tag£div°persist_js_stateÂÙ$aee611f2-bc86-4e85-bbcb-add78c6a9175Чrunning§runtimeÍ5*¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$aee611f2-bc86-4e85-bbcb-add78c6a9175¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeÙ!application/vnd.pluto.tree+object¬rootassigneeÀ²last_run_timestampËAÚ¼|SÍ<Å·has_pluto_hook_features¤bodyƒ¨objectid°54a1c5b46a9f8dc9¤type¥Tuple¨elements“’’¡1ªtext/plain’’¨89932200ªtext/plain’’©-32561659ªtext/plain°persist_js_stateÂÙ$97736c6a-3f5d-4978-8dd2-0a11c09ba9f0Чrunning§runtimeÎ À¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$97736c6a-3f5d-4978-8dd2-0a11c09ba9f0¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|SK{·has_pluto_hook_features¤bodyÙ%pgcd (generic function with 1 method)°persist_js_stateÂÙ$9722971a-16f1-4f28-ba31-c12b673b8a30Чrunning§runtimeÎ “A¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$9722971a-16f1-4f28-ba31-c12b673b8a30¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NFú"·has_pluto_hook_features¤bodyÙ3°persist_js_stateÂÙ$592ae01b-2819-402d-9538-17018df5c34bЧrunning§runtimeÎ +w¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$592ae01b-2819-402d-9538-17018df5c34b¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NGO@·has_pluto_hook_features¤bodyÙP
Fibonacci sequence
°persist_js_stateÂÙ$191f8429-cbbb-44aa-8beb-271a94293e4bЧrunning§runtimeΛÿ¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$191f8429-cbbb-44aa-8beb-271a94293e4b¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|Uð4·has_pluto_hook_features¤bodyÙ$986325341584402112586461440731025613°persist_js_stateÂÙ$1072a756-5026-4de9-93a8-f942d54c474aЧrunning§runtimeÎ ù=¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$1072a756-5026-4de9-93a8-f942d54c474a¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NH¿<·has_pluto_hook_features¤bodyÙ~°persist_js_stateÂÙ$59ac02af-7b54-44d4-b5f4-a0f60d4458a1Чrunning§runtimeι‘º¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$59ac02af-7b54-44d4-b5f4-a0f60d4458a1¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeÙ!application/vnd.pluto.tree+object¬rootassigneeªall_powers²last_run_timestampËAÚ¼|V@[[·has_pluto_hook_features¤body…¦prefix¥Int64¨objectid°8ddd4d3601cc9683¤type¥Array¬prefix_short ¨elementsš’’¡2ªtext/plain’’¡4ªtext/plain’’¡8ªtext/plain’’¡5ªtext/plain’’¢10ªtext/plain’’¡9ªtext/plain’’¡7ªtext/plain’’¡3ªtext/plain’ ’¡6ªtext/plain’
’¡1ªtext/plain°persist_js_stateÂÙ$09f44611-ba21-4982-ba1b-0691124642fcЧrunning§runtimeÎ ‹¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$09f44611-ba21-4982-ba1b-0691124642fc¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NC_F·has_pluto_hook_features¤bodyÙn
Arithmétique modulaire : produit
°persist_js_stateÂÙ$eeaec4f4-71bd-43df-b9c9-a00bc3b1864bЧrunning§runtimeÍ%4¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$eeaec4f4-71bd-43df-b9c9-a00bc3b1864b¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeÙ!application/vnd.pluto.tree+object¬rootassigneeÀ²last_run_timestampËAÚ¼|SÏà&·has_pluto_hook_features¤bodyƒ¨objectid°54a1c5b46a9f8dc9¤type¥Tuple¨elements“’’¡1ªtext/plain’’¨89932200ªtext/plain’’©-32561659ªtext/plain°persist_js_stateÂÙ$f6e22fc3-382e-4548-bc59-8f944e06d237Чrunning§runtimeÎ ×\¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$f6e22fc3-382e-4548-bc59-8f944e06d237¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|UFÕc·has_pluto_hook_features¤bodyÙ32×2 Matrix{Float64}:
1.0 1.0
1.0 -1.11022e-16°persist_js_stateÂÙ$19ef447f-9fdf-49e1-8d1a-7860b4d4e9baЧrunning§runtimeÎ ›©¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$19ef447f-9fdf-49e1-8d1a-7860b4d4e9ba¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassignee¡D²last_run_timestampËAÚ¼|U8s´·has_pluto_hook_features¤bodyÙR2×2 Diagonal{BigFloat, Vector{BigFloat}}:
-0.618034 â‹…
â‹… 1.61803°persist_js_stateÂÙ$82ba8fe1-435e-422b-abb7-cb50a7a85e1eЧrunning§runtimeÎ ]0¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$82ba8fe1-435e-422b-abb7-cb50a7a85e1e¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NGþ·has_pluto_hook_features¤bodyÙN
Dicrete logarithm
°persist_js_stateÂÙ$41cf9efd-65e5-4abb-94d3-e824780e659cЧrunning§runtimeÎ O;¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$41cf9efd-65e5-4abb-94d3-e824780e659c¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|N=׿·has_pluto_hook_features¤bodyÙÙ°persist_js_stateÂÙ$58da5ba4-c858-4684-a9f4-5a39fdc4fb03Чrunning§runtimeÎ
D¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$58da5ba4-c858-4684-a9f4-5a39fdc4fb03¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|SùWŠ·has_pluto_hook_features¤bodyÙ+fast_power (generic function with 1 method)°persist_js_stateÂÙ$ec25ce2a-de8a-4b69-a3f3-b47cd58ec986Чrunning§runtimeÍEü¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$ec25ce2a-de8a-4b69-a3f3-b47cd58ec986¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|Uà†Û·has_pluto_hook_features¤body¦252248°persist_js_stateÂÙ$256c8009-4d2b-42f8-adaa-6f238ef22c6dЧrunning§runtimeÎ &¬¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$256c8009-4d2b-42f8-adaa-6f238ef22c6d¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassignee¨slider_n²last_run_timestampËAÚ¼|U¨ˆ·has_pluto_hook_features¤bodyÚâ5 °persist_js_stateÂÙ$c5e906c8-0f73-4955-baa7-337195329e04Чrunning§runtimeÎ @¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$c5e906c8-0f73-4955-baa7-337195329e04¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NHï[·has_pluto_hook_features¤bodyڛÉtant donné un nombre premier $p$ et une racine primitive $g$ modulo $p$ , Alice (resp. Bob) génère un nombre secret $a$ (resp. $b$ ). Ils communique ensuite publiquement $A$ et $B$ .
°persist_js_stateÂÙ$f39cccac-5b24-46e4-8749-1b0a944542efЧrunning§runtimeÎ ¥¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$f39cccac-5b24-46e4-8749-1b0a944542ef¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|S�½·has_pluto_hook_features¤bodyÚ8‚°persist_js_stateÂÙ$9efb7a71-9a03-4716-8d34-aae233e9b898Чrunning§runtimeÍ'«¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$9efb7a71-9a03-4716-8d34-aae233e9b898¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassignee¡x²last_run_timestampËAÚ¼|VDQz·has_pluto_hook_features¤body¡8°persist_js_stateÂÙ$a1628317-7937-4316-85bf-2da860effce3Чrunning§runtimeÍ+m¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$a1628317-7937-4316-85bf-2da860effce3¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|UªR·has_pluto_hook_features¤body¡3°persist_js_stateÂÙ$7330af43-bec3-460c-94f6-768ac2975b00Чrunning§runtimeÎ -¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$7330af43-bec3-460c-94f6-768ac2975b00¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|U cå·has_pluto_hook_features¤bodyÙ4shanks_discrete_log (generic function with 1 method)°persist_js_stateÂÙ$f9f03579-5bfc-452d-bff9-9e7adfe095d3Чrunning§runtimeÍ d¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$f9f03579-5bfc-452d-bff9-9e7adfe095d3¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|SïÔ0·has_pluto_hook_features¤body¡7°persist_js_stateÂÙ$5c6c45b4-67e3-4ea8-bc09-0205ab24cbc3Чrunning§runtimeÍ5p¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$5c6c45b4-67e3-4ea8-bc09-0205ab24cbc3¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|U«:C·has_pluto_hook_features¤body¡3°persist_js_stateÂÙ$819f15ef-31d0-44b6-837a-e3e67f2667b9Чrunning§runtimeÎ Må¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$819f15ef-31d0-44b6-837a-e3e67f2667b9¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NF ´·has_pluto_hook_features¤bodyÙ:°persist_js_stateÂÙ$3c198d79-c46a-4781-8bd1-b6b68f06c31fЧrunning§runtimeÎ \?l¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$3c198d79-c46a-4781-8bd1-b6b68f06c31f¹depends_on_disabled_cells¦queued¤logs‘ˆ¥group¦stdout¤lineÿ£msg’ÙN 0.005350 seconds (2.62 k allocations: 124.828 KiB, 99.37% compilation time)
ªtext/plain¥level®LogLevel(-555)¢id´PlutoRunner_40f9f5d1§cell_idÙ$3c198d79-c46a-4781-8bd1-b6b68f06c31f¦kwargs�¤fileÙP/home/runner/.julia/packages/Pluto/reLAF/src/runner/PlutoRunner/src/io/stdout.jl¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|UÕ{þ·has_pluto_hook_features¤bodyÙL3618502788666131106986593281521497120414687020801267626233049500247285301248°persist_js_stateÂÙ$ac5e1516-1574-4893-a965-f799947076cbЧrunning§runtimeÎ4I\¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$ac5e1516-1574-4893-a965-f799947076cb¹depends_on_disabled_cells¦queued¤logs‘ˆ¥group¦stdout¤lineÿ£msg’ÙO 0.304746 seconds (705.07 k allocations: 37.763 MiB, 99.92% compilation time)
ªtext/plain¥level®LogLevel(-555)¢id´PlutoRunner_40f9f5d1§cell_idÙ$ac5e1516-1574-4893-a965-f799947076cb¦kwargs�¤fileÙP/home/runner/.julia/packages/Pluto/reLAF/src/runner/PlutoRunner/src/io/stdout.jl¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|Uk+·has_pluto_hook_features¤bodyÙU2.531162323732361578998428490601662084769270923897910687031954402219719762339543e4179°persist_js_stateÂÙ$4be6cea4-13a2-4bcb-b849-14eef57ab604Чrunning§runtimeÎ dÞ¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$4be6cea4-13a2-4bcb-b849-14eef57ab604¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|VBý ·has_pluto_hook_features¤bodyÙcLe nombre 2 est une racine primitive modulo 11
°persist_js_stateÂÙ$a4698418-ebf7-4992-a3ba-a15ff282bf87Чrunning§runtimeÎ ž‘¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$a4698418-ebf7-4992-a3ba-a15ff282bf87¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|Sù�ó·has_pluto_hook_features¤bodyÚ
Quelle est la complexité temporelle ?
Si $n$ est impair, au coup suivant, il est pair donc il n'est impair qu'au pire une fois sur deux. En $l$ multiplication, on divise $m$ au moins par $2^{l/2}$ donc on a une complexité logarithmique $\Theta(\log(m))$ en supposant que prod_func a une complexité $\Theta(1)$ .
°persist_js_stateÂÙ$a1081bb2-2186-4b19-b667-0c246155f360Чrunning§runtimeÎ Ž?¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$a1081bb2-2186-4b19-b667-0c246155f360¹depends_on_disabled_cells¦queued¤logs‘ˆ¥group¦stdout¤lineÿ£msg’Ù2 0.000179 seconds (826 allocations: 100.859 KiB)
ªtext/plain¥level®LogLevel(-555)¢id´PlutoRunner_40f9f5d1§cell_idÙ$a1081bb2-2186-4b19-b667-0c246155f360¦kwargs�¤fileÙP/home/runner/.julia/packages/Pluto/reLAF/src/runner/PlutoRunner/src/io/stdout.jl¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|TºåÁ·has_pluto_hook_features¤bodyÚT2531162323732361242240155003520607291766356485802485278951929841991312781760541315230153423463758831637443488219211037689033673531462742885329724071555187618026931630449193158922771331642302030331971098689235780843478258502779200293635651897483309686042860996364443514558772156043691404155819572984971754278513112487985892718229593329483578531419148805380281624260900362993556916638613939977074685016188258584312329139526393558096840812970422952418558991855772306882442574855589237165219912238201311184749075137322987656049866305366913734924425822681338966507463855180236283582409861199212323835947891143765414913345008456022009455704210891637791911265475167769704477334859109822590053774932978465651023851447920601310106288957894301592502061560528131203072778677491443420921822590709910448617329156135355464620891788459566081572824889514296350670950824208245170667601726417091127999999941149913010424532046881958285409468463211897582215075436515584016297874572183907949257286261608612401379639484713101138120404671732190451327881433201025184027541696124114463488665359385870910331476156665889459832092710304159637019707297988417848767011085425271875588008671422491434005115288334343837778792282383576736341414410248994081564830202363820504190074504566612515965134665683289356188727549463732830075811851574961558669278847363279870595320099844676879457196432535973357128305390290471349480258751812890314779723508104229525161740643984423978659638233074463100366500571977234508464710078102581304823235436518145074482824812996511614161933313389889630935320139507075992100561077534028207257574257706278201308302642634678112591091843082665721697117838726431766741158743554298864560993255547608496686850185804659790217122426535133253371422250684486113457341827911625517128815447325958547912113242367201990672230681308819195941016156001961954700241576553750737681552256845421159386858399433450045903975167084252876848848085910156941603293424067793097271128806817514906531652407763118308162377033463203514657531210413149191213595455280387631030665594589183601575340027172997222489081631144728873621805528648768511368948639522975539046995395707688938978847084621586473529546678958226255042389998718141303055036060772003887773038422366913820397748550793178167220193346017430024134496141145991896227741842515718997898627269918236920453493946658273870473264523119133765447653295022886429174942653014656521909469613184983671431465934965489425515981067546087342348350724207583544436107294087637975025147846254526938442435644928231027868701394819091132912397475713787593612758364812687556725146456646878912169274219209708166678668152184941578590201953144030519381922273252666652671717526318606676754556170379350956342095455612780202199922615392785572481747913435560866995432578680971243966868110016581395696310922519803685837460795358384618017215468122880442252343684547233668502313239328352671318130604247460452134121833305284398726438573787798499612760939462427922917659263046333084007208056631996856315539698234022953452211505675629153637867252695056925345220084020071611220575700841268302638995272842160994219632684575364180160991884885091858259996299627148614456696661412745040519981575543804847463997422326563897043803732970397488471644906183310144691243649149542394691524972023935190633672827306116525712882959108434211652465621144702015336657459532134026915214509960877430595844287585350290234547564574848753110281101545931547225811763441710217452979668178025286460158324658852904105792472468108996135476637212057508192176910900422826969523438985332067597093454021924077101784215936539638808624420121459718286059401823614213214326004270471752802725625810953787713898846144256909835116371235019527013180204030167601567064268573820697948868982630904164685161783088076506964317303709708574052747204405282785965604677674192569851918643651835755242670293612851920696732320545562286110332140065912751551110134916256237884844001366366654055079721985816714803952429301558096968202261698837096090377863017797020488044826628817462866854321356787305635653577619877987998113667928954840972022833505708587561902023411398915823487627297968947621416912816367516125096563705174220460639857683971213093125°persist_js_stateÂÙ$6332b2f2-ed2f-448a-b1df-247b110e335bЧrunning§runtimeÎ ·þ¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$6332b2f2-ed2f-448a-b1df-247b110e335b¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|Sð/ý·has_pluto_hook_features¤bodyÚ÷
Que faire si que $m$ est impair, c'est à dire $m = 2k + 1$ ...
Si $b = a^{2k}$ , calcule le produit $b \times a$ .
°persist_js_stateÂÙ$2381babe-0777-45db-acff-cc647a8a68d3Чrunning§runtimeÎ
Af¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$2381babe-0777-45db-acff-cc647a8a68d3¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassignee¬power_slider²last_run_timestampËAÚ¼|UГ«·has_pluto_hook_features¤bodyÚ"l251 °persist_js_stateÂÙ$72ec8410-05d9-475a-93d4-47153cc0ce31Чrunning§runtimeÎ Y6¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$72ec8410-05d9-475a-93d4-47153cc0ce31¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|Tiƒ·has_pluto_hook_features¤bodyÙ(fib_rec (generic function with 1 method)°persist_js_stateÂÙ$48eba223-6cce-4aa2-9977-4883ba7903fcЧrunning§runtimeÎ ª÷¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$48eba223-6cce-4aa2-9977-4883ba7903fc¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|S<œ·has_pluto_hook_features¤bodyÚ a
Observation finale Si $a$ et $b$ sont positifs et qu'on effectue la substitution $(a, b) \to (b, r)$ récursivement, le mono-variant impose qu'on ne puisse itérer qu'un nombre fini de fois, que va-t-il se passer ?
La paire $(a, b)$ va diminuer strictement (c'est à dire d'au moins 1) à chaque itération. Pourtant, ce sont des nombres entier positifs donc ils ne peuvent diminuer strictement qu'un nombre fini de fois. C'est une contradiction, comme cela se fait-il ? À un moment $b$ vaudra 0, on ne pourra alors plus faire de division Euclidienne. On utilisera alors le fait que $\text{gcd}(a, 0) = a$ .
°persist_js_stateÂÙ$1ca71c26-f98c-4126-a1c5-98786fde7e9bЧrunning§runtimeÎ Ìødepends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$1ca71c26-f98c-4126-a1c5-98786fde7e9b¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NG¦H·has_pluto_hook_features¤bodyÚ¶Trouver $b$ tel que $x_k$ est solution:
$$x_k = b^k
\quad \to \quad b^{k+1} = b^k + b^{k-1}
\quad \to \quad b^2 - b - 1 = 0
\quad \to \quad b = \frac{1 \pm \sqrt{5}}{2}$$
On a donc une famille de solutions:
$$x_k = a_1
\left(\frac{1 - \sqrt5}{2}\right)^k +
a_2
\left(\frac{1 + \sqrt5}{2}\right)^k$$
Il reste à trouver $a_1$ et $a_2$ tels que $x_0 = 0$ et $x_1 = 1$ . Ça correspond à calculer E.vectors \ [1, 0], etc...
$$\begin{align}
x_0 & = 0 & a_1 + a_2 & = 0\\
x_1 & = 1 & a_1 \frac{1 - \sqrt5}{2} + a_2 \frac{1 + \sqrt5}{2} & = 1
\end{align}$$
Donc $a_1 = -1/\sqrt5$ et $a_2 = 1/\sqrt5$ .
°persist_js_stateÂÙ$3026f9c5-81d3-443a-940a-f22fef9754afЧrunning§runtimeÎ d¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$3026f9c5-81d3-443a-940a-f22fef9754af¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|U‘�s·has_pluto_hook_features¤bodyÙ,giant_steps (generic function with 1 method)°persist_js_stateÂÙ$821de132-559b-4420-b866-e97134c5bd9aЧrunning§runtimeÎ a¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$821de132-559b-4420-b866-e97134c5bd9a¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|T
-{·has_pluto_hook_features¤bodyÙ:chinese_remainder_theorem (generic function with 1 method)°persist_js_stateÂÙ$0ee6972c-5069-4ba0-887f-be64c7d000d0Чrunning§runtimeÎ ç¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$0ee6972c-5069-4ba0-887f-be64c7d000d0¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NBß·has_pluto_hook_features¤bodyÙj
Arithmétique modulaire : somme
°persist_js_stateÂÙ$4853f4ef-fbb8-48c3-9523-13ab4969d097Чrunning§runtimeÎ ª2¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$4853f4ef-fbb8-48c3-9523-13ab4969d097¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|UŠBt·has_pluto_hook_features¤bodyÙ+baby_steps (generic function with 1 method)°persist_js_stateÂÙ$b57adc77-3783-4958-91a0-e90782338755Чrunning§runtimeÎ ý¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$b57adc77-3783-4958-91a0-e90782338755¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassignee¨slider_a²last_run_timestampËAÚ¼|U¨Â·has_pluto_hook_features¤bodyÚä11 °persist_js_stateÂÙ$c376513c-6553-4cd6-8384-ae6ff9d472d7Чrunning§runtimeÎ ½ž¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$c376513c-6553-4cd6-8384-ae6ff9d472d7¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NIX·has_pluto_hook_features¤bodyÙz$$A \equiv g^a \pmod{p} \qquad B \equiv g^b \pmod{p}$$
°persist_js_stateÂÙ$37585789-bd43-4ce5-b550-ad712b70d226Чrunning§runtimeÎ ¹ƒ¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$37585789-bd43-4ce5-b550-ad712b70d226¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NB†ì·has_pluto_hook_features¤bodyÚÄ
Définition Le résultat de la division Euclidienne de $a$ par un diviseur $d$ est un quotient $q$ et un reste $0 \le r < d$ tels que $a = qd + r$ . En notation modulaire $a \equiv r \pmod{d}$ .
°persist_js_stateÂÙ$78df9410-5ea4-4d9f-bbe5-862f76a100fcЧrunning§runtimeÎ Ó¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$78df9410-5ea4-4d9f-bbe5-862f76a100fc¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NF8°·has_pluto_hook_features¤bodyÙ¯$30x \equiv j \pmod{7} \quad \Rightarrow \quad x \equiv (30)^{-1} j\pmod{7}$
°persist_js_stateÂÙ$9e8a61d9-a700-4851-b1cd-49ce042c3530Чrunning§runtimeÎ
Õ³¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$9e8a61d9-a700-4851-b1cd-49ce042c3530¹depends_on_disabled_cells¦queued¤logs‘ˆ¥group¦stdout¤lineÿ£msg’Ù. 0.000016 seconds (5 allocations: 176 bytes)
ªtext/plain¥level®LogLevel(-555)¢id´PlutoRunner_40f9f5d1§cell_idÙ$9e8a61d9-a700-4851-b1cd-49ce042c3530¦kwargs�¤fileÙP/home/runner/.julia/packages/Pluto/reLAF/src/runner/PlutoRunner/src/io/stdout.jl¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|UÓ›$·has_pluto_hook_features¤bodyÙL3618502788666131106986593281521497120414687020801267626233049500247285301248°persist_js_stateÂÙ$e505716d-af01-455f-a55a-a9c225822ad5Чrunning§runtimeÎ ”c¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$e505716d-af01-455f-a55a-a9c225822ad5¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NF¢‡·has_pluto_hook_features¤bodyÙ€Comment calculer $a^m$ pour un large $m$ ?
°persist_js_stateÂÙ$61462af5-69bd-42be-8918-7992c79ee00dЧrunning§runtimeÎ ]¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$61462af5-69bd-42be-8918-7992c79ee00d¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|TÈÖ·has_pluto_hook_features¤bodyÚ
Comment savoir si prime_list contient assez de nombres pour avoir la bonne réponse ?
On a la bonne réponse modulo prod(prime_list) donc si prod(prime_list) > 2^power, on a la bonne réponse.
°persist_js_stateÂÙ$15367f3b-c7e4-4004-a018-5422a7f22024Чrunning§runtimeÎ v¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$15367f3b-c7e4-4004-a018-5422a7f22024¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NHRÊ·has_pluto_hook_features¤bodyÙ¬On peut mettre le vecteur de taille $n^2$ sous forme de matrice de taille $n \times n$
°persist_js_stateÂÙ$6e5e3ec6-c96a-4a4a-bf4d-4b115f9b0d82Чrunning§runtimeÎ ,¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$6e5e3ec6-c96a-4a4a-bf4d-4b115f9b0d82¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|U˜ô·has_pluto_hook_features¤bodyÙ*collision (generic function with 1 method)°persist_js_stateÂÙ$64eb4b52-4946-467c-867a-a6fc437b15f6Чrunning§runtimeÎ //¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$64eb4b52-4946-467c-867a-a6fc437b15f6¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NH) ·has_pluto_hook_features¤bodyÙb
Meet in the middle approach
°persist_js_stateÂÙ$bbb2793a-faa4-43bd-b2e8-e8d3ac93310fЧrunning§runtimeÎ v%¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$bbb2793a-faa4-43bd-b2e8-e8d3ac93310f¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NFyp·has_pluto_hook_features¤bodyÙ…S'il y avait 364 jours par ans, les fêtes seraient toujours le même jour de la semaine!
°persist_js_stateÂÙ$ec14d629-b720-47cd-bc08-ff96f49271abЧrunning§runtimeÎ Œª¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$ec14d629-b720-47cd-bc08-ff96f49271ab¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|U€/j·has_pluto_hook_features¤bodyÙ-discrete_log (generic function with 1 method)°persist_js_stateÂÙ$bc58ba24-90f0-4913-8f66-10bb6cb54076Чrunning§runtimeΠǶ¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$bc58ba24-90f0-4913-8f66-10bb6cb54076¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NGêÙ·has_pluto_hook_features¤bodyÚœDéfinition $g$ est une racine primitive modulo $p$ si $g^k$ prend toutes les valeurs $1, 2, ..., p - 1$ .
$$\text{Si } \quad p \nmid b,\quad \text{ alors } \quad
b^{p - 1} \equiv 1 \pmod{p}$$
°persist_js_stateÂÙ$f86a5efc-d31e-4e88-b81f-ebdbbeba11ecЧrunning§runtimeÎ Þ¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$f86a5efc-d31e-4e88-b81f-ebdbbeba11ec¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NH’£·has_pluto_hook_features¤bodyÚªOn doit donc trouver la ligne $i$ et la ligne et $j$ tels que
$$\begin{align}
g^{i-1}g^{(j-1)n} & \equiv a & \pmod{p}\\
g^{i-1} & \equiv a(g^{-n})^{j-1} & \pmod{p}
\end{align}$$
Ils ne reste plus qu'Ã chercher une collision entre les listes de restes modulo $p$ pour $g^{i-1}$ et $a(g^{-n})^{j-1}$ . L'identification des collision peut se faire en $\mathcal{O}(\sqrt{n}\log(n))$ avec une recherche dichotomique our en $\mathcal{O}(\sqrt{n})$ amorti avec un dictionaire.
°persist_js_stateÂÙ$83852dd5-3546-45af-a845-b01dab0aa2a6Чrunning§runtimeÎ ,ÿ¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$83852dd5-3546-45af-a845-b01dab0aa2a6¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NCË£·has_pluto_hook_features¤bodyÙf
Inverse et division modulaire
°persist_js_stateÂÙ$8315b53f-abca-483d-bbf6-7e9193e751c9Чrunning§runtimeÎ ô¸à¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$8315b53f-abca-483d-bbf6-7e9193e751c9¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|UøÂU·has_pluto_hook_features¤bodyÙ*draw_fib (generic function with 2 methods)°persist_js_stateÂÙ$4c2d45e3-56a2-467f-b87f-7b98cb873a05Чrunning§runtimeÎñâò¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$4c2d45e3-56a2-467f-b87f-7b98cb873a05¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeÙ!application/vnd.pluto.tree+object¬rootassigneeÀ²last_run_timestampËAÚ¼|Uå©T·has_pluto_hook_features¤body…¦prefix¥Int64¨objectid°3ac154cd660e8f97¤type¥Array¬prefix_short ¨elementsÜ ’’¡2ªtext/plain’’¡3ªtext/plain’’¡4ªtext/plain’’¡2ªtext/plain’’¡7ªtext/plain’’¡8ªtext/plain’’¢10ªtext/plain’’¡6ªtext/plain’ ’¢15ªtext/plain’
’¡2ªtext/plain’’¢19ªtext/plain’’¢39ªtext/plain’
’¢22ªtext/plain’’¢12ªtext/plain’’¢50ªtext/plain’’¢14ªtext/plain’’¢35ªtext/plain’’¢41ªtext/plain’’¢64ªtext/plain’’¢37ªtext/plain’’¢11ªtext/plain’’¢32ªtext/plain’’¢67ªtext/plain’’¢11ªtext/plain°persist_js_stateÂÙ$3df688c8-1c52-462d-88be-daa153333c60Чrunning§runtimeÎ Äè¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$3df688c8-1c52-462d-88be-daa153333c60¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|N<ít·has_pluto_hook_features¤bodyÚW
Théorie des nombres: Hoffstein et al., 1.2, 1.3, 1.4, 1.5, 2.2, 2.3
Discrete Logarithme Problem et Diffie-Hellman: Hoffstein et al., 2.2, 2.3, 2.6, 2.7, 2.8
°persist_js_stateÂÙ$e9633e3f-376d-413d-bc19-d015f6ce76e5Чrunning§runtimeÍQõ¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$e9633e3f-376d-413d-bc19-d015f6ce76e5¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|Uð¨e·has_pluto_hook_features¤bodyÙL3618502788666131106986593281521497120414687020801267626233049500247285301248°persist_js_stateÂÙ$ae89661a-2c0f-4752-adc2-023f09dc0e9fЧrunning§runtimeÎ h?#¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$ae89661a-2c0f-4752-adc2-023f09dc0e9f¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|VRIE·has_pluto_hook_features¤bodyÙK4×4 Matrix{Int64}:
1 16 1 16
2 15 2 15
4 13 4 13
8 9 8 9°persist_js_stateÂÙ$6f10de7b-ce05-4f82-82e7-4110be44e8ccЧrunning§runtimeÍWɸdepends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$6f10de7b-ce05-4f82-82e7-4110be44e8cc¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|UÛŽ"·has_pluto_hook_features¤body¦252248°persist_js_stateÂÙ$d6b89fda-308f-43da-8028-1a812b4516cfЧrunning§runtimeÎ –¶¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$d6b89fda-308f-43da-8028-1a812b4516cf¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|S;º·has_pluto_hook_features¤bodyÚ F
Observation clé Que dit le théorème de Bézout par rapport à $\text{gcd}(d, r)$ et $a$ .
Le nombre $a$ est divisible par $\text{gcd}(d, r)$ . Le nombre $\text{gcd}(d, r)$ divise donc les 3 nombres, $a$ , $d$ et $r$ et donc $\text{gcd}(d, r) = \text{gcd}(a, d, r)$ . En combinant ça avec l'observation précédente, on a $\text{gcd}(a, d) = \text{gcd}(d, r)$ . On peut généraliser cela en le lemme suivant:
°persist_js_stateÂÙ$e2a3842d-4e07-4703-ab47-a5140649dd6aЧrunning§runtimeÍC@¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$e2a3842d-4e07-4703-ab47-a5140649dd6a¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeÙ!application/vnd.pluto.tree+object¬rootassigneeÀ²last_run_timestampËAÚ¼|VAŒÎ·has_pluto_hook_features¤body…¦prefix¥Int64¨objectid°b49e4fcdcee5e3a2¤type¥Array¬prefix_short ¨elementsš’’¡1ªtext/plain’’¡2ªtext/plain’’¡3ªtext/plain’’¡4ªtext/plain’’¡5ªtext/plain’’¡6ªtext/plain’’¡7ªtext/plain’’¡8ªtext/plain’ ’¡9ªtext/plain’
’¢10ªtext/plain°persist_js_stateÂÙ$9d4858f8-e63d-46e0-a6cc-992d3cc4a9a4Чrunning§runtimeÎ Qv¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$9d4858f8-e63d-46e0-a6cc-992d3cc4a9a4¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|T¨]·has_pluto_hook_features¤bodyÚß
Comment trouver mod(2^power, 999000) en utilisant pow_1000 et pow_999 ?
On peut utiliser une astuce similaire à l'interpolation Lagrangienne. On veut trouver $x$ et $y$ tels que
$$\texttt{pow\_1000}x + \texttt{pow\_999}y \equiv 2^\texttt{power} \pmod{999000}$$
On veut que $x \equiv 0 \pmod{999}$ et $x \equiv 1 \pmod{1000}$ . On utilise donc $x = 999x'$ avec $x' \equiv (999)^{-1} \pmod{1000}$ .
°persist_js_stateÂÙ$d882afdd-eb85-467c-bf18-525c0c5da5e7Чrunning§runtimeÎ W¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$d882afdd-eb85-467c-bf18-525c0c5da5e7¹depends_on_disabled_cells¦queued¤logs‘ˆ¥group¦stdout¤lineÿ£msg’Ù/ 0.000060 seconds (39 allocations: 2.609 KiB)
ªtext/plain¥level®LogLevel(-555)¢id´PlutoRunner_40f9f5d1§cell_idÙ$d882afdd-eb85-467c-bf18-525c0c5da5e7¦kwargs�¤fileÙP/home/runner/.julia/packages/Pluto/reLAF/src/runner/PlutoRunner/src/io/stdout.jl¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|UwDзhas_pluto_hook_features¤bodyÙU2.531162323732361578998428490601662084769270923897910687031954402219719762339543e4179°persist_js_stateÂÙ$03e49669-cdee-4241-862d-33ee91214455Чrunning§runtimeÎ ›ñ¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$03e49669-cdee-4241-862d-33ee91214455¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NBË>·has_pluto_hook_features¤bodyÙªThe complexity is difficult to evaluate but can be shown to be $O(\log(\min(a, b)))$ .
°persist_js_stateÂÙ$e52d25b3-65bf-4617-ae8d-fae0d0c8d041Чrunning§runtimeÎ ƒ¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$e52d25b3-65bf-4617-ae8d-fae0d0c8d041¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NFdà·has_pluto_hook_features¤bodyÙ±$366x \equiv j \pmod{7} \quad \Rightarrow \quad x \equiv (366)^{-1} j\pmod{7}$
°persist_js_stateÂÙ$ed3d6ea6-08c9-45d0-8b77-3389a557bfd1Чrunning§runtimeÍŠà¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$ed3d6ea6-08c9-45d0-8b77-3389a557bfd1¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeÙ!application/vnd.pluto.tree+object¬rootassigneeÀ²last_run_timestampËAÚ¼|SïWi·has_pluto_hook_features¤body…¦prefix¥Int64¨objectid°66dd7918939113c7¤type¥Array¬prefix_short ¨elements—’’¡0ªtext/plain’’¡4ªtext/plain’’¡1ªtext/plain’’¡5ªtext/plain’’¡2ªtext/plain’’¡6ªtext/plain’’¡3ªtext/plain°persist_js_stateÂÙ$7da0705e-c925-4f8d-9ca4-8d8a0f859feaЧrunning§runtimeÎ €H¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$7da0705e-c925-4f8d-9ca4-8d8a0f859fea¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NFN·has_pluto_hook_features¤bodyÙ±$365x \equiv j \pmod{7} \quad \Rightarrow \quad x \equiv (365)^{-1} j\pmod{7}$
°persist_js_stateÂÙ$c3411941-d77f-46cb-8378-23998a1a4828Чrunning§runtimeÎ .ê¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$c3411941-d77f-46cb-8378-23998a1a4828¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NC
·has_pluto_hook_features¤bodyÙR
Division par 3 et 9
°persist_js_stateÂÙ$9bdb30ba-48a7-4e1b-96c2-ea0e059d5253Чrunning§runtimeÍ=Ú¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$9bdb30ba-48a7-4e1b-96c2-ea0e059d5253¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|VDܾ·has_pluto_hook_features¤body¡3°persist_js_stateÂÙ$736307ec-a2a4-11ef-0f85-ad1a0093e06aЧrunning§runtimeÎ 8Ÿdepends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$736307ec-a2a4-11ef-0f85-ad1a0093e06a¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|N6§ë·has_pluto_hook_features¤bodyÙZ
La théorie des nombres
°persist_js_stateÂÙ$40b8e474-16e0-4a61-bb28-11d90beefeeaЧrunning§runtimeÍH¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$40b8e474-16e0-4a61-bb28-11d90beefeea¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|SÍÚˆ·has_pluto_hook_features¤body¡1°persist_js_stateÂÙ$6e59ee60-ef73-45ca-86eb-4d8a44c73771Чrunning§runtimeÎ ¦¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$6e59ee60-ef73-45ca-86eb-4d8a44c73771¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|S;p~·has_pluto_hook_features¤bodyÚr
Observation clé Que dit le théorème de Bézout par rapport à $\text{gcd}(a, d)$ et $r$ .
Le reste $r$ est divisible par $\text{gcd}(a, d)$ . Le nombre $\text{gcd}(a, d)$ divise donc les 3 nombres, $a$ , $d$ et $r$ et donc $\text{gcd}(a, d) = \text{gcd}(a, d, r)$ .
°persist_js_stateÂÙ$08dcbbd3-a531-4f74-a724-1cae8fae1636Чrunning§runtimeÎ m ¬¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$08dcbbd3-a531-4f74-a724-1cae8fae1636¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|VB:›·has_pluto_hook_features¤bodyÙcLe nombre 2 est une racine primitive modulo 11
°persist_js_stateÂÙ$16b677e4-c467-462a-b770-b7a31160e129Чrunning§runtimeÍ=ž¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$16b677e4-c467-462a-b770-b7a31160e129¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeÙ!application/vnd.pluto.tree+object¬rootassigneeªprime_list²last_run_timestampËAÚ¼|T•ž·has_pluto_hook_features¤body…¦prefix¥Int64¨objectid°3bc5efc83288eb4f¤type¥Array¬prefix_short ¨elementsÜ ’’¡3ªtext/plain’’¡5ªtext/plain’’¡7ªtext/plain’’¢11ªtext/plain’’¢13ªtext/plain’’¢17ªtext/plain’’¢19ªtext/plain’’¢23ªtext/plain’ ’¢29ªtext/plain’
’¢31ªtext/plain’’¢37ªtext/plain’’¢41ªtext/plain’
’¢43ªtext/plain’’¢47ªtext/plain’’¢53ªtext/plain’’¢59ªtext/plain’’¢61ªtext/plain’’¢67ªtext/plain’’¢71ªtext/plain’’¢73ªtext/plain’’¢79ªtext/plain’’¢83ªtext/plain’’¢89ªtext/plain’’¢97ªtext/plain°persist_js_stateÂÙ$2c34c17e-12de-43ea-870c-818c97647836Чrunning§runtimeÎ ^¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$2c34c17e-12de-43ea-870c-818c97647836¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|ND<ï·has_pluto_hook_features¤bodyÙz
Inversion modulaire par Euclide étendu
°persist_js_stateÂÙ$21df1900-3954-4506-b759-aeeee664d1dfЧrunning§runtimeÎ œ¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$21df1900-3954-4506-b759-aeeee664d1df¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|S×l3·has_pluto_hook_features¤bodyÙ'modinv (generic function with 1 method)°persist_js_stateÂÙ$d830fffd-3781-40ca-85cb-c242f99667ceЧrunning§runtimeÎ >’¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$d830fffd-3781-40ca-85cb-c242f99667ce¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|UOW ·has_pluto_hook_features¤bodyÙ)fib_diag (generic function with 1 method)°persist_js_stateÂÙ$08b18315-c28e-44ed-beb2-5b17421b0224Чrunning§runtimeÎ MÛ¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$08b18315-c28e-44ed-beb2-5b17421b0224¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NBQ±·has_pluto_hook_features¤bodyÚ•
Définition Le Greatest Common Divisor (GCD) de deux nombres $a \in \mathbb{Z}$ et $b \in \mathbb{Z}$ , noté $\text{gcd}(a, b)$ est le plus grand nombre $g \in \mathbb{Z}$ qui divise $a$ (noté $g \mid a$ ) et $b$ (noté $g \mid b$ ). C'est à dire qu'il existe $x \in \mathbb{Z}$ tel que $a = gx$ et $y \in \mathbb{Z}$ tel que $b = gy$ . En notation modulaire, $a \equiv 0 \pmod{g}$ et $b \equiv 0 \pmod{g}$ .
Théorème de Bézout Il existe $x, y \in \mathbb{Z}$ tels que $ax + by = c$ si et seulement si $\text{gcd}(a, b)$ divise $c$ . En notation modulaire $ax \equiv c \pmod{b}$ et $by \equiv c \pmod{a}$ .
°persist_js_stateÂÙ$8670abc2-63e6-496a-b20c-812197acd9adЧrunning§runtimeÎ ý¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$8670abc2-63e6-496a-b20c-812197acd9ad¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|T5‹·has_pluto_hook_features¤bodyÙ/fast_mod_power (generic function with 1 method)°persist_js_stateÂÙ$227e415e-ab17-4f3a-b695-9573c9ee2b57Чrunning§runtimeÎ Be¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$227e415e-ab17-4f3a-b695-9573c9ee2b57¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|U ¹Z·has_pluto_hook_features¤bodyÚH
What is the relation between $A'$ and $B'$ ?
$$A' \equiv (g^b)^a \equiv g^{ab} \equiv (g^{a})^b \equiv B' \pmod{p}$$
Alice et Bob ont donc maintenant la même clef! Il est cependant difficile de trouver $A'$ depuis $A$ et $B$ sans connaitre les secrets $a$ ou $b$ si le Discrete Logarithm Problem est difficile.
°persist_js_stateÂÙ$67093a35-8e1b-4cd3-b11b-c7ff601f802eЧrunning§runtimeΠɲ¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$67093a35-8e1b-4cd3-b11b-c7ff601f802e¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|Tµ¦·has_pluto_hook_features¤bodyÚ
�°persist_js_stateÂÙ$7f9bd301-355b-43f5-b168-22fac9e52511Чrunning§runtimeÎ #ìý¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$7f9bd301-355b-43f5-b168-22fac9e52511¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeÙ!application/vnd.pluto.tree+object¬rootassigneeÀ²last_run_timestampËAÚ¼|U¡f#·has_pluto_hook_features¤body…¦prefix¥Int64¨objectid¯c8712e0d75202bd¤type¥Array¬prefix_short ¨elements”’’¡2ªtext/plain’’¡3ªtext/plain’’¡5ªtext/plain’’¡7ªtext/plain°persist_js_stateÂÙ$3f1af973-a02b-4e06-8e6e-eff414fcaf67Чrunning§runtimeÎ ?à¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$3f1af973-a02b-4e06-8e6e-eff414fcaf67¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|S¸õ·has_pluto_hook_features¤bodyÙ&pgcdx (generic function with 1 method)°persist_js_stateÂÙ$fe2af566-4a8b-4052-9915-85266ee5ce98Чrunning§runtimeÎc•¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$fe2af566-4a8b-4052-9915-85266ee5ce98¹depends_on_disabled_cells¦queued¤logs‘ˆ¥group¦stdout¤lineÿ£msg’Ú gcd(90284599, 249357461) =
gcd(249357461, 90284599) =
gcd(90284599, 68788263) =
gcd(68788263, 21496336) =
gcd(21496336, 4299255) =
gcd(4299255, 61) =
gcd(61, 36) =
gcd(36, 25) =
gcd(25, 11) =
gcd(11, 3) =
gcd(3, 2) =
gcd(2, 1) =
gcd(1, 0) =
1
ªtext/plain¥level®LogLevel(-555)¢id´PlutoRunner_40f9f5d1§cell_idÙ$fe2af566-4a8b-4052-9915-85266ee5ce98¦kwargs�¤fileÙP/home/runner/.julia/packages/Pluto/reLAF/src/runner/PlutoRunner/src/io/stdout.jl¦output†¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ¼|S°z³·has_pluto_hook_features¤body¡1°persist_js_stateÂÙ$6ed7c73d-60da-4908-85cb-958745d81ebcЧrunning§runtimeÎ œT¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$6ed7c73d-60da-4908-85cb-958745d81ebc¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NGb·has_pluto_hook_features¤bodyÙÜPar l'algo d'Euclide, $\text{gcd}(n, n - 1) = 1$ donc $\text{gcd}(1000, 999) = 1$ .
°persist_js_stateÂÙ$708c442b-cbff-4e1a-b70d-e704453cfd3dЧrunning§runtimeÎ!'ôå¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$708c442b-cbff-4e1a-b70d-e704453cfd3d¹depends_on_disabled_cells¦queued¤logs�¦output†¤mimeÙ,application/vnd.pluto.reactdomelement+object¬rootassigneeÀ²last_run_timestampËAÚ¼|V9°À·has_pluto_hook_features¤bodyƒ¨children’’ڟÉquation de récurrence:
$$x_{k+1} = x_k + x_{k-1}$$
Reformulation sans $(k-1)$
$$\begin{align}
x_{k+1} & = x_k + y_{k}\\
y_{k+1} & = x_k
\end{align}$$
Forme matricielle:
$$\begin{bmatrix}
x_{k+1}\\
y_{k+1}
\end{bmatrix}
=
\begin{bmatrix}
1 & 1\\
1 & 0
\end{bmatrix}
\begin{bmatrix}
x_{k}\\
y_{k}
\end{bmatrix}$$
Matrix power:
$$\begin{bmatrix}
x_n\\
y_n
\end{bmatrix}
=
\begin{bmatrix}
1 & 1\\
1 & 0
\end{bmatrix}^n
\begin{bmatrix}
x_0\\
y_0
\end{bmatrix}$$
©text/html’Úî©text/htmlªattributes�¥styleÙWjustify-content: space-around; display: flex; flex-direction: row; align-items: center;£tag£div°persist_js_stateÂÙ$1b2245f8-2f02-4c4d-b6d2-e65af1f2a21eЧrunning§runtimeÎ Yܸdepends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$1b2245f8-2f02-4c4d-b6d2-e65af1f2a21e¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|NFÞ@·has_pluto_hook_features¤bodyÙ1°persist_js_stateÂÙ$a7d06375-e4dd-47b1-8aba-11dc4d62954bЧrunning§runtimeÎ Sº¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$a7d06375-e4dd-47b1-8aba-11dc4d62954b¹depends_on_disabled_cells¦queued¤logs�¦output†¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ¼|Sð´·has_pluto_hook_features¤bodyÚ(
Supposons que $m$ est pair, c'est à dire $m = 2k$ ...
On a $a^{2k} = (a^k)^2$ . Si $b = a^k$ , on calcule le produit $b \times b$ .
°persist_js_state±published_objects€julia_version§v1.13.3±cell_dependenciesÞ £Ù$a7985d16-500b-4024-aaa1-78e654b94be4„´precedence_heuristic §cell_idÙ$a7985d16-500b-4024-aaa1-78e654b94be4´downstream_cells_map€²upstream_cells_map„§PlutoUI‘Ù$06679a09-47d7-4024-8232-4954c08747a0§@md_str�¨getindex�¯PlutoUI.details�Ù$eb311761-ace2-4632-9ebf-9c7c166659f7„´precedence_heuristic §cell_idÙ$eb311761-ace2-4632-9ebf-9c7c166659f7´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$d8a28762-8aab-49e9-b9ac-38901d34abff„´precedence_heuristic §cell_idÙ$d8a28762-8aab-49e9-b9ac-38901d34abff´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$a826d9d1-47db-4645-be6e-3ae0ed8d4e18„´precedence_heuristic §cell_idÙ$a826d9d1-47db-4645-be6e-3ae0ed8d4e18´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$8f6ba1c4-a971-4dc4-ac5d-2f30790aecde„´precedence_heuristic §cell_idÙ$8f6ba1c4-a971-4dc4-ac5d-2f30790aecde´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$a293bb0e-078d-4335-a446-3096a79c03bc„´precedence_heuristic §cell_idÙ$a293bb0e-078d-4335-a446-3096a79c03bc´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$38744170-9af6-44b5-a0be-46a83da3253e„´precedence_heuristic §cell_idÙ$38744170-9af6-44b5-a0be-46a83da3253e´downstream_cells_map�§fib_pow“Ù$a1081bb2-2186-4b19-b667-0c246155f360Ù$4cb070de-e8bf-4a1d-9625-043c19466c46Ù$192f608c-0563-4179-903f-49fad2db4c74²upstream_cells_map„¡^�¡-�¦BigInt�¡*�Ù$87fdefa1-3bbd-4b69-ad3a-72baca6e55ee„´precedence_heuristic §cell_idÙ$87fdefa1-3bbd-4b69-ad3a-72baca6e55ee´downstream_cells_map€²upstream_cells_map…¡a‘Ù$b57adc77-3783-4958-91a0-e90782338755¡n‘Ù$256c8009-4d2b-42f8-adaa-6f238ef22c6d£mod�¡+�¡b‘Ù$18031ccb-657f-409a-9080-9a0ada3ae8b5Ù$77093b36-c232-4477-be49-845f1a631829„´precedence_heuristic §cell_idÙ$77093b36-c232-4477-be49-845f1a631829´downstream_cells_map�¨pow_1000’Ù$6f10de7b-ce05-4f82-82e7-4110be44e8ccÙ$ec25ce2a-de8a-4b69-a3f3-b47cd58ec986²upstream_cells_mapÞ ¯Base.time_print�«Base.gc_num�»Base.Threads.lock_profiling�³Base.gc_alloc_count�«Base.string�¦Base./�®fast_mod_power‘Ù$8670abc2-63e6-496a-b20c-812197acd9ad¬Base.GC_Diff�¥@time�¥power‘Ù$2381babe-0777-45db-acff-cc647a8a68d3¿Base.cumulative_compile_time_ns�¦Base.-�¤Base�¬Base.time_ns�¨Base.===�¦Base.*�¾Base.cumulative_compile_timing�Ù$462fa407-d973-4e9e-8512-b7cd3bb98b7b„´precedence_heuristic §cell_idÙ$462fa407-d973-4e9e-8512-b7cd3bb98b7b´downstream_cells_map�§fib_seq‘Ù$3cd40d9e-fcea-427d-9877-cea65e7ea413²upstream_cells_map…¥zeros�¡:�¡+�¡-�¦BigInt�Ù$ca8905ef-97a3-424c-bb2e-559f7151585b„´precedence_heuristic §cell_idÙ$ca8905ef-97a3-424c-bb2e-559f7151585b´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$59817f59-429b-4f17-a46a-185571fd1e5a„´precedence_heuristic §cell_idÙ$59817f59-429b-4f17-a46a-185571fd1e5a´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$ee43c389-55f4-4cf9-a8db-ce37d1b89db4„´precedence_heuristic §cell_idÙ$ee43c389-55f4-4cf9-a8db-ce37d1b89db4´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$9b9fc5e6-1a41-43c5-ba43-2c93bc3ef66b„´precedence_heuristic §cell_idÙ$9b9fc5e6-1a41-43c5-ba43-2c93bc3ef66b´downstream_cells_map€²upstream_cells_mapÞ ¯Base.time_print�«Base.gc_num�»Base.Threads.lock_profiling�«Base.string�³Base.gc_alloc_count�¦Base./�¬Base.GC_Diff�¥@time�ªfib_closed‘Ù$535f4bc1-e88c-47c7-990b-e3c8b5054acc¿Base.cumulative_compile_time_ns�¦Base.-�¤Base�¬Base.time_ns�¨Base.===�¦Base.*�¾Base.cumulative_compile_timing�Ù$cd481f6c-66f4-4ebf-9769-c3edc24f403b„´precedence_heuristic §cell_idÙ$cd481f6c-66f4-4ebf-9769-c3edc24f403b´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$9752afbb-96e6-4f96-92cb-09654cf46155„´precedence_heuristic §cell_idÙ$9752afbb-96e6-4f96-92cb-09654cf46155´downstream_cells_map€²upstream_cells_map„§PlutoUI‘Ù$06679a09-47d7-4024-8232-4954c08747a0§@md_str�¨getindex�¯PlutoUI.details�Ù$7bad8c6c-45c7-402f-ad59-6857e9268901„´precedence_heuristic §cell_idÙ$7bad8c6c-45c7-402f-ad59-6857e9268901´downstream_cells_map€²upstream_cells_map„§PlutoUI‘Ù$06679a09-47d7-4024-8232-4954c08747a0§@md_str�¨getindex�¯PlutoUI.details�Ù$0c8ab02e-80b0-44d6-a4a8-c813aac38209„´precedence_heuristic §cell_idÙ$0c8ab02e-80b0-44d6-a4a8-c813aac38209´downstream_cells_map‚¥fib_n‘Ù$708c442b-cbff-4e1a-b70d-e704453cfd3dªfib_picker‘Ù$708c442b-cbff-4e1a-b70d-e704453cfd3d²upstream_cells_map‰¤Base�¡:�¥@bind�¨Base.get�«PlutoRunner�¦Slider�¯Core.applicable�¤Core�·PlutoRunner.create_bond�Ù$059b0ada-2442-48e4-82dd-489cb97e5dcc„´precedence_heuristic §cell_idÙ$059b0ada-2442-48e4-82dd-489cb97e5dcc´downstream_cells_map€²upstream_cells_map�©gp_picker‘Ù$0e3fb524-bea1-4ef0-9589-36230a84e949Ù$b319619e-8f8d-4650-8fb4-76e5ba953470„´precedence_heuristic §cell_idÙ$b319619e-8f8d-4650-8fb4-76e5ba953470´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$7db2060b-d69e-42e7-ae81-fd37ee793876„´precedence_heuristic §cell_idÙ$7db2060b-d69e-42e7-ae81-fd37ee793876´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$594829e2-585b-4d48-bb6e-b35d9543cfbe„´precedence_heuristic §cell_idÙ$594829e2-585b-4d48-bb6e-b35d9543cfbe´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$6107d03d-1e45-4eb9-b8e2-51e4a72485e6„´precedence_heuristic §cell_idÙ$6107d03d-1e45-4eb9-b8e2-51e4a72485e6´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$e1b5733f-a7a8-458f-a345-b358b9a03fcf„´precedence_heuristic §cell_idÙ$e1b5733f-a7a8-458f-a345-b358b9a03fcf´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$b5f3620d-0942-41bb-80b0-d2ddcfe65090„´precedence_heuristic §cell_idÙ$b5f3620d-0942-41bb-80b0-d2ddcfe65090´downstream_cells_map�¡E“Ù$6cf004be-5205-429e-8131-ef607cebeaecÙ$f6e22fc3-382e-4548-bc59-8f944e06d237Ù$d830fffd-3781-40ca-85cb-c242f99667ce²upstream_cells_map�¥eigen�Ù$18031ccb-657f-409a-9080-9a0ada3ae8b5„´precedence_heuristic §cell_idÙ$18031ccb-657f-409a-9080-9a0ada3ae8b5´downstream_cells_map‚¡b•Ù$31388128-33a3-4443-835e-74b91bf48268Ù$87fdefa1-3bbd-4b69-ad3a-72baca6e55eeÙ$a1628317-7937-4316-85bf-2da860effce3Ù$5c6c45b4-67e3-4ea8-bc09-0205ab24cbc3Ù$4e35d650-b9a6-4668-90f0-f27a50af29ad¨slider_b‘Ù$4e35d650-b9a6-4668-90f0-f27a50af29ad²upstream_cells_map‰¤Base�¡:�¥@bind�¨Base.get�«PlutoRunner�¦Slider�¯Core.applicable�¤Core�·PlutoRunner.create_bond�Ù$1e27eedc-5308-4608-863f-fb81d60acdf0„´precedence_heuristic §cell_idÙ$1e27eedc-5308-4608-863f-fb81d60acdf0´downstream_cells_map€²upstream_cells_map„§PlutoUI‘Ù$06679a09-47d7-4024-8232-4954c08747a0§@md_str�¨getindex�¯PlutoUI.details�Ù$4ef2c7e9-fb37-4e38-a252-b9c3f83d2a82„´precedence_heuristic §cell_idÙ$4ef2c7e9-fb37-4e38-a252-b9c3f83d2a82´downstream_cells_map€²upstream_cells_map�ªabn_picker‘Ù$4e35d650-b9a6-4668-90f0-f27a50af29adÙ$c8f85081-3659-4796-8550-2e708b09c8d7„´precedence_heuristic §cell_idÙ$c8f85081-3659-4796-8550-2e708b09c8d7´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨getindex�¬power_slider‘Ù$2381babe-0777-45db-acff-cc647a8a68d3Ù$bc9a718f-4b97-4e15-acf8-d180abc5b6d5„´precedence_heuristic §cell_idÙ$bc9a718f-4b97-4e15-acf8-d180abc5b6d5´downstream_cells_map€²upstream_cells_map„§PlutoUI‘Ù$06679a09-47d7-4024-8232-4954c08747a0§@md_str�¨getindex�¯PlutoUI.details�Ù$ce07d5c5-90a3-4c12-bada-30e4da1b99fd„´precedence_heuristic §cell_idÙ$ce07d5c5-90a3-4c12-bada-30e4da1b99fd´downstream_cells_map€²upstream_cells_mapƒ¡:�¡g‘Ù$0e3fb524-bea1-4ef0-9589-36230a84e949®fast_mod_power‘Ù$8670abc2-63e6-496a-b20c-812197acd9adÙ$59254bfd-48f2-4585-9ba5-e4c809421072„´precedence_heuristic §cell_idÙ$59254bfd-48f2-4585-9ba5-e4c809421072´downstream_cells_map�¨shanks_x‘Ù$ab467d70-ceb1-40e5-b8fe-82e2f1bd95fd²upstream_cells_mapƒ³shanks_discrete_log‘Ù$7330af43-bec3-460c-94f6-768ac2975b00¡p‘Ù$57816e2c-a675-43e7-b674-2877ffcf1415¡g‘Ù$0e3fb524-bea1-4ef0-9589-36230a84e949Ù$93aa2719-f962-497b-9fda-30f54fd848eb„´precedence_heuristic §cell_idÙ$93aa2719-f962-497b-9fda-30f54fd848eb´downstream_cells_map€²upstream_cells_map…¦modinv‘Ù$21df1900-3954-4506-b759-aeeee664d1df§collect�¡:�£mod�¡*�Ù$9f55cad1-b01a-45e3-93df-a4349e2dfbd3„´precedence_heuristic §cell_idÙ$9f55cad1-b01a-45e3-93df-a4349e2dfbd3´downstream_cells_map€²upstream_cells_map‚¤sort�ªall_powers‘Ù$59ac02af-7b54-44d4-b5f4-a0f60d4458a1Ù$a41722b8-8c21-4d3c-a38b-4d248a79e80a„´precedence_heuristic §cell_idÙ$a41722b8-8c21-4d3c-a38b-4d248a79e80a´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$9cef898e-192c-418a-bec6-511f8b6da179„´precedence_heuristic §cell_idÙ$9cef898e-192c-418a-bec6-511f8b6da179´downstream_cells_map€²upstream_cells_map‚¥power‘Ù$2381babe-0777-45db-acff-cc647a8a68d3®fast_mod_power‘Ù$8670abc2-63e6-496a-b20c-812197acd9adÙ$ed023033-1044-4d48-aab1-39e9300043f7„´precedence_heuristic §cell_idÙ$ed023033-1044-4d48-aab1-39e9300043f7´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$2cb5c6e0-b431-4d2e-b023-cd2131112eca„´precedence_heuristic §cell_idÙ$2cb5c6e0-b431-4d2e-b023-cd2131112eca´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$ab467d70-ceb1-40e5-b8fe-82e2f1bd95fd„´precedence_heuristic §cell_idÙ$ab467d70-ceb1-40e5-b8fe-82e2f1bd95fd´downstream_cells_map€²upstream_cells_map„¨shanks_x‘Ù$59254bfd-48f2-4585-9ba5-e4c809421072¡p‘Ù$57816e2c-a675-43e7-b674-2877ffcf1415¡g‘Ù$0e3fb524-bea1-4ef0-9589-36230a84e949®fast_mod_power‘Ù$8670abc2-63e6-496a-b20c-812197acd9adÙ$a7d9703a-5121-4b43-8cd4-2acf9a0d91ef„´precedence_heuristic §cell_idÙ$a7d9703a-5121-4b43-8cd4-2acf9a0d91ef´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$57816e2c-a675-43e7-b674-2877ffcf1415„´precedence_heuristic §cell_idÙ$57816e2c-a675-43e7-b674-2877ffcf1415´downstream_cells_map‚¡p˜Ù$59ac02af-7b54-44d4-b5f4-a0f60d4458a1Ù$08dcbbd3-a531-4f74-a724-1cae8fae1636Ù$4be6cea4-13a2-4bcb-b849-14eef57ab604Ù$9efb7a71-9a03-4716-8d34-aae233e9b898Ù$9bdb30ba-48a7-4e1b-96c2-ea0e059d5253Ù$59254bfd-48f2-4585-9ba5-e4c809421072Ù$ab467d70-ceb1-40e5-b8fe-82e2f1bd95fdÙ$0e3fb524-bea1-4ef0-9589-36230a84e949¨p_picker‘Ù$0e3fb524-bea1-4ef0-9589-36230a84e949²upstream_cells_map‰¦primes�¤Base�¥@bind�¨Base.get�«PlutoRunner�¦Slider�¯Core.applicable�¤Core�·PlutoRunner.create_bond�Ù$f4f49568-dcf2-4c76-ba66-065d2fda7a4a„´precedence_heuristic §cell_idÙ$f4f49568-dcf2-4c76-ba66-065d2fda7a4a´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$4a98507b-653e-4354-a825-7605f8fcb31b„´precedence_heuristic §cell_idÙ$4a98507b-653e-4354-a825-7605f8fcb31b´downstream_cells_map€²upstream_cells_mapˆ¤conj�¡^�¡:�¡g‘Ù$0e3fb524-bea1-4ef0-9589-36230a84e949£mod�§adjoint�¡*�®fast_mod_power‘Ù$8670abc2-63e6-496a-b20c-812197acd9adÙ$a59a20e2-a7c7-48a9-ad8d-8094e03a749d„´precedence_heuristic §cell_idÙ$a59a20e2-a7c7-48a9-ad8d-8094e03a749d´downstream_cells_map€²upstream_cells_map…¦modinv‘Ù$21df1900-3954-4506-b759-aeeee664d1df§collect�¡:�£mod�¡*�Ù$4e35d650-b9a6-4668-90f0-f27a50af29ad„´precedence_heuristic §cell_idÙ$4e35d650-b9a6-4668-90f0-f27a50af29ad´downstream_cells_map�ªabn_picker’Ù$d81bbd74-42df-4bb2-a045-9c2642cc19e5Ù$4ef2c7e9-fb37-4e38-a252-b9c3f83d2a82²upstream_cells_map‰¡a‘Ù$b57adc77-3783-4958-91a0-e90782338755¡n‘Ù$256c8009-4d2b-42f8-adaa-6f238ef22c6d£mod�¨getindex�¨slider_a‘Ù$b57adc77-3783-4958-91a0-e90782338755¨slider_n‘Ù$256c8009-4d2b-42f8-adaa-6f238ef22c6d§@md_str�¡b‘Ù$18031ccb-657f-409a-9080-9a0ada3ae8b5¨slider_b‘Ù$18031ccb-657f-409a-9080-9a0ada3ae8b5Ù$4cff1d10-422f-4b12-b790-a589c972fbb7„´precedence_heuristic §cell_idÙ$4cff1d10-422f-4b12-b790-a589c972fbb7´downstream_cells_map€²upstream_cells_map�©gp_picker‘Ù$0e3fb524-bea1-4ef0-9589-36230a84e949Ù$909b8a36-79bb-4c1a-9dd7-4acaffc0434e„´precedence_heuristic §cell_idÙ$909b8a36-79bb-4c1a-9dd7-4acaffc0434e´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$642d545f-b1b9-49da-8a03-ad63e3214f59„´precedence_heuristic §cell_idÙ$642d545f-b1b9-49da-8a03-ad63e3214f59´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$6c3bca1a-3109-4e48-97e1-e0ed4599ffb2„´precedence_heuristic §cell_idÙ$6c3bca1a-3109-4e48-97e1-e0ed4599ffb2´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$a7afc0cb-a980-4f4f-b782-9791d932ee52„´precedence_heuristic §cell_idÙ$a7afc0cb-a980-4f4f-b782-9791d932ee52´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$d81bbd74-42df-4bb2-a045-9c2642cc19e5„´precedence_heuristic §cell_idÙ$d81bbd74-42df-4bb2-a045-9c2642cc19e5´downstream_cells_map€²upstream_cells_map�ªabn_picker‘Ù$4e35d650-b9a6-4668-90f0-f27a50af29adÙ$087cbe82-b42a-4f80-a1af-97f3aa93aeeb„´precedence_heuristic §cell_idÙ$087cbe82-b42a-4f80-a1af-97f3aa93aeeb´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨getindex�¬power_slider‘Ù$2381babe-0777-45db-acff-cc647a8a68d3Ù$8b16a522-9be4-4286-b64d-3d1bbdef7142„´precedence_heuristic §cell_idÙ$8b16a522-9be4-4286-b64d-3d1bbdef7142´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$bbc907b1-63f8-435a-badc-11ed88bd6cf5„´precedence_heuristic §cell_idÙ$bbc907b1-63f8-435a-badc-11ed88bd6cf5´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$c2fab245-8a98-4b41-ade2-c5b16e9c39f9„´precedence_heuristic §cell_idÙ$c2fab245-8a98-4b41-ade2-c5b16e9c39f9´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$35b7b8b7-bff6-4f64-91b9-b65035162365„´precedence_heuristic §cell_idÙ$35b7b8b7-bff6-4f64-91b9-b65035162365´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$3cd40d9e-fcea-427d-9877-cea65e7ea413„´precedence_heuristic §cell_idÙ$3cd40d9e-fcea-427d-9877-cea65e7ea413´downstream_cells_map€²upstream_cells_mapÞ ¯Base.time_print�«Base.gc_num�»Base.Threads.lock_profiling�«Base.string�³Base.gc_alloc_count�§fib_seq‘Ù$462fa407-d973-4e9e-8512-b7cd3bb98b7b¦Base./�¬Base.GC_Diff�¥@time�¿Base.cumulative_compile_time_ns�¦Base.-�¤Base�¬Base.time_ns�¨Base.===�¦Base.*�¾Base.cumulative_compile_timing�Ù$4cb070de-e8bf-4a1d-9625-043c19466c46„´precedence_heuristic §cell_idÙ$4cb070de-e8bf-4a1d-9625-043c19466c46´downstream_cells_map€²upstream_cells_mapÞ ¯Base.time_print�«Base.gc_num�»Base.Threads.lock_profiling�«Base.string�³Base.gc_alloc_count�¦Base./�§fib_pow‘Ù$38744170-9af6-44b5-a0be-46a83da3253e¬Base.GC_Diff�¥@time�¿Base.cumulative_compile_time_ns�¦Base.-�¤Base�¬Base.time_ns�¨Base.===�¦Base.*�¾Base.cumulative_compile_timing�Ù$1a4da418-147f-46f4-9b95-7955183aa5cf„´precedence_heuristic §cell_idÙ$1a4da418-147f-46f4-9b95-7955183aa5cf´downstream_cells_map�¥gcd_a”Ù$fe2af566-4a8b-4052-9915-85266ee5ce98Ù$aee611f2-bc86-4e85-bbcb-add78c6a9175Ù$40b8e474-16e0-4a61-bb28-11d90beefeeaÙ$eeaec4f4-71bd-43df-b9c9-a00bc3b1864b²upstream_cells_map�¥Int32�«PlutoRunner�¯Core.applicable�¤Core�¨Base.get�¨getindex�¥@bind�§typemax�·PlutoRunner.create_bond�¡:�¤Base�§@md_str�¦Slider�Ù$192f608c-0563-4179-903f-49fad2db4c74„´precedence_heuristic §cell_idÙ$192f608c-0563-4179-903f-49fad2db4c74´downstream_cells_map€²upstream_cells_mapÞ ¯Base.time_print�«Base.gc_num�»Base.Threads.lock_profiling�«Base.string�³Base.gc_alloc_count�¦Base./�§fib_pow‘Ù$38744170-9af6-44b5-a0be-46a83da3253e¬Base.GC_Diff�¥@time�¿Base.cumulative_compile_time_ns�¦Base.-�¤Base�¬Base.time_ns�¨Base.===�¦Base.*�¾Base.cumulative_compile_timing�Ù$027fe67c-d2f0-49f6-b894-959795551d27„´precedence_heuristic §cell_idÙ$027fe67c-d2f0-49f6-b894-959795551d27´downstream_cells_map€²upstream_cells_mapÞ ¯Base.time_print�«Base.gc_num�»Base.Threads.lock_profiling�«Base.string�³Base.gc_alloc_count�¦Base./�¬Base.GC_Diff�§fib_rec‘Ù$72ec8410-05d9-475a-93d4-47153cc0ce31¥@time�¿Base.cumulative_compile_time_ns�¦Base.-�¤Base�¬Base.time_ns�¨Base.===�¦Base.*�¾Base.cumulative_compile_timing�Ù$bcf73ad7-a08b-4cbb-bcd2-d0abc002e7e2„´precedence_heuristic §cell_idÙ$bcf73ad7-a08b-4cbb-bcd2-d0abc002e7e2´downstream_cells_map€²upstream_cells_map„§PlutoUI‘Ù$06679a09-47d7-4024-8232-4954c08747a0§@md_str�¨getindex�¯PlutoUI.details�Ù$cbabee34-2ca2-4ad4-93ba-2ec3c941da5e„´precedence_heuristic §cell_idÙ$cbabee34-2ca2-4ad4-93ba-2ec3c941da5e´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$e1aafab7-c4f3-45ac-81ee-7f875ac7c8c6„´precedence_heuristic §cell_idÙ$e1aafab7-c4f3-45ac-81ee-7f875ac7c8c6´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$535f4bc1-e88c-47c7-990b-e3c8b5054acc„´precedence_heuristic §cell_idÙ$535f4bc1-e88c-47c7-990b-e3c8b5054acc´downstream_cells_map�ªfib_closed‘Ù$9b9fc5e6-1a41-43c5-ba43-2c93bc3ef66b²upstream_cells_map‡¡/�¡^�¡+�¡-�¤sqrt�£big�£âˆš�Ù$bd0c0258-7040-42e7-a20e-532b55af3a62„´precedence_heuristic §cell_idÙ$bd0c0258-7040-42e7-a20e-532b55af3a62´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$65f4990f-1952-4682-8fa8-9e3dd4bf1ebf„´precedence_heuristic §cell_idÙ$65f4990f-1952-4682-8fa8-9e3dd4bf1ebf´downstream_cells_map�§pow_999’Ù$6f10de7b-ce05-4f82-82e7-4110be44e8ccÙ$ec25ce2a-de8a-4b69-a3f3-b47cd58ec986²upstream_cells_mapÞ ¯Base.time_print�«Base.gc_num�»Base.Threads.lock_profiling�³Base.gc_alloc_count�«Base.string�¦Base./�®fast_mod_power‘Ù$8670abc2-63e6-496a-b20c-812197acd9ad¬Base.GC_Diff�¥@time�¥power‘Ù$2381babe-0777-45db-acff-cc647a8a68d3¿Base.cumulative_compile_time_ns�¦Base.-�¤Base�¬Base.time_ns�¨Base.===�¦Base.*�¾Base.cumulative_compile_timing�Ù$d1b260fb-7500-47fb-bb48-21b5857ab55a„´precedence_heuristic §cell_idÙ$d1b260fb-7500-47fb-bb48-21b5857ab55a´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$31388128-33a3-4443-835e-74b91bf48268„´precedence_heuristic §cell_idÙ$31388128-33a3-4443-835e-74b91bf48268´downstream_cells_map€²upstream_cells_map…¡a‘Ù$b57adc77-3783-4958-91a0-e90782338755¡n‘Ù$256c8009-4d2b-42f8-adaa-6f238ef22c6d£mod�¡+�¡b‘Ù$18031ccb-657f-409a-9080-9a0ada3ae8b5Ù$9207b107-e1b0-4328-a004-f4b8152b423f„´precedence_heuristic §cell_idÙ$9207b107-e1b0-4328-a004-f4b8152b423f´downstream_cells_map€²upstream_cells_map„§PlutoUI‘Ù$06679a09-47d7-4024-8232-4954c08747a0§@md_str�¨getindex�¯PlutoUI.details�Ù$06679a09-47d7-4024-8232-4954c08747a0„´precedence_heuristic§cell_idÙ$06679a09-47d7-4024-8232-4954c08747a0´downstream_cells_map‡LinearAlgebra�§PlutoUIÜ Ù$7bad8c6c-45c7-402f-ad59-6857e9268901Ù$6e59ee60-ef73-45ca-86eb-4d8a44c73771Ù$d6b89fda-308f-43da-8028-1a812b4516cfÙ$9207b107-e1b0-4328-a004-f4b8152b423fÙ$48eba223-6cce-4aa2-9977-4883ba7903fcÙ$9752afbb-96e6-4f96-92cb-09654cf46155Ù$a7985d16-500b-4024-aaa1-78e654b94be4Ù$a7d06375-e4dd-47b1-8aba-11dc4d62954bÙ$6332b2f2-ed2f-448a-b1df-247b110e335bÙ$a4698418-ebf7-4992-a3ba-a15ff282bf87Ù$9d4858f8-e63d-46e0-a6cc-992d3cc4a9a4Ù$61462af5-69bd-42be-8918-7992c79ee00dÙ$bcf73ad7-a08b-4cbb-bcd2-d0abc002e7e2Ù$bc9a718f-4b97-4e15-acf8-d180abc5b6d5Ù$1e27eedc-5308-4608-863f-fb81d60acdf0Ù$227e415e-ab17-4f3a-b695-9573c9ee2b57²ExperimentalLayout�¦Primes‘Ù$7f9bd301-355b-43f5-b168-22fac9e52511¦Colors�¥Luxor‘Ù$8315b53f-abca-483d-bbf6-7e9193e751c9ªDataFrames�²upstream_cells_map€Ù$4714b7d7-32ee-42a1-bfa5-93eafda739d3„´precedence_heuristic §cell_idÙ$4714b7d7-32ee-42a1-bfa5-93eafda739d3´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$3da58487-192f-458a-9d47-7a4ce98b6da3„´precedence_heuristic §cell_idÙ$3da58487-192f-458a-9d47-7a4ce98b6da3´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$6cf004be-5205-429e-8131-ef607cebeaec„´precedence_heuristic §cell_idÙ$6cf004be-5205-429e-8131-ef607cebeaec´downstream_cells_map€²upstream_cells_map�¡E‘Ù$b5f3620d-0942-41bb-80b0-d2ddcfe65090Ù$0e3fb524-bea1-4ef0-9589-36230a84e949„´precedence_heuristic §cell_idÙ$0e3fb524-bea1-4ef0-9589-36230a84e949´downstream_cells_map‚¡gšÙ$59ac02af-7b54-44d4-b5f4-a0f60d4458a1Ù$08dcbbd3-a531-4f74-a724-1cae8fae1636Ù$4be6cea4-13a2-4bcb-b849-14eef57ab604Ù$9efb7a71-9a03-4716-8d34-aae233e9b898Ù$9bdb30ba-48a7-4e1b-96c2-ea0e059d5253Ù$ce07d5c5-90a3-4c12-bada-30e4da1b99fdÙ$ae89661a-2c0f-4752-adc2-023f09dc0e9fÙ$4a98507b-653e-4354-a825-7605f8fcb31bÙ$59254bfd-48f2-4585-9ba5-e4c809421072Ù$ab467d70-ceb1-40e5-b8fe-82e2f1bd95fd©gp_picker’Ù$4cff1d10-422f-4b12-b790-a589c972fbb7Ù$059b0ada-2442-48e4-82dd-489cb97e5dcc²upstream_cells_mapÞ «PlutoRunner�¡-�¯Core.applicable�¤Core�¨Base.get�¨getindex�¥@bind�·PlutoRunner.create_bond�¤Dict�¡p‘Ù$57816e2c-a675-43e7-b674-2877ffcf1415¡:�¢=>�¤Base�¨p_picker‘Ù$57816e2c-a675-43e7-b674-2877ffcf1415¤hbox�§@md_str�¦Slider�Ù$aee611f2-bc86-4e85-bbcb-add78c6a9175„´precedence_heuristic §cell_idÙ$aee611f2-bc86-4e85-bbcb-add78c6a9175´downstream_cells_mapƒ¥gcd_x‘Ù$40b8e474-16e0-4a61-bb28-11d90beefeea¥gcd_g�¥gcd_y‘Ù$40b8e474-16e0-4a61-bb28-11d90beefeea²upstream_cells_mapƒ¥pgcdx‘Ù$3f1af973-a02b-4e06-8e6e-eff414fcaf67¥gcd_b‘Ù$f39cccac-5b24-46e4-8749-1b0a944542ef¥gcd_a‘Ù$1a4da418-147f-46f4-9b95-7955183aa5cfÙ$97736c6a-3f5d-4978-8dd2-0a11c09ba9f0„´precedence_heuristic §cell_idÙ$97736c6a-3f5d-4978-8dd2-0a11c09ba9f0´downstream_cells_map�¤pgcd‘Ù$fe2af566-4a8b-4052-9915-85266ee5ce98²upstream_cells_mapƒ¢==�§println�£mod�Ù$9722971a-16f1-4f28-ba31-c12b673b8a30„´precedence_heuristic §cell_idÙ$9722971a-16f1-4f28-ba31-c12b673b8a30´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$592ae01b-2819-402d-9538-17018df5c34b„´precedence_heuristic §cell_idÙ$592ae01b-2819-402d-9538-17018df5c34b´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$191f8429-cbbb-44aa-8beb-271a94293e4b„´precedence_heuristic §cell_idÙ$191f8429-cbbb-44aa-8beb-271a94293e4b´downstream_cells_map€²upstream_cells_map…®fast_mod_power‘Ù$8670abc2-63e6-496a-b20c-812197acd9ad¹chinese_remainder_theorem‘Ù$821de132-559b-4420-b866-e97134c5bd9a¥power‘Ù$2381babe-0777-45db-acff-cc647a8a68d3£big�ªprime_list‘Ù$16b677e4-c467-462a-b770-b7a31160e129Ù$1072a756-5026-4de9-93a8-f942d54c474a„´precedence_heuristic §cell_idÙ$1072a756-5026-4de9-93a8-f942d54c474a´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$59ac02af-7b54-44d4-b5f4-a0f60d4458a1„´precedence_heuristic §cell_idÙ$59ac02af-7b54-44d4-b5f4-a0f60d4458a1´downstream_cells_map�ªall_powers”Ù$9f55cad1-b01a-45e3-93df-a4349e2dfbd3Ù$e2a3842d-4e07-4703-ab47-a5140649dd6aÙ$08dcbbd3-a531-4f74-a724-1cae8fae1636Ù$4be6cea4-13a2-4bcb-b849-14eef57ab604²upstream_cells_map…¡p‘Ù$57816e2c-a675-43e7-b674-2877ffcf1415¡:�¡g‘Ù$0e3fb524-bea1-4ef0-9589-36230a84e949¡-�®fast_mod_power‘Ù$8670abc2-63e6-496a-b20c-812197acd9adÙ$09f44611-ba21-4982-ba1b-0691124642fc„´precedence_heuristic §cell_idÙ$09f44611-ba21-4982-ba1b-0691124642fc´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$eeaec4f4-71bd-43df-b9c9-a00bc3b1864b„´precedence_heuristic §cell_idÙ$eeaec4f4-71bd-43df-b9c9-a00bc3b1864b´downstream_cells_map€²upstream_cells_mapƒ¥gcd_b‘Ù$f39cccac-5b24-46e4-8749-1b0a944542ef¤gcdx�¥gcd_a‘Ù$1a4da418-147f-46f4-9b95-7955183aa5cfÙ$f6e22fc3-382e-4548-bc59-8f944e06d237„´precedence_heuristic §cell_idÙ$f6e22fc3-382e-4548-bc59-8f944e06d237´downstream_cells_map€²upstream_cells_map„¨Diagonal�£inv�¡*�¡E‘Ù$b5f3620d-0942-41bb-80b0-d2ddcfe65090Ù$19ef447f-9fdf-49e1-8d1a-7860b4d4e9ba„´precedence_heuristic §cell_idÙ$19ef447f-9fdf-49e1-8d1a-7860b4d4e9ba´downstream_cells_map�¡D‘Ù$d830fffd-3781-40ca-85cb-c242f99667ce²upstream_cells_map‡¨Diagonal�¡/�¡+�¡-�¤sqrt�£big�£âˆš�Ù$82ba8fe1-435e-422b-abb7-cb50a7a85e1e„´precedence_heuristic §cell_idÙ$82ba8fe1-435e-422b-abb7-cb50a7a85e1e´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$41cf9efd-65e5-4abb-94d3-e824780e659c„´precedence_heuristic §cell_idÙ$41cf9efd-65e5-4abb-94d3-e824780e659c´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$58da5ba4-c858-4684-a9f4-5a39fdc4fb03„´precedence_heuristic §cell_idÙ$58da5ba4-c858-4684-a9f4-5a39fdc4fb03´downstream_cells_map�ªfast_power’Ù$3c198d79-c46a-4781-8bd1-b6b68f06c31fÙ$8670abc2-63e6-496a-b20c-812197acd9ad²upstream_cells_map†¢==�£one�£mod�¡-�¨Function�£div�Ù$ec25ce2a-de8a-4b69-a3f3-b47cd58ec986„´precedence_heuristic §cell_idÙ$ec25ce2a-de8a-4b69-a3f3-b47cd58ec986´downstream_cells_map€²upstream_cells_mapƒ§pow_999‘Ù$65f4990f-1952-4682-8fa8-9e3dd4bf1ebf¨pow_1000‘Ù$77093b36-c232-4477-be49-845f1a631829¹chinese_remainder_theorem‘Ù$821de132-559b-4420-b866-e97134c5bd9aÙ$256c8009-4d2b-42f8-adaa-6f238ef22c6d„´precedence_heuristic §cell_idÙ$256c8009-4d2b-42f8-adaa-6f238ef22c6d´downstream_cells_map‚¡n•Ù$31388128-33a3-4443-835e-74b91bf48268Ù$87fdefa1-3bbd-4b69-ad3a-72baca6e55eeÙ$a1628317-7937-4316-85bf-2da860effce3Ù$5c6c45b4-67e3-4ea8-bc09-0205ab24cbc3Ù$4e35d650-b9a6-4668-90f0-f27a50af29ad¨slider_n‘Ù$4e35d650-b9a6-4668-90f0-f27a50af29ad²upstream_cells_map‰¤Base�¡:�¥@bind�¨Base.get�«PlutoRunner�¦Slider�¯Core.applicable�¤Core�·PlutoRunner.create_bond�Ù$c5e906c8-0f73-4955-baa7-337195329e04„´precedence_heuristic §cell_idÙ$c5e906c8-0f73-4955-baa7-337195329e04´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$f39cccac-5b24-46e4-8749-1b0a944542ef„´precedence_heuristic §cell_idÙ$f39cccac-5b24-46e4-8749-1b0a944542ef´downstream_cells_map�¥gcd_b”Ù$fe2af566-4a8b-4052-9915-85266ee5ce98Ù$aee611f2-bc86-4e85-bbcb-add78c6a9175Ù$40b8e474-16e0-4a61-bb28-11d90beefeeaÙ$eeaec4f4-71bd-43df-b9c9-a00bc3b1864b²upstream_cells_map�¥Int32�«PlutoRunner�¯Core.applicable�¤Core�¨Base.get�¨getindex�¥@bind�§typemax�·PlutoRunner.create_bond�¡:�¤Base�§@md_str�¦Slider�Ù$9efb7a71-9a03-4716-8d34-aae233e9b898„´precedence_heuristic §cell_idÙ$9efb7a71-9a03-4716-8d34-aae233e9b898´downstream_cells_map�¡x‘Ù$9bdb30ba-48a7-4e1b-96c2-ea0e059d5253²upstream_cells_mapƒ¡p‘Ù$57816e2c-a675-43e7-b674-2877ffcf1415¡g‘Ù$0e3fb524-bea1-4ef0-9589-36230a84e949¬discrete_log‘Ù$ec14d629-b720-47cd-bc08-ff96f49271abÙ$a1628317-7937-4316-85bf-2da860effce3„´precedence_heuristic §cell_idÙ$a1628317-7937-4316-85bf-2da860effce3´downstream_cells_map€²upstream_cells_map…¡a‘Ù$b57adc77-3783-4958-91a0-e90782338755¡n‘Ù$256c8009-4d2b-42f8-adaa-6f238ef22c6d£mod�¡b‘Ù$18031ccb-657f-409a-9080-9a0ada3ae8b5¡*�Ù$7330af43-bec3-460c-94f6-768ac2975b00„´precedence_heuristic §cell_idÙ$7330af43-bec3-460c-94f6-768ac2975b00´downstream_cells_map�³shanks_discrete_log‘Ù$59254bfd-48f2-4585-9ba5-e4c809421072²upstream_cells_mapˆ«giant_steps‘Ù$3026f9c5-81d3-443a-940a-f22fef9754af¥isqrt�©collision‘Ù$6e5e3ec6-c96a-4a4a-bf4d-4b115f9b0d82£mod�¡+�¡-�ªbaby_steps‘Ù$4853f4ef-fbb8-48c3-9523-13ab4969d097¡*�Ù$f9f03579-5bfc-452d-bff9-9e7adfe095d3„´precedence_heuristic §cell_idÙ$f9f03579-5bfc-452d-bff9-9e7adfe095d3´downstream_cells_map€²upstream_cells_map�£gcd�Ù$5c6c45b4-67e3-4ea8-bc09-0205ab24cbc3„´precedence_heuristic §cell_idÙ$5c6c45b4-67e3-4ea8-bc09-0205ab24cbc3´downstream_cells_map€²upstream_cells_map…¡a‘Ù$b57adc77-3783-4958-91a0-e90782338755¡n‘Ù$256c8009-4d2b-42f8-adaa-6f238ef22c6d£mod�¡b‘Ù$18031ccb-657f-409a-9080-9a0ada3ae8b5¡*�Ù$819f15ef-31d0-44b6-837a-e3e67f2667b9„´precedence_heuristic §cell_idÙ$819f15ef-31d0-44b6-837a-e3e67f2667b9´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$3c198d79-c46a-4781-8bd1-b6b68f06c31f„´precedence_heuristic §cell_idÙ$3c198d79-c46a-4781-8bd1-b6b68f06c31f´downstream_cells_map€²upstream_cells_mapÞ ¯Base.time_print�«Base.gc_num�»Base.Threads.lock_profiling�«Base.string�³Base.gc_alloc_count�¦Base./�¬Base.GC_Diff�¥@time�¿Base.cumulative_compile_time_ns�¥power‘Ù$2381babe-0777-45db-acff-cc647a8a68d3¦Base.-�ªfast_power‘Ù$58da5ba4-c858-4684-a9f4-5a39fdc4fb03¤Base�¬Base.time_ns�¨Base.===�¦Base.*�£big�¡*�¾Base.cumulative_compile_timing�Ù$ac5e1516-1574-4893-a965-f799947076cb„´precedence_heuristic §cell_idÙ$ac5e1516-1574-4893-a965-f799947076cb´downstream_cells_map€²upstream_cells_mapÞ ¯Base.time_print�«Base.gc_num�»Base.Threads.lock_profiling�«Base.string�³Base.gc_alloc_count�¦Base./�¬Base.GC_Diff�¥@time�¿Base.cumulative_compile_time_ns�¦Base.-�¤Base�¨fib_diag‘Ù$d830fffd-3781-40ca-85cb-c242f99667ce¬Base.time_ns�¨Base.===�¦Base.*�¾Base.cumulative_compile_timing�Ù$4be6cea4-13a2-4bcb-b849-14eef57ab604„´precedence_heuristic §cell_idÙ$4be6cea4-13a2-4bcb-b849-14eef57ab604´downstream_cells_map€²upstream_cells_mapŠ¢==�¤sort�¡p‘Ù$57816e2c-a675-43e7-b674-2877ffcf1415¦length�¡g‘Ù$0e3fb524-bea1-4ef0-9589-36230a84e949¨getindex�§@md_str�¡-�¦unique�ªall_powers‘Ù$59ac02af-7b54-44d4-b5f4-a0f60d4458a1Ù$a4698418-ebf7-4992-a3ba-a15ff282bf87„´precedence_heuristic §cell_idÙ$a4698418-ebf7-4992-a3ba-a15ff282bf87´downstream_cells_map€²upstream_cells_map„§PlutoUI‘Ù$06679a09-47d7-4024-8232-4954c08747a0§@md_str�¨getindex�¯PlutoUI.details�Ù$a1081bb2-2186-4b19-b667-0c246155f360„´precedence_heuristic §cell_idÙ$a1081bb2-2186-4b19-b667-0c246155f360´downstream_cells_map€²upstream_cells_mapÞ ¯Base.time_print�«Base.gc_num�»Base.Threads.lock_profiling�«Base.string�³Base.gc_alloc_count�¦Base./�§fib_pow‘Ù$38744170-9af6-44b5-a0be-46a83da3253e¬Base.GC_Diff�¥@time�¿Base.cumulative_compile_time_ns�¦Base.-�¤Base�¬Base.time_ns�¨Base.===�¦Base.*�¾Base.cumulative_compile_timing�Ù$6332b2f2-ed2f-448a-b1df-247b110e335b„´precedence_heuristic §cell_idÙ$6332b2f2-ed2f-448a-b1df-247b110e335b´downstream_cells_map€²upstream_cells_map„§PlutoUI‘Ù$06679a09-47d7-4024-8232-4954c08747a0§@md_str�¨getindex�¯PlutoUI.details�Ù$2381babe-0777-45db-acff-cc647a8a68d3„´precedence_heuristic §cell_idÙ$2381babe-0777-45db-acff-cc647a8a68d3´downstream_cells_map‚¥power˜Ù$9e8a61d9-a700-4851-b1cd-49ce042c3530Ù$3c198d79-c46a-4781-8bd1-b6b68f06c31fÙ$77093b36-c232-4477-be49-845f1a631829Ù$65f4990f-1952-4682-8fa8-9e3dd4bf1ebfÙ$9cef898e-192c-418a-bec6-511f8b6da179Ù$4c2d45e3-56a2-467f-b87f-7b98cb873a05Ù$191f8429-cbbb-44aa-8beb-271a94293e4bÙ$e9633e3f-376d-413d-bc19-d015f6ce76e5¬power_slider’Ù$c8f85081-3659-4796-8550-2e708b09c8d7Ù$087cbe82-b42a-4f80-a1af-97f3aa93aeeb²upstream_cells_map‰¤Base�¡:�¥@bind�¨Base.get�«PlutoRunner�¦Slider�¯Core.applicable�¤Core�·PlutoRunner.create_bond�Ù$72ec8410-05d9-475a-93d4-47153cc0ce31„´precedence_heuristic §cell_idÙ$72ec8410-05d9-475a-93d4-47153cc0ce31´downstream_cells_map�§fib_rec‘Ù$027fe67c-d2f0-49f6-b894-959795551d27²upstream_cells_mapƒ¢==�¡+�¡-�Ù$48eba223-6cce-4aa2-9977-4883ba7903fc„´precedence_heuristic §cell_idÙ$48eba223-6cce-4aa2-9977-4883ba7903fc´downstream_cells_map€²upstream_cells_map„§PlutoUI‘Ù$06679a09-47d7-4024-8232-4954c08747a0§@md_str�¨getindex�¯PlutoUI.details�Ù$1ca71c26-f98c-4126-a1c5-98786fde7e9b„´precedence_heuristic §cell_idÙ$1ca71c26-f98c-4126-a1c5-98786fde7e9b´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$3026f9c5-81d3-443a-940a-f22fef9754af„´precedence_heuristic §cell_idÙ$3026f9c5-81d3-443a-940a-f22fef9754af´downstream_cells_map�«giant_steps‘Ù$7330af43-bec3-460c-94f6-768ac2975b00²upstream_cells_mapƒ¦modinv‘Ù$21df1900-3954-4506-b759-aeeee664d1dfªbaby_steps‘Ù$4853f4ef-fbb8-48c3-9523-13ab4969d097®fast_mod_power‘Ù$8670abc2-63e6-496a-b20c-812197acd9adÙ$821de132-559b-4420-b866-e97134c5bd9a„´precedence_heuristic §cell_idÙ$821de132-559b-4420-b866-e97134c5bd9a´downstream_cells_map�¹chinese_remainder_theorem’Ù$ec25ce2a-de8a-4b69-a3f3-b47cd58ec986Ù$191f8429-cbbb-44aa-8beb-271a94293e4b²upstream_cells_map‹©eachindex�¤prod�£mod�¢!=�£sum�¥error�£gcd�¢==�¦modinv‘Ù$21df1900-3954-4506-b759-aeeee664d1df¡*�£div�Ù$0ee6972c-5069-4ba0-887f-be64c7d000d0„´precedence_heuristic §cell_idÙ$0ee6972c-5069-4ba0-887f-be64c7d000d0´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$4853f4ef-fbb8-48c3-9523-13ab4969d097„´precedence_heuristic §cell_idÙ$4853f4ef-fbb8-48c3-9523-13ab4969d097´downstream_cells_map�ªbaby_steps’Ù$3026f9c5-81d3-443a-940a-f22fef9754afÙ$7330af43-bec3-460c-94f6-768ac2975b00²upstream_cells_map…£one�¥push!�¡:�£mod�¡*�Ù$b57adc77-3783-4958-91a0-e90782338755„´precedence_heuristic §cell_idÙ$b57adc77-3783-4958-91a0-e90782338755´downstream_cells_map‚¡a•Ù$31388128-33a3-4443-835e-74b91bf48268Ù$87fdefa1-3bbd-4b69-ad3a-72baca6e55eeÙ$a1628317-7937-4316-85bf-2da860effce3Ù$5c6c45b4-67e3-4ea8-bc09-0205ab24cbc3Ù$4e35d650-b9a6-4668-90f0-f27a50af29ad¨slider_a‘Ù$4e35d650-b9a6-4668-90f0-f27a50af29ad²upstream_cells_map‰¤Base�¡:�¥@bind�¨Base.get�«PlutoRunner�¦Slider�¯Core.applicable�¤Core�·PlutoRunner.create_bond�Ù$c376513c-6553-4cd6-8384-ae6ff9d472d7„´precedence_heuristic §cell_idÙ$c376513c-6553-4cd6-8384-ae6ff9d472d7´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$37585789-bd43-4ce5-b550-ad712b70d226„´precedence_heuristic §cell_idÙ$37585789-bd43-4ce5-b550-ad712b70d226´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$78df9410-5ea4-4d9f-bbe5-862f76a100fc„´precedence_heuristic §cell_idÙ$78df9410-5ea4-4d9f-bbe5-862f76a100fc´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$9e8a61d9-a700-4851-b1cd-49ce042c3530„´precedence_heuristic §cell_idÙ$9e8a61d9-a700-4851-b1cd-49ce042c3530´downstream_cells_map€²upstream_cells_mapÞ ¡^�¯Base.time_print�«Base.gc_num�»Base.Threads.lock_profiling�³Base.gc_alloc_count�«Base.string�¦Base./�¬Base.GC_Diff�¥@time�¥power‘Ù$2381babe-0777-45db-acff-cc647a8a68d3¿Base.cumulative_compile_time_ns�¦Base.-�¤Base�¬Base.time_ns�¨Base.===�¦Base.*�£big�¾Base.cumulative_compile_timing�Ù$e505716d-af01-455f-a55a-a9c225822ad5„´precedence_heuristic §cell_idÙ$e505716d-af01-455f-a55a-a9c225822ad5´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$61462af5-69bd-42be-8918-7992c79ee00d„´precedence_heuristic §cell_idÙ$61462af5-69bd-42be-8918-7992c79ee00d´downstream_cells_map€²upstream_cells_map„§PlutoUI‘Ù$06679a09-47d7-4024-8232-4954c08747a0§@md_str�¨getindex�¯PlutoUI.details�Ù$15367f3b-c7e4-4004-a018-5422a7f22024„´precedence_heuristic §cell_idÙ$15367f3b-c7e4-4004-a018-5422a7f22024´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$6e5e3ec6-c96a-4a4a-bf4d-4b115f9b0d82„´precedence_heuristic §cell_idÙ$6e5e3ec6-c96a-4a4a-bf4d-4b115f9b0d82´downstream_cells_map�©collision‘Ù$7330af43-bec3-460c-94f6-768ac2975b00²upstream_cells_map„©eachindex�¢=>�¤Dict�¦haskey�Ù$64eb4b52-4946-467c-867a-a6fc437b15f6„´precedence_heuristic §cell_idÙ$64eb4b52-4946-467c-867a-a6fc437b15f6´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$bbb2793a-faa4-43bd-b2e8-e8d3ac93310f„´precedence_heuristic §cell_idÙ$bbb2793a-faa4-43bd-b2e8-e8d3ac93310f´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$ec14d629-b720-47cd-bc08-ff96f49271ab„´precedence_heuristic §cell_idÙ$ec14d629-b720-47cd-bc08-ff96f49271ab´downstream_cells_map�¬discrete_log‘Ù$9efb7a71-9a03-4716-8d34-aae233e9b898²upstream_cells_map†¢==�£one�¡:�£mod�¡-�¡*�Ù$bc58ba24-90f0-4913-8f66-10bb6cb54076„´precedence_heuristic §cell_idÙ$bc58ba24-90f0-4913-8f66-10bb6cb54076´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$f86a5efc-d31e-4e88-b81f-ebdbbeba11ec„´precedence_heuristic §cell_idÙ$f86a5efc-d31e-4e88-b81f-ebdbbeba11ec´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$83852dd5-3546-45af-a845-b01dab0aa2a6„´precedence_heuristic §cell_idÙ$83852dd5-3546-45af-a845-b01dab0aa2a6´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$8315b53f-abca-483d-bbf6-7e9193e751c9„´precedence_heuristic §cell_idÙ$8315b53f-abca-483d-bbf6-7e9193e751c9´downstream_cells_map�¨draw_fib‘Ù$708c442b-cbff-4e1a-b70d-e704453cfd3d²upstream_cells_mapÞ ¥Luxor‘Ù$06679a09-47d7-4024-8232-4954c08747a0¡/�¦isless�£div�¦sethue�°Luxor.background�ªsetopacity�£min�¬Luxor.origin�¡-�¥@draw�¤rect�£mod�¡+�£sum�¤text�¬Luxor.sethue�Luxor.preview�Luxor.Drawing�¥push!�¡:�¥Point�¬Luxor.finish�¦iseven�¢==�¦string�¶distinguishable_colors�§maximum�¥isodd�¨fontsize�¡*�Ù$4c2d45e3-56a2-467f-b87f-7b98cb873a05„´precedence_heuristic §cell_idÙ$4c2d45e3-56a2-467f-b87f-7b98cb873a05´downstream_cells_map€²upstream_cells_mapƒ®fast_mod_power‘Ù$8670abc2-63e6-496a-b20c-812197acd9ad¥power‘Ù$2381babe-0777-45db-acff-cc647a8a68d3ªprime_list‘Ù$16b677e4-c467-462a-b770-b7a31160e129Ù$3df688c8-1c52-462d-88be-daa153333c60„´precedence_heuristic §cell_idÙ$3df688c8-1c52-462d-88be-daa153333c60´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$e9633e3f-376d-413d-bc19-d015f6ce76e5„´precedence_heuristic §cell_idÙ$e9633e3f-376d-413d-bc19-d015f6ce76e5´downstream_cells_map€²upstream_cells_mapƒ¡^�¥power‘Ù$2381babe-0777-45db-acff-cc647a8a68d3£big�Ù$ae89661a-2c0f-4752-adc2-023f09dc0e9f„´precedence_heuristic §cell_idÙ$ae89661a-2c0f-4752-adc2-023f09dc0e9f´downstream_cells_map€²upstream_cells_map„§reshape�¡:�¡g‘Ù$0e3fb524-bea1-4ef0-9589-36230a84e949®fast_mod_power‘Ù$8670abc2-63e6-496a-b20c-812197acd9adÙ$6f10de7b-ce05-4f82-82e7-4110be44e8cc„´precedence_heuristic §cell_idÙ$6f10de7b-ce05-4f82-82e7-4110be44e8cc´downstream_cells_map€²upstream_cells_map†¦modinv‘Ù$21df1900-3954-4506-b759-aeeee664d1df§pow_999‘Ù$65f4990f-1952-4682-8fa8-9e3dd4bf1ebf¨pow_1000‘Ù$77093b36-c232-4477-be49-845f1a631829£mod�¡+�¡*�Ù$d6b89fda-308f-43da-8028-1a812b4516cf„´precedence_heuristic §cell_idÙ$d6b89fda-308f-43da-8028-1a812b4516cf´downstream_cells_map€²upstream_cells_map„§PlutoUI‘Ù$06679a09-47d7-4024-8232-4954c08747a0§@md_str�¨getindex�¯PlutoUI.details�Ù$e2a3842d-4e07-4703-ab47-a5140649dd6a„´precedence_heuristic §cell_idÙ$e2a3842d-4e07-4703-ab47-a5140649dd6a´downstream_cells_map€²upstream_cells_mapƒ¤sort�¦unique�ªall_powers‘Ù$59ac02af-7b54-44d4-b5f4-a0f60d4458a1Ù$9d4858f8-e63d-46e0-a6cc-992d3cc4a9a4„´precedence_heuristic §cell_idÙ$9d4858f8-e63d-46e0-a6cc-992d3cc4a9a4´downstream_cells_map€²upstream_cells_map„§PlutoUI‘Ù$06679a09-47d7-4024-8232-4954c08747a0§@md_str�¨getindex�¯PlutoUI.details�Ù$d882afdd-eb85-467c-bf18-525c0c5da5e7„´precedence_heuristic §cell_idÙ$d882afdd-eb85-467c-bf18-525c0c5da5e7´downstream_cells_map€²upstream_cells_mapÞ ¯Base.time_print�«Base.gc_num�»Base.Threads.lock_profiling�«Base.string�³Base.gc_alloc_count�¦Base./�¬Base.GC_Diff�¥@time�¿Base.cumulative_compile_time_ns�¦Base.-�¤Base�¨fib_diag‘Ù$d830fffd-3781-40ca-85cb-c242f99667ce¬Base.time_ns�¨Base.===�¦Base.*�¾Base.cumulative_compile_timing�Ù$03e49669-cdee-4241-862d-33ee91214455„´precedence_heuristic §cell_idÙ$03e49669-cdee-4241-862d-33ee91214455´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$e52d25b3-65bf-4617-ae8d-fae0d0c8d041„´precedence_heuristic §cell_idÙ$e52d25b3-65bf-4617-ae8d-fae0d0c8d041´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$ed3d6ea6-08c9-45d0-8b77-3389a557bfd1„´precedence_heuristic §cell_idÙ$ed3d6ea6-08c9-45d0-8b77-3389a557bfd1´downstream_cells_map€²upstream_cells_map…¦modinv‘Ù$21df1900-3954-4506-b759-aeeee664d1df§collect�¡:�£mod�¡*�Ù$7da0705e-c925-4f8d-9ca4-8d8a0f859fea„´precedence_heuristic §cell_idÙ$7da0705e-c925-4f8d-9ca4-8d8a0f859fea´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$c3411941-d77f-46cb-8378-23998a1a4828„´precedence_heuristic §cell_idÙ$c3411941-d77f-46cb-8378-23998a1a4828´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$9bdb30ba-48a7-4e1b-96c2-ea0e059d5253„´precedence_heuristic §cell_idÙ$9bdb30ba-48a7-4e1b-96c2-ea0e059d5253´downstream_cells_map€²upstream_cells_map†®fast_mod_power‘Ù$8670abc2-63e6-496a-b20c-812197acd9ad¡p‘Ù$57816e2c-a675-43e7-b674-2877ffcf1415©isnothing�¡g‘Ù$0e3fb524-bea1-4ef0-9589-36230a84e949¡!�¡x‘Ù$9efb7a71-9a03-4716-8d34-aae233e9b898Ù$736307ec-a2a4-11ef-0f85-ad1a0093e06a„´precedence_heuristic §cell_idÙ$736307ec-a2a4-11ef-0f85-ad1a0093e06a´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$40b8e474-16e0-4a61-bb28-11d90beefeea„´precedence_heuristic §cell_idÙ$40b8e474-16e0-4a61-bb28-11d90beefeea´downstream_cells_map€²upstream_cells_map†¥gcd_b‘Ù$f39cccac-5b24-46e4-8749-1b0a944542ef¡+�¥gcd_x‘Ù$aee611f2-bc86-4e85-bbcb-add78c6a9175¥gcd_y‘Ù$aee611f2-bc86-4e85-bbcb-add78c6a9175¡*�¥gcd_a‘Ù$1a4da418-147f-46f4-9b95-7955183aa5cfÙ$6e59ee60-ef73-45ca-86eb-4d8a44c73771„´precedence_heuristic §cell_idÙ$6e59ee60-ef73-45ca-86eb-4d8a44c73771´downstream_cells_map€²upstream_cells_map„§PlutoUI‘Ù$06679a09-47d7-4024-8232-4954c08747a0§@md_str�¨getindex�¯PlutoUI.details�Ù$08dcbbd3-a531-4f74-a724-1cae8fae1636„´precedence_heuristic §cell_idÙ$08dcbbd3-a531-4f74-a724-1cae8fae1636´downstream_cells_map€²upstream_cells_mapŠ¢==�¤sort�¡p‘Ù$57816e2c-a675-43e7-b674-2877ffcf1415¦length�¡g‘Ù$0e3fb524-bea1-4ef0-9589-36230a84e949¨getindex�§@md_str�¡-�¦unique�ªall_powers‘Ù$59ac02af-7b54-44d4-b5f4-a0f60d4458a1Ù$16b677e4-c467-462a-b770-b7a31160e129„´precedence_heuristic §cell_idÙ$16b677e4-c467-462a-b770-b7a31160e129´downstream_cells_map�ªprime_list’Ù$4c2d45e3-56a2-467f-b87f-7b98cb873a05Ù$191f8429-cbbb-44aa-8beb-271a94293e4b²upstream_cells_map‚¦primes�¬primes_upper‘Ù$67093a35-8e1b-4cd3-b11b-c7ff601f802eÙ$2c34c17e-12de-43ea-870c-818c97647836„´precedence_heuristic §cell_idÙ$2c34c17e-12de-43ea-870c-818c97647836´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$21df1900-3954-4506-b759-aeeee664d1df„´precedence_heuristic §cell_idÙ$21df1900-3954-4506-b759-aeeee664d1df´downstream_cells_map�¦modinv–Ù$93aa2719-f962-497b-9fda-30f54fd848ebÙ$a59a20e2-a7c7-48a9-ad8d-8094e03a749dÙ$ed3d6ea6-08c9-45d0-8b77-3389a557bfd1Ù$6f10de7b-ce05-4f82-82e7-4110be44e8ccÙ$821de132-559b-4420-b866-e97134c5bd9aÙ$3026f9c5-81d3-443a-940a-f22fef9754af²upstream_cells_map‚£mod�¤gcdx�Ù$d830fffd-3781-40ca-85cb-c242f99667ce„´precedence_heuristic §cell_idÙ$d830fffd-3781-40ca-85cb-c242f99667ce´downstream_cells_map�¨fib_diag’Ù$ac5e1516-1574-4893-a965-f799947076cbÙ$d882afdd-eb85-467c-bf18-525c0c5da5e7²upstream_cells_map†¡^�¡D‘Ù$19ef447f-9fdf-49e1-8d1a-7860b4d4e9ba¡\�¡-�¡*�¡E‘Ù$b5f3620d-0942-41bb-80b0-d2ddcfe65090Ù$08b18315-c28e-44ed-beb2-5b17421b0224„´precedence_heuristic §cell_idÙ$08b18315-c28e-44ed-beb2-5b17421b0224´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$8670abc2-63e6-496a-b20c-812197acd9ad„´precedence_heuristic §cell_idÙ$8670abc2-63e6-496a-b20c-812197acd9ad´downstream_cells_map�®fast_mod_powerœÙ$77093b36-c232-4477-be49-845f1a631829Ù$65f4990f-1952-4682-8fa8-9e3dd4bf1ebfÙ$9cef898e-192c-418a-bec6-511f8b6da179Ù$4c2d45e3-56a2-467f-b87f-7b98cb873a05Ù$191f8429-cbbb-44aa-8beb-271a94293e4bÙ$59ac02af-7b54-44d4-b5f4-a0f60d4458a1Ù$9bdb30ba-48a7-4e1b-96c2-ea0e059d5253Ù$ce07d5c5-90a3-4c12-bada-30e4da1b99fdÙ$ae89661a-2c0f-4752-adc2-023f09dc0e9fÙ$4a98507b-653e-4354-a825-7605f8fcb31bÙ$3026f9c5-81d3-443a-940a-f22fef9754afÙ$ab467d70-ceb1-40e5-b8fe-82e2f1bd95fd²upstream_cells_mapƒªfast_power‘Ù$58da5ba4-c858-4684-a9f4-5a39fdc4fb03£mod�¡*�Ù$227e415e-ab17-4f3a-b695-9573c9ee2b57„´precedence_heuristic §cell_idÙ$227e415e-ab17-4f3a-b695-9573c9ee2b57´downstream_cells_map€²upstream_cells_map„§PlutoUI‘Ù$06679a09-47d7-4024-8232-4954c08747a0§@md_str�¨getindex�¯PlutoUI.details�Ù$67093a35-8e1b-4cd3-b11b-c7ff601f802e„´precedence_heuristic §cell_idÙ$67093a35-8e1b-4cd3-b11b-c7ff601f802e´downstream_cells_map�¬primes_upper‘Ù$16b677e4-c467-462a-b770-b7a31160e129²upstream_cells_map‹«PlutoRunner�¯Core.applicable�¤Core�¨Base.get�¨getindex�¥@bind�·PlutoRunner.create_bond�¡:�¤Base�§@md_str�¦Slider�Ù$7f9bd301-355b-43f5-b168-22fac9e52511„´precedence_heuristic §cell_idÙ$7f9bd301-355b-43f5-b168-22fac9e52511´downstream_cells_map€²upstream_cells_map‚Primes.primes�¦Primes‘Ù$06679a09-47d7-4024-8232-4954c08747a0Ù$3f1af973-a02b-4e06-8e6e-eff414fcaf67„´precedence_heuristic §cell_idÙ$3f1af973-a02b-4e06-8e6e-eff414fcaf67´downstream_cells_map�¥pgcdx‘Ù$aee611f2-bc86-4e85-bbcb-add78c6a9175²upstream_cells_map†¢==�£one�¦divrem�¡-�¤zero�¡*�Ù$fe2af566-4a8b-4052-9915-85266ee5ce98„´precedence_heuristic §cell_idÙ$fe2af566-4a8b-4052-9915-85266ee5ce98´downstream_cells_map€²upstream_cells_mapƒ¤pgcd‘Ù$97736c6a-3f5d-4978-8dd2-0a11c09ba9f0¥gcd_b‘Ù$f39cccac-5b24-46e4-8749-1b0a944542ef¥gcd_a‘Ù$1a4da418-147f-46f4-9b95-7955183aa5cfÙ$6ed7c73d-60da-4908-85cb-958745d81ebc„´precedence_heuristic §cell_idÙ$6ed7c73d-60da-4908-85cb-958745d81ebc´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$708c442b-cbff-4e1a-b70d-e704453cfd3d„´precedence_heuristic §cell_idÙ$708c442b-cbff-4e1a-b70d-e704453cfd3d´downstream_cells_map€²upstream_cells_mapˆ¨draw_fib‘Ù$8315b53f-abca-483d-bbf6-7e9193e751c9¤hbox�¨getindex�§@md_str�¥fib_n‘Ù$0c8ab02e-80b0-44d6-a4a8-c813aac38209¢=>�¤Dict�ªfib_picker‘Ù$0c8ab02e-80b0-44d6-a4a8-c813aac38209Ù$1b2245f8-2f02-4c4d-b6d2-e65af1f2a21e„´precedence_heuristic §cell_idÙ$1b2245f8-2f02-4c4d-b6d2-e65af1f2a21e´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$a7d06375-e4dd-47b1-8aba-11dc4d62954b„´precedence_heuristic §cell_idÙ$a7d06375-e4dd-47b1-8aba-11dc4d62954b´downstream_cells_map€²upstream_cells_map„§PlutoUI‘Ù$06679a09-47d7-4024-8232-4954c08747a0§@md_str�¨getindex�¯PlutoUI.details�®last_save_timeËAÚ¼|M[Œ¨«notebook_idÙ$8773f172-dc58-11f1-8c6a-87ec0f1e9c6f«in_temp_dir¨metadata€¥bonds€´cell_execution_orderÜ £Ù$06679a09-47d7-4024-8232-4954c08747a0Ù$736307ec-a2a4-11ef-0f85-ad1a0093e06aÙ$3df688c8-1c52-462d-88be-daa153333c60Ù$41cf9efd-65e5-4abb-94d3-e824780e659cÙ$bbc907b1-63f8-435a-badc-11ed88bd6cf5Ù$cbabee34-2ca2-4ad4-93ba-2ec3c941da5eÙ$909b8a36-79bb-4c1a-9dd7-4acaffc0434eÙ$08b18315-c28e-44ed-beb2-5b17421b0224Ù$7bad8c6c-45c7-402f-ad59-6857e9268901Ù$cd481f6c-66f4-4ebf-9769-c3edc24f403bÙ$37585789-bd43-4ce5-b550-ad712b70d226Ù$6e59ee60-ef73-45ca-86eb-4d8a44c73771Ù$d6b89fda-308f-43da-8028-1a812b4516cfÙ$d1b260fb-7500-47fb-bb48-21b5857ab55aÙ$9207b107-e1b0-4328-a004-f4b8152b423fÙ$48eba223-6cce-4aa2-9977-4883ba7903fcÙ$bd0c0258-7040-42e7-a20e-532b55af3a62Ù$97736c6a-3f5d-4978-8dd2-0a11c09ba9f0Ù$1a4da418-147f-46f4-9b95-7955183aa5cfÙ$f39cccac-5b24-46e4-8749-1b0a944542efÙ$fe2af566-4a8b-4052-9915-85266ee5ce98Ù$03e49669-cdee-4241-862d-33ee91214455Ù$0ee6972c-5069-4ba0-887f-be64c7d000d0Ù$f4f49568-dcf2-4c76-ba66-065d2fda7a4aÙ$09f44611-ba21-4982-ba1b-0691124642fcÙ$642d545f-b1b9-49da-8a03-ad63e3214f59Ù$7db2060b-d69e-42e7-ae81-fd37ee793876Ù$c3411941-d77f-46cb-8378-23998a1a4828Ù$a826d9d1-47db-4645-be6e-3ae0ed8d4e18Ù$83852dd5-3546-45af-a845-b01dab0aa2a6Ù$e1aafab7-c4f3-45ac-81ee-7f875ac7c8c6Ù$9752afbb-96e6-4f96-92cb-09654cf46155Ù$a7985d16-500b-4024-aaa1-78e654b94be4Ù$2cb5c6e0-b431-4d2e-b023-cd2131112ecaÙ$b319619e-8f8d-4650-8fb4-76e5ba953470Ù$3f1af973-a02b-4e06-8e6e-eff414fcaf67Ù$aee611f2-bc86-4e85-bbcb-add78c6a9175Ù$40b8e474-16e0-4a61-bb28-11d90beefeeaÙ$a41722b8-8c21-4d3c-a38b-4d248a79e80aÙ$eeaec4f4-71bd-43df-b9c9-a00bc3b1864bÙ$2c34c17e-12de-43ea-870c-818c97647836Ù$ca8905ef-97a3-424c-bb2e-559f7151585bÙ$21df1900-3954-4506-b759-aeeee664d1dfÙ$819f15ef-31d0-44b6-837a-e3e67f2667b9Ù$78df9410-5ea4-4d9f-bbe5-862f76a100fcÙ$93aa2719-f962-497b-9fda-30f54fd848ebÙ$7da0705e-c925-4f8d-9ca4-8d8a0f859feaÙ$a59a20e2-a7c7-48a9-ad8d-8094e03a749dÙ$e52d25b3-65bf-4617-ae8d-fae0d0c8d041Ù$ed3d6ea6-08c9-45d0-8b77-3389a557bfd1Ù$bbb2793a-faa4-43bd-b2e8-e8d3ac93310fÙ$f9f03579-5bfc-452d-bff9-9e7adfe095d3Ù$d8a28762-8aab-49e9-b9ac-38901d34abffÙ$e505716d-af01-455f-a55a-a9c225822ad5Ù$a7d06375-e4dd-47b1-8aba-11dc4d62954bÙ$6332b2f2-ed2f-448a-b1df-247b110e335bÙ$6107d03d-1e45-4eb9-b8e2-51e4a72485e6Ù$58da5ba4-c858-4684-a9f4-5a39fdc4fb03Ù$a4698418-ebf7-4992-a3ba-a15ff282bf87Ù$59817f59-429b-4f17-a46a-185571fd1e5aÙ$8670abc2-63e6-496a-b20c-812197acd9adÙ$1b2245f8-2f02-4c4d-b6d2-e65af1f2a21eÙ$9722971a-16f1-4f28-ba31-c12b673b8a30Ù$6ed7c73d-60da-4908-85cb-958745d81ebcÙ$9d4858f8-e63d-46e0-a6cc-992d3cc4a9a4Ù$c2fab245-8a98-4b41-ade2-c5b16e9c39f9Ù$a7afc0cb-a980-4f4f-b782-9791d932ee52Ù$821de132-559b-4420-b866-e97134c5bd9aÙ$67093a35-8e1b-4cd3-b11b-c7ff601f802eÙ$16b677e4-c467-462a-b770-b7a31160e129Ù$61462af5-69bd-42be-8918-7992c79ee00dÙ$592ae01b-2819-402d-9538-17018df5c34bÙ$594829e2-585b-4d48-bb6e-b35d9543cfbeÙ$72ec8410-05d9-475a-93d4-47153cc0ce31Ù$027fe67c-d2f0-49f6-b894-959795551d27Ù$462fa407-d973-4e9e-8512-b7cd3bb98b7bÙ$3cd40d9e-fcea-427d-9877-cea65e7ea413Ù$38744170-9af6-44b5-a0be-46a83da3253eÙ$a1081bb2-2186-4b19-b667-0c246155f360Ù$4714b7d7-32ee-42a1-bfa5-93eafda739d3Ù$b5f3620d-0942-41bb-80b0-d2ddcfe65090Ù$19ef447f-9fdf-49e1-8d1a-7860b4d4e9baÙ$6cf004be-5205-429e-8131-ef607cebeaecÙ$f6e22fc3-382e-4548-bc59-8f944e06d237Ù$d830fffd-3781-40ca-85cb-c242f99667ceÙ$ac5e1516-1574-4893-a965-f799947076cbÙ$4cb070de-e8bf-4a1d-9625-043c19466c46Ù$6c3bca1a-3109-4e48-97e1-e0ed4599ffb2Ù$1ca71c26-f98c-4126-a1c5-98786fde7e9bÙ$535f4bc1-e88c-47c7-990b-e3c8b5054accÙ$9b9fc5e6-1a41-43c5-ba43-2c93bc3ef66bÙ$d882afdd-eb85-467c-bf18-525c0c5da5e7Ù$192f608c-0563-4179-903f-49fad2db4c74Ù$8f6ba1c4-a971-4dc4-ac5d-2f30790aecdeÙ$ed023033-1044-4d48-aab1-39e9300043f7Ù$bc58ba24-90f0-4913-8f66-10bb6cb54076Ù$82ba8fe1-435e-422b-abb7-cb50a7a85e1eÙ$8b16a522-9be4-4286-b64d-3d1bbdef7142Ù$ec14d629-b720-47cd-bc08-ff96f49271abÙ$bcf73ad7-a08b-4cbb-bcd2-d0abc002e7e2Ù$bc9a718f-4b97-4e15-acf8-d180abc5b6d5Ù$64eb4b52-4946-467c-867a-a6fc437b15f6Ù$a7d9703a-5121-4b43-8cd4-2acf9a0d91efÙ$15367f3b-c7e4-4004-a018-5422a7f22024Ù$e1b5733f-a7a8-458f-a345-b358b9a03fcfÙ$f86a5efc-d31e-4e88-b81f-ebdbbeba11ecÙ$ee43c389-55f4-4cf9-a8db-ce37d1b89db4Ù$1072a756-5026-4de9-93a8-f942d54c474aÙ$4853f4ef-fbb8-48c3-9523-13ab4969d097Ù$3026f9c5-81d3-443a-940a-f22fef9754afÙ$6e5e3ec6-c96a-4a4a-bf4d-4b115f9b0d82Ù$7330af43-bec3-460c-94f6-768ac2975b00Ù$1e27eedc-5308-4608-863f-fb81d60acdf0Ù$a293bb0e-078d-4335-a446-3096a79c03bcÙ$c5e906c8-0f73-4955-baa7-337195329e04Ù$c376513c-6553-4cd6-8384-ae6ff9d472d7Ù$eb311761-ace2-4632-9ebf-9c7c166659f7Ù$227e415e-ab17-4f3a-b695-9573c9ee2b57Ù$35b7b8b7-bff6-4f64-91b9-b65035162365Ù$3da58487-192f-458a-9d47-7a4ce98b6da3Ù$7f9bd301-355b-43f5-b168-22fac9e52511Ù$b57adc77-3783-4958-91a0-e90782338755Ù$18031ccb-657f-409a-9080-9a0ada3ae8b5Ù$256c8009-4d2b-42f8-adaa-6f238ef22c6dÙ$31388128-33a3-4443-835e-74b91bf48268Ù$87fdefa1-3bbd-4b69-ad3a-72baca6e55eeÙ$a1628317-7937-4316-85bf-2da860effce3Ù$5c6c45b4-67e3-4ea8-bc09-0205ab24cbc3Ù$4e35d650-b9a6-4668-90f0-f27a50af29adÙ$d81bbd74-42df-4bb2-a045-9c2642cc19e5Ù$4ef2c7e9-fb37-4e38-a252-b9c3f83d2a82Ù$2381babe-0777-45db-acff-cc647a8a68d3Ù$c8f85081-3659-4796-8550-2e708b09c8d7Ù$087cbe82-b42a-4f80-a1af-97f3aa93aeebÙ$9e8a61d9-a700-4851-b1cd-49ce042c3530Ù$3c198d79-c46a-4781-8bd1-b6b68f06c31fÙ$77093b36-c232-4477-be49-845f1a631829Ù$65f4990f-1952-4682-8fa8-9e3dd4bf1ebfÙ$6f10de7b-ce05-4f82-82e7-4110be44e8ccÙ$ec25ce2a-de8a-4b69-a3f3-b47cd58ec986Ù$9cef898e-192c-418a-bec6-511f8b6da179Ù$4c2d45e3-56a2-467f-b87f-7b98cb873a05Ù$191f8429-cbbb-44aa-8beb-271a94293e4bÙ$e9633e3f-376d-413d-bc19-d015f6ce76e5Ù$8315b53f-abca-483d-bbf6-7e9193e751c9Ù$0c8ab02e-80b0-44d6-a4a8-c813aac38209Ù$708c442b-cbff-4e1a-b70d-e704453cfd3dÙ$57816e2c-a675-43e7-b674-2877ffcf1415Ù$0e3fb524-bea1-4ef0-9589-36230a84e949Ù$4cff1d10-422f-4b12-b790-a589c972fbb7Ù$59ac02af-7b54-44d4-b5f4-a0f60d4458a1Ù$9f55cad1-b01a-45e3-93df-a4349e2dfbd3Ù$e2a3842d-4e07-4703-ab47-a5140649dd6aÙ$08dcbbd3-a531-4f74-a724-1cae8fae1636Ù$059b0ada-2442-48e4-82dd-489cb97e5dccÙ$4be6cea4-13a2-4bcb-b849-14eef57ab604Ù$9efb7a71-9a03-4716-8d34-aae233e9b898Ù$9bdb30ba-48a7-4e1b-96c2-ea0e059d5253Ù$ce07d5c5-90a3-4c12-bada-30e4da1b99fdÙ$ae89661a-2c0f-4752-adc2-023f09dc0e9fÙ$4a98507b-653e-4354-a825-7605f8fcb31bÙ$59254bfd-48f2-4585-9ba5-e4c809421072Ù$ab467d70-ceb1-40e5-b8fe-82e2f1bd95fd®process_status¥readyªcell_orderÜ £Ù$736307ec-a2a4-11ef-0f85-ad1a0093e06aÙ$3df688c8-1c52-462d-88be-daa153333c60Ù$41cf9efd-65e5-4abb-94d3-e824780e659cÙ$bbc907b1-63f8-435a-badc-11ed88bd6cf5Ù$cbabee34-2ca2-4ad4-93ba-2ec3c941da5eÙ$909b8a36-79bb-4c1a-9dd7-4acaffc0434eÙ$08b18315-c28e-44ed-beb2-5b17421b0224Ù$7bad8c6c-45c7-402f-ad59-6857e9268901Ù$cd481f6c-66f4-4ebf-9769-c3edc24f403bÙ$37585789-bd43-4ce5-b550-ad712b70d226Ù$6e59ee60-ef73-45ca-86eb-4d8a44c73771Ù$d6b89fda-308f-43da-8028-1a812b4516cfÙ$d1b260fb-7500-47fb-bb48-21b5857ab55aÙ$9207b107-e1b0-4328-a004-f4b8152b423fÙ$48eba223-6cce-4aa2-9977-4883ba7903fcÙ$bd0c0258-7040-42e7-a20e-532b55af3a62Ù$97736c6a-3f5d-4978-8dd2-0a11c09ba9f0Ù$1a4da418-147f-46f4-9b95-7955183aa5cfÙ$f39cccac-5b24-46e4-8749-1b0a944542efÙ$fe2af566-4a8b-4052-9915-85266ee5ce98Ù$03e49669-cdee-4241-862d-33ee91214455Ù$0ee6972c-5069-4ba0-887f-be64c7d000d0Ù$f4f49568-dcf2-4c76-ba66-065d2fda7a4aÙ$d81bbd74-42df-4bb2-a045-9c2642cc19e5Ù$31388128-33a3-4443-835e-74b91bf48268Ù$87fdefa1-3bbd-4b69-ad3a-72baca6e55eeÙ$09f44611-ba21-4982-ba1b-0691124642fcÙ$642d545f-b1b9-49da-8a03-ad63e3214f59Ù$4ef2c7e9-fb37-4e38-a252-b9c3f83d2a82Ù$a1628317-7937-4316-85bf-2da860effce3Ù$5c6c45b4-67e3-4ea8-bc09-0205ab24cbc3Ù$7db2060b-d69e-42e7-ae81-fd37ee793876Ù$c3411941-d77f-46cb-8378-23998a1a4828Ù$a826d9d1-47db-4645-be6e-3ae0ed8d4e18Ù$83852dd5-3546-45af-a845-b01dab0aa2a6Ù$e1aafab7-c4f3-45ac-81ee-7f875ac7c8c6Ù$9752afbb-96e6-4f96-92cb-09654cf46155Ù$a7985d16-500b-4024-aaa1-78e654b94be4Ù$2cb5c6e0-b431-4d2e-b023-cd2131112ecaÙ$b319619e-8f8d-4650-8fb4-76e5ba953470Ù$3f1af973-a02b-4e06-8e6e-eff414fcaf67Ù$aee611f2-bc86-4e85-bbcb-add78c6a9175Ù$40b8e474-16e0-4a61-bb28-11d90beefeeaÙ$a41722b8-8c21-4d3c-a38b-4d248a79e80aÙ$eeaec4f4-71bd-43df-b9c9-a00bc3b1864bÙ$2c34c17e-12de-43ea-870c-818c97647836Ù$ca8905ef-97a3-424c-bb2e-559f7151585bÙ$21df1900-3954-4506-b759-aeeee664d1dfÙ$819f15ef-31d0-44b6-837a-e3e67f2667b9Ù$78df9410-5ea4-4d9f-bbe5-862f76a100fcÙ$93aa2719-f962-497b-9fda-30f54fd848ebÙ$7da0705e-c925-4f8d-9ca4-8d8a0f859feaÙ$a59a20e2-a7c7-48a9-ad8d-8094e03a749dÙ$e52d25b3-65bf-4617-ae8d-fae0d0c8d041Ù$ed3d6ea6-08c9-45d0-8b77-3389a557bfd1Ù$bbb2793a-faa4-43bd-b2e8-e8d3ac93310fÙ$f9f03579-5bfc-452d-bff9-9e7adfe095d3Ù$d8a28762-8aab-49e9-b9ac-38901d34abffÙ$e505716d-af01-455f-a55a-a9c225822ad5Ù$c8f85081-3659-4796-8550-2e708b09c8d7Ù$a7d06375-e4dd-47b1-8aba-11dc4d62954bÙ$6332b2f2-ed2f-448a-b1df-247b110e335bÙ$6107d03d-1e45-4eb9-b8e2-51e4a72485e6Ù$58da5ba4-c858-4684-a9f4-5a39fdc4fb03Ù$087cbe82-b42a-4f80-a1af-97f3aa93aeebÙ$9e8a61d9-a700-4851-b1cd-49ce042c3530Ù$3c198d79-c46a-4781-8bd1-b6b68f06c31fÙ$a4698418-ebf7-4992-a3ba-a15ff282bf87Ù$59817f59-429b-4f17-a46a-185571fd1e5aÙ$8670abc2-63e6-496a-b20c-812197acd9adÙ$1b2245f8-2f02-4c4d-b6d2-e65af1f2a21eÙ$77093b36-c232-4477-be49-845f1a631829Ù$9722971a-16f1-4f28-ba31-c12b673b8a30Ù$65f4990f-1952-4682-8fa8-9e3dd4bf1ebfÙ$6ed7c73d-60da-4908-85cb-958745d81ebcÙ$9d4858f8-e63d-46e0-a6cc-992d3cc4a9a4Ù$9cef898e-192c-418a-bec6-511f8b6da179Ù$6f10de7b-ce05-4f82-82e7-4110be44e8ccÙ$c2fab245-8a98-4b41-ade2-c5b16e9c39f9Ù$a7afc0cb-a980-4f4f-b782-9791d932ee52Ù$821de132-559b-4420-b866-e97134c5bd9aÙ$ec25ce2a-de8a-4b69-a3f3-b47cd58ec986Ù$67093a35-8e1b-4cd3-b11b-c7ff601f802eÙ$16b677e4-c467-462a-b770-b7a31160e129Ù$4c2d45e3-56a2-467f-b87f-7b98cb873a05Ù$191f8429-cbbb-44aa-8beb-271a94293e4bÙ$e9633e3f-376d-413d-bc19-d015f6ce76e5Ù$61462af5-69bd-42be-8918-7992c79ee00dÙ$592ae01b-2819-402d-9538-17018df5c34bÙ$708c442b-cbff-4e1a-b70d-e704453cfd3dÙ$594829e2-585b-4d48-bb6e-b35d9543cfbeÙ$72ec8410-05d9-475a-93d4-47153cc0ce31Ù$027fe67c-d2f0-49f6-b894-959795551d27Ù$462fa407-d973-4e9e-8512-b7cd3bb98b7bÙ$3cd40d9e-fcea-427d-9877-cea65e7ea413Ù$38744170-9af6-44b5-a0be-46a83da3253eÙ$a1081bb2-2186-4b19-b667-0c246155f360Ù$4714b7d7-32ee-42a1-bfa5-93eafda739d3Ù$b5f3620d-0942-41bb-80b0-d2ddcfe65090Ù$19ef447f-9fdf-49e1-8d1a-7860b4d4e9baÙ$6cf004be-5205-429e-8131-ef607cebeaecÙ$f6e22fc3-382e-4548-bc59-8f944e06d237Ù$d830fffd-3781-40ca-85cb-c242f99667ceÙ$ac5e1516-1574-4893-a965-f799947076cbÙ$4cb070de-e8bf-4a1d-9625-043c19466c46Ù$6c3bca1a-3109-4e48-97e1-e0ed4599ffb2Ù$1ca71c26-f98c-4126-a1c5-98786fde7e9bÙ$535f4bc1-e88c-47c7-990b-e3c8b5054accÙ$9b9fc5e6-1a41-43c5-ba43-2c93bc3ef66bÙ$d882afdd-eb85-467c-bf18-525c0c5da5e7Ù$192f608c-0563-4179-903f-49fad2db4c74Ù$8f6ba1c4-a971-4dc4-ac5d-2f30790aecdeÙ$ed023033-1044-4d48-aab1-39e9300043f7Ù$bc58ba24-90f0-4913-8f66-10bb6cb54076Ù$4cff1d10-422f-4b12-b790-a589c972fbb7Ù$59ac02af-7b54-44d4-b5f4-a0f60d4458a1Ù$9f55cad1-b01a-45e3-93df-a4349e2dfbd3Ù$e2a3842d-4e07-4703-ab47-a5140649dd6aÙ$08dcbbd3-a531-4f74-a724-1cae8fae1636Ù$82ba8fe1-435e-422b-abb7-cb50a7a85e1eÙ$8b16a522-9be4-4286-b64d-3d1bbdef7142Ù$ec14d629-b720-47cd-bc08-ff96f49271abÙ$059b0ada-2442-48e4-82dd-489cb97e5dccÙ$4be6cea4-13a2-4bcb-b849-14eef57ab604Ù$9efb7a71-9a03-4716-8d34-aae233e9b898Ù$9bdb30ba-48a7-4e1b-96c2-ea0e059d5253Ù$bcf73ad7-a08b-4cbb-bcd2-d0abc002e7e2Ù$bc9a718f-4b97-4e15-acf8-d180abc5b6d5Ù$64eb4b52-4946-467c-867a-a6fc437b15f6Ù$a7d9703a-5121-4b43-8cd4-2acf9a0d91efÙ$ce07d5c5-90a3-4c12-bada-30e4da1b99fdÙ$15367f3b-c7e4-4004-a018-5422a7f22024Ù$ae89661a-2c0f-4752-adc2-023f09dc0e9fÙ$e1b5733f-a7a8-458f-a345-b358b9a03fcfÙ$4a98507b-653e-4354-a825-7605f8fcb31bÙ$f86a5efc-d31e-4e88-b81f-ebdbbeba11ecÙ$ee43c389-55f4-4cf9-a8db-ce37d1b89db4Ù$1072a756-5026-4de9-93a8-f942d54c474aÙ$3026f9c5-81d3-443a-940a-f22fef9754afÙ$4853f4ef-fbb8-48c3-9523-13ab4969d097Ù$6e5e3ec6-c96a-4a4a-bf4d-4b115f9b0d82Ù$7330af43-bec3-460c-94f6-768ac2975b00Ù$59254bfd-48f2-4585-9ba5-e4c809421072Ù$ab467d70-ceb1-40e5-b8fe-82e2f1bd95fdÙ$1e27eedc-5308-4608-863f-fb81d60acdf0Ù$a293bb0e-078d-4335-a446-3096a79c03bcÙ$c5e906c8-0f73-4955-baa7-337195329e04Ù$c376513c-6553-4cd6-8384-ae6ff9d472d7Ù$eb311761-ace2-4632-9ebf-9c7c166659f7Ù$227e415e-ab17-4f3a-b695-9573c9ee2b57Ù$35b7b8b7-bff6-4f64-91b9-b65035162365Ù$3da58487-192f-458a-9d47-7a4ce98b6da3Ù$7f9bd301-355b-43f5-b168-22fac9e52511Ù$06679a09-47d7-4024-8232-4954c08747a0Ù$b57adc77-3783-4958-91a0-e90782338755Ù$18031ccb-657f-409a-9080-9a0ada3ae8b5Ù$256c8009-4d2b-42f8-adaa-6f238ef22c6dÙ$4e35d650-b9a6-4668-90f0-f27a50af29adÙ$0e3fb524-bea1-4ef0-9589-36230a84e949Ù$2381babe-0777-45db-acff-cc647a8a68d3Ù$8315b53f-abca-483d-bbf6-7e9193e751c9Ù$0c8ab02e-80b0-44d6-a4a8-c813aac38209Ù$57816e2c-a675-43e7-b674-2877ffcf1415«cell_inputsÞ £Ù$a7985d16-500b-4024-aaa1-78e654b94be4„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$a7985d16-500b-4024-aaa1-78e654b94be4«code_foldedäcodeÚbPlutoUI.details(
md"Comment trouver l'inverse modulaire ?",
md"""
Si on avait les coefficients ``x`` et ``y`` tels que ``xa + yn = 1``, l'inverse serait ``x``. Dans l'algorithme d'Euclide, on ne garde que le **reste** et on oublie le **quotient**. Il faudrait combiner les quotients des différentes opérations pour trouver ``x``.
""",
)Ù$eb311761-ace2-4632-9ebf-9c7c166659f7„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$eb311761-ace2-4632-9ebf-9c7c166659f7«code_foldedäcodeÙJmd"""
```math
A' \equiv B^a \pmod{p} \qquad B' \equiv A^b \pmod{p}
```
"""Ù$d8a28762-8aab-49e9-b9ac-38901d34abff„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$d8a28762-8aab-49e9-b9ac-38901d34abff«code_foldedäcode³md"# Fast powering"Ù$a826d9d1-47db-4645-be6e-3ae0ed8d4e18„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$a826d9d1-47db-4645-be6e-3ae0ed8d4e18«code_foldedäcodeÚmd"""
Est-ce que 2345 est divisible par 3 ou 9?
```math
\begin{align}
2 \cdot 10^3 + 3 \cdot 10^2 + 4 \cdot 10 + 5 & \equiv \,\, ? \pmod{9}\\
2 \cdot 1^3 + 3 \cdot 1^2 + 4 \cdot 1 + 5 & \equiv \,\, ? \pmod{9}\\
2 + 3 + 4 + 5 & \equiv 14 \pmod{9}\\
\end{align}
```
Est-ce que 2345 est divisible par 11?
```math
\begin{align}
2 \cdot (10)^3 + 3 \cdot 10^2 + 4 \cdot 10 + 5 & \equiv \,\, ? \pmod{11}\\
2 \cdot (-1)^3 + 3 \cdot (-1)^2 + 4 \cdot (-1) + 5 & \equiv \,\, ? \pmod{11}\\
-2 + 3 - 4 + 5 & \equiv 2 \pmod{11}\\
\end{align}
```
"""Ù$8f6ba1c4-a971-4dc4-ac5d-2f30790aecde„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$8f6ba1c4-a971-4dc4-ac5d-2f30790aecde«code_foldedäcode¿md"# Fermat’s Little Theorem"Ù$a293bb0e-078d-4335-a446-3096a79c03bc„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$a293bb0e-078d-4335-a446-3096a79c03bc«code_foldedäcode´md"# Diffie-Hellman"Ù$38744170-9af6-44b5-a0be-46a83da3253e„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$38744170-9af6-44b5-a0be-46a83da3253e«code_folded¤codeÙRfunction fib_pow(n)
A = BigInt[1 1
1 0]
x = A^(n-1) * [1, 0]
return x[1]
endÙ$87fdefa1-3bbd-4b69-ad3a-72baca6e55ee„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$87fdefa1-3bbd-4b69-ad3a-72baca6e55ee«code_folded¤code½mod(mod(a, n) + mod(b, n), n)Ù$77093b36-c232-4477-be49-845f1a631829„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$77093b36-c232-4477-be49-845f1a631829«code_folded¤codeÙ/@time pow_1000 = fast_mod_power(2, power, 1000)Ù$462fa407-d973-4e9e-8512-b7cd3bb98b7b„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$462fa407-d973-4e9e-8512-b7cd3bb98b7b«code_folded¤codeÙzfunction fib_seq(n)
f = zeros(BigInt, n + 1)
f[2] = 1
for k in 2:n
f[k + 1] = f[k] + f[k - 1]
end
return f[end]
endÙ$ca8905ef-97a3-424c-bb2e-559f7151585b„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$ca8905ef-97a3-424c-bb2e-559f7151585b«code_foldedäcodeÙ•md"""
Ensemble de solutions: ``(x + kb, y - ka)`` pour un ``k \in \mathbb{Z}`` arbitraire.
Prenons ``k`` tel que ``0 \le x + kb < b`` avec `mod`.
"""Ù$59817f59-429b-4f17-a46a-185571fd1e5a„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$59817f59-429b-4f17-a46a-185571fd1e5a«code_foldedäcode»md"# Fast modular powering"Ù$ee43c389-55f4-4cf9-a8db-ce37d1b89db4„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$ee43c389-55f4-4cf9-a8db-ce37d1b89db4«code_foldedäcodeÙ-md"# Shanks's Babystep–Giantstep Algorithm"Ù$9b9fc5e6-1a41-43c5-ba43-2c93bc3ef66b„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$9b9fc5e6-1a41-43c5-ba43-2c93bc3ef66b«code_folded¤code·@time fib_closed(20000)Ù$cd481f6c-66f4-4ebf-9769-c3edc24f403b„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$cd481f6c-66f4-4ebf-9769-c3edc24f403b«code_foldedäcodeÙ)md"# Algorithme d'Euclide : élaboration"Ù$9752afbb-96e6-4f96-92cb-09654cf46155„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$9752afbb-96e6-4f96-92cb-09654cf46155«code_foldedäcodeÙçPlutoUI.details(
md"Est-ce que l'inverse modulaire existe toujours ?",
md"""
Par le théorème de Bézout, il existe si et seulement si ``\text{gcd}(a, n) \mid 1``, c'est à dire que ``\text{gcd}(a, n) = 1``.
""",
)Ù$7bad8c6c-45c7-402f-ad59-6857e9268901„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$7bad8c6c-45c7-402f-ad59-6857e9268901«code_foldedäcodeÚyPlutoUI.details(
md"Comment prouver que l'égalité ``ax + by = c`` implique que ``\text{gcd}(a, b)`` divise ``c`` ?",
md"""
Soit ``g = \text{gcd}(a, b)``. Par définition, il existe ``\alpha, \beta`` tels que ``a = \alpha g`` et ``b = \beta g``.
On a alors ``c = ax + by = (\alpha x + \beta y) g`` ce qui implique que ``c`` est un multiple de ``g``.
""",
)Ù$0c8ab02e-80b0-44d6-a4a8-c813aac38209„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$0c8ab02e-80b0-44d6-a4a8-c813aac38209«code_folded¤codeÙFfib_picker = @bind fib_n Slider(1:12, default = 10, show_value = true)Ù$059b0ada-2442-48e4-82dd-489cb97e5dcc„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$059b0ada-2442-48e4-82dd-489cb97e5dcc«code_foldedäcode©gp_pickerÙ$b319619e-8f8d-4650-8fb4-76e5ba953470„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$b319619e-8f8d-4650-8fb4-76e5ba953470«code_foldedäcodeÙèmd"""
```math
xb + yr = g \quad \text{et} \quad r = a - qb \quad \Rightarrow \quad (x - yq)b + ya = g
```
Solution *homogène* ``x = b``, ``y = -a`` → ``ba - ab = 0``.
Donc si ``(x, y)`` est solution, ``(x + b, y - a)`` aussi.
"""Ù$7db2060b-d69e-42e7-ae81-fd37ee793876„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$7db2060b-d69e-42e7-ae81-fd37ee793876«code_foldedäcodeÙímd"""
Corollaire
```math
n \mid a \quad \text{et} \quad n \mid b \quad \Rightarrow \quad n \mid (ab)
```
À ne pas confondre avec
```math
a \mid n \quad \text{et} \quad b \mid n \quad \Rightarrow \quad (ab/\text{gcd}(a,b)) \mid n
```
"""Ù$594829e2-585b-4d48-bb6e-b35d9543cfbe„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$594829e2-585b-4d48-bb6e-b35d9543cfbe«code_foldedäcodeÙ md"# Fast powering for matrices"Ù$6107d03d-1e45-4eb9-b8e2-51e4a72485e6„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$6107d03d-1e45-4eb9-b8e2-51e4a72485e6«code_foldedäcode¾md"# Recursive implementation"Ù$e1b5733f-a7a8-458f-a345-b358b9a03fcf„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$e1b5733f-a7a8-458f-a345-b358b9a03fcf«code_foldedäcodeÚ md"""
On remarque que la matrice est de rang 1. Elle vaut
```math
\begin{bmatrix}
1 & g^n & \cdots & g^{n^2-n}\\
g & g^{n+1} & \ddots & g^{n^2-n+1}\\
\vdots & \ddots & \ddots & \vdots\\
g^{n-1} & g^{2n-1} & \cdots & g^{n^2 - 1}
\end{bmatrix}
\equiv
\begin{bmatrix}
1\\
g\\
g^2\\
\vdots\\
g^{n-1}
\end{bmatrix}
\begin{bmatrix}
1 &
g^{n} &
g^{2n} &
\cdots &
g^{n^2-n}
\end{bmatrix}
\pmod{p}
```
"""Ù$b5f3620d-0942-41bb-80b0-d2ddcfe65090„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$b5f3620d-0942-41bb-80b0-d2ddcfe65090«code_folded¤codeµE = eigen([1 1; 1 0])Ù$18031ccb-657f-409a-9080-9a0ada3ae8b5„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$18031ccb-657f-409a-9080-9a0ada3ae8b5«code_folded¤codeÙ?slider_b = @bind b Slider(1:100, default=13, show_value = true)Ù$1e27eedc-5308-4608-863f-fb81d60acdf0„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$1e27eedc-5308-4608-863f-fb81d60acdf0«code_foldedäcodeÙUPlutoUI.details(md"Quelle est la complexité?", md"``\mathcal{O}(\sqrt{p}\log(p))``")Ù$4ef2c7e9-fb37-4e38-a252-b9c3f83d2a82„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$4ef2c7e9-fb37-4e38-a252-b9c3f83d2a82«code_foldedäcodeªabn_pickerÙ$c8f85081-3659-4796-8550-2e708b09c8d7„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$c8f85081-3659-4796-8550-2e708b09c8d7«code_foldedäcode»md"`power` = $power_slider"Ù$bc9a718f-4b97-4e15-acf8-d180abc5b6d5„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$bc9a718f-4b97-4e15-acf8-d180abc5b6d5«code_foldedäcodeÚ•PlutoUI.details(
md"Est-ce une complexité linéaire ou exponentielle en fonction de la taille de l'input",
md"""
La taille est proportionnelle à ``\log_2(p)`` donc on être linéaire en ``p`` c'est être proportionnel à ``2^{\log_2(p)}`` et donc la complexité est exponentielle en la taille de l'input ! [Hoffstein et al., Section 2.6](https://doi.org/10.1007/978-1-4939-1711-2)
""",
)Ù$ce07d5c5-90a3-4c12-bada-30e4da1b99fd„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$ce07d5c5-90a3-4c12-bada-30e4da1b99fd«code_folded¤code¼fast_mod_power.(g, 0:15, 17)Ù$59254bfd-48f2-4585-9ba5-e4c809421072„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$59254bfd-48f2-4585-9ba5-e4c809421072«code_folded¤codeÙ'shanks_x = shanks_discrete_log(3, g, p)Ù$93aa2719-f962-497b-9fda-30f54fd848eb„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$93aa2719-f962-497b-9fda-30f54fd848eb«code_folded¤codeÙ(collect(mod.(modinv(30, 7) .* (0:6), 7))Ù$9f55cad1-b01a-45e3-93df-a4349e2dfbd3„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$9f55cad1-b01a-45e3-93df-a4349e2dfbd3«code_folded¤code°sort(all_powers)Ù$a41722b8-8c21-4d3c-a38b-4d248a79e80a„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$a41722b8-8c21-4d3c-a38b-4d248a79e80a«code_foldedäcode¼md"Pas une solution unique:"Ù$9cef898e-192c-418a-bec6-511f8b6da179„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$9cef898e-192c-418a-bec6-511f8b6da179«code_folded¤codeÙ fast_mod_power(2, power, 999000)Ù$ed023033-1044-4d48-aab1-39e9300043f7„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$ed023033-1044-4d48-aab1-39e9300043f7«code_foldedäcodeÙùmd"""
**Fermat's little theorem** [Hoffstein et al., Theorem 1.24](https://doi.org/10.1007/978-1-4939-1711-2)
```math
\text{Si} \quad p \text{ est premier}\quad \text{et} \quad p \nmid g,\quad \text{alors} \quad
g^{p - 1} \equiv 1 \pmod{p}.
```
"""Ù$2cb5c6e0-b431-4d2e-b023-cd2131112eca„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$2cb5c6e0-b431-4d2e-b023-cd2131112eca«code_foldedäcodeÙ"md"# Algorithme d'Euclide étendu"Ù$ab467d70-ceb1-40e5-b8fe-82e2f1bd95fd„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$ab467d70-ceb1-40e5-b8fe-82e2f1bd95fd«code_folded¤code¾fast_mod_power(g, shanks_x, p)Ù$a7d9703a-5121-4b43-8cd4-2acf9a0d91ef„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$a7d9703a-5121-4b43-8cd4-2acf9a0d91ef«code_foldedäcodeÙ¢md"""
La méthode *meet in the middle* est une méthode générique permettant de passer d'une complexité de ``\mathcal{O}(N)`` à ``\mathcal{O}(\sqrt{N})``.
"""Ù$57816e2c-a675-43e7-b674-2877ffcf1415„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$57816e2c-a675-43e7-b674-2877ffcf1415«code_folded¤codeÙFp_picker = @bind p Slider(primes(20), default = 11, show_value = true)Ù$f4f49568-dcf2-4c76-ba66-065d2fda7a4a„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$f4f49568-dcf2-4c76-ba66-065d2fda7a4a«code_foldedäcodeÙ™md"""
```math
a \equiv \alpha \pmod{n} \quad \text{et} \quad b \equiv \beta \pmod{n}
\quad \Rightarrow \quad a + b \equiv \alpha + \beta \pmod{n}
```
"""Ù$4a98507b-653e-4354-a825-7605f8fcb31b„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$4a98507b-653e-4354-a825-7605f8fcb31b«code_folded¤codeÙFmod.(fast_mod_power.(g, 0:3, 17) * fast_mod_power.(g^4, 0:3, 17)', 17)Ù$a59a20e2-a7c7-48a9-ad8d-8094e03a749d„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$a59a20e2-a7c7-48a9-ad8d-8094e03a749d«code_folded¤codeÙ)collect(mod.(modinv(365, 7) .* (0:6), 7))Ù$4e35d650-b9a6-4668-90f0-f27a50af29ad„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$4e35d650-b9a6-4668-90f0-f27a50af29ad«code_foldedäcodeÙ¤abn_picker = md"""
| `a` | ``\alpha`` | `b` | ``\beta`` | `n` |
|------|-----|-----|---|---|
| $slider_a | $(mod(a, n)) | $slider_b | $(mod(b, n)) | $slider_n |
"""Ù$4cff1d10-422f-4b12-b790-a589c972fbb7„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$4cff1d10-422f-4b12-b790-a589c972fbb7«code_foldedäcode©gp_pickerÙ$909b8a36-79bb-4c1a-9dd7-4acaffc0434e„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$909b8a36-79bb-4c1a-9dd7-4acaffc0434e«code_foldedäcode»md"# Théorème de Bézout"Ù$642d545f-b1b9-49da-8a03-ad63e3214f59„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$642d545f-b1b9-49da-8a03-ad63e3214f59«code_foldedäcodeÙ•md"""
```math
a \equiv \alpha \pmod{n} \quad \text{et} \quad b \equiv \beta \pmod{n}
\quad \Rightarrow \quad a b \equiv \alpha \beta \pmod{n}
```
"""Ù$6c3bca1a-3109-4e48-97e1-e0ed4599ffb2„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$6c3bca1a-3109-4e48-97e1-e0ed4599ffb2«code_foldedäcodeºmd"# Closed form solution"Ù$a7afc0cb-a980-4f4f-b782-9791d932ee52„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$a7afc0cb-a980-4f4f-b782-9791d932ee52«code_foldedäcodeÙZmd"""
Voir [Hoffstein et al., Section 2.8](https://doi.org/10.1007/978-1-4939-1711-2).
"""Ù$d81bbd74-42df-4bb2-a045-9c2642cc19e5„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$d81bbd74-42df-4bb2-a045-9c2642cc19e5«code_folded¤codeªabn_pickerÙ$087cbe82-b42a-4f80-a1af-97f3aa93aeeb„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$087cbe82-b42a-4f80-a1af-97f3aa93aeeb«code_foldedäcode»md"`power` = $power_slider"Ù$8b16a522-9be4-4286-b64d-3d1bbdef7142„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$8b16a522-9be4-4286-b64d-3d1bbdef7142«code_foldedäcodeÙämd"""
Étant donné un nombre premier ``p`` et une racine primitive ``g`` modulo ``p`` et un entier ``a`` tel que ``p \nmid a``, le *Discrete logarithme problem* consiste à retrouver ``x`` tel que ``g^x \equiv a \pmod{p}``.
"""Ù$bbc907b1-63f8-435a-badc-11ed88bd6cf5„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$bbc907b1-63f8-435a-badc-11ed88bd6cf5«code_foldedäcode®md"# Exemples"Ù$c2fab245-8a98-4b41-ade2-c5b16e9c39f9„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$c2fab245-8a98-4b41-ade2-c5b16e9c39f9«code_foldedäcode¿md"# Chinese remainder theorem"Ù$35b7b8b7-bff6-4f64-91b9-b65035162365„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$35b7b8b7-bff6-4f64-91b9-b65035162365«code_foldedäcodeÙWmd"""Voir [Hoffstein et al., Section 2.3](https://doi.org/10.1007/978-1-4939-1711-2)"""Ù$3cd40d9e-fcea-427d-9877-cea65e7ea413„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$3cd40d9e-fcea-427d-9877-cea65e7ea413«code_folded¤code´@time fib_seq(20000)Ù$4cb070de-e8bf-4a1d-9625-043c19466c46„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$4cb070de-e8bf-4a1d-9625-043c19466c46«code_folded¤code´@time fib_pow(20000)Ù$1a4da418-147f-46f4-9b95-7955183aa5cf„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$1a4da418-147f-46f4-9b95-7955183aa5cf«code_foldedäcodeÙZmd"`gcd_a` = $(@bind gcd_a Slider(1:typemax(Int32), default=90284599, show_value = true))"Ù$192f608c-0563-4179-903f-49fad2db4c74„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$192f608c-0563-4179-903f-49fad2db4c74«code_folded¤code´@time fib_pow(20000)Ù$027fe67c-d2f0-49f6-b894-959795551d27„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$027fe67c-d2f0-49f6-b894-959795551d27«code_folded¤code±@time fib_rec(42)Ù$bcf73ad7-a08b-4cbb-bcd2-d0abc002e7e2„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$bcf73ad7-a08b-4cbb-bcd2-d0abc002e7e2«code_foldedäcodeÙþPlutoUI.details(
md"Quelle est la complexité spatiale et temporelle de `discrete_log` ?",
md"""
``\mathcal{O}(p)`` temporelle et ``\Omega(1)`` spatiale. Voir [Hoffstein et al., Proposition 2.19](https://doi.org/10.1007/978-1-4939-1711-2).
""",
)Ù$cbabee34-2ca2-4ad4-93ba-2ec3c941da5e„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$cbabee34-2ca2-4ad4-93ba-2ec3c941da5e«code_foldedäcodeÚdmd"""
Si tous les mois avaient 30 jours, est-ce qu'il y a des jours de la semaine qui ne seront jamais le premier du mois ?
Reformulation: pour tout nombre ``0 \le j < 7``, existe-t-il ``x`` et ``y`` tels que ``30x = j + 7y``. Notation modulo : ``30x \equiv j \pmod{7}``.
Si tous les ans avaient 365 jours, est-ce qu'il y a des jours de la semaine qui ne seront jamais le 25 Décembre ? Est si tous les ans avaient 366 jours ? Et s'ils avaient 364 jours ?
Reformulation: pour tout nombre ``0 \le j < 7``, existe-t-il ``x`` et ``y`` tels que ``365x = j + 7y``. Notation modulo : ``365x \equiv j \pmod{7}``.
"""Ù$e1aafab7-c4f3-45ac-81ee-7f875ac7c8c6„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$e1aafab7-c4f3-45ac-81ee-7f875ac7c8c6«code_foldedäcodeÚmd"""
* **Inverse modulaire** : étant donné ``a, n``, trouver ``x`` (noté ``a^{-1}``) tel que ``xa \equiv 1 \pmod{n}``
* **Division modulaire** : étant donné ``a, b, n``, trouver ``x`` tel que ``xa \equiv b \pmod{n}`` → ``x \equiv a^{-1}b \pmod{n}``.
"""Ù$535f4bc1-e88c-47c7-990b-e3c8b5054acc„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$535f4bc1-e88c-47c7-990b-e3c8b5054acc«code_folded¤codeÙOfib_closed(n) = (((1 + √big(5)) / 2)^n - ((1 - √big(5)) / 2)^n) / √big(5)Ù$bd0c0258-7040-42e7-a20e-532b55af3a62„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$bd0c0258-7040-42e7-a20e-532b55af3a62«code_foldedäcodeÙ,md"# Algorithme d'Euclide : implémentation"Ù$65f4990f-1952-4682-8fa8-9e3dd4bf1ebf„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$65f4990f-1952-4682-8fa8-9e3dd4bf1ebf«code_folded¤codeÙ-@time pow_999 = fast_mod_power(2, power, 999)Ù$d1b260fb-7500-47fb-bb48-21b5857ab55a„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$d1b260fb-7500-47fb-bb48-21b5857ab55a«code_foldedäcodeÙ^md"""
**Lemme**: Si ``a \equiv r \pmod{b}`` alors ``\text{gcd}(a, b) = \text{gcd}(b, r)``.
"""Ù$31388128-33a3-4443-835e-74b91bf48268„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$31388128-33a3-4443-835e-74b91bf48268«code_folded¤codemod(a + b, n)Ù$9207b107-e1b0-4328-a004-f4b8152b423f„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$9207b107-e1b0-4328-a004-f4b8152b423f«code_foldedäcodeÚQPlutoUI.details(
md"**Observation clé** Si ``a > b``, trouver un mono-variant.",
md"""
On a ``(a, b) > (b, r)``. En effet, ``a > b`` par supposition et ``b > r`` par définition de l'algorithme d'Euclide.
Notons que même si la supposition ``a > b`` n'est pas vraie, elle le devient pour ``\text{gcd}(b, r)``.
""",
)Ù$06679a09-47d7-4024-8232-4954c08747a0„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$06679a09-47d7-4024-8232-4954c08747a0«code_folded¤codeÙ[using PlutoUI, PlutoUI.ExperimentalLayout, Primes, DataFrames, Luxor, Colors, LinearAlgebraÙ$4714b7d7-32ee-42a1-bfa5-93eafda739d3„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$4714b7d7-32ee-42a1-bfa5-93eafda739d3«code_foldedäcodeÙ*md"# Diagonalization to speed up powering"Ù$3da58487-192f-458a-9d47-7a4ce98b6da3„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$3da58487-192f-458a-9d47-7a4ce98b6da3«code_foldedäcode«md"# Utils"Ù$6cf004be-5205-429e-8131-ef607cebeaec„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$6cf004be-5205-429e-8131-ef607cebeaec«code_folded¤code©E.vectorsÙ$0e3fb524-bea1-4ef0-9589-36230a84e949„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$0e3fb524-bea1-4ef0-9589-36230a84e949«code_folded¤codeÙÝgp_picker = hbox(
[
md"`g` = $(@bind g Slider(2:(p-1), default = 2, show_value = true))",
md"`p` = $p_picker",
];
style = Dict("justify-content" => "space-around", "align-items" => "center"),
)Ù$aee611f2-bc86-4e85-bbcb-add78c6a9175„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$aee611f2-bc86-4e85-bbcb-add78c6a9175«code_folded¤codeÙ)gcd_g, gcd_x, gcd_y = pgcdx(gcd_a, gcd_b)Ù$97736c6a-3f5d-4978-8dd2-0a11c09ba9f0„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$97736c6a-3f5d-4978-8dd2-0a11c09ba9f0«code_folded¤codeÙfunction pgcd(a, b)
println("gcd($a, $b) = ")
if b == 0
println(a)
return a
else
return pgcd(b, mod(a, b))
end
endÙ$9722971a-16f1-4f28-ba31-c12b673b8a30„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$9722971a-16f1-4f28-ba31-c12b673b8a30«code_foldedäcode³md"Et modulo 999 ?"Ù$592ae01b-2819-402d-9538-17018df5c34b„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$592ae01b-2819-402d-9538-17018df5c34b«code_foldedäcode¸md"# Fibonacci sequence"Ù$191f8429-cbbb-44aa-8beb-271a94293e4b„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$191f8429-cbbb-44aa-8beb-271a94293e4b«code_folded¤codeÙXchinese_remainder_theorem(big.(fast_mod_power.(2, power, prime_list)), big.(prime_list))Ù$1072a756-5026-4de9-93a8-f942d54c474a„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$1072a756-5026-4de9-93a8-f942d54c474a«code_foldedäcodeÙWmd"""Voir [Hoffstein et al., Section 2.7](https://doi.org/10.1007/978-1-4939-1711-2)"""Ù$59ac02af-7b54-44d4-b5f4-a0f60d4458a1„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$59ac02af-7b54-44d4-b5f4-a0f60d4458a1«code_folded¤codeÙ+all_powers = fast_mod_power.(g, 1:(p-1), p)Ù$09f44611-ba21-4982-ba1b-0691124642fc„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$09f44611-ba21-4982-ba1b-0691124642fc«code_foldedäcodeÙ'md"# Arithmétique modulaire : produit"Ù$eeaec4f4-71bd-43df-b9c9-a00bc3b1864b„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$eeaec4f4-71bd-43df-b9c9-a00bc3b1864b«code_folded¤code²gcdx(gcd_a, gcd_b)Ù$f6e22fc3-382e-4548-bc59-8f944e06d237„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$f6e22fc3-382e-4548-bc59-8f944e06d237«code_folded¤codeÙ/E.vectors * Diagonal(E.values) * inv(E.vectors)Ù$19ef447f-9fdf-49e1-8d1a-7860b4d4e9ba„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$19ef447f-9fdf-49e1-8d1a-7860b4d4e9ba«code_folded¤codeÙ8D = Diagonal([(1 - √big(5)) / 2, (1 + √big(5)) / 2])Ù$82ba8fe1-435e-422b-abb7-cb50a7a85e1e„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$82ba8fe1-435e-422b-abb7-cb50a7a85e1e«code_foldedäcode·md"# Dicrete logarithm"Ù$41cf9efd-65e5-4abb-94d3-e824780e659c„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$41cf9efd-65e5-4abb-94d3-e824780e659c«code_foldedäcodeÙ§md"Jeffrey Hoffstein, Jill Pipher et Joseph H. Silverman. [*An Introduction to Mathematical Cryptography*](https://doi.org/10.1007/978-1-4939-1711-2). Springer, 2014."Ù$58da5ba4-c858-4684-a9f4-5a39fdc4fb03„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$58da5ba4-c858-4684-a9f4-5a39fdc4fb03«code_folded¤codeÙýfunction fast_power(prod_func::Function, a, power)
if power == 0
return one(a)
elseif mod(power, 2) == 1
return prod_func(fast_power(prod_func, a, power - 1), a)
else
b = fast_power(prod_func, a, div(power, 2))
return prod_func(b, b)
end
endÙ$ec25ce2a-de8a-4b69-a3f3-b47cd58ec986„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$ec25ce2a-de8a-4b69-a3f3-b47cd58ec986«code_folded¤codeÙ;chinese_remainder_theorem([pow_1000, pow_999], [1000, 999])Ù$256c8009-4d2b-42f8-adaa-6f238ef22c6d„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$256c8009-4d2b-42f8-adaa-6f238ef22c6d«code_folded¤codeÙ>slider_n = @bind n Slider(1:100, default=5, show_value = true)Ù$c5e906c8-0f73-4955-baa7-337195329e04„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$c5e906c8-0f73-4955-baa7-337195329e04«code_foldedäcodeÙÐmd"""
Étant donné un nombre premier ``p`` et une racine primitive ``g`` modulo ``p``, Alice (resp. Bob) génère un nombre secret ``a`` (resp. ``b``). Ils communique ensuite publiquement ``A`` et ``B``.
"""Ù$f39cccac-5b24-46e4-8749-1b0a944542ef„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$f39cccac-5b24-46e4-8749-1b0a944542ef«code_foldedäcodeÙ[md"`gcd_b` = $(@bind gcd_b Slider(1:typemax(Int32), default=249357461, show_value = true))"Ù$9efb7a71-9a03-4716-8d34-aae233e9b898„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$9efb7a71-9a03-4716-8d34-aae233e9b898«code_folded¤code¹x = discrete_log(3, g, p)Ù$a1628317-7937-4316-85bf-2da860effce3„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$a1628317-7937-4316-85bf-2da860effce3«code_folded¤codemod(a * b, n)Ù$7330af43-bec3-460c-94f6-768ac2975b00„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$7330af43-bec3-460c-94f6-768ac2975b00«code_folded¤codeÙ¢function shanks_discrete_log(a, g, p)
n = isqrt(p) + 1
i, j = collision(baby_steps(g, n, p), mod.(a .* giant_steps(g, n, p), p))
return i - 1 + (j - 1) * n
endÙ$f9f03579-5bfc-452d-bff9-9e7adfe095d3„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$f9f03579-5bfc-452d-bff9-9e7adfe095d3«code_folded¤code«gcd(364, 7)Ù$5c6c45b4-67e3-4ea8-bc09-0205ab24cbc3„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$5c6c45b4-67e3-4ea8-bc09-0205ab24cbc3«code_folded¤code½mod(mod(a, n) * mod(b, n), n)Ù$819f15ef-31d0-44b6-837a-e3e67f2667b9„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$819f15ef-31d0-44b6-837a-e3e67f2667b9«code_foldedäcodeºmd"Revenons aux exemples:"Ù$3c198d79-c46a-4781-8bd1-b6b68f06c31f„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$3c198d79-c46a-4781-8bd1-b6b68f06c31f«code_folded¤codeÙ"@time fast_power(*, big(2), power)Ù$ac5e1516-1574-4893-a965-f799947076cb„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$ac5e1516-1574-4893-a965-f799947076cb«code_folded¤codeµ@time fib_diag(20000)Ù$4be6cea4-13a2-4bcb-b849-14eef57ab604„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$4be6cea4-13a2-4bcb-b849-14eef57ab604«code_foldedäcodeÙ³if length(unique(sort(all_powers))) == p - 1
md"Le nombre $g **est** une racine primitive modulo $p"
else
md"Le nombre $g **n'est pas** une racine primitive modulo $p"
endÙ$a4698418-ebf7-4992-a3ba-a15ff282bf87„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$a4698418-ebf7-4992-a3ba-a15ff282bf87«code_foldedäcodeÚmPlutoUI.details(
md"Quelle est la complexité temporelle ?",
md"Si ``n`` est impair, au coup suivant, il est pair donc il n'est impair qu'au pire une fois sur deux. En ``l`` multiplication, on divise ``m`` au moins par ``2^{l/2}`` donc on a une complexité logarithmique ``\Theta(\log(m))`` en supposant que `prod_func` a une complexité ``\Theta(1)``.",
)Ù$a1081bb2-2186-4b19-b667-0c246155f360„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$a1081bb2-2186-4b19-b667-0c246155f360«code_folded¤code´@time fib_pow(20000)Ù$6332b2f2-ed2f-448a-b1df-247b110e335b„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$6332b2f2-ed2f-448a-b1df-247b110e335b«code_foldedäcodeÙ«PlutoUI.details(
md"Que faire si que ``m`` est impair, c'est à dire ``m = 2k + 1``...",
md"""
Si ``b = a^{2k}``, calcule le produit ``b \times a``.
""",
)Ù$2381babe-0777-45db-acff-cc647a8a68d3„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$2381babe-0777-45db-acff-cc647a8a68d3«code_folded¤codeÙLpower_slider = @bind power Slider(1:10000, default = 256, show_value = true)Ù$72ec8410-05d9-475a-93d4-47153cc0ce31„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$72ec8410-05d9-475a-93d4-47153cc0ce31«code_folded¤codeÙJfib_rec(n) = (n == 0 ? 0 : (n == 1 ? 1 : fib_rec(n - 1) + fib_rec(n - 2)))Ù$48eba223-6cce-4aa2-9977-4883ba7903fc„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$48eba223-6cce-4aa2-9977-4883ba7903fc«code_foldedäcodeÚ¦PlutoUI.details(
md"**Observation finale** Si ``a`` et ``b`` sont positifs et qu'on effectue la substitution ``(a, b) \to (b, r)`` récursivement, le mono-variant impose qu'on ne puisse itérer qu'un nombre fini de fois, que va-t-il se passer ?",
md"""
La paire ``(a, b)`` va diminuer strictement (c'est à dire d'au moins 1) à chaque itération. Pourtant, ce sont des nombres entier positifs donc ils ne peuvent diminuer strictement qu'un nombre fini de fois. C'est une contradiction, comme cela se fait-il ?
À un moment ``b`` vaudra 0, on ne pourra alors plus faire de division Euclidienne. On utilisera alors le fait que ``\text{gcd}(a, 0) = a``.
""",
)Ù$1ca71c26-f98c-4126-a1c5-98786fde7e9b„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$1ca71c26-f98c-4126-a1c5-98786fde7e9b«code_foldedäcodeÚ�md"""
Trouver ``b`` tel que ``x_k`` est solution:
```math
x_k = b^k
\quad \to \quad b^{k+1} = b^k + b^{k-1}
\quad \to \quad b^2 - b - 1 = 0
\quad \to \quad b = \frac{1 \pm \sqrt{5}}{2}
```
On a donc une famille de solutions:
```math
x_k = a_1
\left(\frac{1 - \sqrt5}{2}\right)^k +
a_2
\left(\frac{1 + \sqrt5}{2}\right)^k
```
Il reste à trouver ``a_1`` et ``a_2`` tels que ``x_0 = 0`` et ``x_1 = 1``. Ça correspond à calculer `E.vectors \ [1, 0]`, etc...
```math
\begin{align}
x_0 & = 0 & a_1 + a_2 & = 0\\
x_1 & = 1 & a_1 \frac{1 - \sqrt5}{2} + a_2 \frac{1 + \sqrt5}{2} & = 1
\end{align}
```
Donc ``a_1 = -1/\sqrt5`` et ``a_2 = 1/\sqrt5``.
"""Ù$3026f9c5-81d3-443a-940a-f22fef9754af„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$3026f9c5-81d3-443a-940a-f22fef9754af«code_folded¤codeÙhfunction giant_steps(g, n, p)
gn = fast_mod_power(g, n, p)
return baby_steps.(modinv(gn, p), n, p)
endÙ$821de132-559b-4420-b866-e97134c5bd9a„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$821de132-559b-4420-b866-e97134c5bd9a«code_foldedäcodeÚ`function chinese_remainder_theorem(r, n)
for i in eachindex(n)
for j in eachindex(n)
if i != j && gcd(n[i], n[j]) != 1
error("`$(n[i])` and `$(n[j])` are not coprime")
end
end
end
prod_n = prod(n)
return mod(sum(eachindex(n)) do i
m = div(prod_n, n[i])
return mod(r[i] * mod(m * modinv(m, n[i]), prod_n), prod_n)
end, prod_n)
endÙ$0ee6972c-5069-4ba0-887f-be64c7d000d0„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$0ee6972c-5069-4ba0-887f-be64c7d000d0«code_foldedäcodeÙ%md"# Arithmétique modulaire : somme"Ù$4853f4ef-fbb8-48c3-9523-13ab4969d097„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$4853f4ef-fbb8-48c3-9523-13ab4969d097«code_folded¤codeÙzfunction baby_steps(g, n, p)
steps = [one(g)]
for i in 1:n
push!(steps, mod(steps[end] * g, p))
end
return steps
endÙ$b57adc77-3783-4958-91a0-e90782338755„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$b57adc77-3783-4958-91a0-e90782338755«code_folded¤codeÙ?slider_a = @bind a Slider(1:100, default=11, show_value = true)Ù$c376513c-6553-4cd6-8384-ae6ff9d472d7„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$c376513c-6553-4cd6-8384-ae6ff9d472d7«code_foldedäcodeÙHmd"""
```math
A \equiv g^a \pmod{p} \qquad B \equiv g^b \pmod{p}
```
"""Ù$37585789-bd43-4ce5-b550-ad712b70d226„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$37585789-bd43-4ce5-b550-ad712b70d226«code_foldedäcodeÙÞmd"""
> **Définition** Le résultat de la *division Euclidienne* de ``a`` par un diviseur ``d`` est un quotient ``q`` et un reste ``0 \le r < d`` tels que ``a = qd + r``. En notation modulaire ``a \equiv r \pmod{d}``.
"""Ù$78df9410-5ea4-4d9f-bbe5-862f76a100fc„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$78df9410-5ea4-4d9f-bbe5-862f76a100fc«code_foldedäcodeÙRmd"``30x \equiv j \pmod{7} \quad \Rightarrow \quad x \equiv (30)^{-1} j\pmod{7}``"Ù$9e8a61d9-a700-4851-b1cd-49ce042c3530„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$9e8a61d9-a700-4851-b1cd-49ce042c3530«code_folded¤code²@time big(2)^powerÙ$e505716d-af01-455f-a55a-a9c225822ad5„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$e505716d-af01-455f-a55a-a9c225822ad5«code_foldedäcodeÙ8md"""
Comment calculer ``a^m`` pour un large ``m`` ?
"""Ù$61462af5-69bd-42be-8918-7992c79ee00d„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$61462af5-69bd-42be-8918-7992c79ee00d«code_foldedäcodeÙëPlutoUI.details(
md"Comment savoir si `prime_list` contient assez de nombres pour avoir la bonne réponse ?",
md"On a la bonne réponse modulo `prod(prime_list)` donc si `prod(prime_list) > 2^power`, on a la bonne réponse.",
)Ù$15367f3b-c7e4-4004-a018-5422a7f22024„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$15367f3b-c7e4-4004-a018-5422a7f22024«code_foldedäcodeÙ^md"On peut mettre le vecteur de taille ``n^2`` sous forme de matrice de taille ``n \times n``"Ù$6e5e3ec6-c96a-4a4a-bf4d-4b115f9b0d82„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$6e5e3ec6-c96a-4a4a-bf4d-4b115f9b0d82«code_folded¤codeÙ“function collision(a, b)
d = Dict(a[i] => i for i in eachindex(a))
for j in eachindex(b)
if haskey(d, b[j])
return d[b[j]], j
end
end
endÙ$64eb4b52-4946-467c-867a-a6fc437b15f6„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$64eb4b52-4946-467c-867a-a6fc437b15f6«code_foldedäcodeÙ!md"# Meet in the middle approach"Ù$bbb2793a-faa4-43bd-b2e8-e8d3ac93310f„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$bbb2793a-faa4-43bd-b2e8-e8d3ac93310f«code_foldedäcodeÙ]md"S'il y avait 364 jours par ans, les fêtes seraient toujours le même jour de la semaine!"Ù$ec14d629-b720-47cd-bc08-ff96f49271ab„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$ec14d629-b720-47cd-bc08-ff96f49271ab«code_folded¤codeÙ‰function discrete_log(a, g, p)
a = mod(a, p)
gx = one(a)
for x = 0:(p-2)
if a == gx
return x
end
gx = mod(gx * g, p)
end
endÙ$bc58ba24-90f0-4913-8f66-10bb6cb54076„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$bc58ba24-90f0-4913-8f66-10bb6cb54076«code_foldedäcodeÙàmd"""
**Définition** ``g`` est une *racine primitive* modulo ``p`` si ``g^k`` prend toutes les valeurs ``1, 2, ..., p - 1``.
```math
\text{Si } \quad p \nmid b,\quad \text{ alors } \quad
b^{p - 1} \equiv 1 \pmod{p}
```
"""Ù$f86a5efc-d31e-4e88-b81f-ebdbbeba11ec„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$f86a5efc-d31e-4e88-b81f-ebdbbeba11ec«code_foldedäcodeÚõmd"""
On doit donc trouver la ligne ``i`` et la ligne et ``j`` tels que
```math
\begin{align}
g^{i-1}g^{(j-1)n} & \equiv a & \pmod{p}\\
g^{i-1} & \equiv a(g^{-n})^{j-1} & \pmod{p}
\end{align}
```
Ils ne reste plus qu'Ã chercher une collision entre les listes de restes modulo ``p`` pour ``g^{i-1}`` et ``a(g^{-n})^{j-1}``.
L'identification des collision peut se faire en ``\mathcal{O}(\sqrt{n}\log(n))`` avec une recherche dichotomique our en ``\mathcal{O}(\sqrt{n})`` amorti avec un dictionaire.
"""Ù$83852dd5-3546-45af-a845-b01dab0aa2a6„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$83852dd5-3546-45af-a845-b01dab0aa2a6«code_foldedäcodeÙ#md"# Inverse et division modulaire"Ù$8315b53f-abca-483d-bbf6-7e9193e751c9„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$8315b53f-abca-483d-bbf6-7e9193e751c9«code_folded¤codeÚ‡function draw_fib(n, size = 400)
f = [0, 1, 1]
for i in 3:(n+1)
push!(f, f[end] + f[end - 1])
end
scale = div(size, 2maximum(f[end-1]))
#Luxor.scale(scale)
colors = distinguishable_colors(n)
if iseven(n)
Δx = f[end]
Δy = f[end - 1]
else
Δx = f[end - 1]
Δy = f[end]
end
left_most = sum(f[i] for i in 1:(n+1) if mod(i, 4) == 1; init = 0)
up_most = sum(f[i] for i in 1:(n+1) if mod(i, 4) == 0; init = 0)
shift = Point(left_most - Δx / 2, up_most - Δy / 2)
pos(x, y) = scale * (Point(x, y) + shift)
@draw begin
x = 0
y = 0
j = 1
for i in 2:(n+1)
left = x
if isodd(i)
if iseven(div(i - 1, 2))
left -= f[i]
else
left += f[i - 1]
end
end
up = y
if iseven(i)
if iseven(div(i, 2))
up -= f[i]
else
up += f[i-1]
end
end
sethue(colors[i - 1])
setopacity(0.6)
rect(pos(left, up), scale * f[i], scale * f[i], action=:fill)
setopacity(1)
sethue("black")
fontsize(div(scale * f[i], 2))
text(string(f[i]), pos(left + f[i] / 2, up + f[i] / 2), halign = :center, valign = :middle)
x = min(x, left)
y = min(y, up)
end
end Δx * scale Δy * scale
endÙ$4c2d45e3-56a2-467f-b87f-7b98cb873a05„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$4c2d45e3-56a2-467f-b87f-7b98cb873a05«code_folded¤codeÙ%fast_mod_power.(2, power, prime_list)Ù$3df688c8-1c52-462d-88be-daa153333c60„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$3df688c8-1c52-462d-88be-daa153333c60«code_foldedäcodeÚmd"""
* Théorie des nombres: [Hoffstein et al., 1.2, 1.3, 1.4, 1.5, 2.2, 2.3](https://doi.org/10.1007/978-1-4939-1711-2)
* Discrete Logarithme Problem et Diffie-Hellman: [Hoffstein et al., 2.2, 2.3, 2.6, 2.7, 2.8](https://doi.org/10.1007/978-1-4939-1711-2)
"""Ù$e9633e3f-376d-413d-bc19-d015f6ce76e5„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$e9633e3f-376d-413d-bc19-d015f6ce76e5«code_folded¤code¬big(2)^powerÙ$ae89661a-2c0f-4752-adc2-023f09dc0e9f„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$ae89661a-2c0f-4752-adc2-023f09dc0e9f«code_folded¤codeÙ+reshape(fast_mod_power.(g, 0:15, 17), 4, 4)Ù$6f10de7b-ce05-4f82-82e7-4110be44e8cc„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$6f10de7b-ce05-4f82-82e7-4110be44e8cc«code_folded¤codeÙTmod(pow_1000 * 999 * modinv(999, 1000) + pow_999 * 1000 * modinv(1000, 999), 999000)Ù$d6b89fda-308f-43da-8028-1a812b4516cf„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$d6b89fda-308f-43da-8028-1a812b4516cf«code_foldedäcodeÚîPlutoUI.details(
md"**Observation clé** Que dit le théorème de Bézout par rapport à ``\text{gcd}(d, r)`` et ``a``.",
md"""
Le nombre ``a`` est **divisible** par ``\text{gcd}(d, r)``.
Le nombre ``\text{gcd}(d, r)`` divise donc les 3 nombres, ``a``, ``d`` et ``r`` et donc ``\text{gcd}(d, r) = \text{gcd}(a, d, r)``.
En combinant ça avec l'observation précédente, on a ``\text{gcd}(a, d) = \text{gcd}(d, r)``. On peut généraliser cela en le lemme suivant:
""",
)Ù$e2a3842d-4e07-4703-ab47-a5140649dd6a„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$e2a3842d-4e07-4703-ab47-a5140649dd6a«code_folded¤code¸unique(sort(all_powers))Ù$9d4858f8-e63d-46e0-a6cc-992d3cc4a9a4„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$9d4858f8-e63d-46e0-a6cc-992d3cc4a9a4«code_foldedäcodeÚÌPlutoUI.details(
md"Comment trouver `mod(2^power, 999000)` en utilisant `pow_1000` et `pow_999` ?",
md"
On peut utiliser une astuce similaire à l'interpolation Lagrangienne.
On veut trouver ``x`` et ``y`` tels que
```math
\texttt{pow\_1000}x + \texttt{pow\_999}y \equiv 2^\texttt{power} \pmod{999000}
```
On veut que ``x \equiv 0 \pmod{999}`` et ``x \equiv 1 \pmod{1000}``.
On utilise donc ``x = 999x'`` avec ``x' \equiv (999)^{-1} \pmod{1000}``.
",
)Ù$d882afdd-eb85-467c-bf18-525c0c5da5e7„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$d882afdd-eb85-467c-bf18-525c0c5da5e7«code_folded¤codeµ@time fib_diag(20000)Ù$03e49669-cdee-4241-862d-33ee91214455„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$03e49669-cdee-4241-862d-33ee91214455«code_foldedäcodeÙ[md"The complexity is difficult to evaluate but can be shown to be ``O(\log(\min(a, b)))``."Ù$e52d25b3-65bf-4617-ae8d-fae0d0c8d041„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$e52d25b3-65bf-4617-ae8d-fae0d0c8d041«code_foldedäcodeÙTmd"``366x \equiv j \pmod{7} \quad \Rightarrow \quad x \equiv (366)^{-1} j\pmod{7}``"Ù$ed3d6ea6-08c9-45d0-8b77-3389a557bfd1„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$ed3d6ea6-08c9-45d0-8b77-3389a557bfd1«code_folded¤codeÙ)collect(mod.(modinv(366, 7) .* (0:6), 7))Ù$7da0705e-c925-4f8d-9ca4-8d8a0f859fea„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$7da0705e-c925-4f8d-9ca4-8d8a0f859fea«code_foldedäcodeÙTmd"``365x \equiv j \pmod{7} \quad \Rightarrow \quad x \equiv (365)^{-1} j\pmod{7}``"Ù$c3411941-d77f-46cb-8378-23998a1a4828„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$c3411941-d77f-46cb-8378-23998a1a4828«code_foldedäcode¹md"# Division par 3 et 9"Ù$9bdb30ba-48a7-4e1b-96c2-ea0e059d5253„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$9bdb30ba-48a7-4e1b-96c2-ea0e059d5253«code_folded¤codeÙ-if !isnothing(x)
fast_mod_power(g, x, p)
endÙ$736307ec-a2a4-11ef-0f85-ad1a0093e06a„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$736307ec-a2a4-11ef-0f85-ad1a0093e06a«code_foldedäcode½md"# La théorie des nombres"Ù$40b8e474-16e0-4a61-bb28-11d90beefeea„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$40b8e474-16e0-4a61-bb28-11d90beefeea«code_folded¤code½gcd_x * gcd_a + gcd_y * gcd_bÙ$6e59ee60-ef73-45ca-86eb-4d8a44c73771„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$6e59ee60-ef73-45ca-86eb-4d8a44c73771«code_foldedäcodeÚYPlutoUI.details(
md"**Observation clé** Que dit le théorème de Bézout par rapport à ``\text{gcd}(a, d)`` et ``r``.",
md"""
Le reste ``r`` est **divisible** par ``\text{gcd}(a, d)``.
Le nombre ``\text{gcd}(a, d)`` divise donc les 3 nombres, ``a``, ``d`` et ``r`` et donc ``\text{gcd}(a, d) = \text{gcd}(a, d, r)``.
""",
)Ù$08dcbbd3-a531-4f74-a724-1cae8fae1636„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$08dcbbd3-a531-4f74-a724-1cae8fae1636«code_foldedäcodeÙ³if length(unique(sort(all_powers))) == p - 1
md"Le nombre $g **est** une racine primitive modulo $p"
else
md"Le nombre $g **n'est pas** une racine primitive modulo $p"
endÙ$16b677e4-c467-462a-b770-b7a31160e129„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$16b677e4-c467-462a-b770-b7a31160e129«code_folded¤codeÙ$prime_list = primes(3, primes_upper)Ù$2c34c17e-12de-43ea-870c-818c97647836„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$2c34c17e-12de-43ea-870c-818c97647836«code_foldedäcodeÙ-md"# Inversion modulaire par Euclide étendu"Ù$21df1900-3954-4506-b759-aeeee664d1df„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$21df1900-3954-4506-b759-aeeee664d1df«code_folded¤codeÙAfunction modinv(a, n)
g, x, y = gcdx(a, n)
return mod(x, n)
endÙ$d830fffd-3781-40ca-85cb-c242f99667ce„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$d830fffd-3781-40ca-85cb-c242f99667ce«code_folded¤codeÙWfunction fib_diag(n)
x = E.vectors * D^(n - 1) * (E.vectors \ [1, 0])
return x[1]
endÙ$08b18315-c28e-44ed-beb2-5b17421b0224„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$08b18315-c28e-44ed-beb2-5b17421b0224«code_foldedäcodeÚžmd"""
> **Définition** Le *Greatest Common Divisor (GCD)* de deux nombres ``a \in \mathbb{Z}`` et ``b \in \mathbb{Z}``, noté ``\text{gcd}(a, b)`` est le plus grand nombre ``g \in \mathbb{Z}`` qui divise ``a`` (noté ``g \mid a``) et ``b`` (noté ``g \mid b``). C'est à dire qu'il existe ``x \in \mathbb{Z}`` tel que ``a = gx`` et ``y \in \mathbb{Z}`` tel que ``b = gy``. En notation modulaire, ``a \equiv 0 \pmod{g}`` et ``b \equiv 0 \pmod{g}``.
> **Théorème de Bézout** Il existe ``x, y \in \mathbb{Z}`` tels que ``ax + by = c`` si et seulement si ``\text{gcd}(a, b)`` divise ``c``. En notation modulaire ``ax \equiv c \pmod{b}`` et ``by \equiv c \pmod{a}``.
"""Ù$8670abc2-63e6-496a-b20c-812197acd9ad„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$8670abc2-63e6-496a-b20c-812197acd9ad«code_foldedäcodeÙKfast_mod_power(a, power, n) = fast_power((a, b) -> mod(a * b, n), a, power)Ù$227e415e-ab17-4f3a-b695-9573c9ee2b57„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$227e415e-ab17-4f3a-b695-9573c9ee2b57«code_foldedäcodeÚŒPlutoUI.details(
md"What is the relation between ``A'`` and ``B'`` ?",
md"""
```math
A' \equiv (g^b)^a \equiv g^{ab} \equiv (g^{a})^b \equiv B' \pmod{p}
```
Alice et Bob ont donc maintenant la même clef! Il est cependant difficile de trouver ``A'`` depuis ``A`` et ``B`` sans connaitre les secrets ``a`` ou ``b`` si le Discrete Logarithm Problem est difficile.
""",
)Ù$67093a35-8e1b-4cd3-b11b-c7ff601f802e„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$67093a35-8e1b-4cd3-b11b-c7ff601f802e«code_foldedäcodeÙ[md"`primes_upper` = $(@bind primes_upper Slider(50:300, default = 100, show_value = true))"Ù$7f9bd301-355b-43f5-b168-22fac9e52511„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$7f9bd301-355b-43f5-b168-22fac9e52511«code_folded¤code±Primes.primes(10)Ù$3f1af973-a02b-4e06-8e6e-eff414fcaf67„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$3f1af973-a02b-4e06-8e6e-eff414fcaf67«code_folded¤codeÙ”function pgcdx(a, b)
if b == 0
return a, one(a), zero(a)
else
q, r = divrem(a, b)
g, x, y = pgcdx(b, r)
return g, y, x - y * q
end
endÙ$fe2af566-4a8b-4052-9915-85266ee5ce98„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$fe2af566-4a8b-4052-9915-85266ee5ce98«code_folded¤code²pgcd(gcd_a, gcd_b)Ù$6ed7c73d-60da-4908-85cb-958745d81ebc„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$6ed7c73d-60da-4908-85cb-958745d81ebc«code_foldedäcodeÙZmd"Par l'algo d'Euclide, ``\text{gcd}(n, n - 1) = 1`` donc ``\text{gcd}(1000, 999) = 1``."Ù$708c442b-cbff-4e1a-b70d-e704453cfd3d„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$708c442b-cbff-4e1a-b70d-e704453cfd3d«code_foldedäcodeÚhbox(
[
md"""
Équation de récurrence:
```math
x_{k+1} = x_k + x_{k-1}
```
Reformulation sans ``(k-1)``
```math
\begin{align}
x_{k+1} & = x_k + y_{k}\\
y_{k+1} & = x_k
\end{align}
```
Forme matricielle:
```math
\begin{bmatrix}
x_{k+1}\\
y_{k+1}
\end{bmatrix}
=
\begin{bmatrix}
1 & 1\\
1 & 0
\end{bmatrix}
\begin{bmatrix}
x_{k}\\
y_{k}
\end{bmatrix}
```
Matrix power:
```math
\begin{bmatrix}
x_n\\
y_n
\end{bmatrix}
=
\begin{bmatrix}
1 & 1\\
1 & 0
\end{bmatrix}^n
\begin{bmatrix}
x_0\\
y_0
\end{bmatrix}
```
""",
md"""
`n` = $(fib_picker)\
$(draw_fib(fib_n))
""",
];
style = Dict("justify-content" => "space-around", "align-items" => "center"),
)Ù$1b2245f8-2f02-4c4d-b6d2-e65af1f2a21e„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$1b2245f8-2f02-4c4d-b6d2-e65af1f2a21e«code_foldedäcode±md"Last 3 digit:"Ù$a7d06375-e4dd-47b1-8aba-11dc4d62954b„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$a7d06375-e4dd-47b1-8aba-11dc4d62954b«code_foldedäcodeÙ½PlutoUI.details(
md"Supposons que ``m`` est pair, c'est à dire ``m = 2k``...",
md"""
On a ``a^{2k} = (a^k)^2``. Si ``b = a^k``, on calcule le produit ``b \times b``.
""",
)´last_hot_reload_timeË ©shortpath©number.jl¥nbpkgŠbusy_packages�Ù,waiting_for_permission_but_probably_disabled§enabledðterminal_outputs‡LinearAlgebraÚá
[0m[1mResolving...[22m
[90m===[39m
[33m[1m┌ [22m[39m[33m[1mWarning: [22m[39mPkg operation failed. Fixing stdlib dependencies and trying again...
[33m[1mâ”” [22m[39m[90m@ GracefulPkg ~/.julia/packages/GracefulPkg/GQ6My/src/apply strategies.jl:96[39m
[0m[1mResolving...[22m
[90m===[39m
[36m[1m Project[22m[39m No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_rcezkwihuv/Project.toml`
[36m[1m Manifest[22m[39m No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_rcezkwihuv/Manifest.toml`
[0m[1mInstantiating...[22m
[90m===[39m
[0m[1mPrecompiling...[22m
[90m===[39m§PlutoUIÚá
[0m[1mResolving...[22m
[90m===[39m
[33m[1m┌ [22m[39m[33m[1mWarning: [22m[39mPkg operation failed. Fixing stdlib dependencies and trying again...
[33m[1mâ”” [22m[39m[90m@ GracefulPkg ~/.julia/packages/GracefulPkg/GQ6My/src/apply strategies.jl:96[39m
[0m[1mResolving...[22m
[90m===[39m
[36m[1m Project[22m[39m No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_rcezkwihuv/Project.toml`
[36m[1m Manifest[22m[39m No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_rcezkwihuv/Manifest.toml`
[0m[1mInstantiating...[22m
[90m===[39m
[0m[1mPrecompiling...[22m
[90m===[39mªnbpkg_syncÚá
[0m[1mResolving...[22m
[90m===[39m
[33m[1m┌ [22m[39m[33m[1mWarning: [22m[39mPkg operation failed. Fixing stdlib dependencies and trying again...
[33m[1mâ”” [22m[39m[90m@ GracefulPkg ~/.julia/packages/GracefulPkg/GQ6My/src/apply strategies.jl:96[39m
[0m[1mResolving...[22m
[90m===[39m
[36m[1m Project[22m[39m No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_rcezkwihuv/Project.toml`
[36m[1m Manifest[22m[39m No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_rcezkwihuv/Manifest.toml`
[0m[1mInstantiating...[22m
[90m===[39m
[0m[1mPrecompiling...[22m
[90m===[39m¦PrimesÚá
[0m[1mResolving...[22m
[90m===[39m
[33m[1m┌ [22m[39m[33m[1mWarning: [22m[39mPkg operation failed. Fixing stdlib dependencies and trying again...
[33m[1mâ”” [22m[39m[90m@ GracefulPkg ~/.julia/packages/GracefulPkg/GQ6My/src/apply strategies.jl:96[39m
[0m[1mResolving...[22m
[90m===[39m
[36m[1m Project[22m[39m No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_rcezkwihuv/Project.toml`
[36m[1m Manifest[22m[39m No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_rcezkwihuv/Manifest.toml`
[0m[1mInstantiating...[22m
[90m===[39m
[0m[1mPrecompiling...[22m
[90m===[39m¦ColorsÚá
[0m[1mResolving...[22m
[90m===[39m
[33m[1m┌ [22m[39m[33m[1mWarning: [22m[39mPkg operation failed. Fixing stdlib dependencies and trying again...
[33m[1mâ”” [22m[39m[90m@ GracefulPkg ~/.julia/packages/GracefulPkg/GQ6My/src/apply strategies.jl:96[39m
[0m[1mResolving...[22m
[90m===[39m
[36m[1m Project[22m[39m No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_rcezkwihuv/Project.toml`
[36m[1m Manifest[22m[39m No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_rcezkwihuv/Manifest.toml`
[0m[1mInstantiating...[22m
[90m===[39m
[0m[1mPrecompiling...[22m
[90m===[39m¥LuxorÚá
[0m[1mResolving...[22m
[90m===[39m
[33m[1m┌ [22m[39m[33m[1mWarning: [22m[39mPkg operation failed. Fixing stdlib dependencies and trying again...
[33m[1mâ”” [22m[39m[90m@ GracefulPkg ~/.julia/packages/GracefulPkg/GQ6My/src/apply strategies.jl:96[39m
[0m[1mResolving...[22m
[90m===[39m
[36m[1m Project[22m[39m No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_rcezkwihuv/Project.toml`
[36m[1m Manifest[22m[39m No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_rcezkwihuv/Manifest.toml`
[0m[1mInstantiating...[22m
[90m===[39m
[0m[1mPrecompiling...[22m
[90m===[39mªDataFramesÚá
[0m[1mResolving...[22m
[90m===[39m
[33m[1m┌ [22m[39m[33m[1mWarning: [22m[39mPkg operation failed. Fixing stdlib dependencies and trying again...
[33m[1mâ”” [22m[39m[90m@ GracefulPkg ~/.julia/packages/GracefulPkg/GQ6My/src/apply strategies.jl:96[39m
[0m[1mResolving...[22m
[90m===[39m
[36m[1m Project[22m[39m No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_rcezkwihuv/Project.toml`
[36m[1m Manifest[22m[39m No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_rcezkwihuv/Manifest.toml`
[0m[1mInstantiating...[22m
[90m===[39m
[0m[1mPrecompiling...[22m
[90m===[39m¶waiting_for_permission·restart_recommended_msgÀ´restart_required_msgÀ²installed_versionsˆLinearAlgebra¦stdlib¥Luxor¥4.1.0¸__internal_julia_version¦1.13.3§PlutoUI¦0.7.60¦Primes¥0.5.6¦Colors§0.12.11Ù!__internal_julia_manifest_version¦1.13.3ªDataFrames¥1.7.0¯install_time_nsÎ5ÿ´¥¬instantiatedÃpluto_version¦v1.1.0