Initial commit: math notes vault
This commit is contained in:
49
README.md
Normal file
49
README.md
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
# Math Foundation for Cryptography
|
||||||
|
|
||||||
|
Study system combining:
|
||||||
|
- **MIT 6.1200J** — Mathematics for Computer Science (Spring 2024)
|
||||||
|
- **University at Buffalo CSE 191** — Discrete Structures
|
||||||
|
- **University of Toronto CSC110/111** — Computational Thinking
|
||||||
|
|
||||||
|
## Folder Structure
|
||||||
|
|
||||||
|
- **discrete-math/** — Sets, logic, proofs, induction
|
||||||
|
- **linear-algebra/** — Vectors, matrices, operations
|
||||||
|
- **number-theory/** — Modular arithmetic, primes, GCD, etc.
|
||||||
|
- **logic-proofs/** — Formal reasoning, proof techniques
|
||||||
|
- **graph-theory/** — Graphs, trees, algorithms
|
||||||
|
- **algorithms/** — Complexity, sorting, searching
|
||||||
|
- **cryptography-prep/** — Building blocks for crypto (once foundation is solid)
|
||||||
|
- **lecture-notes/** — Raw notes from lectures before organizing
|
||||||
|
|
||||||
|
## Study Flow
|
||||||
|
|
||||||
|
1. Watch lecture → save raw notes to `lecture-notes/`
|
||||||
|
2. Extract key concepts → organize into appropriate topic folder
|
||||||
|
3. Link cross-references between topics
|
||||||
|
4. System reminds you of old concepts periodically
|
||||||
|
5. Practice problems generated from your notes
|
||||||
|
|
||||||
|
## Topics Covered
|
||||||
|
|
||||||
|
### Foundational (Start Here)
|
||||||
|
- [ ] Sets and Logic
|
||||||
|
- [ ] Proof Techniques
|
||||||
|
- [ ] Induction
|
||||||
|
- [ ] Basic Algorithms
|
||||||
|
|
||||||
|
### Intermediate
|
||||||
|
- [ ] Discrete Math (combinatorics, graphs)
|
||||||
|
- [ ] Linear Algebra (matrices, vectors)
|
||||||
|
- [ ] Modular Arithmetic
|
||||||
|
- [ ] Number Theory Basics
|
||||||
|
|
||||||
|
### Advanced (Path to Crypto)
|
||||||
|
- [ ] Prime Numbers and Factorization
|
||||||
|
- [ ] GCD and Extended Euclidean Algorithm
|
||||||
|
- [ ] Fermat's Little Theorem
|
||||||
|
- [ ] Chinese Remainder Theorem
|
||||||
|
- [ ] Cryptography Foundations
|
||||||
|
|
||||||
|
## Last Updated
|
||||||
|
Created: March 12, 2026
|
||||||
21
algorithms/00-index.md
Normal file
21
algorithms/00-index.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Algorithms
|
||||||
|
|
||||||
|
## Topics
|
||||||
|
- Algorithm Analysis (Big O)
|
||||||
|
- Sorting Algorithms
|
||||||
|
- Searching Algorithms
|
||||||
|
- Recursion
|
||||||
|
- Dynamic Programming
|
||||||
|
- Divide and Conquer
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
- Toronto CSC110/111
|
||||||
|
- MIT 6.1200J Computational sections
|
||||||
|
|
||||||
|
## Key Concepts
|
||||||
|
(Add as you learn)
|
||||||
|
|
||||||
|
## Related
|
||||||
|
- [[graph-theory/00-index|Graph Theory]]
|
||||||
|
- [[logic-proofs/00-index|Logic & Proofs]]
|
||||||
|
- [[cryptography-prep/00-index|Cryptography Prep]]
|
||||||
24
cryptography-prep/00-index.md
Normal file
24
cryptography-prep/00-index.md
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Cryptography Foundations
|
||||||
|
|
||||||
|
## Topics
|
||||||
|
- One-way Functions
|
||||||
|
- Hash Functions
|
||||||
|
- RSA (number theory foundation)
|
||||||
|
- Symmetric Cryptography (math background)
|
||||||
|
- Public Key Cryptography (math requirements)
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
- Build from: Number Theory, Linear Algebra, Algorithms
|
||||||
|
- MIT 6.1200J (as foundation)
|
||||||
|
- Will add crypto-specific resources later
|
||||||
|
|
||||||
|
## Key Concepts
|
||||||
|
(Add as you learn)
|
||||||
|
|
||||||
|
## Related
|
||||||
|
- [[number-theory/00-index|Number Theory]]
|
||||||
|
- [[linear-algebra/00-index|Linear Algebra]]
|
||||||
|
- [[algorithms/00-index|Algorithms]]
|
||||||
|
|
||||||
|
## Status
|
||||||
|
⏳ Not ready yet — build foundation first
|
||||||
19
discrete-math/00-index.md
Normal file
19
discrete-math/00-index.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Discrete Mathematics
|
||||||
|
|
||||||
|
## Topics
|
||||||
|
- Sets and Elements
|
||||||
|
- Logic and Proofs
|
||||||
|
- Induction
|
||||||
|
- Combinatorics
|
||||||
|
- Cardinality
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
- MIT 6.1200J Lectures on Discrete Math
|
||||||
|
- Buffalo CSE 191
|
||||||
|
|
||||||
|
## Key Concepts
|
||||||
|
(Add as you learn)
|
||||||
|
|
||||||
|
## Related
|
||||||
|
- [[linear-algebra/00-index|Linear Algebra]]
|
||||||
|
- [[logic-proofs/00-index|Logic & Proofs]]
|
||||||
60
discrete-math/01-sets-basics.md
Normal file
60
discrete-math/01-sets-basics.md
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
# Sets: Basics and Operations
|
||||||
|
|
||||||
|
**Source:** MIT 6.1200J Lecture 01
|
||||||
|
|
||||||
|
## What is a Set?
|
||||||
|
A **set** is a collection of objects.
|
||||||
|
|
||||||
|
### Properties
|
||||||
|
- **No duplicates:** {1, 2, 2, 3} = {1, 2, 3}
|
||||||
|
- **Order doesn't matter:** {1, 2, 3} = {3, 1, 2}
|
||||||
|
- **Can be infinite:** ℕ = {0, 1, 2, ...}
|
||||||
|
- **Can contain other sets:** B = {2, {3, 4}, ∅}
|
||||||
|
|
||||||
|
## Basic Notation
|
||||||
|
|
||||||
|
### Membership
|
||||||
|
- **∈** (element of): 6 ∈ A means "6 is in set A"
|
||||||
|
- **∉** (not element of): {1, 2} ∉ A
|
||||||
|
|
||||||
|
### Subset
|
||||||
|
- **⊆** (subset): S ⊆ T means all elements of S are also in T
|
||||||
|
- Example: {1, 2} ⊆ {0, 1, 2, 6}
|
||||||
|
|
||||||
|
## Common Sets
|
||||||
|
- **ℕ** (Natural numbers): {0, 1, 2, ...}
|
||||||
|
- **ℤ** (Integers): {..., -2, -1, 0, 1, 2, ...}
|
||||||
|
- **∅** or **{}** (Empty set): The set with no elements
|
||||||
|
|
||||||
|
## Set-Builder Notation
|
||||||
|
Used to define sets with predicates:
|
||||||
|
|
||||||
|
```
|
||||||
|
{n ∈ ℕ | isPrime(n)} = {2, 3, 5, 7, 11, ...}
|
||||||
|
```
|
||||||
|
|
||||||
|
Reads as: "The set of all n in ℕ such that isPrime(n) is true"
|
||||||
|
|
||||||
|
Can also use colon instead of vertical bar: `{n ∈ ℕ : isPrime(n)}`
|
||||||
|
|
||||||
|
## Set Operations
|
||||||
|
|
||||||
|
### Intersection (∩)
|
||||||
|
A ∩ B = {elements in both A and B}
|
||||||
|
|
||||||
|
### Union (∪)
|
||||||
|
A ∪ B = {elements in A or B (or both)}
|
||||||
|
|
||||||
|
### Difference (\ or −)
|
||||||
|
A \ B = {elements in A that are not in B}
|
||||||
|
|
||||||
|
## Ordered Tuples
|
||||||
|
When **order matters**, use parentheses (not braces):
|
||||||
|
|
||||||
|
- **(6, 1, 2, 0) ≠ (2, 1, 6, 0)**
|
||||||
|
- Duplicates allowed: (1, 2, 2, 3) is valid
|
||||||
|
- Set operations (∩, ∪, etc.) don't apply to tuples
|
||||||
|
|
||||||
|
## Related
|
||||||
|
- [[../logic-proofs/00-index|Logic & Proofs]]
|
||||||
|
- [[00-index|Discrete Math Index]]
|
||||||
21
graph-theory/00-index.md
Normal file
21
graph-theory/00-index.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Graph Theory
|
||||||
|
|
||||||
|
## Topics
|
||||||
|
- Graphs and Nodes
|
||||||
|
- Paths and Connectivity
|
||||||
|
- Trees
|
||||||
|
- Graph Algorithms (DFS, BFS)
|
||||||
|
- Shortest Path
|
||||||
|
- Spanning Trees
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
- MIT 6.1200J
|
||||||
|
- Buffalo CSE 191
|
||||||
|
- Toronto CSC110/111
|
||||||
|
|
||||||
|
## Key Concepts
|
||||||
|
(Add as you learn)
|
||||||
|
|
||||||
|
## Related
|
||||||
|
- [[algorithms/00-index|Algorithms]]
|
||||||
|
- [[discrete-math/00-index|Discrete Math]]
|
||||||
62
lecture-notes/MIT_6_1200J_Lec01_Predicates_Sets_Proofs.md
Normal file
62
lecture-notes/MIT_6_1200J_Lec01_Predicates_Sets_Proofs.md
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
# MIT 6.1200J Lecture 01: Predicates, Sets, and Proofs
|
||||||
|
**Date:** Tuesday, February 6, 2024
|
||||||
|
**Instructors:** Z. Abel, B. Chapman, E. Demaine
|
||||||
|
|
||||||
|
## Course Administration
|
||||||
|
- Lectures Tu/Th
|
||||||
|
- Recitations W/F (attendance counts 10%)
|
||||||
|
- Problem Sets due Mondays, released Tuesdays
|
||||||
|
- **Collaboration Policy:** Solve in groups, list collaborators, write solutions independently (no looking at others' work or using communal notes while writing)
|
||||||
|
- **Late Policy:** n hours late = 100 - n% of points (min 50%)
|
||||||
|
|
||||||
|
## Key Concepts
|
||||||
|
|
||||||
|
### What is a Proof?
|
||||||
|
**Definition:** A mathematical proof is a verification of a proposition by a chain of logical deductions from a base set of axioms.
|
||||||
|
|
||||||
|
### Propositions and Predicates
|
||||||
|
- **Proposition:** A statement that is either True or False
|
||||||
|
- Example (True): 2 + 3 = 5
|
||||||
|
- Example (False): 2 + 3 = 6
|
||||||
|
- **Predicate:** A proposition whose truth depends on variables
|
||||||
|
- Example: ∀n ∈ ℕ. n² + n + 41 is prime
|
||||||
|
|
||||||
|
### Sets (Introduction)
|
||||||
|
- **Set:** A collection of objects (no duplicates, order doesn't matter)
|
||||||
|
- **Notation:**
|
||||||
|
- ∈ (element of): 6 ∈ A
|
||||||
|
- ⊆ (subset): S ⊆ T means all elements of S are in T
|
||||||
|
- Set-builder notation: {n ∈ ℕ | isPrime(n)} = {2, 3, 5, 7, 11, ...}
|
||||||
|
- **Operations:**
|
||||||
|
- ∩ (intersection): A ∩ B
|
||||||
|
- ∪ (union): A ∪ B
|
||||||
|
- \ (difference): A \ B
|
||||||
|
- **Ordered Tuples:** (a, b) where order matters and duplicates allowed
|
||||||
|
|
||||||
|
#### Common Sets:
|
||||||
|
- ℕ = {0, 1, 2, ...} (natural numbers)
|
||||||
|
- ℤ = {..., -2, -1, 0, 1, 2, ...} (integers)
|
||||||
|
- ∅ or {} (empty set)
|
||||||
|
|
||||||
|
### Axioms
|
||||||
|
**Definition:** An axiom is a proposition assumed to be True. Must be stated upfront.
|
||||||
|
|
||||||
|
**Key Point:** Different axiom systems can be equally valid but yield different results.
|
||||||
|
|
||||||
|
#### Example Axioms:
|
||||||
|
1. If a = b and b = c, then a = c
|
||||||
|
2. **Euclidean:** Given line l and point p ∉ l, exactly one line through p parallel to l
|
||||||
|
3. **Hyperbolic:** Given line l and point p ∉ l, infinitely many lines through p parallel to l
|
||||||
|
4. **Spherical:** Given line l and point p ∉ l, no line through p parallel to l
|
||||||
|
|
||||||
|
### Consistency and Completeness
|
||||||
|
- **Consistent:** No proposition can be both proved and disproved
|
||||||
|
- **Complete:** Every proposition can be either proved or disproved
|
||||||
|
|
||||||
|
**Gödel's Incompleteness Theorem (1930s):** No set of axioms is both complete and consistent.
|
||||||
|
|
||||||
|
**Corollary:** If axioms are consistent, there exist true statements that cannot be proved.
|
||||||
|
|
||||||
|
## Important Note
|
||||||
|
- Understanding someone else's proof ≠ being able to piece your own proof together
|
||||||
|
- "In your own words" means: show your reasoning process
|
||||||
12
lecture-notes/README.md
Normal file
12
lecture-notes/README.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Raw Lecture Notes
|
||||||
|
|
||||||
|
Store unorganized lecture notes here, then move key concepts to appropriate topic folders.
|
||||||
|
|
||||||
|
## Files
|
||||||
|
(New notes appear here as you forward them)
|
||||||
|
|
||||||
|
## Organization Workflow
|
||||||
|
1. Save raw lecture as `lecture-COURSE-DATE.md`
|
||||||
|
2. Extract key concepts
|
||||||
|
3. Move relevant parts to topic folders
|
||||||
|
4. Keep references here for archival
|
||||||
19
linear-algebra/00-index.md
Normal file
19
linear-algebra/00-index.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Linear Algebra
|
||||||
|
|
||||||
|
## Topics
|
||||||
|
- Vectors and Vector Spaces
|
||||||
|
- Matrices
|
||||||
|
- Linear Transformations
|
||||||
|
- Eigenvalues and Eigenvectors
|
||||||
|
- Determinants
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
- MIT 6.1200J (as it relates to CS)
|
||||||
|
- Toronto CSC110/111
|
||||||
|
|
||||||
|
## Key Concepts
|
||||||
|
(Add as you learn)
|
||||||
|
|
||||||
|
## Related
|
||||||
|
- [[discrete-math/00-index|Discrete Math]]
|
||||||
|
- [[cryptography-prep/00-index|Cryptography Prep]]
|
||||||
19
logic-proofs/00-index.md
Normal file
19
logic-proofs/00-index.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Logic and Proofs
|
||||||
|
|
||||||
|
## Topics
|
||||||
|
- Propositional Logic
|
||||||
|
- Predicate Logic
|
||||||
|
- Proof by Contradiction
|
||||||
|
- Mathematical Induction
|
||||||
|
- Proof Techniques
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
- MIT 6.1200J Mathematics for Computer Science
|
||||||
|
- Buffalo CSE 191
|
||||||
|
|
||||||
|
## Key Concepts
|
||||||
|
(Add as you learn)
|
||||||
|
|
||||||
|
## Related
|
||||||
|
- [[discrete-math/00-index|Discrete Math]]
|
||||||
|
- [[algorithms/00-index|Algorithms]]
|
||||||
27
logic-proofs/01-what-is-a-proof.md
Normal file
27
logic-proofs/01-what-is-a-proof.md
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# What is a Proof?
|
||||||
|
|
||||||
|
**Source:** MIT 6.1200J Lecture 01
|
||||||
|
|
||||||
|
## Definition
|
||||||
|
A **mathematical proof** is a verification of a proposition by a chain of logical deductions from a base set of axioms.
|
||||||
|
|
||||||
|
## Key Components
|
||||||
|
1. **Proposition** — A statement that is either True or False
|
||||||
|
2. **Axioms** — Assumed-to-be-true base statements
|
||||||
|
3. **Logical deductions** — Chain of reasoning connecting axioms to conclusion
|
||||||
|
|
||||||
|
## Important: Different Proof Contexts
|
||||||
|
- Physics: Experiment/observation
|
||||||
|
- Statistics: Sampling
|
||||||
|
- Law: Judge/jury verdict
|
||||||
|
- Business: Authority
|
||||||
|
- Mathematics: Logical deduction from axioms
|
||||||
|
|
||||||
|
## Why State Axioms?
|
||||||
|
- Mathematics requires assumptions (axiom = stated assumption)
|
||||||
|
- Different axiom systems lead to different mathematical worlds
|
||||||
|
- Example: Euclidean vs. Hyperbolic geometry — both valid with different parallel axioms
|
||||||
|
|
||||||
|
## Related
|
||||||
|
- [[../discrete-math/00-index|Discrete Math Foundations]]
|
||||||
|
- [[02-propositions|Propositions]]
|
||||||
42
logic-proofs/02-propositions.md
Normal file
42
logic-proofs/02-propositions.md
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# Propositions and Predicates
|
||||||
|
|
||||||
|
**Source:** MIT 6.1200J Lecture 01
|
||||||
|
|
||||||
|
## Proposition
|
||||||
|
**Definition:** A statement that is either True or False.
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
- **True:** 2 + 3 = 5
|
||||||
|
- **False:** 2 + 3 = 6
|
||||||
|
|
||||||
|
### Non-examples (not propositions)
|
||||||
|
- "Hello" — not a statement
|
||||||
|
- "Who are you?" — a question, not a declarative statement
|
||||||
|
|
||||||
|
## Predicate
|
||||||
|
**Definition:** A proposition whose truth depends on variables.
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
- P(n) = "n² + n + 41 is prime" where n ∈ ℕ
|
||||||
|
- Q(x, y) = "x + y = 5" where x, y ∈ ℝ
|
||||||
|
|
||||||
|
### Notation
|
||||||
|
- ∀ (for all): ∀n ∈ ℕ. P(n)
|
||||||
|
- ∃ (there exists): ∃n ∈ ℕ. P(n)
|
||||||
|
|
||||||
|
## Implication (A ⇒ B)
|
||||||
|
**Key point:** A ⇒ B is NOT about causation or time ordering.
|
||||||
|
|
||||||
|
Truth table:
|
||||||
|
| A | B | A ⇒ B |
|
||||||
|
|---|---|-------|
|
||||||
|
| T | T | T |
|
||||||
|
| T | F | F |
|
||||||
|
| F | T | **T** |
|
||||||
|
| F | F | T |
|
||||||
|
|
||||||
|
**Note:** "If and only if" (A ⟺ B) means (A ⇒ B) AND (B ⇒ A)
|
||||||
|
|
||||||
|
## Related
|
||||||
|
- [[01-what-is-a-proof|What is a Proof?]]
|
||||||
|
- [[03-axioms-and-godel|Axioms & Gödel's Theorem]]
|
||||||
48
logic-proofs/03-axioms-and-godel.md
Normal file
48
logic-proofs/03-axioms-and-godel.md
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
# Axioms and Gödel's Incompleteness Theorem
|
||||||
|
|
||||||
|
**Source:** MIT 6.1200J Lecture 01
|
||||||
|
|
||||||
|
## Axiom
|
||||||
|
**Definition:** A proposition that is assumed to be True.
|
||||||
|
|
||||||
|
### Key Insight
|
||||||
|
- You MUST make assumptions in mathematics
|
||||||
|
- The key is to **state them upfront**
|
||||||
|
|
||||||
|
## Examples of Contradictory Axiom Systems
|
||||||
|
All three are equally valid — they define different geometric worlds:
|
||||||
|
|
||||||
|
1. **Euclidean:** Given line l and point p ∉ l, exactly one line through p parallel to l
|
||||||
|
2. **Hyperbolic:** Given line l and point p ∉ l, infinitely many lines through p parallel to l
|
||||||
|
3. **Spherical:** Given line l and point p ∉ l, no line through p parallel to l
|
||||||
|
|
||||||
|
**Lesson:** Different axioms yield different proofs and theorems. Anyone who accepts your axioms must accept theorems derived from them.
|
||||||
|
|
||||||
|
## Consistency and Completeness
|
||||||
|
|
||||||
|
### Consistent
|
||||||
|
Definition: A set of axioms is consistent if no proposition can be both proved and disproved.
|
||||||
|
|
||||||
|
### Complete
|
||||||
|
Definition: A set of axioms is complete if every proposition can be either proved or disproved.
|
||||||
|
|
||||||
|
**Ideal scenario:** Both consistent AND complete.
|
||||||
|
|
||||||
|
## Gödel's Incompleteness Theorem
|
||||||
|
|
||||||
|
**Theorem (Kurt Gödel, 1930s):** No set of axioms is both complete and consistent.
|
||||||
|
|
||||||
|
### Impact
|
||||||
|
- Shocked the mathematical community
|
||||||
|
- Logicians Russell and Whitehead spent careers trying to find complete + consistent axioms for arithmetic — impossible!
|
||||||
|
|
||||||
|
### Corollary
|
||||||
|
If axioms must be consistent (necessary for validity), then there exist **True statements that cannot be proved**.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
- Goldbach's Conjecture might be true but unprovable
|
||||||
|
- (If so, please don't assign it as homework!)
|
||||||
|
|
||||||
|
## Related
|
||||||
|
- [[02-propositions|Propositions]]
|
||||||
|
- [[01-what-is-a-proof|What is a Proof?]]
|
||||||
20
number-theory/00-index.md
Normal file
20
number-theory/00-index.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# Number Theory
|
||||||
|
|
||||||
|
## Topics
|
||||||
|
- Divisibility and Primes
|
||||||
|
- Modular Arithmetic
|
||||||
|
- GCD and Extended Euclidean Algorithm
|
||||||
|
- Fermat's Little Theorem
|
||||||
|
- Chinese Remainder Theorem
|
||||||
|
- Factorization
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
- Buffalo CSE 191
|
||||||
|
- MIT 6.1200J Number Theory sections
|
||||||
|
|
||||||
|
## Key Concepts
|
||||||
|
(Add as you learn)
|
||||||
|
|
||||||
|
## Related
|
||||||
|
- [[cryptography-prep/00-index|Cryptography Prep]]
|
||||||
|
- [[discrete-math/00-index|Discrete Math]]
|
||||||
Reference in New Issue
Block a user