davidlyness [dot] com

Things I find interesting.

Posts in the Maths category (page 1 of 2)

In computing, a quine is a computer program which outputs a copy of its own source code. (See the Wikipedia page on quines for more information and examples.) I recently discovered a different sort of quine: mathematical ones.

Consider the function \[{1\over 2} < \left\lfloor \mathrm{mod}\left(\left\lfloor {y \over 17} \right\rfloor 2^{-17 \lfloor x \rfloor - \mathrm{mod}(\lfloor y\rfloor, 17)},2\right)\right\rfloor\] where
  • \(\lfloor x \rfloor\) is the floor function, i.e. the largest integer less than \(x\);
  • \(\bmod(b,m)\) is the modulo operation, which, when graphed over \(0\leq x\leq 106\) and \(n\leq y\leq n+17\) with n = 4 858 450 636 189 713 423 582 095 962 494 202 044 581 400 587 983 244 549 483 093 085 061 934 704 708 809 928 450 644 769 865 524 364 849 997 247 024 915 119 110 411 605 739 177 407 856 919 754 326 571 855 442 057 210 445 735 883 681 829 823 754 139 634 338 225 199 452 191 651 284 348 332 905 131 193 199 953 502 413 758 765 239 264 874 613 394 906 870 130 562 295 813 219 481 113 685 339 535 565 290 850 023 875 092 856 892 694 555 974 281 546 386 510 730 049 106 723 058 933 586 052 544 096 664 351 265 349 363 643 957 125 565 695 936 815 184 334 857 605 266 940 161 251 266 951 421 550 539 554 519 153 785 457 525 756 590 740 540 157 929 001 765 967 965 480 064 427 829 131 488 548 259 914 721 248 506 352 686 630 476 300.


This is known as Tupper's Formula (created by Jeff Tupper in 2001). It produces the following "graph".

quine picture

If you look closely, this graph is a bitmap which has been chosen out of all possible bitmaps of this size by the value of \(n\) specified above, making it not truly self-referential. A real (and complex) self-referential mathematical formula was created by Jakub Trávník earlier this year.


Last year I wrote and gave a presentation on the development of calculus through the ages - from the Ancient Egyptians through to modern times. I thought it might be interesting to give people a chance to look through it - and if you stick through it to the end you get a maths joke too!




(Use the fullscreen button to view it at a more readable size.)


One of the good things about maths is that everything you're working with must be "well-defined". That means that a precise mathematical definition must be given for anything you want to work with, be it functions, properties, operations or sets. And these definitions themselves must be based on even more fundamental concepts of mathematics, and so on. Eventually you get down to one of two things:
  • axioms, or
  • intuitive definitions.
Axioms are mathematical statements which are taken as "obvious" (I'll leave what "obvious" means in this context to the philosophers!) For example, an axiom saying that we can add two numbers together either way around and get the same result is called commutativity, and written \(a + b = b + a\). From this, and other axioms like it, we are able to build up all of the fundamentals of modern-day mathematics, which comprises the 1st year course in real analysis.

However, even these axioms have a more fundamental basis. If you visit the axiom link above, you'll notice that we define mathematical structures in terms of sets. Naive set theory tells us that a set is just a collection of objects - for example, an apple, a pear and an orange. We denote a set by putting curly braces around the objects in the set (called the elements of the set), and denote it by \[\{\text{apple, pear, orange}\}.\] Note that a set is uniquely determined by its elements - that is, if two sets contain precisely the same elements as each other, we say they are equal. We can also write \(x\in X\) to mean that "\(x \text{ is an element of the set } X\)". Two more simple rules about sets:
  • The way a set is ordered is irrelevant: \(\{\text{apple, pear}\} = \{\text{pear, apple}\}\).
  • Duplicates in a set are irrelevant: \(\{\text{apple, apple}\} = \{\text{apple}\}\).
Being mathematicians, we usually prefer to work with numbers rather than fruit. So, the set of non-negative whole numbers less than 10 would be \(\{0,1,2,3,4,5,6,7,8,9\}\), the set of square numbers less than 100 would be \(\{0,1,4,9,16,25,36,49,64,81\}\), and so on. In particular, we call the set containing no elements the empty set, and write it as \(\emptyset\). But what if we wanted a list of all the non-negative whole numbers? We'd write it as \[\{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,...\},\] and we soon see that it would be quite impossible to write them all down! Such a set is said to be infinite - it has infinitely many elements. Since we can't denote such a set by writing down all the elements, we denote it by using a symbol - in the case of the example above, \(\mathbb{N}\). We have more symbols for other infinite sets:
  • \(\mathbb{Z}\) for the set of all whole numbers (both positive and negative);
  • \(\mathbb{Q}\) for the set of all fractions;
  • \(\mathbb{R}\) for the set of all real numbers, which include numbers like \(\pi\).
If you look closely you can see that every element that is in \(\mathbb{Z}\) is also in \(\mathbb{Q}\) - in this case, we say that "\(\mathbb{Z}\) is a subset of \(\mathbb{Q}\)", and denote it by \(\mathbb{Z}\subseteq \mathbb{Q}\). In actual fact, each of the sets I mentioned above is a subset of its successor, and we can say \[\emptyset\subseteq \mathbb{N}\subseteq \mathbb{Z}\subseteq \mathbb{Q}\subseteq \mathbb{R}.\] Finally, a common practice is to define a set by specifying that all of the elements in that set must have a specific property. For example, above we defined the set of non-negative whole numbers that were less than 10. We would write this mathematically as \[\{ x \in \mathbb{N}:x < 10\}.\] This is how mathematicians proceeded for many years, and everyone was satisfied with this intuitive definition of sets. However, in 1901 a mathematician named Bertrand Russell published a paper in which he outlined a paradox derived from the very foundations of set theory. He proposed the following: take a set \(R\), which contains the sets which do not contain themselves: \[R=\{x:x \notin x\}.\] So far so good, as long as you can wrap your head around the notion of what a set containing itself would "look like". But there's nothing in our rules which says this cannot be defined. He then asked the question: does \(R\) belong to itself: is \(R \in R\)? There are two possibilities, either \(R \in R\) or \(R \notin R\). We consider each case in turn.
  • \(R \in R\): then by definition \(R\) does not contain itself, and so \(R \notin R\), which is a contradiction.
  • \(R \notin R\): then \(R\) does not satisfy the property of elements of \(R\): namely, it is false that \(R\) does not contain itself. Therefore \(R \in R\), which is again a contradiction.
In the second post on this topic I'll talk about how this issue was solved, and some interesting concepts that arose in set theory thereafter, which I've been studying this term.