Fun personal project that pushes me to try new things.
I started a home lab to experiment with and better understand a variety of tech.
Training an LLM from scratch on old hardware. Without too much cloud-AI guidance, create an AI assistant.
A real-time fantasy app made with Node.js to better understand controlling an AI.
A little web app that visualizes symmetry planes in 3D space.
Fine-tuning a Stable Diffusion AI models to learn, recognize, and manipulate specific animation styles and characters.
Exploring mathematical concepts and how well we can come to understand them.
My tutoring site and business to help students not only learn about, but also learn to enjoy science.
This is a gym tracking app to help users monitor their fitness goals. The goal is to log data to train an AI model create very personalized workouts.
Sometimes I come across interesting math problems/concepts that I want to share. This page keeps me from boring others with my ramblings. Do not take everything I say as gospel, but this is my understanding of these concepts.
The goal of Cryptography is pretty much to say how can we make a puzzle easy for us but super hard for everybody else. We want to be able to talk without other people understanding us, even if they are listening. If you ever had one of those toys where you spin around a disk with an alphabet and it lines up with another alphabet to send your buddy a secret message, you have already been indoctrinated into the world of cryptography, with the classic Caesar cipher. Trust me, it gets way deeper. Every time you interact with the internet, you are using a bunch of complex math to do the same thing as that toy, except for way more secure.
People have spent forever trying to figure out how to do this, because it is an insane task. your little phone, or computer, has to be able to communicate with a server in microseconds in a way that some of the best computers on earth couldnt figure out for hundreds of years. This math is crazy, and it is getting way wilder with quantum computing being the cool new thing.
The prime numebrs are kind of insane to think about. Every number can be broken down into a unique set of primes. They are also famously hard to find. We have been trying to discover their secrets for litterally hundreds of years, and the best we got is an estimate for where they might be. There is no proven formula for finding every prime number. And we only have incredibly slow algorithms for definitively knowing if a number is prime. And when I say slow, I mean that it would take the age of the universe to find out if a number with 100 digits is prime. This is what makes them so useful for cryptography, because we can use them to create puzzles that are easy to make but hard to solve. Now, with the rise of quantum computing, prime numbers are kind of loosing their spotlight in this world because they are just too good at cracking our current prime puzzles. That is where lattice, eliptic curve, and many other types of cryptography come in. I still think we can talk about primes for now though, because they are still cool.
Lets take a look at how fast your computer can test for primes.
These are implementations of four primality testing algorithms I wrote for a cryptography course. Enter a number and run any combination of tests to see how they compare in speed and result. Note: AKS is a deterministic test (it gives a guaranteed answer) but is dramatically slower than the probabilistic tests.
(probably good) Primes
All tests agree: prime
Carmichael Numbers
Fool Fermat — caught by Miller-Rabin & Baillie-PSW
Strong Pseudoprimes
Can fool single-round Miller-Rabin (base 2)
I learned about these special lenses called caustic lenses. They are really interesting because they use refraction to focus light in purposeful ways. It becomes a fun interaction between the physics and the fabrication challenge. If you have every looked at the bottom of a pool on a sunny day, you are witnessing the effect we are trying to recreate. the light refracted by the medium of moving water creates beautiful patterns and distinct lines. If you are anything like me, you have wondered if you could control this effect. This is what caustic lenses do.
Moitivation: I wanted to try to derive the math and physics that governs this behavior. Also I thought it would make for a great business card. Although it makes it a little bit of a pain to have to have sunlight to see the effect. I would just add a little nfc chip to bring people to my resume if they couldnt see the effect.
I started by trying to think of a cheap way to get a clear medium that I could easily deform. I thought the clear storage containers from a department store would work well. I opted for the thick plastic ones as they are quite transparent (the cheap ones are pretty opaque, but they might be able to get the job done). My first idea to deform them is writing gcode for my 3D printer to just melt the platic to the right depth and pattern. I first, needed a proof of concept, so I have been trying to melt some with my wood carver.
This first attempt was rought. I was able to cast shawdows, but not really bend any light because the melted plastic was just forming blobs rather than smooth gradients. There was too much internal refraction from the blobs to get any real control over the light. From here I think I have two options :
I do not know why I love this thing, but it provides me with a whole lot of joy. I think it may be because I never thought of changing the exponent of a circle equation, but look at that. Isnt that so cool? set it to 1. It;s a square. From 1 - 2, it is what my favorite math man, Matt Parker, likes to call the "Ciare" (the opposite of a squircle). then you get a circle. Then, beyond that, it tries to become a square again. That just makes me happy.
I am not too much of an expert on geometric symmetries in math, honestly I am not even close. But I find them so ridiculously fun to play with. finding symmetries in across math is so beautiful and satisfying. I was watching a video about creating false objects with mirrors and just wanted to screw around with it myself. It led me to the discovery of Maths City in Leeds. This place is awesome, I really want to go take a trip. Anyways, I wanted to create a similar thing with mirrors, but unfortunately, I did not have any extra mirrors laying around, or much denero to waste on seeing something cool in a mirror, so I (along with a good bit of AI) just made a little symmetrical plane thing. Try it out! Find out how many shaped you can make by just drawing one or two lines. It is kind of a lot to fit on a page with other stuff, so I just made it its own page.
Click here to for full screenNote: (Yes the axes are cartesian coordinates and the translation/rotation sliders are in polar, It feels more natural to me). Also please let me know if you have any suggestions on how this works, I am always trying to make it more intuitive.
Here is a little example of an octahedron you can make with just a line. The highlighted orange line is the only line that I have drawn to create the octahedron. It is also a preset I made along with some others. There is also some more presets that I encourage you to try out, do some math to get some perfect setups. If you find any more configurations of planes, send them to me, I would love to add some more presets to the page!
Here are some platonic and catalan solids. In theory, you should be able to make these with just a couple of lines and some well placed axes of symmetry.
|
|
These were taken from this site symmetry-us.com
Another very cool site to screw around with is this polyhedra viewer by tesseralis. If you are struggling to understand the diferent axes of symmetry, I strongly suggest this site. It is also incredibly useful for understanding how different shapes have the same symmetries.
Paul Erdős was one of the most prolific mathematicians in history, and he had a charming habit of offering cash prizes, ranging from a few dollars to thousands, for solutions to problems he found particularly interesting or difficult. These "Erdős problems" span number theory, combinatorics, graph theory, and more, and many remain unsolved to this day. He was one of the most interesting people, but his problems were even more interesting. I have this whole section dedicated to his problems becuase I researched him for a school project and became infatuated with his work. If you are ever bored and feel like taking on a challenge, you should check out this site. It is a whole website dedicated to these problems. Even if you are not a huge math person, you should check it out. Some of these problems seem so simple, they just need the right mind to take a look at them.
Erdos ProblemsIf you dont feel like sticking to Erdos, Check out this site with a bunch of other open problems.
Open Problem GardenThis is a fun one that Paul Erdos asked Norman Anning. I will propose you the same question.
Can you have infinite points all an integer distance apart? Obviously the answer is yes — just arrange the points in a line, all 1 unit apart. Every point is immediately a multiple of 1 away from each other. We can have infinite points and just keep adding them 1 unit from the last.
This was a little too easy so let's ask something else. Can you have infinite points all an integer distance apart, not all in a line? Well if we just take the same solution and shift it a little, let's keep the same line and just move one point above it.
We can see that the bottom points still remain an integer distance away from each other, so all we need to think about is the distance from the top point. We can condense this problem down to just solving the triangles. For a moment let's consider the real numbers instead of integers — we can construct our triangles like this, adjusting by (x − 1/x) for each new point. Now if we want to make these integers we can adjust all locations by a factor of N!/2. Every distance becomes an integer!
So here, yes we can have infinite because we can just add two add (x-1/x) for each point we want next (We can see the Distance from point A is the named variable). Now if we want to make these integers we can just multiply just adjust all locations by a factor of N!/2. Check it out, Every distance is an integer!
Is this infinite? It almost appears so — but then we realize that for infinite points, A must be an infinite distance away. Unfortunately, infinity is not an integer, nor a real number, so we cannot have them all an integer distance away. This shows this arrangement cannot be infinite. My first proof of this with Norman Anning was quite long and complex, but it did provide a solution. I later came up with a proof that I believe was straight from the Book:
If $A, B, C$ are three points not in a line and $k = \max(AB, BC)$, then there are at most $4(k+1)^2$ points $P$ such that $PA-PB$ and $PB-PC$ are integers. For $|PA - PB|$ is at most $AB$ and therefore assumes one of the values $0,1,\ldots,k$, that is, $P$ lies on one of $k+1$ hyperbolas. These distinct hyperbolas intersect at most $4(k+1)^2$ points. An analogous theorem clearly holds for higher dimensions.
Here we can see it visually by the intersections of the hyperbolas. The points in our set must lie on an intersection of the green and blue hyperbolas. Two hyperbolas can only intersect 4 times, so the places where our points can be are finite. Dragging around $B'$ and $C'$, you can see that these hyperbolas always will satisfy $|P'A - P'P_1| \le k$.
This is called Bertrand's Postulate. It is one of Paul Erdos most famous proofs because it was when He first displayed what a proof from the Book looked like.
Let $\displaystyle \binom{2n}{n}$ denote the central binomial coefficient. A standard inequality gives \[\binom{2n}{n} > \frac{4^{\,n}}{2\sqrt{n}}. \tag{1}\]
Write $\displaystyle \binom{2n}{n} = \prod_{p \le 2n} p^{a_p}$ as a product over primes. For a prime $p > n$, we have $a_p = 1$, since such a prime occurs only once in the numerator of $(2n)!$ and not in $n!\,n!$. For $p \le n$, the exponent satisfies \[a_p \le \left\lfloor \frac{2n}{p} \right\rfloor - 2 \left\lfloor \frac{n}{p} \right\rfloor.\]
Assume, for contradiction, that there are no primes in the interval $n < p \le 2n$. Then \[\binom{2n}{n} \le \prod_{p \le n} p^{a_p} < \prod_{p \le n} p. \tag{2}\]
A classical Chebyshev-type estimate gives \[\prod_{p \le n} p < \frac{4^{\,n}}{2\sqrt{n}}. \tag{3}\]
Combining (1), (2), and (3), we obtain the contradiction \[\binom{2n}{n} > \frac{4^{\,n}}{2\sqrt{n}} \qquad\text{and}\qquad \binom{2n}{n} < \frac{4^{\,n}}{2\sqrt{n}}.\]
Thus our assumption was false. Therefore, there exists at least one prime in the interval $(n, 2n]$, proving Bertrand's Postulate.
This proof was pretty cool because it initiated the field of incidence geometry. It also uses one of my favorite principle names — the pigeonhole principle. This is the principle that if you have n holes and n+1 pigeons, at least one pigeonhole will have two pigeons in it. Sounds so obvious, but it is amazing how useful it is. It is used to show that if there are not enough options for multiple things, then some of those things must be the same, or share things.
Let $P$ be a set of $n$ points in the plane and let $D$ be the number of distinct distances determined by $P$. For each point $x \in P$, let $n_x(d)$ be the number of points at distance $d$ from $x$. Then the number of isosceles triangles with apex $x$ is $\sum_{d} \binom{n_x(d)}{2}$. Summing over all $x$ gives \[T = \sum_{x \in P} \sum_{d} \binom{n_x(d)}{2}. \tag{1}\]
By Cauchy–Schwarz, \[\sum_{d} \binom{n_x(d)}{2} \ge \frac{1}{2D} \left(\sum_{d} n_x(d)\right)^2 = \frac{(n-1)^2}{2D}.\] Summing over all $x$ yields \[T \ge \frac{n(n-1)^2}{2D}. \tag{2}\]
On the other hand, each base of an isosceles triangle determines its apex uniquely, so trivially $T = O(n^2)$. Combining (1) and (2) gives \[\frac{n(n-1)^2}{2D} = O(n^2),\] hence \[D \ge c\, \frac{n}{\sqrt{\log n}}\] for some absolute constant $c > 0$. Thus the point set determines at least $\dfrac{n}{\sqrt{\log n}}$ distinct distances.
This question helped spark Ramsey theory and was one of the earliest results in combinatorial geometry. We named it the Happy Ending Theorem because my two coauthors began dating shortly after and got married.
Sort the five points by increasing $x$-coordinate and label them $P_1, P_2, P_3, P_4, P_5$. Consider the sequence of slopes of the segments $P_i P_{i+1}$. Each point $P_i$ (for $i = 2, 3, 4$) is either the vertex of a "cup" (a convex upward triple $P_{i-1}, P_i, P_{i+1}$) or a "cap" (convex downward triple).
By the pigeonhole principle, among the three interior points $P_2, P_3, P_4$, at least two form the same type (both cups or both caps). If $P_j$ and $P_k$ ($j < k$) are both cups, then the four points $P_{j-1}, P_j, P_k, P_{k+1}$ form a convex quadrilateral. The same argument works if they are both caps.
Thus any five points in general position contain a convex quadrilateral. $\square$