squirrelworks

Computer Science Foundations > Part 1: Continuous Math & Systems Abstraction

A SysAdmin's Guide to Computer Science: From College Algebra to Machine Memory

Traditional CS degrees start with high-level proofs, continuous calculus, and theoretical abstract algebra. But in the world of systems administration and DevOps, math isn't just theory—it's the underlying infrastructure governing vector stores, kernel memory allocation, state management, and algorithmic performance under heavy server load.

Linear Algebra & Matrices Discrete Logic & Sets Algorithmic Big-O
cs-core — math & memory
Input: College Algebra Basis
Scale: 1D Scalar → ND Matrices
Target: Hardware Vectorization
Goal: Zero-Fluff Systems Understanding

1. Beyond College Algebra: Vectors, Matrices & Parallel SIMD

Standard College Algebra focuses on single variables ($x, y$) on a two-dimensional plane. Linear Algebra takes those same arithmetic rules and packages them into multi-dimensional arrays (Vectors and Matrices) so hardware can execute millions of calculations simultaneously.

Mathematical Structure Data Representation SysAdmin / DevOps Analogy
Scalar ($x = 42$) A single numerical value or isolated metric point. A single CPU temperature reading or current server load average.
Vector ($\mathbf{v} = [x, y, z]$) An ordered 1D array representing multiple traits or dimensions. A JSON payload or log record containing [Timestamp, IP, Status, Latency]
Matrix ($M_{m \times n}$) A 2D grid of numbers where rows are vectors and columns are traits. A relational database table or Prometheus timeseries telemetry matrix.

Sequential CPU Execution

Standard loops evaluate linear algebra one operation at a time. A CPU steps line-by-line through memory registers, creating latency bottlenecks when scaling to massive datasets.

SIMD & GPU Parallelism

Modern hardware uses Single Instruction, Multiple Data (SIMD) instruction sets and GPU tensor cores to multiply entire matrix blocks in a single clock cycle.

Tech Fact Icon
Infrastructure Takeaway

Whether configuring high-performance Redis caches, vector databases for LLMs, or GPU passthrough on a hypervisor host, linear algebra is simply the spatial geometry of organized computer memory.

2. Discrete Math: Set Theory, Boolean Logic & IAM Policy Maps

Unlike continuous calculus (which tracks smooth rates of change), Discrete Mathematics deals with distinct, non-continuous structures: sets, true/false conditions, and graph nodes. Discrete math is the natural language of access control, network routing, and state engines.

Set Theory in Directory Services & Network Filtering

Active Directory group memberships, SQL JOIN statements, and firewall rule tables are explicit set operations:

# Union (∪): Combining distinct objects across groups
[Domain Admins] ∪ [Enterprise Admins] = All administrative identities

# Intersection (∩): Identity alignment for Conditional Access / RBAC
[SecOps Team] ∩ [MFA-Enforced Users] = Authorized operational scope

# Complement (∖): Excluding service & system accounts from cloud sync
[All Local AD Users] ∖ [OU=ServiceAccounts] = Azure AD Sync Target Scope
Graph Theory in Infrastructure Architecture Discrete Application
Nodes & Edges
Active Directory Trust Boundaries

Domain controllers act as vertices (nodes) connected by replication edges. Traversing Kerberos transitive trust relationships is literally a graph search problem (Dijkstra's / BFS).

Directed Acyclic Graphs (DAG)
Terraform & Ansible Execution Trees

Infrastructure-as-Code engines build DAGs to evaluate resource dependencies—ensuring a virtual network exists before attempting to provision dependent VM NICs.

Packet Routing
OSPF & BGP Dynamic Path Selection

Network switches compute shortest-path routing graphs dynamically to route IP traffic around link outages and latency spikes.

3. Algorithmic Complexity (Big-O): Why Scripts Crash under Scale

You don't need a CS degree to write a working script, but understanding Big-O notation explains why a Bash or Python script that runs in 2 seconds on your laptop freezes for 3 hours when pointed at 50,000 production Active Directory accounts or log files.

Complexity Operation Description Real-World SysAdmin Impact
O(1) — Constant Direct memory lookup regardless of total dataset size. Querying a Redis key-value cache or array index.
O(log n) — Logarithmic Splits the problem space in half each step (Binary Search). Querying indexed B-Tree columns in SQL or searching sorted logs.
O(n) — Linear Inspects every item once sequentially. Running an un-indexed grep or scanning a raw CSV line-by-line.
O(n²) — Quadratic Nested loops: iterates over the entire list for every single item. Comparing two unindexed arrays in PowerShell using nested foreach loops.
Practical Optimization: O(n²) vs O(1) Lookups

When checking user lists against security groups, using standard arrays creates an O(n²) bottleneck. Converting target lookup sets into HashTables drops operation time to O(1):

# SLOW O(n²) Approach: Array linear search inside loop
$targetUsers | Where-Object { $groupMembers -contains $_.SamAccountName }

# FAST O(1) Approach: Instant HashTable memory lookup
$hashTable = @{} ; $groupMembers.ForEach({ $hashTable[$_] = $true })
$targetUsers | Where-Object { $hashTable.ContainsKey($_.SamAccountName) }

4. Memory Architecture: Stack, Heap & Virtual Memory

Computer science abstraction layers hide physical silicon behind memory management models. When troubleshooting process crashes, OOM (Out Of Memory) kills on Linux containers, or thread locks, understanding how the OS manages memory is critical.

sequenceDiagram
    autonumber
    actor App as User Process (Python/C)
    participant Stack as Process Stack (LIFO)
    participant Heap as Process Heap (Dynamic)
    participant Kernel as Linux Kernel (VMM)
    participant RAM as Physical RAM / Swap

    App->>Stack: 1. Allocate local primitive variables & frame pointers
    Note over Stack: Fast, fixed-size allocation,
automatically managed App->>Heap: 2. Request dynamic memory (malloc / objects) Note over Heap: Flexible sizing,
requires Garbage Collection or free() Heap->>Kernel: 3. Page fault / request virtual address space Kernel->>RAM: 4. Map Virtual Page to Physical RAM Frame RAM-->>App: 5. Execute instruction against physical bus
The Call Stack
  • Stores active function calls, local primitive variables, and return pointers.
  • Strict Last-In, First-Out (LIFO) memory structure.
  • Fast, fixed memory size; exceeding it triggers a StackOverflow.
The Managed Heap
  • Stores large dynamic objects, global state, and runtime data structures.
  • Requires explicit garbage collection or runtime memory tracking.
  • Unbounded growth causes memory leaks and triggers the Linux OOM Killer.

5. Summary: Operationalizing CS Fundamentals

Computer science isn't an isolated academic tower—it is the engineering playbook behind everyday systems administration. By understanding vector data structures, discrete logic sets, Big-O algorithm constraints, and virtual memory layout, you gain the ability to troubleshoot root causes rather than just treating symptoms.

Part 1 Knowledge Architecture Baseline
Data Geometry: College Algebra → Vectors & SIMD Acceleration
State & Logic: Discrete Set Operations & Graph DAGs
Performance Target: Replacing O(n²) nested loops with O(1) Hash Lookups
System Memory: Mapping Virtual Memory Pages & Stack/Heap Management
Establishing Theoretical Systems Mastery

With continuous mathematical structures, discrete logic maps, algorithmic scaling rules, and operating system memory layouts established, our foundation is complete. In the next part of this series, we move from hardware and low-level execution up into high-level software engineering: compilers, data structures, and systemic failure modes in distributed environments.



Accessibility
 --overview

API
 --REST best practices
 --REST demo
 --REST vs RPC
 --Wikipedia API

Blockchain
 --overview

Blog
 --The 'Brute Force' Mistake
 --The Bezosian Protocol: Eliminating Learned Helplessness
 --The Humility Protocol: Reality Over Reputation
 --The Jobsian Protocol: Systems Analysis as a War on Entropy
 --The Jordan Framework: Engineering a Competitive Edge
 --Time Management as an Operational System: The Tracy Framework
 --Tracy on Goals: Vector Alignment & Execution

Cloud
 --AWS overview

CSS/HTML
 --Admissions Portal Simulation Lab
 --Bootstrap carousel
 --Grid demo
 --markdown demo

DevOps
 --Agile Principles
 --DevOps overview
 --Drupal, containerized
 --Prometheus & Grafana
 --RKE2: Deploying the Rancher Kubernetes Engine

Encoding
 --Overview

Ergonomics
 --Desk configuration
 --Device fleet
 --Input device array
 --keystroke mechanics
 --Phones & RSI

ERP
 --Anthology overview
 --Ellucian Banner
 --Higher Ed ERP Simulation Lab
 --PeopleSoft Campus Solutions
 --PESC standards
 --Slate data model

Git
 --Authoring & Deploying the Post-Receive Hook
 --syntax overview
 --troubleshooting libcrypto

Hardware
 --Device fleet
 --Electricity fundamentals
 --Homelab diagram

Identity & Access
 --Deploying Entra Connect
 --Foundations
 --OIDC Integration
 --Provisioning Okta Dev Tenant

Java
 --Fundamentals

Javascript
 --Advanced Interaction: jQuery & UI Frameworks
 --input prompt demo
 --misc demo
 --Time and Date functions
 --Vue demo

Linux
 --Auditing the live interface state using ethtool
 --grep demo
 --HCI and Proxmox
 --Persistent Infrastructure Telemetry: TMUX
 --Proxmox install
 --xammp ftp server

Mail flow
 --DKIM, SPF, DMARC
 --MAPI

Microsoft
 --AZ-800: Administering Windows Server Hybrid Core Infrastructure
 --BAT scripting
 --Group Policy
 --IIS
 --robocopy
 --Server 2022 setup - Virtualbox

Misc
 --Applications
 --Computer Science Foundations
 --Field Notes: RainPoint Bluetooth Hose Timer
 --Protocols, TLS & Distributed Scale
 --regex
 --Resources
 --Runtimes, ASTs & Data Structures
 --Sustainable Computing
 --Terminology
 --Tribute to Computer Scientists

Networks
 --BGP Peering & Security Hardening Lab
 --CCNA Lammle Study Guide
 --Cisco 1921/K9 router
 --NGFW vs. Legacy
 --routing protocols
 --throughput calculations

PHP/SQL
 --Cookies
 --database interaction
 --demo, OSI Layers quiz
 --Foreign key constraint demo
 --fundamentals
 --MySQL and PHPmyAdmin setup
 --pagination
 --security
 --session variables
 --SQL fundamentals
 --structures
 --Tables display

Python
 --fundamentals

Security
 --Kerberos: Protocol Architecture
 --NTP Overview
 --Overview- GRC (Governance, Risk, and Compliance)
 --Security Blog
 --SSH fundamentals

Serialization
 --JSON demo
 --YAML demo