commit c99525717defdf2f1d43da9e66b4b57edc65fd93
parent d75f3fa664e0a57014998ee09f3fd4590aef0235
Author: Andrew <andrewlaack1@gmail.com>
Date: Wed, 28 Aug 2024 14:00:07 -0500
Took notes for discrete from yesterday
Diffstat:
13 files changed, 126 insertions(+), 14 deletions(-)
diff --git a/CaesarCipher.md b/CaesarCipher.md
@@ -0,0 +1,8 @@
+:discrete: :cryptography:
+# Caesar Cipher
+
+U 2.4
+
+## Notes
+
+**Definition:** A Caesar Cipher is monoalphabetic substitution whereby we encode characters as numbers shift the numbers by a constant amount and then decode them.
diff --git a/Congruence.md b/Congruence.md
@@ -0,0 +1,8 @@
+:discrete:
+# Congruence (over mod)
+
+U 2.4
+
+## Notes
+
+**Definition:** Congruence describes the relationship between two numbers such that $a \equiv b (mod c)$.
diff --git a/CongruenceClass.md b/CongruenceClass.md
@@ -0,0 +1,8 @@
+:discrete:
+# Congruence Class
+
+U 2.4
+
+## Notes
+
+**Definition:** A congruence class is the set of all integers such that $a \equiv b (modc)$ for all integers a.
diff --git a/DiscreteMath.md b/DiscreteMath.md
@@ -90,17 +90,15 @@ Unit 2.4 (integers and division):
- [NumberTheory](NumberTheory.md)
- [CompositeNumber](CompositeNumber.md)
- [PrimeNumber](PrimeNumber.md)
- - Mersenne Prime
- - div (function)
- - mod (function always greater than 0 including for negatives)
- - relatively prime (gcd)
- - pairwise relatively prime
- - prime factorization (describe how to find with prime exponent calculation)
- - gcd (describe prime factorization use to find it)
- - lcm (describe again how to find with prime factorization)
- - ab = gcd(a,b) x lcm(a,b)
- - congruence (a \equiv b (mod c))
- - congruence class
- - pseudo random number generation (linear congruential model and pure multiplicative gen)
- - caesar cipher
- - vigenere cipher (polyalphabetic ciphers)
+ - [MersennePrime](MersennePrime.md)
+ - [Div](Div.md)
+ - [Mod](Mod.md)
+ - [RelativelyPrime](RelativelyPrime.md)
+ - [PairwiseRelativelyPrime](PairwiseRelativelyPrime.md)
+ - [PrimeFactorization](PrimeFactorization.md)
+ - [GCD](GCD.md)
+ - [LCM](LCM.md)
+ - [Congruence](Congruence.md)
+ - [CongruenceClass](CongruenceClass.md)
+ - [CaesarCipher](CaesarCipher.md)
+ - [VigenereCipher](VigenereCipher.md)
diff --git a/Div.md b/Div.md
@@ -0,0 +1,14 @@
+:discrete:
+# Div
+
+U 2.4
+
+## Notes
+
+**Definition:** Div is a mathmatical function whereby we find the largest integer such that the second number times divisor is less than or equal to the first number.
+
+
+ex:
+
+
+15 div 2 = 7
diff --git a/GCD.md b/GCD.md
@@ -0,0 +1,10 @@
+:discrete:
+# GCD
+
+U 2.4
+
+## Notes
+
+**Definition:** The GCD of two numbers a and c is the largest integer such that a | b and a | c.
+
+To find the GCD of two numbers find the prime factorization and then take the min exponent of each prior prime. Evaluate this to find the GCD.
diff --git a/LCM.md b/LCM.md
@@ -0,0 +1,8 @@
+:discrete:
+# LCM
+
+U 2.4
+
+## Notes
+
+**Definition:** LCM is the least common multiple of two numbers meaning it is the smallest number that is divisible by both values.
diff --git a/MersennePrime.md b/MersennePrime.md
@@ -0,0 +1,10 @@
+:discrete:
+# Mersenne Prime
+
+U 2.4
+
+## Notes
+
+**Definition:** A mersenne prime is a prime number of the form (2^n) - 1.
+
+The largest prime numbers found have been prime numbers of this form.
diff --git a/Mod.md b/Mod.md
@@ -0,0 +1,10 @@
+:discrete:
+# Mod
+
+U 2.4
+
+## Notes
+
+**Definition:** Mod is a mathematical function where we find the value 0 <= n < a such that a = bk + n for some integer b.
+
+Generally, this is normally used only for integers, but there is not anything prohibitive about using it on R so long as b is an integer.
diff --git a/PairwiseRelativelyPrime.md b/PairwiseRelativelyPrime.md
@@ -0,0 +1,8 @@
+:discrete:
+# Pairwise Relatively Prime
+
+U 2.4
+
+## Notes
+
+**Definition:** Pairwise relatively primes are a set of numbers such that the gcd between any two numbers in the set is always 1.
diff --git a/PrimeFactorization.md b/PrimeFactorization.md
@@ -0,0 +1,14 @@
+:discrete:
+# Prime Factorization
+
+U 2.4
+
+## Notes
+
+**Definition:** The prime factorization of any given number is the multiplication of prime numbers that results in the number.
+
+In the case a number is prime its prime factorization would then be itself.
+
+## Calculate
+
+To calculate the prime factorization of any given number you iterate through the prime numbers less than or equal to its square root and any time a prime number is a divisor of the specified value you add it to the list of the prime factorization. You then test to see if it is divisible by that number again and continue adding it if it is. Otherwise you move on to the next prime until reaching the number of interest.
diff --git a/RelativelyPrime.md b/RelativelyPrime.md
@@ -0,0 +1,8 @@
+:discrete:
+# Relatively Prime
+
+U 2.4
+
+## Notes
+
+**Definition:** A relatively prime numbers (only 2 numbers) are prime numbers such that gcd(a,b) = 1.
diff --git a/VigenereCipher.md b/VigenereCipher.md
@@ -0,0 +1,8 @@
+:discrete: :cryptography:
+# Vigenere Cipher
+
+U 2.4
+
+## Notes
+
+**Definition:** Vigenere cipher is an polyalphabetic encryption scheme where we specify a key and then shift each element in the original message by the number represented by the character at the current location. When doing this we iterate through the key to ensure there is not one value doing the encrypting like with a Caesar Cipher.