december, 2024
a lot a change in a semester, here's what i've been up to :D
clearly a thing that i have not learned this year is actual web development, since this website is still made entirely of straight html and css >:D
fall was a good and busy time. unlike fall of 2023, when i was swamped beyond belief with a intense course schedule, squeezing in social time in between the crevices of time blocked out for academic work in my google calendar, time of this fall was quite evenly distributed between my many commitments. i'll mostly talk about classes for this one, but also, i wrote down a few semesterly goals in august, and thought that i'd share a few of the accomplished ones with the class.
i also took classes. this was a decently low load semester. i won't go too much into the course content, but here are my favorite bit of information i've learned from each:
proving that a plane can only be tiled with three types of regular polygons (triangles, squares and hexagons) through euler's formula, the handshake lemma and the faceshake lemma, all of which are elementary results of studying planar graphs.
euler's formula states that for a planar graph:
\[ e + 2 = n + f\]
where \(G = (V, E)\), \( e = |E| \), \( n = |V| \), and \(f\) is the number of faces the planar graph \(G\).
the handshake lemma states that the sum of node degrees in a graph is equal to double the number of edges, which is an intuitive result:
\[ \sum_{v \in V} deg(v) = 2e \]
and lastly, the faceshake lemma (as dubbed by my professor, shoutout to gabor) is the equivalent of the handshake lemma for the faces in a planar graph, stating that the sum of face degrees (or the number of edges that make up a face) is equivalent also to double the number of edges. also quite intuitive:
\[ \sum_{f \in F} deg(f) = 2e \]
the handshake and faceshake lemma are simplified to \( nk = 2e \) and \( fl = 2e \) respectively, with \( k \) being the degree of each node, and \(l\) being the number of sides of the polygon that we wish to tile with. these simplifications come from our original assumption of a tiling of the plane with regular polygons.
it turns out that that is enough for us to concretely say something about the polygons we can use to tile a 2D plane with. with some algebraic manipulations and number theory, we find eventually that the only integer \(k\) and \(l\) that satisfy our given constraints are \(k = 6, l = 3\), \(k = 4, l = 4\), \(k = 3, l = 6\), which corresponds to triangles, squares and hexagons, respectively.
isn't it pretty cool that elementary results in graph theory can tell you something so general about all the regular tilings of a plane? :D
proving that the traveling salesperson problem (TSP) is NP complete.
back in highschool i did a project on various exploration and exploitation strategies in genetic algorithms evaluated on the traveling salesperson problem, and i distinctly remember writing in my final paper that TSP is NP-complete, without really understanding what it meant. i then went on to study computer science and mathematics in college, where i heard these terms thrown around for some more years, still without enough context on complexity classes.
and so, it genuinely felt like a full circle moment when we learned about P and NP in this class, both concretely defining what it meant for a problem to be NP-complete, and proving that the traveling salesperson problem did in fact belong in it. the actual proof, which involved a polynomial time mapping reduction from the hamiltonian cycle problem, was not exactly exciting, but finally grasping something previously out of my intellectual reach was of course satisfying.
i also saw a bunch of very interesting, creative and sometimes unintuitive proofs in this class. notably, the proof that language \(L\) is regular iff \(\exists\) a regular expression \(R\) s.t \(L(R) = L\), and the reduction from 3SAT to the subset sum problem.
generative adversarial networks, which is quite frankly a pretty cool idea for a neural network architecture. the essence of it lies in having two models, one named the generator and the other the discriminator, with the former attempting to generate images that are in distribution for the training data, and the latter attempting to distinguish between generator created images and real images in the training set. this creates a little adversarial game where the discriminator is attempting to minimize classification loss, while the generator is trying to maximize it.
in an alternate universe i'd like to imagine that the generator and the discriminator could have a enemies to lovers arc...
the architecture of the generator is also quite cool. it takes in a vector of noise, and through many layers of deconvolutions, upscales the noise into image outputs. with the discriminator's feedback, it updates the weights of the many layers, including the deconvolution ones, and iteratively improves the quality of the images generated.
i spent most of this class writing about myself, and my places, and my travels. i used this class as an excuse for many late night walks through the city, and as a creative outlet in a otherwise very stemmy (science, technology, engineering, math-y) semester. given the absent of a cool cs or math tidbit, here's two of my favorite paragraphs that i wrote for this class.
on my home in Lima: My parents are plain and practical people, and our house reflects their philosophy. The walls are bare and a simple shade of white, etched by scratches and pen marks - early abstract artworks of my little sister. They still hand wash all of their dishes and hang out clothes to dry. The furniture is minimal, purchased when they bought their first apartment in Peru. It survived several moves, ending up in our current home. My dad does have a particular appetite for hardwood tables. Every two years or so, I’d come home to an unexpected, shiny new dining table, so heavy that our whole family would come together to lift it to the living room. And then came the task of finding another suitable purpose for the old one, will it go in the kitchen, continuing its service as a second dining table, or out in the backyard, for when extra workspace is needed for a barbeque? Like many Chinese people that grew up in an era of famine and poverty, my parents are hoarders. We throw out nothing, and every piece of furniture we have ever owned sits somewhere in the house, in an ordered, but cluttered, fashion.
on traveling in Lisbon: During my many walks up to Barrio Alto (literally the “tall” neighborhood), Chiado and Cais Do Sodré, I found myself more than once cursing the Portuguese settlers that decided to put Lisbon there, out of all the places it could have been. Both Lisbon and Cusco are what I like to call stairmaster cities, where every inch of horizontal displacement is accompanied by significant vertical displacement, and going from point A to a point B a hundred feet away involves first tumbling down a gigantic set of stairs, and then crawling up the other side.