From bf8a6e23bef20a7c32caeaad5a4afb1381704e0c Mon Sep 17 00:00:00 2001 From: Johannes Date: Sat, 23 May 2020 15:44:21 +0200 Subject: [PATCH] Did the latex --- TTM4135.ipynb | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/TTM4135.ipynb b/TTM4135.ipynb index da75faf..a8af703 100644 --- a/TTM4135.ipynb +++ b/TTM4135.ipynb @@ -252,7 +252,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "1105 is probable prime\n" + "1105 is composite\n" ] } ], @@ -265,7 +265,7 @@ "# times to test for primality\n", "from random import randint\n", "def fermat_prime(n, k):\n", - " for x in range(k):\n", + " for _ in range(k):\n", " a = randint(2,n-2)\n", " # Fermat’s theorem says that if a number p is prime then \n", " # a^p−1 mod p = 1 for all a with gcd(a,p) = 1.\n", @@ -299,7 +299,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -382,7 +382,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -429,9 +429,8 @@ "source": [ "# Discrete logarithm problem\n", "Given a prime `p` and an integer `y` with `0 < y < p`, find `x` such that \n", - "```\n", - "y = g^x mod p\n", - "```\n", + "\n", + "> $y = g^{x}\\mod{p}$\n", "\n", "No polynomial algorithims exists, but \"Baby-step giant-step\" is a reasonable one. \n", "\n", @@ -443,7 +442,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 10, "metadata": {}, "outputs": [ { @@ -520,7 +519,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 11, "metadata": {}, "outputs": [ {