Create wiki/stem/computer-science.md
75cd3c102501 harrisonqian 2026-04-12 1 file
new file mode 100644
index 0000000..dc275da
@@ -0,0 +1,53 @@
+---
+visibility: public-edit
+---
+
+# computer science
+
+the digital world is built on math. not approximately, not metaphorically — literally. every computer, every app, every website is a tower of mathematical abstractions from boolean logic at the bottom to algorithms at the top.
+
+## boolean algebra → circuits → computers
+
+in 1937, claude shannon's master's thesis showed that boolean algebra (true/false, AND/OR/NOT) could be implemented with electrical switches. this single insight is the foundation of all digital computing. every transistor in your phone is computing a boolean function. a modern chip has billions of them, all doing math.
+
+the instruction your CPU is executing right now — reading a value from memory, comparing two numbers, jumping to a different part of the program — is a sequence of boolean operations on binary numbers. [arithmetic](/wiki/immediate/arithmetic-everywhere) at the hardware level.
+
+## algorithms and complexity
+
+an algorithm is a precise mathematical procedure for solving a problem. the key question isn't just "can we solve it?" but "how fast?"
+
+complexity theory classifies problems by how their difficulty scales:
+- **O(1)**: constant time. looking up an element in a hash table. doesn't matter how big the table is.
+- **O(log n)**: binary search. searching a sorted list of a million items takes ~20 steps.
+- **O(n)**: linear. reading every element once.
+- **O(n log n)**: sorting. the best you can do for comparison-based sorting (connects to [ordering](/wiki/immediate/ordering-and-comparison)).
+- **O(n²)**: quadratic. naive pairwise comparison. starts hurting around n = 10,000.
+- **O(2ⁿ)**: exponential. brute-force search. at n = 100, there are more possibilities than atoms in the universe.
+
+the P vs NP problem — are there problems that are easy to verify but hard to solve? — is one of the millennium prize problems. a million dollars if you solve it. most computer scientists believe P ≠ NP, which means there are inherently hard problems that no clever algorithm can make easy.
+
+## cryptography
+
+the security of the internet rests on a mathematical asymmetry: multiplying two large prime numbers is easy, but factoring the result back into primes is (believed to be) hard.
+
+RSA encryption works because of this. your browser uses it right now. the math is number theory — a branch of "pure" math that was considered the most useless branch of mathematics for centuries. G.H. Hardy, the famous number theorist, wrote proudly that his work had no practical applications. he was wrong — it now secures trillions of dollars in transactions.
+
+this is a beautiful example of [abstraction as power](/wiki/structural/abstraction-as-power): the most abstract math becoming the most practical.
+
+## information theory
+
+shannon (again) founded information theory in 1948. the key idea: information can be measured mathematically, in bits. a fair coin flip is 1 bit of information. a die roll is log₂(6) ≈ 2.58 bits.
+
+shannon's theorems set fundamental limits on communication: there's a maximum rate at which you can transmit information through a noisy channel, and no encoding scheme can beat it. every wifi standard, every cell phone protocol, every streaming video codec is engineered to approach these mathematical limits.
+
+the connection to [probability](/wiki/immediate/probability-in-daily-life): information theory is deeply connected to probability. the "surprise" of an event is -log₂(probability). unlikely events carry more information than likely ones. "the sun rose today" is low-information; "a meteor hit the earth" is high-information. entropy — the average surprise — measures uncertainty.
+
+## machine learning and linear algebra
+
+modern AI is mostly [linear algebra](/wiki/structural/linear-algebra-as-thinking) and [calculus](/wiki/structural/calculus-as-thinking). a neural network is a sequence of matrix multiplications and nonlinear functions. training is gradient descent — [multivariable calculus](/wiki/structural/multivariable-calculus-as-thinking) applied to a loss function with millions of parameters.
+
+the semantic space example from my essay is a direct application: word embeddings represent meanings as vectors, and the geometry of the vector space captures semantic relationships. "woman" + "king" - "man" ≈ "queen" works because the vector arithmetic in embedding space mirrors conceptual relationships.
+
+## the deep point
+
+computer science demonstrates that math isn't just about numbers — it's about computation, information, and the fundamental limits of what can be known, computed, and communicated. some problems are provably unsolvable (the halting problem). some are solvable but take longer than the age of the universe. understanding these limits is itself a mathematical achievement.
\ No newline at end of file