-
Notifications
You must be signed in to change notification settings - Fork 0
Add comprehensive study notes on math, CS, networking, and AI #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| # Math & CS Notes Repository | ||
|
|
||
| A structured collection of study notes spanning pure mathematics, theoretical computer science, physics, programming, networking, and AI architecture. | ||
|
|
||
| ## Contents | ||
|
|
||
| ### Math | ||
| - [Complex Numbers](math/complex-numbers.md) -- Conjugates, Euler's formula, Taylor expansion of e^(ix) | ||
| - [Modular Arithmetic](math/modular-arithmetic.md) -- Definition, clock arithmetic, congruence properties | ||
| - [Linear Algebra](math/linear-algebra.md) -- Function spaces K^X, scalar-product associativity proof | ||
|
|
||
| ### Theoretical Computer Science | ||
| - [The Halting Problem](theoretical-cs/halting-problem.md) -- Turing's undecidability proof, h/h+ construction, self-reference | ||
| - [Paradoxes & Self-Reference](theoretical-cs/paradoxes.md) -- Liar paradox, Cantor diagonalization, Monty Hall Trolley Problem | ||
|
|
||
| ### Physics | ||
| - [Quantum Mechanics](physics/quantum-mechanics.md) -- Schrodinger equation, wave functions, Hilbert space | ||
|
|
||
| ### Programming | ||
| - [Python Mutability](programming/python-mutability.md) -- References vs copies, list aliasing, += rebinding behavior | ||
|
|
||
| ### Networking | ||
| - [VLAN Configuration](networking/vlan-configuration.md) -- Cisco switch commands, access/trunk modes | ||
| - [IPv4 Subnetting](networking/ipv4-subnetting.md) -- Complete CIDR table, binary calculations, private ranges, IPv4 classes | ||
| - [DNS](networking/dns.md) -- Resolution flow, hierarchy, record types | ||
|
|
||
| ### AI Architecture | ||
| - [Agentic Patterns](ai-architecture/agentic-patterns.md) -- Multi-agent patterns: parallel, sequential, loop, router, aggregator, network, hierarchical | ||
|
|
||
| ### Puzzles & Misc | ||
| - [Connect All 9](puzzles/connect-nine.md) -- Classic dot puzzle, triangular numbers (termial) | ||
| - [Orbital Mechanics](puzzles/orbital-mechanics.md) -- Planetary orbits, Kepler's laws | ||
|
|
||
| ## Topic Map | ||
|
|
||
| ``` | ||
| ┌─────────────────┐ | ||
| │ Complex Numbers│ | ||
| └────────┬────────┘ | ||
| │ Euler's formula | ||
| ▼ | ||
| ┌─────────────────┐ ┌──────────────┐ | ||
| │ Quantum │────────→ │ Linear │ | ||
| │ Mechanics │ Hilbert │ Algebra │ | ||
| └─────────────────┘ space └──────────────┘ | ||
| │ | ||
| ┌─────────────────┐ │ finite fields | ||
| │ Modular │ ←───────────────┘ | ||
| │ Arithmetic │ | ||
| └────────┬────────┘ | ||
| │ binary math | ||
| ▼ | ||
| ┌─────────────────┐ | ||
| │ IPv4 Subnetting │ | ||
| └────────┬────────┘ | ||
| │ | ||
| ┌────────┴────────┐ | ||
| │ VLAN DNS │ | ||
| └─────────────────┘ | ||
|
|
||
| ┌─────────────────┐ ┌──────────────────┐ | ||
| │ Halting Problem │────────→│ Paradoxes & │ | ||
| │ (Turing 1936) │ self- │ Self-Reference │ | ||
| └──────────────────┘ ref └──────────────────┘ | ||
|
|
||
| ┌─────────────────┐ ┌──────────────────┐ | ||
| │ Python │ shared │ Agentic │ | ||
| │ Mutability │ state │ Architectures │ | ||
| └──────────────────┘────────└──────────────────┘ | ||
| ``` | ||
|
|
||
| ## Source | ||
|
|
||
| Notes transcribed from handwritten pages, reference images, and community discussions (r/askmath, r/trolleyproblem, r/askastronomy, r/PythonLearnersHub, networks.baseline, leadgenman). | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,136 @@ | ||
| # Agentic Architectures | ||
|
|
||
| ## Single System vs Multi-Agent System | ||
|
|
||
| ### Single System | ||
| ``` | ||
| User ──→ AI Agent ──→ Response | ||
| │ | ||
| Memory | ||
| Tools | ||
| ``` | ||
|
|
||
| ### Multi-Agent System | ||
| ``` | ||
| User ──→ AI Agent ←──→ AI Agent | ||
| │ │ | ||
| Memory Tools | ||
| Tools Memory | ||
| ``` | ||
|
|
||
| Multiple agents collaborate, each with their own memory and tools. | ||
|
|
||
| ## Patterns in Multi-Agent Systems | ||
|
|
||
| ### 1. Parallel | ||
| ``` | ||
| ┌─ AI Agent ─┐ | ||
| In ──→───┤ ├───→ Out | ||
| └─ AI Agent ─┘ | ||
| ``` | ||
| Multiple agents process the same input simultaneously. Good for speed and redundancy. | ||
|
|
||
| ### 2. Sequential | ||
| ``` | ||
| In ──→ AI Agent ──→ AI Agent ──→ Out | ||
| ``` | ||
| Each agent's output feeds into the next. Good for pipelines and staged processing. | ||
|
|
||
| ### 3. Loop | ||
| ``` | ||
| In ──→ AI Agent ──→ AI Agent ──→ Out | ||
| ▲ │ | ||
| └──────────────┘ | ||
| ``` | ||
| Agents iterate until a condition is met. Good for refinement and self-correction. | ||
|
|
||
| ### 4. Router | ||
| ``` | ||
| ┌──→ Out | ||
| In ──→ AI Agent | ||
| └──→ Out | ||
| ``` | ||
| One agent decides where to send the input. Good for classification and routing. | ||
|
|
||
| ### 5. Aggregator | ||
| ``` | ||
| In ──→───┐ | ||
| AI Agent ──→ Out | ||
| In ──→───┘ | ||
| ``` | ||
| Combines multiple inputs into a single output. Good for summarization and synthesis. | ||
|
|
||
| ### 6. Network | ||
| ``` | ||
| ┌─────────────┐ | ||
| In ──→ AI Agent ←→ AI Agent ──→ Out | ||
| └─→ AI Agent ←─┘ | ||
| ``` | ||
| Fully connected agents that can communicate freely. Good for complex reasoning. | ||
|
|
||
| ### 7. Hierarchical | ||
| ``` | ||
| AI Agent (manager) | ||
| / \ | ||
| AI Agent AI Agent | ||
| ``` | ||
| A manager agent delegates to worker agents. Good for task decomposition. | ||
|
|
||
| ## Architecture Examples (with Tools) | ||
|
|
||
| ### Hierarchical (with external services) | ||
| ``` | ||
| AI Agent (orchestrator) | ||
| / | \ | ||
| AI Agent AI Agent AI Agent | ||
| | | | | ||
| Vector Search Web Search Gmail | ||
| Vector Search Vector Search | ||
| ``` | ||
|
|
||
| ### Human-in-the-Loop | ||
| ``` | ||
| User Input ──→ AI Agent ──→ Person ──→ Response | ||
| │ │ | ||
| AI Agent ←─────────────────┘ | ||
| ``` | ||
|
|
||
| ### Shared Tools | ||
| ``` | ||
| User Input ──→ AI Agent ──→ Response | ||
| │ | ||
| ┌─────┼─────┐ | ||
| Vector Search Web Search Vector DB | ||
| ``` | ||
|
|
||
| ### Database with Tools | ||
| ``` | ||
| User Input ──→ AI Agent ──→ Response | ||
| │ | ||
| ┌─────┼─────┐ | ||
| AI/KB Web Search Vector DB | ||
| Data Transform | ||
| ``` | ||
|
|
||
| ### Memory Transformation | ||
| ``` | ||
| User Input ──→ AI Agent ──→ Response | ||
| │ | ||
| ┌─────┼──────────┐ | ||
| Web Search Vector Search Vector DB | ||
| AI Agent Memory Data Transform | ||
| ``` | ||
|
|
||
| ## Relevance to BlackRoad | ||
|
|
||
| BlackRoad's architecture uses several of these patterns: | ||
| - **Router**: The Operator classifies and routes requests | ||
| - **Hierarchical**: Cece delegates to specialized tools/services | ||
| - **Sequential**: Request → classify → route → execute → respond | ||
| - **Shared Tools**: Multiple agents share NumPy, Claude, GPT, Hailo-8 | ||
|
|
||
| ## Connections | ||
|
|
||
| - Routing patterns connect to [DNS](../networking/dns.md) (hierarchical resolution) | ||
| - Agent memory relates to [Python Mutability](../programming/python-mutability.md) (shared vs. isolated state) | ||
| - The halting problem ([Halting Problem](../theoretical-cs/halting-problem.md)) limits what agents can decide |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,60 @@ | ||||||||||
| # Complex Numbers | ||||||||||
|
|
||||||||||
| ## Multiplication of Complex Conjugates | ||||||||||
|
|
||||||||||
| ``` | ||||||||||
| a(a - aib + aib - ibib) | ||||||||||
| = a² - (ib)² | ||||||||||
|
Comment on lines
+6
to
+7
|
||||||||||
| a(a - aib + aib - ibib) | |
| = a² - (ib)² | |
| (a + ib)(a - ib) | |
| = a² - iab + iab - i²b² |
Copilot
AI
Feb 27, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The expression shown under “Imaginary Numbers” ((y + x)² y) is unclear/unfinished as written and doesn’t connect to the surrounding discussion (e.g., complex form a+bi, magnitude, etc.). Consider replacing it with a clear example (like z=a+bi, |z|=√(a²+b²)) or removing it if it’s a transcription artifact.
Copilot
AI
Feb 27, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This absolute value example is mathematically incorrect: |x - 1| cannot equal -1. If the intent is to show the inside can be -1, that should be written as x - 1 = -1 while keeping |x - 1| = 1.
| |x - 1| = -1 (Note: absolute value is always >= 0; this explores when the inner expression is negative) | |
| x - 1 = -1 (inner expression is negative, but its absolute value is non-negative) | |
| |x - 1| = 1 |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,71 @@ | ||||||
| # Linear Algebra - Function Spaces | ||||||
|
|
||||||
| ## Function Space Definition | ||||||
|
|
||||||
| The set of all functions from X to a field K: | ||||||
|
|
||||||
| ``` | ||||||
| K^X = { f : X → K } | ||||||
| ``` | ||||||
|
|
||||||
| This is a **vector space** of functions. | ||||||
|
|
||||||
| ## Operations on Function Spaces | ||||||
|
|
||||||
| ### Addition of Functions | ||||||
| ``` | ||||||
| (f + g)(x) := f(x) + g(x) | ||||||
| ``` | ||||||
|
|
||||||
| ### Scalar Multiplication | ||||||
| ``` | ||||||
| (λ · f)(x) := λ · f(x) | ||||||
| ``` | ||||||
|
|
||||||
| ### Pointwise Multiplication | ||||||
| ``` | ||||||
| (f * g)(x) := f(x) · g(x) | ||||||
| ``` | ||||||
|
|
||||||
| ## Key Property: Scalar-Product Associativity | ||||||
|
|
||||||
| **Proposition 2.2:** | ||||||
|
|
||||||
| ``` | ||||||
| λ · (a * b) = (λ · a) * b = a * (λ · b) | ||||||
|
||||||
| λ · (a * b) = (λ · a) * b = a * (λ · b) | |
| λ · (f * g) = (λ · f) * g = f * (λ · g) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The README describes the IPv4 notes as a “Complete CIDR table”, but the subnetting table in
networking/ipv4-subnetting.mdskips several prefix lengths (e.g., /7, /6, /5, /3–/1). Either fill in the missing CIDRs or adjust this description to avoid overstating completeness.