Posts

Showing posts with the label algebra

Dobble Connect

Image
    I was given a new version of Dobble for Xmas called Dobble Connect.  Dobble consists of stack of cards with pictures on it where each pair of cards has one match, and each pair of symbols appears on one card.  This is a new version which has 91 symbols in total, 10 symbols per card, and 91 cards.  The fingerprint of the original Dobble was (57 symbols, 8 symbols, 57 cards). An additional innovation in Dobble Connect is that the cards are hexagonal and grouped into a colour per player.  Players build a tiling on the tabletop, placing cards next to each other as soon as they spot a matching symbol between their top card and one of the cards already placed.  The first player to get four of their own colour in a row wins. How is it possible for each pair of cards to have one and only one symbol in common, and for each pair of symbols to appear on one and only one card?  Does that have something to do with the strange number 91?  The answer is "yes" and it turns out this is o

Cayley graphs for all orthogonal symmetries of Platonic solids

Image
Generator symmetries c, b, and a, applied sequentially to the octahedron, resulting in a composite operation of order 2 I've become a bit obsessed with Cayley graphs recently. I figured out a way to construct a graph for the rotational symmetries of the 5 Platonic solids, and the result was quite elegant, I thought.  And it seemed to me that extending this to the complete set of  orthogonal symmetries (which includes reflections) should be quite simple - it is just twice the number of nodes after all.  However,  it took a surprising amount of staring into the middle distance and mumbling to myself to come up with the answer. And I'm going to describe its construction in this post.  As an example I'm using the octahedron here,  but the construction works in exactly the same way whichever solid you choose.  My generators I'm calling $a$, $b$, and $c$, where $a$ is a clockwise rotation of a face,  $b$ is a clockwise rotation around an adjoining vertex,  and $c$ is a reflec

Cayley graphs for rotational symmetries of Platonic solids

Image
In the previous post I used a short python program to draw a Cayley graph for the rotational symmetries of the cube.  The result was a rhombicuboctahedron, a kind of cross between a cube and an octahedron. Now,  these two platonic solids are "duals" of each other, which is to say that if you start with one and draw a node for each face,  and an edge for each pair of faces that meet, you end up with the other! Is there a pattern here? Can we choose generators for the rotational symmetry groups of the other platonic solids so that the resulting Cayley graphs look like crosses between the original solids and their duals? First let's see if we can find a generic representation for the rotational symmetry group.  Let's assume our solid has $n$ sided faces and the vertices are all of degree $m$. If $a$ is a clockwise rotation about one face and $b$ is a clockwise rotation about an adjoining vertex then $ab$ flips an edge about its midpoint, which implies $(ab)^2=1$. This su

Creating Cayley Graphs from Group Presentations

Image
Definitions: A Cayley graph is a directed graph showing how to get from any element of a group to any other using only a finite number of "generator" elements.  For example, in the group $\mathbb{Z}_2\times\mathbb{Z}_2$ we could use the generators $a = (1,0)$ and $b = (0,1)$ and we'd end up with a graph that looks like a square with arrows going round the edges. A Group presentation defines a group by specifying generators and relations between them.  For example the presentation $\langle a,b \vert a^2=1,b^2=1,aba^{-1}b^{-1}=1\rangle$ specifies a group.  In fact the group it specifies is isomorphic to  $\mathbb{Z}_2\times\mathbb{Z}_2$ and we can prove this using the facts that $a$ and $b$ commute and both have order 2.  In this case it's easy to see what group we have but in general it's a bit more difficult.  A useful first step would be to be able to draw the Cayley graph automatically. Question: Is it possible to automatically generate a Cayley graph from a g

Pythagorean Triples

Image
A Pythagorean triple is a set of three non-zero integers $a,b,c$ satisfying Pythagoras' formula $$ c^2 = a^2 + b^2 $$ Pythagoras certainly wasn't the first to know that this formula applied to the sides of right angled triangles, or to compile lists of Pythagorean triples, but he may have been the first to present a proof .  In this post I'm going to show a simple method of finding all Pythagorean triples, using complex numbers. First we need to introduce Gaussian Integers .  These are complex numbers $z=a+ib$ where $a,b$ are integers.  If $z$ is any complex number then, since multiplication is commutative, $$ (zz^*)^2 = z^2(z^2)^* $$ However, in the case where $z$ is a Gaussian Integer the LHS is a square of an ordinary integer, and the RHS is the sum of two squares of integers.  For it to be a sum of two non-zero squares we need $z^2$ to be neither purely real or purely imaginary, or equivalently, that $z$ is neither purely real, purely imaginary, or on a diagonal $a =

Why $\sqrt{2} \ne \frac{7}{5}$ (or similar sort of thing)

Image
Why does $\sqrt{2} \ne \frac{7}{5}$?  Well, if it did, we could draw a square of side 5 and diagonal 7 Not in proportion! Then, by removing 5 from the diagonal we could create a second square of side 2 and diagonal 3, which would mean $\sqrt{2} = \frac{3}{2}$, which is a  different fraction to $\frac{7}{5}$. Actually, we can easily generalize this argument to show that if $$ \sqrt{2} = \frac{a}{b} $$ for some whole numbers $a$ and $b$, then $$ \sqrt{2} = \frac{c}{d} $$ for some smaller whole numbers $c \lt a$ and $d \lt b$.  Repeating this argument over and over leads us to the conclusion that $\sqrt{2}$ is a whole number itself!  This is clearly incorrect and leads us to the conclusion that we can't in fact write $\sqrt{2}$ as a fraction. This is not a particularly modern way to prove the existence of irrational (non-fraction) numbers, but it is - supposedly - how the ancient Greeks originally did it!  Unfortunately the person who discovered this fact, Hippasus of Metapontum , fo

The Debugger's Theorem

Image
This reminder has been on a wall in my house for ~15 years As a programmer for 22 years I've fixed thousands of bugs, and created many times more.  Very often it appeared that the problem I was trying to fix had multiple independent causes.  However I have found - almost invariably - that if you dig long enough you'll find a single cause for all the problems you are seeing.  In fact the moment you hit on the right theory is often really obvious because it suddenly explains a whole bunch of other things that have been going wrong!  But, I wondered, can this observation be proven mathematically?  It turns out it can! The Debugger's Theorem If a system that usually works currently isn't working, then it is more likely than not that there's just one thing causing all the observed problems. Proof Let $P_0$ be the probability that the system has no problems, $P_1$ be the probability that one independent problem has occurred, $P_{2+}$ the probability that two

Trisecting the Angle

Image
Credit: Teodomiro, wikipedia.org The ancient Greeks were obsessed with ruler and compass constructions, and they had a lot of successes.  They bisected angles, constructed pentagons, and much more.  One thing that eluded them was finding a general method for trisecting an angle.  Although they could trisect certain angles, e.g. $90^{\circ}$, they tried in vain to come up with a general recipe given just three starting points. It turns out that trisecting an angle is in general impossible, but the proof that this is the case had to wait for some mathematics developed by Galois.  In this post I'll give a proof using polynomials, fields , and vector spaces . Most impossibility proofs work the same way.  First you identify some property which remains invariant with each step, and then you show that the property would need to change to get to the final state.  In this case the property is very abstract.... The Invariant Property Let $\mathbb{F}_0$ be the minimal subfield of

Epicycles

Image
Any orbit can be represented given enough epicycles. The Geocentric Model The geocentric model was wonderful for human self aggrandizement.  We belonged at the centre of the universe and everything revolved around us.  That early humans believed this isn't that surprising.  After all the Sun, moon, and stars do seem to move in circles around us (albeit different ones).  What's more interesting is how we attempted to cling on to this theory in the light of a) conflicting evidence, and b) a far better explanation. David Deutsch in The Fabric of Reality puts forward the view that the point of a scientific theory is to explain .  The more a theory explains - whilst still remaining consistent with observable facts - the better it is.  This is a philosophical justification for Occam's Razor.  Why is an explanation with fewer postulates better than one with more postulates? because it leaves less unexplained! The earliest theory for why the planets did not move in sim

Dobble

Image
I discovered the card game Dobble a few days ago whilst visiting relatives in Germany.  There are 57 cards with 8 symbols on each.  To play the most basic version of the game you deal the cards face down between the players such that one card remains (if there are an odd number of players you may need to hold back more than 1 card).  Then you turn face up the remaining card (or one of the remaining cards) and each person turns their top card face up. The first person to spot a symbol on their own card that matches one on the left over card shouts out the name of that symbol (e.g. "car!") and gets to move their card to the top of the shared stack; the others move their top card to the bottom of their own stack.  The winner is the person who gets rid of their cards first. At first sight this doesn't seem very mathematical.  However, after a while I noticed something odd about the cards: every card shares exactly one symbol with each other card in the pack.  I thou

Determinants and parallelepipeds

Image
Connecting Geometry and Algebra Matrix determinants have the following strange definition that seems to have been pulled out of thin air: $$ det(A) = \sum_{\sigma}{sign(\sigma)a_{1\sigma(1)}...a_{n\sigma(n)}} $$ where $A = (a_{ij})$ is a real $n\times n$ matrix $\sigma$ ranges over all permutations of $\{1,...,n\}$ $sign(\sigma)$ is $+1$ if $\sigma$ is a product of an even number of transpositions and $-1$ otherwise$^\dagger$ However, in the geometric world the definition is far more intuitive: The determinant of A is the volume of the parallelepiped formed by its columns, multiplied by minus one if these have the opposite handedness to the unit vectors. Why are these two definitions the same?  To begin to answer this we need to first define elementary matrices and then show that every square matrix can be written as a product of these. Definition The elementary matrices are $E_{i, j}$ for $1 \le i,j \le n$ $E_{i,\lambda}$ for every real $\lambda$ and $1 \l

Fundamental Theorem of Algebra

Image
Theorem of the week This week's theorem of the week is the fundamental theorem of algebra , and the picture is the proof! Theorem Every non degree-zero polynomial $p(z) = a_nz^n + ...+ a_1z +  a_0$ has a root in $\mathbb{C}$. Picture proof To see how the picture proves this, write $z$ as $Re^{i\theta}$, then for all $k$ $$ z^k = R^ke^{k i \theta} $$ So for sufficiently large $R$ the $a_nz^n$ term dwarfs all the others and so the image of $\{z\in\mathbb{C}: \lvert z \rvert = R\}$ must go around the origin $n$ times, like the rubber band in the photo.  But when $R= 0$ the image is just $\{a_0\}$ which goes around the origin zero times.  So, for some $0 < r < R$ the image of $\{z\in\mathbb{C}: \lvert z \rvert = r\}$ must cross the origin.  QED. Less handwavy proof In order to obtain a contradiction assume $p(z)$ has no zeros.  Then $\frac{z^{n-1}}{p(z)}$ is everywhere differentiable, which in turn means that its closed loop integrals are zero$^{(\dagger)}$.